@kontent-ai/model-generator
Version:
This utility generates strongly-typed models for Delivery JS SDK, Migration toolkit or just general scripting to improve the experience when referencing Kontent.ai related objects.
21 lines (20 loc) • 1.3 kB
TypeScript
import type { CollectionModels, ContentTypeModels, ContentTypeSnippetModels, EnvironmentModels, LanguageModels, TaxonomyModels, WorkflowModels } from "@kontent-ai/management-sdk";
import type { GeneratedSet, ModuleFileExtension } from "../../core/core.models.js";
export interface MigrationGeneratorConfig {
readonly moduleFileExtension: ModuleFileExtension;
readonly environmentData: {
readonly environment: Readonly<EnvironmentModels.EnvironmentInformationModel>;
readonly types: readonly Readonly<ContentTypeModels.ContentType>[];
readonly workflows: readonly Readonly<WorkflowModels.Workflow>[];
readonly languages: readonly Readonly<LanguageModels.LanguageModel>[];
readonly collections: readonly Readonly<CollectionModels.Collection>[];
readonly snippets: readonly Readonly<ContentTypeSnippetModels.ContentTypeSnippet>[];
readonly taxonomies: readonly Readonly<TaxonomyModels.Taxonomy>[];
};
}
export declare function getMigrationGenerator(config: MigrationGeneratorConfig): {
getEnvironmentFiles(): GeneratedSet;
getMigrationTypeFiles(): GeneratedSet;
getMigrationItemFiles(): GeneratedSet;
};
export declare function getWorkflowStepCodenamesType(workflows: readonly Readonly<WorkflowModels.Workflow>[]): string;