Background
apps/cms is intended to be the canonical source for manager data, but staging and local development need a way to seed a limited slice of gateway media data into CMS without running a full import. The current gateway-sync flow supports full sync phases, but it does not accept operator-selected collection IDs or resolve them automatically into concrete video IDs.
Expected outcome
Admins can trigger a staging-safe limited seed import that accepts coverage-style collection IDs and/or explicit video IDs, resolves collection IDs automatically to child/self video IDs, and imports only that selected media graph into Strapi CMS.
Acceptance criteria
Possible solution(s)
- Extend the existing
apps/cms/src/api/gateway-sync/ service layer with a reusable collection-to-video transformer.
- Infer full vs limited sync from whether
collectionIds / videoIds are empty.
- Keep full sync behavior intact, but add a selected-video query path for limited imports.
- Reuse existing video and variant upsert helpers, while skipping
softDeleteUnseen() in limited runs.
References
docs/plans/2026-03-23-001-feat-staging-cms-collection-seed-import-plan.md
docs/plans/2026-03-19-001-feat-cms-gateway-data-sync-plan.md
apps/cms/src/api/gateway-sync/services/gateway-sync.ts
apps/cms/src/api/gateway-sync/services/sync-videos.ts
apps/cms/src/api/gateway-sync/services/sync-video-variants.ts
Background
apps/cmsis intended to be the canonical source for manager data, but staging and local development need a way to seed a limited slice of gateway media data into CMS without running a full import. The currentgateway-syncflow supports full sync phases, but it does not accept operator-selected collection IDs or resolve them automatically into concrete video IDs.Expected outcome
Admins can trigger a staging-safe limited seed import that accepts coverage-style collection IDs and/or explicit video IDs, resolves collection IDs automatically to child/self video IDs, and imports only that selected media graph into Strapi CMS.
Acceptance criteria
POST /api/gateway-sync/triggeraccepts optionalcollectionIds,videoIds, anddryRunPossible solution(s)
apps/cms/src/api/gateway-sync/service layer with a reusable collection-to-video transformer.collectionIds/videoIdsare empty.softDeleteUnseen()in limited runs.References
docs/plans/2026-03-23-001-feat-staging-cms-collection-seed-import-plan.mddocs/plans/2026-03-19-001-feat-cms-gateway-data-sync-plan.mdapps/cms/src/api/gateway-sync/services/gateway-sync.tsapps/cms/src/api/gateway-sync/services/sync-videos.tsapps/cms/src/api/gateway-sync/services/sync-video-variants.ts