UNPKG

sb-mig

Version:

CLI to rule the world. (and handle stuff related to Storyblok CMS)

25 lines (24 loc) 833 B
import type { StoryblokComponentSchemaBase } from "storyblok-schema-types"; type ComponentData = { [K in keyof StoryblokComponentSchemaBase<any>]: any; }; export interface ResolversBy { match: string[]; componentData: Partial<ComponentData>; } export interface SchemaGlobalResolvers { all?: Omit<ResolversBy, "match">; byPluginNames?: ResolversBy[]; byComponentGroupNames?: ResolversBy[]; byComponentNames?: ResolversBy[]; } export type ComponentWhitelistSimpleResolver = (prevComponentWhitelist: string[]) => string[]; export type TranslatableSimpleResolver = (prevTranslatable: boolean) => boolean; export interface SimpleResolver { match: string[]; fields: { component_whitelist?: ComponentWhitelistSimpleResolver; translatable?: TranslatableSimpleResolver; }; } export {};