Package: @contentstack/datasync-manager v2.2.0 (README on main has the same issue)
Problem
The README documents init sync filters like this:
filters: {
content_type_uid: ['blogs'],
locale: ['en-us'],
action: ['publish', 'unpublish']
}
That does not match the Sync API or what the manager actually sends.
What actually works
Per the Sync API docs, initial sync (init=true) uses the query param type, with values like entry_published, asset_published, entry_deleted, content_type_deleted, etc. — not publish / unpublish.
The manager forwards filter keys verbatim to the API (dist/core/index.js):
request.qs[filter] = filters[filter].join(',');
So action: ['publish'] becomes ?action=publish, which the Sync API does not support. A working config looks like:
filters: {
type: ['entry_published', 'asset_published', 'entry_deleted', 'content_type_deleted']
}
Suggested fix
- Replace
action with type in the README.
- Document Sync API event type values, not store method names (
publish / unpublish / delete).
- Note that filter keys are passed through as-is to Sync API query params.
We ran into this building an init sync that replays historical deletes via content_type_deleted. Happy to open a README PR if useful.
Package:
@contentstack/datasync-managerv2.2.0 (README onmainhas the same issue)Problem
The README documents init sync filters like this:
That does not match the Sync API or what the manager actually sends.
What actually works
Per the Sync API docs, initial sync (
init=true) uses the query paramtype, with values likeentry_published,asset_published,entry_deleted,content_type_deleted, etc. — notpublish/unpublish.The manager forwards filter keys verbatim to the API (
dist/core/index.js):So
action: ['publish']becomes?action=publish, which the Sync API does not support. A working config looks like:Suggested fix
actionwithtypein the README.publish/unpublish/delete).We ran into this building an init sync that replays historical deletes via
content_type_deleted. Happy to open a README PR if useful.