UNPKG

@flatfile/plugin-convert-yaml-schema

Version:

A plugin for converting YAML Schema definitions to Flatfile Blueprint.

27 lines (23 loc) 1.19 kB
import * as _flatfile_listener from '@flatfile/listener'; import { FlatfileEvent } from '@flatfile/listener'; import { TickFunction } from '@flatfile/plugin-job-handler'; import { Flatfile } from '@flatfile/api'; import { Setup } from '@flatfile/plugin-space-configure'; interface ModelToSheetConfig extends PartialSheetConfig { sourceUrl: string; } interface PartialSheetConfig extends Omit<Flatfile.SheetConfig, 'fields' | 'name'> { name?: string; } interface PartialWorkbookConfig extends Omit<Flatfile.CreateWorkbookConfig, 'sheets' | 'name'> { name?: string; } declare function generateSetup(models?: ModelToSheetConfig[], options?: { workbookConfig?: PartialWorkbookConfig; debug?: boolean; }): Promise<Setup>; declare function configureSpaceWithYamlSchema(models?: ModelToSheetConfig[], options?: { workbookConfig?: PartialWorkbookConfig; debug?: boolean; }, callback?: (event: FlatfileEvent, workbookIds: string[], tick: TickFunction) => any | Promise<any>): (listener: _flatfile_listener.FlatfileListener) => void; export { type ModelToSheetConfig, type PartialSheetConfig, type PartialWorkbookConfig, configureSpaceWithYamlSchema, generateSetup };