import { type Database } from "../database.js"; import type { PropertyConfiguration } from "../schema.js"; import type { SelectOption, StatusGroup } from "../types.js"; import type { DataSourceDefinition, NotionAsCodePropertyConfig, NotionAsCodeSchema } from "./intents.js"; type AppsPropertyFor = Property extends { type: "title"; } ? { type: "title"; } : Property extends { type: "text"; } ? { type: "text"; } : Property extends { type: "number"; } ? { type: "number"; } : Property extends { type: "select"; } ? { type: "select"; options: SelectOption[]; } : Property extends { type: "multi_select"; } ? { type: "multi_select"; options: SelectOption[]; } : Property extends { type: "status"; } ? { type: "status"; groups: StatusGroup[]; } : Property extends { type: "date"; } ? { type: "date"; } : Property extends { type: "checkbox"; } ? { type: "checkbox"; } : Property extends { type: "url"; } ? { type: "url"; } : Property extends { type: "email"; } ? { type: "email"; } : Property extends { type: "phone_number"; } ? { type: "phone_number"; } : Property extends { type: "file"; } ? { type: "file"; } : PropertyConfiguration; /** * Map keyed authoring properties to the Apps schema used by sync handlers. The explicit * string-key mapping avoids a homomorphic mapped type interfering with `NoInfer` key checks. */ export type AppsSchemaForSchema = { [Property in keyof Schema & string]: AppsPropertyFor; }; /** Convert a Notion-as-Code data source into the Apps database used by sync handlers. */ export declare function createAppsDatabase(databaseKey: string, dataSource: DataSourceDefinition): Database; export {}; //# sourceMappingURL=schema.d.ts.map