From 0d71ad4a808ad14f8b8bad1d551b3f583a6c958c Mon Sep 17 00:00:00 2001 From: Richard Sustek Date: Thu, 25 Jul 2024 10:25:16 +0200 Subject: [PATCH] Uses types System for MigrationItem --- .../migration_toolkit_map_migrationitem.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts b/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts index 54b9d4b5..f1473123 100644 --- a/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts +++ b/ts/migrate-from-other-systems/migration_toolkit_map_migrationitem.ts @@ -11,7 +11,12 @@ type CollectionCodenames = "default" | "global"; type WorkflowCodenames = "default" | "custom"; type WorkflowStepCodenames = "published" | "archived" | "draft"; type ContentTypeCodenames = "movie" | "actor"; -type ContentTypeCodename = Codename; +type System = MigrationItemSystem< + Codename, + LanguageCodenames, + CollectionCodenames, + WorkflowCodenames +>; type MovieItem = MigrationItem< // Defines the elements in the 'Movie' content type defined in Kontent.ai @@ -27,7 +32,7 @@ type MovieItem = MigrationItem< releasecategory: MigrationElementModels.TaxonomyElement; }, MigrationItemSystem< - ContentTypeCodename<"movie">, + System<"movie">, LanguageCodenames, CollectionCodenames, WorkflowCodenames