@tailor-platform/sdk 1.32.1 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/dist/{application-p2GujXmg.mjs → application-CfAom-vi.mjs} +33 -25
  3. package/dist/application-CfAom-vi.mjs.map +1 -0
  4. package/dist/{application-Cwt_ifTT.mjs → application-ChVyhwe-.mjs} +4 -4
  5. package/dist/cli/index.mjs +9 -9
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.d.mts +9 -6
  8. package/dist/cli/lib.mjs +7 -7
  9. package/dist/configure/index.d.mts +5 -5
  10. package/dist/configure/index.mjs +81 -11
  11. package/dist/configure/index.mjs.map +1 -1
  12. package/dist/{enum-constants-CkKARYb7.mjs → enum-constants-Piv_E-2M.mjs} +2 -1
  13. package/dist/{enum-constants-CkKARYb7.mjs.map → enum-constants-Piv_E-2M.mjs.map} +1 -1
  14. package/dist/{env-BZLTIlIo.d.mts → env-CSZ9CKg7.d.mts} +2 -2
  15. package/dist/{file-utils-D2TxR_kj.mjs → file-utils-B7xME5IK.mjs} +2 -1
  16. package/dist/{file-utils-D2TxR_kj.mjs.map → file-utils-B7xME5IK.mjs.map} +1 -1
  17. package/dist/{index-BYk_9R3S.d.mts → index-BdlrrjvD.d.mts} +133 -24
  18. package/dist/{index-BQKAzTPA.d.mts → index-Dlpe_4Nd.d.mts} +3 -2
  19. package/dist/{index-vVGamLOw.d.mts → index-IHl7P_9I.d.mts} +3 -2
  20. package/dist/{index-CgMytw2A.d.mts → index-dg3Sf-No.d.mts} +3 -2
  21. package/dist/{index-CoReoodF.d.mts → index-uNv9YJgx.d.mts} +3 -2
  22. package/dist/{kysely-type-BK0b4Rqt.mjs → kysely-type-t5MbP7iJ.mjs} +2 -1
  23. package/dist/{kysely-type-BK0b4Rqt.mjs.map → kysely-type-t5MbP7iJ.mjs.map} +1 -1
  24. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  25. package/dist/plugin/builtin/enum-constants/index.mjs +1 -1
  26. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  27. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  28. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  29. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  30. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  31. package/dist/plugin/builtin/seed/index.mjs +1 -1
  32. package/dist/plugin/index.d.mts +2 -2
  33. package/dist/{plugin-IIDZW9GG.d.mts → plugin-BC7WQrjm.d.mts} +24 -13
  34. package/dist/{runtime-7DOyTTxR.mjs → runtime-3P9JFpe9.mjs} +1018 -303
  35. package/dist/runtime-3P9JFpe9.mjs.map +1 -0
  36. package/dist/{schema-BITbkmq3.mjs → schema-D27cW0Ca.mjs} +2 -1
  37. package/dist/{schema-BITbkmq3.mjs.map → schema-D27cW0Ca.mjs.map} +1 -1
  38. package/dist/{seed-BXrSEJbv.mjs → seed-DtYgudLq.mjs} +11 -3
  39. package/dist/seed-DtYgudLq.mjs.map +1 -0
  40. package/dist/utils/test/index.d.mts +2 -2
  41. package/dist/{workflow.generated-C2A5Ye0m.d.mts → workflow.generated-Cd5dsFnf.d.mts} +2 -2
  42. package/docs/cli/application.md +17 -0
  43. package/docs/services/executor.md +54 -0
  44. package/package.json +8 -8
  45. package/dist/application-p2GujXmg.mjs.map +0 -1
  46. package/dist/runtime-7DOyTTxR.mjs.map +0 -1
  47. package/dist/seed-BXrSEJbv.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"enum-constants-CkKARYb7.mjs","names":[],"sources":["../src/plugin/builtin/enum-constants/generate-enum-constants.ts","../src/plugin/builtin/enum-constants/process-enum-type.ts","../src/plugin/builtin/enum-constants/index.ts"],"sourcesContent":["import type { EnumDefinition } from \"./types\";\n\n/**\n * Generate enum constant definitions from collected metadata.\n * @param allEnums - All collected enum definitions\n * @returns Generated enum constant definitions\n */\nexport function generateUnifiedEnumConstants(allEnums: EnumDefinition[]): string {\n if (allEnums.length === 0) {\n return \"\";\n }\n\n const enumMap = new Map<string, EnumDefinition>();\n for (const enumDef of allEnums) {\n enumMap.set(enumDef.name, enumDef);\n }\n\n const enumDefs = Array.from(enumMap.values())\n .map((e) => {\n const members = e.values\n .map((v) => {\n const key = v.value.replace(/[-\\s]/g, \"_\");\n return ` \"${key}\": \"${v.value}\"`;\n })\n .join(\",\\n\");\n\n const hasDescriptions = e.values.some((v) => v.description);\n let jsDoc = \"\";\n if (e.fieldDescription || hasDescriptions) {\n const lines: string[] = [];\n\n if (e.fieldDescription) {\n lines.push(` * ${e.fieldDescription}`);\n if (hasDescriptions) {\n lines.push(\" *\");\n }\n }\n\n if (hasDescriptions) {\n const propertyDocs = e.values.map((v) => {\n const key = v.value.replace(/[-\\s]/g, \"_\");\n return ` * @property ${[key, v.description].filter(Boolean).join(\" - \")}`;\n });\n lines.push(...propertyDocs);\n }\n\n if (lines.length > 0) {\n jsDoc = `/**\\n${lines.join(\"\\n\")}\\n */\\n`;\n }\n }\n\n const constDef = `${jsDoc}export const ${e.name} = {\\n${members}\\n} as const;`;\n const typeDef = `export type ${e.name} = (typeof ${e.name})[keyof typeof ${e.name}];`;\n return `${constDef}\\n${typeDef}`;\n })\n .join(\"\\n\\n\");\n\n if (!enumDefs) {\n return \"\";\n }\n\n return enumDefs + \"\\n\";\n}\n","import type { EnumConstantMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\nfunction capitalizeFirst(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nfunction collectEnums(type: TailorDBType): EnumConstantMetadata[\"enums\"] {\n const enums: EnumConstantMetadata[\"enums\"] = [];\n\n for (const [fieldName, parsedField] of Object.entries(type.fields)) {\n if (parsedField.config.type === \"enum\" && parsedField.config.allowedValues) {\n const enumTypeName = `${type.name}${capitalizeFirst(fieldName)}`;\n enums.push({\n name: enumTypeName,\n values: parsedField.config.allowedValues,\n fieldDescription: parsedField.config.description,\n });\n }\n\n // Process nested fields\n if (parsedField.config.type === \"nested\" && parsedField.config.fields) {\n for (const [nestedFieldName, nestedFieldConfig] of Object.entries(\n parsedField.config.fields,\n )) {\n if (nestedFieldConfig.type === \"enum\" && nestedFieldConfig.allowedValues) {\n const fullFieldName = `${fieldName}${capitalizeFirst(nestedFieldName)}`;\n const enumTypeName = `${type.name}${capitalizeFirst(fullFieldName)}`;\n enums.push({\n name: enumTypeName,\n values: nestedFieldConfig.allowedValues,\n fieldDescription: nestedFieldConfig.description,\n });\n }\n }\n }\n }\n\n return enums;\n}\n\n/**\n * Process a TailorDB type and extract enum metadata.\n * @param type - The parsed TailorDB type to process\n * @returns Enum constant metadata for the type\n */\nexport async function processEnumType(type: TailorDBType): Promise<EnumConstantMetadata> {\n const enums = collectEnums(type);\n\n return {\n name: type.name,\n enums,\n };\n}\n","import { generateUnifiedEnumConstants } from \"./generate-enum-constants\";\nimport { processEnumType } from \"./process-enum-type\";\nimport type { EnumDefinition } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const EnumConstantsGeneratorID = \"@tailor-platform/enum-constants\";\n\ntype EnumConstantsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates enum constants from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated constants\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function enumConstantsPlugin(\n options: EnumConstantsPluginOptions,\n): Plugin<unknown, EnumConstantsPluginOptions> {\n return {\n id: EnumConstantsGeneratorID,\n description: \"Generates enum constants from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<EnumConstantsPluginOptions>,\n ): Promise<GeneratorResult> {\n const allEnums: EnumDefinition[] = [];\n\n for (const ns of ctx.tailordb) {\n for (const type of Object.values(ns.types)) {\n const metadata = await processEnumType(type);\n allEnums.push(...metadata.enums);\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allEnums.length > 0) {\n const content = generateUnifiedEnumConstants(allEnums);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,6BAA6B,UAAoC;AAC/E,KAAI,SAAS,WAAW,EACtB,QAAO;CAGT,MAAM,0BAAU,IAAI,KAA6B;AACjD,MAAK,MAAM,WAAW,SACpB,SAAQ,IAAI,QAAQ,MAAM,QAAQ;CAGpC,MAAM,WAAW,MAAM,KAAK,QAAQ,QAAQ,CAAC,CAC1C,KAAK,MAAM;EACV,MAAM,UAAU,EAAE,OACf,KAAK,MAAM;AAEV,UAAO,MADK,EAAE,MAAM,QAAQ,UAAU,IAAI,CACzB,MAAM,EAAE,MAAM;IAC/B,CACD,KAAK,MAAM;EAEd,MAAM,kBAAkB,EAAE,OAAO,MAAM,MAAM,EAAE,YAAY;EAC3D,IAAI,QAAQ;AACZ,MAAI,EAAE,oBAAoB,iBAAiB;GACzC,MAAM,QAAkB,EAAE;AAE1B,OAAI,EAAE,kBAAkB;AACtB,UAAM,KAAK,MAAM,EAAE,mBAAmB;AACtC,QAAI,gBACF,OAAM,KAAK,KAAK;;AAIpB,OAAI,iBAAiB;IACnB,MAAM,eAAe,EAAE,OAAO,KAAK,MAAM;AAEvC,YAAO,gBAAgB,CADX,EAAE,MAAM,QAAQ,UAAU,IAAI,EACb,EAAE,YAAY,CAAC,OAAO,QAAQ,CAAC,KAAK,MAAM;MACvE;AACF,UAAM,KAAK,GAAG,aAAa;;AAG7B,OAAI,MAAM,SAAS,EACjB,SAAQ,QAAQ,MAAM,KAAK,KAAK,CAAC;;AAMrC,SAAO,GAFU,GAAG,MAAM,eAAe,EAAE,KAAK,QAAQ,QAAQ,eAE7C,IADH,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,KAAK;GAElF,CACD,KAAK,OAAO;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AK;AAC5C,aAAS,KAAK,GAAG,SAAS,MAAM;;GAIpC,MAAM,QAAkC,EAAE;AAC1C,OAAI,SAAS,SAAS,GAAG;IACvB,MAAM,UAAU,6BAA6B,SAAS;AACtD,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
1
+ {"version":3,"file":"enum-constants-Piv_E-2M.mjs","names":[],"sources":["../src/plugin/builtin/enum-constants/generate-enum-constants.ts","../src/plugin/builtin/enum-constants/process-enum-type.ts","../src/plugin/builtin/enum-constants/index.ts"],"sourcesContent":["import type { EnumDefinition } from \"./types\";\n\n/**\n * Generate enum constant definitions from collected metadata.\n * @param allEnums - All collected enum definitions\n * @returns Generated enum constant definitions\n */\nexport function generateUnifiedEnumConstants(allEnums: EnumDefinition[]): string {\n if (allEnums.length === 0) {\n return \"\";\n }\n\n const enumMap = new Map<string, EnumDefinition>();\n for (const enumDef of allEnums) {\n enumMap.set(enumDef.name, enumDef);\n }\n\n const enumDefs = Array.from(enumMap.values())\n .map((e) => {\n const members = e.values\n .map((v) => {\n const key = v.value.replace(/[-\\s]/g, \"_\");\n return ` \"${key}\": \"${v.value}\"`;\n })\n .join(\",\\n\");\n\n const hasDescriptions = e.values.some((v) => v.description);\n let jsDoc = \"\";\n if (e.fieldDescription || hasDescriptions) {\n const lines: string[] = [];\n\n if (e.fieldDescription) {\n lines.push(` * ${e.fieldDescription}`);\n if (hasDescriptions) {\n lines.push(\" *\");\n }\n }\n\n if (hasDescriptions) {\n const propertyDocs = e.values.map((v) => {\n const key = v.value.replace(/[-\\s]/g, \"_\");\n return ` * @property ${[key, v.description].filter(Boolean).join(\" - \")}`;\n });\n lines.push(...propertyDocs);\n }\n\n if (lines.length > 0) {\n jsDoc = `/**\\n${lines.join(\"\\n\")}\\n */\\n`;\n }\n }\n\n const constDef = `${jsDoc}export const ${e.name} = {\\n${members}\\n} as const;`;\n const typeDef = `export type ${e.name} = (typeof ${e.name})[keyof typeof ${e.name}];`;\n return `${constDef}\\n${typeDef}`;\n })\n .join(\"\\n\\n\");\n\n if (!enumDefs) {\n return \"\";\n }\n\n return enumDefs + \"\\n\";\n}\n","import type { EnumConstantMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\nfunction capitalizeFirst(str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n\nfunction collectEnums(type: TailorDBType): EnumConstantMetadata[\"enums\"] {\n const enums: EnumConstantMetadata[\"enums\"] = [];\n\n for (const [fieldName, parsedField] of Object.entries(type.fields)) {\n if (parsedField.config.type === \"enum\" && parsedField.config.allowedValues) {\n const enumTypeName = `${type.name}${capitalizeFirst(fieldName)}`;\n enums.push({\n name: enumTypeName,\n values: parsedField.config.allowedValues,\n fieldDescription: parsedField.config.description,\n });\n }\n\n // Process nested fields\n if (parsedField.config.type === \"nested\" && parsedField.config.fields) {\n for (const [nestedFieldName, nestedFieldConfig] of Object.entries(\n parsedField.config.fields,\n )) {\n if (nestedFieldConfig.type === \"enum\" && nestedFieldConfig.allowedValues) {\n const fullFieldName = `${fieldName}${capitalizeFirst(nestedFieldName)}`;\n const enumTypeName = `${type.name}${capitalizeFirst(fullFieldName)}`;\n enums.push({\n name: enumTypeName,\n values: nestedFieldConfig.allowedValues,\n fieldDescription: nestedFieldConfig.description,\n });\n }\n }\n }\n }\n\n return enums;\n}\n\n/**\n * Process a TailorDB type and extract enum metadata.\n * @param type - The parsed TailorDB type to process\n * @returns Enum constant metadata for the type\n */\nexport async function processEnumType(type: TailorDBType): Promise<EnumConstantMetadata> {\n const enums = collectEnums(type);\n\n return {\n name: type.name,\n enums,\n };\n}\n","import { generateUnifiedEnumConstants } from \"./generate-enum-constants\";\nimport { processEnumType } from \"./process-enum-type\";\nimport type { EnumDefinition } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\n/** Unique identifier for the enum constants generator plugin. */\nexport const EnumConstantsGeneratorID = \"@tailor-platform/enum-constants\";\n\ntype EnumConstantsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates enum constants from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated constants\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function enumConstantsPlugin(\n options: EnumConstantsPluginOptions,\n): Plugin<unknown, EnumConstantsPluginOptions> {\n return {\n id: EnumConstantsGeneratorID,\n description: \"Generates enum constants from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<EnumConstantsPluginOptions>,\n ): Promise<GeneratorResult> {\n const allEnums: EnumDefinition[] = [];\n\n for (const ns of ctx.tailordb) {\n for (const type of Object.values(ns.types)) {\n const metadata = await processEnumType(type);\n allEnums.push(...metadata.enums);\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allEnums.length > 0) {\n const content = generateUnifiedEnumConstants(allEnums);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;AAOA,SAAgB,6BAA6B,UAAoC;AAC/E,KAAI,SAAS,WAAW,EACtB,QAAO;CAGT,MAAM,0BAAU,IAAI,KAA6B;AACjD,MAAK,MAAM,WAAW,SACpB,SAAQ,IAAI,QAAQ,MAAM,QAAQ;CAGpC,MAAM,WAAW,MAAM,KAAK,QAAQ,QAAQ,CAAC,CAC1C,KAAK,MAAM;EACV,MAAM,UAAU,EAAE,OACf,KAAK,MAAM;AAEV,UAAO,MADK,EAAE,MAAM,QAAQ,UAAU,IAAI,CACzB,MAAM,EAAE,MAAM;IAC/B,CACD,KAAK,MAAM;EAEd,MAAM,kBAAkB,EAAE,OAAO,MAAM,MAAM,EAAE,YAAY;EAC3D,IAAI,QAAQ;AACZ,MAAI,EAAE,oBAAoB,iBAAiB;GACzC,MAAM,QAAkB,EAAE;AAE1B,OAAI,EAAE,kBAAkB;AACtB,UAAM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AAgB,cAAc;AAClE,UAAM,KAAK;KACT,MAAM;KACN,QAAQ,kBAAkB;KAC1B,kBAAkB,kBAAkB;KACrC,CAAC;;;;AAMV,QAAO;;;;;;;AAQT,eAAsB,gBAAgB,MAAmD;CACvF,MAAM,QAAQ,aAAa,KAAK;AAEhC,QAAO;EACL,MAAM,KAAK;EACX;EACD;;;;;;AC7CH,MAAa,2BAA2B;;;;;;;AAYxC,SAAgB,oBACd,SAC6C;AAC7C,QAAO;EACL,IAAI;EACJ,aAAa;EACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,WAA6B,EAAE;AAErC,QAAK,MAAM,MAAM,IAAI,SACnB,MAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;IAC1C,MAAM,WAAW,MAAM,gBAAgB,KAAK;AAC5C,aAAS,KAAK,GAAG,SAAS,MAAM;;GAIpC,MAAM,QAAkC,EAAE;AAC1C,OAAI,SAAS,SAAS,GAAG;IACvB,MAAM,UAAU,6BAA6B,SAAS;AACtD,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { ct as InferredAttributeList, lt as InferredAttributeMap } from "./plugin-IIDZW9GG.mjs";
2
+ import { ct as InferredAttributeList, lt as InferredAttributeMap } from "./plugin-BC7WQrjm.mjs";
3
3
 
4
4
  //#region src/configure/types/actor.d.ts
5
5
  /** User type enum values from the Tailor Platform server. */
@@ -27,4 +27,4 @@ interface Env {}
27
27
  type TailorEnv = keyof Env extends never ? Record<string, string> : Env;
28
28
  //#endregion
29
29
  export { TailorEnv as n, TailorActor as r, Env as t };
30
- //# sourceMappingURL=env-BZLTIlIo.d.mts.map
30
+ //# sourceMappingURL=env-CSZ9CKg7.d.mts.map
@@ -97,6 +97,7 @@ async function processFileType(type) {
97
97
 
98
98
  //#endregion
99
99
  //#region src/plugin/builtin/file-utils/index.ts
100
+ /** Unique identifier for the file utilities generator plugin. */
100
101
  const FileUtilsGeneratorID = "@tailor-platform/file-utils";
101
102
  /**
102
103
  * Plugin that generates TypeWithFiles interface from TailorDB type definitions.
@@ -137,4 +138,4 @@ function fileUtilsPlugin(options) {
137
138
 
138
139
  //#endregion
139
140
  export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
140
- //# sourceMappingURL=file-utils-D2TxR_kj.mjs.map
141
+ //# sourceMappingURL=file-utils-B7xME5IK.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-utils-D2TxR_kj.mjs","names":[],"sources":["../src/plugin/builtin/file-utils/generate-file-utils.ts","../src/plugin/builtin/file-utils/process-file-type.ts","../src/plugin/builtin/file-utils/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport type { FileUtilMetadata } from \"./types\";\n\n/**\n * Generate unified file utility functions from collected metadata.\n * @param namespaceData - Namespace data with file utility metadata\n * @returns Generated file utility code\n */\nexport function generateUnifiedFileUtils(\n namespaceData: { namespace: string; types: FileUtilMetadata[] }[],\n): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Collect all types with their namespace\n const typeNamespaceMap = new Map<string, string>();\n const typeFieldsMap = new Map<string, string[]>();\n\n for (const { namespace, types } of namespaceData) {\n for (const type of types) {\n typeNamespaceMap.set(type.name, namespace);\n typeFieldsMap.set(type.name, type.fileFields);\n }\n }\n\n if (typeNamespaceMap.size === 0) {\n return \"\";\n }\n\n // Generate interface fields\n const interfaceFields = Array.from(typeFieldsMap.entries())\n .map(([typeName, fields]) => {\n const fieldNamesUnion = fields.map((field) => `\"${field}\"`).join(\" | \");\n return ` ${typeName}: {\\n fields: ${fieldNamesUnion};\\n };`;\n })\n .join(\"\\n\");\n\n const interfaceDefinition =\n multiline /* ts */ `\n export interface TypeWithFiles {\n ${interfaceFields}\n }\n ` + \"\\n\";\n\n // Generate namespaces object\n const namespaceEntries = Array.from(typeNamespaceMap.entries())\n .map(([typeName, namespace]) => ` ${typeName}: \"${namespace}\"`)\n .join(\",\\n\");\n\n const namespacesDefinition =\n multiline /* ts */ `\n const namespaces: Record<keyof TypeWithFiles, string> = {\n ${namespaceEntries},\n };\n ` + \"\\n\";\n\n // Generate downloadFile helper function\n const downloadFunction =\n multiline /* ts */ `\n export async function downloadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ) {\n return await tailordb.file.download(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate uploadFile helper function\n const uploadFunction =\n multiline /* ts */ `\n export async function uploadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n data: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[],\n options?: FileUploadOptions,\n ): Promise<FileUploadResponse> {\n return await tailordb.file.upload(namespaces[type], type, field, recordId, data, options);\n }\n ` + \"\\n\";\n\n // Generate deleteFile helper function\n const deleteFunction =\n multiline /* ts */ `\n export async function deleteFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<void> {\n return await tailordb.file.delete(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate getFileMetadata helper function\n const getMetadataFunction =\n multiline /* ts */ `\n export async function getFileMetadata<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileMetadata> {\n return await tailordb.file.getMetadata(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate openFileDownloadStream helper function\n const openDownloadStreamFunction =\n multiline /* ts */ `\n export async function openFileDownloadStream<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileStreamIterator> {\n return await tailordb.file.openDownloadStream(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n return [\n interfaceDefinition,\n namespacesDefinition,\n downloadFunction,\n uploadFunction,\n deleteFunction,\n getMetadataFunction,\n openDownloadStreamFunction,\n ].join(\"\\n\");\n}\n","import type { FileUtilMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\n/**\n * Process a TailorDB type and extract file field metadata.\n * @param type - The parsed TailorDB type to process\n * @returns File utility metadata for the type\n */\nexport async function processFileType(type: TailorDBType): Promise<FileUtilMetadata> {\n const fileFields: string[] = [];\n\n if (type.files) {\n for (const fileFieldName of Object.keys(type.files)) {\n fileFields.push(fileFieldName);\n }\n }\n\n return {\n name: type.name,\n fileFields,\n };\n}\n","import { generateUnifiedFileUtils } from \"./generate-file-utils\";\nimport { processFileType } from \"./process-file-type\";\nimport type { FileUtilMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const FileUtilsGeneratorID = \"@tailor-platform/file-utils\";\n\ntype FileUtilsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates TypeWithFiles interface from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated file utilities\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function fileUtilsPlugin(\n options: FileUtilsPluginOptions,\n): Plugin<unknown, FileUtilsPluginOptions> {\n return {\n id: FileUtilsGeneratorID,\n description: \"Generates TypeWithFiles interface from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<FileUtilsPluginOptions>,\n ): Promise<GeneratorResult> {\n const namespaceData: { namespace: string; types: FileUtilMetadata[] }[] = [];\n\n for (const ns of ctx.tailordb) {\n const typesWithFiles: FileUtilMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processFileType(type);\n if (metadata.fileFields.length > 0) {\n typesWithFiles.push(metadata);\n }\n }\n\n if (typesWithFiles.length > 0) {\n namespaceData.push({\n namespace: ns.namespace,\n types: typesWithFiles,\n });\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (namespaceData.length > 0) {\n const content = generateUnifiedFileUtils(namespaceData);\n if (content) {\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,yBACd,eACQ;AACR,KAAI,cAAc,WAAW,EAC3B,QAAO;CAIT,MAAM,mCAAmB,IAAI,KAAqB;CAClD,MAAM,gCAAgB,IAAI,KAAuB;AAEjD,MAAK,MAAM,EAAE,WAAW,WAAW,cACjC,MAAK,MAAM,QAAQ,OAAO;AACxB,mBAAiB,IAAI,KAAK,MAAM,UAAU;AAC1C,gBAAc,IAAI,KAAK,MAAM,KAAK,WAAW;;AAIjD,KAAI,iBAAiB,SAAS,EAC5B,QAAO;AA4FT,QAAO;EAhFL,EAAmB;;QARG,MAAM,KAAK,cAAc,SAAS,CAAC,CACxD,KAAK,CAAC,UAAU,YAAY;AAE3B,UAAO,KAAK,SAAS,mBADG,OAAO,KAAK,UAAU,IAAI,MAAM,GAAG,CAAC,KAAK,MAAM,CACf;IACxD,CACD,KAAK,KAAK,CAKS;;QAEhB;EAQJ,EAAmB;;QALI,MAAM,KAAK,iBAAiB,SAAS,CAAC,CAC5D,KAAK,CAAC,UAAU,eAAe,KAAK,SAAS,KAAK,UAAU,GAAG,CAC/D,KAAK,MAAM,CAKS;;QAEjB;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;;;QAUf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAUL,CAAC,KAAK,KAAK;;;;;;;;;;ACvHd,eAAsB,gBAAgB,MAA+C;CACnF,MAAM,aAAuB,EAAE;AAE/B,KAAI,KAAK,MACP,MAAK,MAAM,iBAAiB,OAAO,KAAK,KAAK,MAAM,CACjD,YAAW,KAAK,cAAc;AAIlC,QAAO;EACL,MAAM,KAAK;EACX;EACD;;;;;ACdH,MAAa,uBAAuB;;;;;;;AAYpC,SAAgB,gBACd,SACyC;AACzC,QAAO;EACL,IAAI;EACJ,aAAa;EACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,gBAAoE,EAAE;AAE5E,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,iBAAqC,EAAE;AAE7C,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,gBAAgB,KAAK;AAC5C,SAAI,SAAS,WAAW,SAAS,EAC/B,gBAAe,KAAK,SAAS;;AAIjC,QAAI,eAAe,SAAS,EAC1B,eAAc,KAAK;KACjB,WAAW,GAAG;KACd,OAAO;KACR,CAAC;;GAIN,MAAM,QAAkC,EAAE;AAC1C,OAAI,cAAc,SAAS,GAAG;IAC5B,MAAM,UAAU,yBAAyB,cAAc;AACvD,QAAI,QACF,OAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAIN,UAAO,EAAE,OAAO;;EAEnB"}
1
+ {"version":3,"file":"file-utils-B7xME5IK.mjs","names":[],"sources":["../src/plugin/builtin/file-utils/generate-file-utils.ts","../src/plugin/builtin/file-utils/process-file-type.ts","../src/plugin/builtin/file-utils/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport type { FileUtilMetadata } from \"./types\";\n\n/**\n * Generate unified file utility functions from collected metadata.\n * @param namespaceData - Namespace data with file utility metadata\n * @returns Generated file utility code\n */\nexport function generateUnifiedFileUtils(\n namespaceData: { namespace: string; types: FileUtilMetadata[] }[],\n): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Collect all types with their namespace\n const typeNamespaceMap = new Map<string, string>();\n const typeFieldsMap = new Map<string, string[]>();\n\n for (const { namespace, types } of namespaceData) {\n for (const type of types) {\n typeNamespaceMap.set(type.name, namespace);\n typeFieldsMap.set(type.name, type.fileFields);\n }\n }\n\n if (typeNamespaceMap.size === 0) {\n return \"\";\n }\n\n // Generate interface fields\n const interfaceFields = Array.from(typeFieldsMap.entries())\n .map(([typeName, fields]) => {\n const fieldNamesUnion = fields.map((field) => `\"${field}\"`).join(\" | \");\n return ` ${typeName}: {\\n fields: ${fieldNamesUnion};\\n };`;\n })\n .join(\"\\n\");\n\n const interfaceDefinition =\n multiline /* ts */ `\n export interface TypeWithFiles {\n ${interfaceFields}\n }\n ` + \"\\n\";\n\n // Generate namespaces object\n const namespaceEntries = Array.from(typeNamespaceMap.entries())\n .map(([typeName, namespace]) => ` ${typeName}: \"${namespace}\"`)\n .join(\",\\n\");\n\n const namespacesDefinition =\n multiline /* ts */ `\n const namespaces: Record<keyof TypeWithFiles, string> = {\n ${namespaceEntries},\n };\n ` + \"\\n\";\n\n // Generate downloadFile helper function\n const downloadFunction =\n multiline /* ts */ `\n export async function downloadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ) {\n return await tailordb.file.download(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate uploadFile helper function\n const uploadFunction =\n multiline /* ts */ `\n export async function uploadFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n data: string | ArrayBuffer | Uint8Array<ArrayBufferLike> | number[],\n options?: FileUploadOptions,\n ): Promise<FileUploadResponse> {\n return await tailordb.file.upload(namespaces[type], type, field, recordId, data, options);\n }\n ` + \"\\n\";\n\n // Generate deleteFile helper function\n const deleteFunction =\n multiline /* ts */ `\n export async function deleteFile<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<void> {\n return await tailordb.file.delete(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate getFileMetadata helper function\n const getMetadataFunction =\n multiline /* ts */ `\n export async function getFileMetadata<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileMetadata> {\n return await tailordb.file.getMetadata(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n // Generate openFileDownloadStream helper function\n const openDownloadStreamFunction =\n multiline /* ts */ `\n export async function openFileDownloadStream<T extends keyof TypeWithFiles>(\n type: T,\n field: TypeWithFiles[T][\"fields\"],\n recordId: string,\n ): Promise<FileStreamIterator> {\n return await tailordb.file.openDownloadStream(namespaces[type], type, field, recordId);\n }\n ` + \"\\n\";\n\n return [\n interfaceDefinition,\n namespacesDefinition,\n downloadFunction,\n uploadFunction,\n deleteFunction,\n getMetadataFunction,\n openDownloadStreamFunction,\n ].join(\"\\n\");\n}\n","import type { FileUtilMetadata } from \"./types\";\nimport type { TailorDBType } from \"@/types/tailordb\";\n\n/**\n * Process a TailorDB type and extract file field metadata.\n * @param type - The parsed TailorDB type to process\n * @returns File utility metadata for the type\n */\nexport async function processFileType(type: TailorDBType): Promise<FileUtilMetadata> {\n const fileFields: string[] = [];\n\n if (type.files) {\n for (const fileFieldName of Object.keys(type.files)) {\n fileFields.push(fileFieldName);\n }\n }\n\n return {\n name: type.name,\n fileFields,\n };\n}\n","import { generateUnifiedFileUtils } from \"./generate-file-utils\";\nimport { processFileType } from \"./process-file-type\";\nimport type { FileUtilMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\n/** Unique identifier for the file utilities generator plugin. */\nexport const FileUtilsGeneratorID = \"@tailor-platform/file-utils\";\n\ntype FileUtilsPluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates TypeWithFiles interface from TailorDB type definitions.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated file utilities\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function fileUtilsPlugin(\n options: FileUtilsPluginOptions,\n): Plugin<unknown, FileUtilsPluginOptions> {\n return {\n id: FileUtilsGeneratorID,\n description: \"Generates TypeWithFiles interface from TailorDB type definitions\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<FileUtilsPluginOptions>,\n ): Promise<GeneratorResult> {\n const namespaceData: { namespace: string; types: FileUtilMetadata[] }[] = [];\n\n for (const ns of ctx.tailordb) {\n const typesWithFiles: FileUtilMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processFileType(type);\n if (metadata.fileFields.length > 0) {\n typesWithFiles.push(metadata);\n }\n }\n\n if (typesWithFiles.length > 0) {\n namespaceData.push({\n namespace: ns.namespace,\n types: typesWithFiles,\n });\n }\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (namespaceData.length > 0) {\n const content = generateUnifiedFileUtils(namespaceData);\n if (content) {\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,yBACd,eACQ;AACR,KAAI,cAAc,WAAW,EAC3B,QAAO;CAIT,MAAM,mCAAmB,IAAI,KAAqB;CAClD,MAAM,gCAAgB,IAAI,KAAuB;AAEjD,MAAK,MAAM,EAAE,WAAW,WAAW,cACjC,MAAK,MAAM,QAAQ,OAAO;AACxB,mBAAiB,IAAI,KAAK,MAAM,UAAU;AAC1C,gBAAc,IAAI,KAAK,MAAM,KAAK,WAAW;;AAIjD,KAAI,iBAAiB,SAAS,EAC5B,QAAO;AA4FT,QAAO;EAhFL,EAAmB;;QARG,MAAM,KAAK,cAAc,SAAS,CAAC,CACxD,KAAK,CAAC,UAAU,YAAY;AAE3B,UAAO,KAAK,SAAS,mBADG,OAAO,KAAK,UAAU,IAAI,MAAM,GAAG,CAAC,KAAK,MAAM,CACf;IACxD,CACD,KAAK,KAAK,CAKS;;QAEhB;EAQJ,EAAmB;;QALI,MAAM,KAAK,iBAAiB,SAAS,CAAC,CAC5D,KAAK,CAAC,UAAU,eAAe,KAAK,SAAS,KAAK,UAAU,GAAG,CAC/D,KAAK,MAAM,CAKS;;QAEjB;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;;;QAUf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAIJ,EAAmB;;;;;;;;QAQf;EAUL,CAAC,KAAK,KAAK;;;;;;;;;;ACvHd,eAAsB,gBAAgB,MAA+C;CACnF,MAAM,aAAuB,EAAE;AAE/B,KAAI,KAAK,MACP,MAAK,MAAM,iBAAiB,OAAO,KAAK,KAAK,MAAM,CACjD,YAAW,KAAK,cAAc;AAIlC,QAAO;EACL,MAAM,KAAK;EACX;EACD;;;;;;ACbH,MAAa,uBAAuB;;;;;;;AAYpC,SAAgB,gBACd,SACyC;AACzC,QAAO;EACL,IAAI;EACJ,aAAa;EACb,cAAc;EAEd,MAAM,gBACJ,KAC0B;GAC1B,MAAM,gBAAoE,EAAE;AAE5E,QAAK,MAAM,MAAM,IAAI,UAAU;IAC7B,MAAM,iBAAqC,EAAE;AAE7C,SAAK,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,EAAE;KAC1C,MAAM,WAAW,MAAM,gBAAgB,KAAK;AAC5C,SAAI,SAAS,WAAW,SAAS,EAC/B,gBAAe,KAAK,SAAS;;AAIjC,QAAI,eAAe,SAAS,EAC1B,eAAc,KAAK;KACjB,WAAW,GAAG;KACd,OAAO;KACR,CAAC;;GAIN,MAAM,QAAkC,EAAE;AAC1C,OAAI,cAAc,SAAS,GAAG;IAC5B,MAAM,UAAU,yBAAyB,cAAc;AACvD,QAAI,QACF,OAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAIN,UAAO,EAAE,OAAO;;EAEnB"}
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as ScheduleTriggerInput, F as UserAttributeMap, H as TailorDBType, O as AuthServiceInput, Ot as WorkflowOperation$1, P as UserAttributeListKey, Q as FieldOptions, St as IdpUserTrigger$1, Tt as ResolverExecutedTrigger$1, V as TailorDBInstance, X as DefinedFieldMetadata, Y as ArrayFieldOutput, Z as FieldMetadata, _t as AuthAccessTokenTrigger$1, at as output$1, bt as FunctionOperation$1, et as TailorFieldType, ft as AllowedValues, gt as GeneratorConfig, ht as ResolverInput, it as JsonCompatible, kt as AuthInvoker$1, mt as Resolver, n as Plugin, nt as TailorField, pt as AllowedValuesOutput, rt as InferFieldsOutput, tt as TailorAnyField, ut as TailorUser, wt as RecordTrigger$1, xt as GqlOperation$1, yt as ExecutorInput } from "./plugin-IIDZW9GG.mjs";
3
- import { n as TailorEnv, r as TailorActor } from "./env-BZLTIlIo.mjs";
4
- import { g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy, y as IdPInput } from "./workflow.generated-C2A5Ye0m.mjs";
2
+ import { $ as FieldOutput, A as DefinedAuth, Ct as IncomingWebhookTrigger$1, Dt as WebhookOperation$1, Et as TailorDBTrigger$1, F as UserAttributeMap, H as TailorDBType, O as AuthServiceInput, Ot as WorkflowOperation$1, P as UserAttributeListKey, Q as FieldOptions, St as IdpUserTrigger$1, Tt as ScheduleTriggerInput, V as TailorDBInstance, X as DefinedFieldMetadata, Y as ArrayFieldOutput, Z as FieldMetadata, _t as AuthAccessTokenTrigger$1, at as output$1, bt as FunctionOperation$1, et as TailorFieldType, ft as AllowedValues, gt as GeneratorConfig, ht as ResolverInput, it as JsonCompatible, kt as AuthInvoker$1, mt as Resolver, n as Plugin, nt as TailorField, pt as AllowedValuesOutput, rt as InferFieldsOutput, tt as TailorAnyField, ut as TailorUser, wt as ResolverExecutedTrigger$1, xt as GqlOperation$1, yt as ExecutorInput } from "./plugin-BC7WQrjm.mjs";
3
+ import { n as TailorEnv, r as TailorActor } from "./env-CSZ9CKg7.mjs";
4
+ import { g as IdpDefinitionBrand, n as AppConfig, t as RetryPolicy, y as IdPInput } from "./workflow.generated-Cd5dsFnf.mjs";
5
5
  import * as zod from "zod";
6
6
  import { JsonPrimitive, Jsonifiable, Jsonify } from "type-fest";
7
7
  import { Client } from "@urql/core";
@@ -348,13 +348,19 @@ interface RecordArgs extends EventArgs {
348
348
  typeName: string;
349
349
  }
350
350
  interface RecordCreatedArgs<T extends TailorDBType> extends RecordArgs {
351
+ event: "created";
352
+ rawEvent: "tailordb.type_record.created";
351
353
  newRecord: output$1<T>;
352
354
  }
353
355
  interface RecordUpdatedArgs<T extends TailorDBType> extends RecordArgs {
356
+ event: "updated";
357
+ rawEvent: "tailordb.type_record.updated";
354
358
  newRecord: output$1<T>;
355
359
  oldRecord: output$1<T>;
356
360
  }
357
361
  interface RecordDeletedArgs<T extends TailorDBType> extends RecordArgs {
362
+ event: "deleted";
363
+ rawEvent: "tailordb.type_record.deleted";
358
364
  oldRecord: output$1<T>;
359
365
  }
360
366
  /**
@@ -384,7 +390,58 @@ type ResolverExecutedArgs<R extends ResolverConfig> = EventArgs & {
384
390
  result?: never;
385
391
  error: string;
386
392
  });
387
- type RecordTrigger<Args> = RecordTrigger$1 & {
393
+ interface IdpUserCreatedArgs extends EventArgs {
394
+ event: "created";
395
+ rawEvent: "idp.user.created";
396
+ namespaceName: string;
397
+ userId: string;
398
+ }
399
+ interface IdpUserUpdatedArgs extends EventArgs {
400
+ event: "updated";
401
+ rawEvent: "idp.user.updated";
402
+ namespaceName: string;
403
+ userId: string;
404
+ }
405
+ interface IdpUserDeletedArgs extends EventArgs {
406
+ event: "deleted";
407
+ rawEvent: "idp.user.deleted";
408
+ namespaceName: string;
409
+ userId: string;
410
+ }
411
+ type IdpUserArgs = IdpUserCreatedArgs | IdpUserUpdatedArgs | IdpUserDeletedArgs;
412
+ interface AuthAccessTokenIssuedArgs extends EventArgs {
413
+ event: "issued";
414
+ rawEvent: "auth.access_token.issued";
415
+ namespaceName: string;
416
+ userId: string;
417
+ }
418
+ interface AuthAccessTokenRefreshedArgs extends EventArgs {
419
+ event: "refreshed";
420
+ rawEvent: "auth.access_token.refreshed";
421
+ namespaceName: string;
422
+ userId: string;
423
+ }
424
+ interface AuthAccessTokenRevokedArgs extends EventArgs {
425
+ event: "revoked";
426
+ rawEvent: "auth.access_token.revoked";
427
+ namespaceName: string;
428
+ userId: string;
429
+ }
430
+ type AuthAccessTokenArgs = AuthAccessTokenIssuedArgs | AuthAccessTokenRefreshedArgs | AuthAccessTokenRevokedArgs;
431
+ declare const recordEventMap: {
432
+ readonly created: "tailordb.type_record.created";
433
+ readonly updated: "tailordb.type_record.updated";
434
+ readonly deleted: "tailordb.type_record.deleted";
435
+ };
436
+ type RecordEventMap = typeof recordEventMap;
437
+ type RecordEventKind = keyof RecordEventMap;
438
+ type RecordArgsMap<T extends TailorDBType> = {
439
+ created: RecordCreatedArgs<T>;
440
+ updated: RecordUpdatedArgs<T>;
441
+ deleted: RecordDeletedArgs<T>;
442
+ };
443
+ type RecordMultiArgs<T extends TailorDBType, K extends RecordEventKind[]> = RecordArgsMap<T>[K[number]];
444
+ type TailorDBTrigger<Args> = TailorDBTrigger$1 & {
388
445
  __args: Args;
389
446
  };
390
447
  type RecordTriggerOptions<T extends TailorDBType, Args> = {
@@ -397,21 +454,34 @@ type RecordTriggerOptions<T extends TailorDBType, Args> = {
397
454
  * @param options - Trigger options
398
455
  * @returns Record created trigger
399
456
  */
400
- declare function recordCreatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordCreatedArgs<T>>): RecordTrigger<RecordCreatedArgs<T>>;
457
+ declare function recordCreatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordCreatedArgs<T>>): TailorDBTrigger<RecordCreatedArgs<T>>;
401
458
  /**
402
459
  * Create a trigger that fires when a TailorDB record is updated.
403
460
  * @template T
404
461
  * @param options - Trigger options
405
462
  * @returns Record updated trigger
406
463
  */
407
- declare function recordUpdatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordUpdatedArgs<T>>): RecordTrigger<RecordUpdatedArgs<T>>;
464
+ declare function recordUpdatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordUpdatedArgs<T>>): TailorDBTrigger<RecordUpdatedArgs<T>>;
408
465
  /**
409
466
  * Create a trigger that fires when a TailorDB record is deleted.
410
467
  * @template T
411
468
  * @param options - Trigger options
412
469
  * @returns Record deleted trigger
413
470
  */
414
- declare function recordDeletedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordDeletedArgs<T>>): RecordTrigger<RecordDeletedArgs<T>>;
471
+ declare function recordDeletedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordDeletedArgs<T>>): TailorDBTrigger<RecordDeletedArgs<T>>;
472
+ type RecordTriggerMultiOptions<T extends TailorDBType, K extends RecordEventKind[]> = {
473
+ type: T;
474
+ events: K;
475
+ condition?: (args: RecordMultiArgs<T, K>) => boolean;
476
+ };
477
+ /**
478
+ * Create a trigger that fires on multiple TailorDB record event types.
479
+ * @template T
480
+ * @template K
481
+ * @param options - Trigger options with events array
482
+ * @returns TailorDB record trigger
483
+ */
484
+ declare function recordTrigger<T extends TailorDBType, const K extends [RecordEventKind, ...RecordEventKind[]]>(options: RecordTriggerMultiOptions<T, K>): TailorDBTrigger<RecordMultiArgs<T, K>>;
415
485
  type ResolverExecutedTrigger<Args> = ResolverExecutedTrigger$1 & {
416
486
  __args: Args;
417
487
  };
@@ -426,10 +496,19 @@ type ResolverExecutedTriggerOptions<R extends ResolverConfig> = {
426
496
  * @returns Resolver executed trigger
427
497
  */
428
498
  declare function resolverExecutedTrigger<R extends ResolverConfig>(options: ResolverExecutedTriggerOptions<R>): ResolverExecutedTrigger<ResolverExecutedArgs<R>>;
429
- interface IdpUserArgs extends EventArgs {
430
- namespaceName: string;
431
- userId: string;
432
- }
499
+ declare const idpUserEventMap: {
500
+ readonly created: "idp.user.created";
501
+ readonly updated: "idp.user.updated";
502
+ readonly deleted: "idp.user.deleted";
503
+ };
504
+ type IdpUserEventMap = typeof idpUserEventMap;
505
+ type IdpUserEventKind = keyof IdpUserEventMap;
506
+ type IdpUserArgsMap = {
507
+ created: IdpUserCreatedArgs;
508
+ updated: IdpUserUpdatedArgs;
509
+ deleted: IdpUserDeletedArgs;
510
+ };
511
+ type IdpUserMultiArgs<K extends IdpUserEventKind[]> = IdpUserArgsMap[K[number]];
433
512
  type IdpUserTrigger<Args> = IdpUserTrigger$1 & {
434
513
  __args: Args;
435
514
  };
@@ -437,21 +516,40 @@ type IdpUserTrigger<Args> = IdpUserTrigger$1 & {
437
516
  * Create a trigger that fires when an IdP user is created.
438
517
  * @returns IdP user created trigger
439
518
  */
440
- declare function idpUserCreatedTrigger(): IdpUserTrigger<IdpUserArgs>;
519
+ declare function idpUserCreatedTrigger(): IdpUserTrigger<IdpUserCreatedArgs>;
441
520
  /**
442
521
  * Create a trigger that fires when an IdP user is updated.
443
522
  * @returns IdP user updated trigger
444
523
  */
445
- declare function idpUserUpdatedTrigger(): IdpUserTrigger<IdpUserArgs>;
524
+ declare function idpUserUpdatedTrigger(): IdpUserTrigger<IdpUserUpdatedArgs>;
446
525
  /**
447
526
  * Create a trigger that fires when an IdP user is deleted.
448
527
  * @returns IdP user deleted trigger
449
528
  */
450
- declare function idpUserDeletedTrigger(): IdpUserTrigger<IdpUserArgs>;
451
- interface AuthAccessTokenArgs extends EventArgs {
452
- namespaceName: string;
453
- userId: string;
454
- }
529
+ declare function idpUserDeletedTrigger(): IdpUserTrigger<IdpUserDeletedArgs>;
530
+ type IdpUserTriggerOptions<K extends IdpUserEventKind[]> = {
531
+ events: K;
532
+ };
533
+ /**
534
+ * Create a trigger that fires on multiple IdP user event types.
535
+ * @template K
536
+ * @param options - Trigger options with events array
537
+ * @returns IdP user trigger
538
+ */
539
+ declare function idpUserTrigger<const K extends [IdpUserEventKind, ...IdpUserEventKind[]]>(options: IdpUserTriggerOptions<K>): IdpUserTrigger<IdpUserMultiArgs<K>>;
540
+ declare const authAccessTokenEventMap: {
541
+ readonly issued: "auth.access_token.issued";
542
+ readonly refreshed: "auth.access_token.refreshed";
543
+ readonly revoked: "auth.access_token.revoked";
544
+ };
545
+ type AuthAccessTokenEventMap = typeof authAccessTokenEventMap;
546
+ type AuthAccessTokenEventKind = keyof AuthAccessTokenEventMap;
547
+ type AuthAccessTokenArgsMap = {
548
+ issued: AuthAccessTokenIssuedArgs;
549
+ refreshed: AuthAccessTokenRefreshedArgs;
550
+ revoked: AuthAccessTokenRevokedArgs;
551
+ };
552
+ type AuthAccessTokenMultiArgs<K extends AuthAccessTokenEventKind[]> = AuthAccessTokenArgsMap[K[number]];
455
553
  type AuthAccessTokenTrigger<Args> = AuthAccessTokenTrigger$1 & {
456
554
  __args: Args;
457
555
  };
@@ -459,17 +557,27 @@ type AuthAccessTokenTrigger<Args> = AuthAccessTokenTrigger$1 & {
459
557
  * Create a trigger that fires when an access token is issued.
460
558
  * @returns Auth access token issued trigger
461
559
  */
462
- declare function authAccessTokenIssuedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenArgs>;
560
+ declare function authAccessTokenIssuedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenIssuedArgs>;
463
561
  /**
464
562
  * Create a trigger that fires when an access token is refreshed.
465
563
  * @returns Auth access token refreshed trigger
466
564
  */
467
- declare function authAccessTokenRefreshedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenArgs>;
565
+ declare function authAccessTokenRefreshedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRefreshedArgs>;
468
566
  /**
469
567
  * Create a trigger that fires when an access token is revoked.
470
568
  * @returns Auth access token revoked trigger
471
569
  */
472
- declare function authAccessTokenRevokedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenArgs>;
570
+ declare function authAccessTokenRevokedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRevokedArgs>;
571
+ type AuthAccessTokenTriggerOptions<K extends AuthAccessTokenEventKind[]> = {
572
+ events: K;
573
+ };
574
+ /**
575
+ * Create a trigger that fires on multiple auth access token event types.
576
+ * @template K
577
+ * @param options - Trigger options with events array
578
+ * @returns Auth access token trigger
579
+ */
580
+ declare function authAccessTokenTrigger<const K extends [AuthAccessTokenEventKind, ...AuthAccessTokenEventKind[]]>(options: AuthAccessTokenTriggerOptions<K>): AuthAccessTokenTrigger<AuthAccessTokenMultiArgs<K>>;
473
581
  //#endregion
474
582
  //#region src/configure/services/executor/trigger/schedule.d.ts
475
583
  type Timezone = "UTC" | "Pacific/Midway" | "Pacific/Niue" | "Pacific/Pago_Pago" | "America/Adak" | "Pacific/Honolulu" | "Pacific/Rarotonga" | "Pacific/Tahiti" | "Pacific/Marquesas" | "America/Anchorage" | "America/Juneau" | "America/Metlakatla" | "America/Nome" | "America/Sitka" | "America/Yakutat" | "Pacific/Gambier" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "Pacific/Pitcairn" | "America/Boise" | "America/Cambridge_Bay" | "America/Chihuahua" | "America/Creston" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Edmonton" | "America/Fort_Nelson" | "America/Hermosillo" | "America/Inuvik" | "America/Mazatlan" | "America/Ojinaga" | "America/Phoenix" | "America/Whitehorse" | "America/Yellowknife" | "America/Bahia_Banderas" | "America/Belize" | "America/Chicago" | "America/Costa_Rica" | "America/El_Salvador" | "America/Guatemala" | "America/Indiana/Knox" | "America/Indiana/Tell_City" | "America/Managua" | "America/Matamoros" | "America/Menominee" | "America/Merida" | "America/Mexico_City" | "America/Monterrey" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Regina" | "America/Resolute" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Winnipeg" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Atikokan" | "America/Bogota" | "America/Cancun" | "America/Cayman" | "America/Detroit" | "America/Eirunepe" | "America/Grand_Turk" | "America/Guayaquil" | "America/Havana" | "America/Indiana/Indianapolis" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Iqaluit" | "America/Jamaica" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Lima" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Panama" | "America/Pangnirtung" | "America/Port-au-Prince" | "America/Rio_Branco" | "America/Thunder_Bay" | "America/Toronto" | "America/Anguilla" | "America/Antigua" | "America/Aruba" | "America/Asuncion" | "America/Barbados" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Campo_Grande" | "America/Caracas" | "America/Cuiaba" | "America/Curacao" | "America/Dominica" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grenada" | "America/Guadeloupe" | "America/Guyana" | "America/Halifax" | "America/Kralendijk" | "America/La_Paz" | "America/Lower_Princes" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Moncton" | "America/Montserrat" | "America/Porto_Velho" | "America/Port_of_Spain" | "America/Puerto_Rico" | "America/Santiago" | "America/Santo_Domingo" | "America/St_Barthelemy" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Thule" | "America/Tortola" | "Atlantic/Bermuda" | "America/St_Johns" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Bahia" | "America/Belem" | "America/Cayenne" | "America/Fortaleza" | "America/Godthab" | "America/Maceio" | "America/Miquelon" | "America/Montevideo" | "America/Paramaribo" | "America/Punta_Arenas" | "America/Recife" | "America/Santarem" | "America/Sao_Paulo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Atlantic/Stanley" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Scoresbysund" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Abidjan" | "Africa/Accra" | "Africa/Bamako" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Casablanca" | "Africa/Conakry" | "Africa/Dakar" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Sao_Tome" | "America/Danmarkshavn" | "Antarctica/Troll" | "Atlantic/Canary" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/St_Helena" | "Europe/Dublin" | "Europe/Guernsey" | "Europe/Isle_of_Man" | "Europe/Jersey" | "Europe/Lisbon" | "Europe/London" | "Africa/Algiers" | "Africa/Bangui" | "Africa/Brazzaville" | "Africa/Ceuta" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Malabo" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Porto-Novo" | "Africa/Tunis" | "Africa/Windhoek" | "Arctic/Longyearbyen" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Africa/Blantyre" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Tripoli" | "Asia/Amman" | "Asia/Beirut" | "Asia/Damascus" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Jerusalem" | "Asia/Nicosia" | "Europe/Athens" | "Europe/Bucharest" | "Europe/Chisinau" | "Europe/Helsinki" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Mariehamn" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Uzhgorod" | "Europe/Vilnius" | "Europe/Zaporizhzhia" | "Africa/Addis_Ababa" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Africa/Mogadishu" | "Africa/Nairobi" | "Antarctica/Syowa" | "Asia/Aden" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Kuwait" | "Asia/Qatar" | "Asia/Riyadh" | "Europe/Istanbul" | "Europe/Kirov" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Europe/Volgograd" | "Indian/Antananarivo" | "Indian/Comoro" | "Indian/Mayotte" | "Asia/Tehran" | "Asia/Baku" | "Asia/Dubai" | "Asia/Muscat" | "Asia/Tbilisi" | "Asia/Yerevan" | "Europe/Astrakhan" | "Europe/Samara" | "Europe/Saratov" | "Europe/Ulyanovsk" | "Indian/Mahe" | "Indian/Mauritius" | "Indian/Reunion" | "Asia/Kabul" | "Antarctica/Mawson" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Dushanbe" | "Asia/Karachi" | "Asia/Oral" | "Asia/Qyzylorda" | "Asia/Samarkand" | "Asia/Tashkent" | "Asia/Yekaterinburg" | "Indian/Kerguelen" | "Indian/Maldives" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Antarctica/Vostok" | "Asia/Almaty" | "Asia/Bishkek" | "Asia/Dhaka" | "Asia/Omsk" | "Asia/Qostanay" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Yangon" | "Indian/Cocos" | "Antarctica/Davis" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Hovd" | "Asia/Ho_Chi_Minh" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Tomsk" | "Asia/Vientiane" | "Indian/Christmas" | "Asia/Brunei" | "Asia/Choibalsan" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Macau" | "Asia/Makassar" | "Asia/Manila" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Australia/Eucla" | "Asia/Chita" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Khandyga" | "Asia/Pyongyang" | "Asia/Seoul" | "Asia/Tokyo" | "Asia/Yakutsk" | "Pacific/Palau" | "Australia/Adelaide" | "Australia/Broken_Hill" | "Australia/Darwin" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Asia/Ust-Nera" | "Asia/Vladivostok" | "Australia/Brisbane" | "Australia/Currie" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Melbourne" | "Australia/Sydney" | "Pacific/Chuuk" | "Pacific/Guam" | "Pacific/Port_Moresby" | "Pacific/Saipan" | "Australia/Lord_Howe" | "Antarctica/Casey" | "Asia/Magadan" | "Asia/Sakhalin" | "Asia/Srednekolymsk" | "Pacific/Bougainville" | "Pacific/Efate" | "Pacific/Guadalcanal" | "Pacific/Kosrae" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pohnpei" | "Antarctica/McMurdo" | "Asia/Anadyr" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Tarawa" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
@@ -514,7 +622,7 @@ type IncomingWebhookTrigger<Args> = IncomingWebhookTrigger$1 & {
514
622
  declare function incomingWebhookTrigger<T extends IncomingWebhookRequest>(): IncomingWebhookTrigger<IncomingWebhookArgs<T>>;
515
623
  //#endregion
516
624
  //#region src/configure/services/executor/trigger/index.d.ts
517
- type Trigger<Args> = RecordTrigger<Args> | ResolverExecutedTrigger<Args> | ScheduleTrigger<Args> | IncomingWebhookTrigger<Args> | IdpUserTrigger<Args> | AuthAccessTokenTrigger<Args>;
625
+ type Trigger<Args> = TailorDBTrigger<Args> | ResolverExecutedTrigger<Args> | ScheduleTrigger<Args> | IncomingWebhookTrigger<Args> | IdpUserTrigger<Args> | AuthAccessTokenTrigger<Args>;
518
626
  //#endregion
519
627
  //#region src/configure/services/executor/executor.d.ts
520
628
  /**
@@ -684,6 +792,7 @@ declare function definePlugins(...configs: Plugin<any, any>[]): Plugin<any, any>
684
792
  type TailorOutput<T> = output$1<T>;
685
793
  type infer<T> = TailorOutput<T>;
686
794
  type output<T> = TailorOutput<T>;
795
+ /** TailorDB field type builders. */
687
796
  declare const t: {
688
797
  uuid: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
689
798
  type: "uuid";
@@ -757,5 +866,5 @@ declare namespace t {
757
866
  type infer<T> = TailorOutput<T>;
758
867
  }
759
868
  //#endregion
760
- export { AuthInvoker as $, idpUserCreatedTrigger as A, WebhookOperation as B, RecordTrigger as C, authAccessTokenIssuedTrigger as D, ResolverExecutedTrigger as E, recordUpdatedTrigger as F, WORKFLOW_TEST_ENV_KEY as G, Workflow as H, resolverExecutedTrigger as I, WorkflowJobInput as J, WorkflowJob as K, FunctionOperation as L, idpUserUpdatedTrigger as M, recordCreatedTrigger as N, authAccessTokenRefreshedTrigger as O, recordDeletedTrigger as P, createResolver as Q, GqlOperation as R, RecordDeletedArgs as S, ResolverExecutedArgs as T, WorkflowConfig as U, WorkflowOperation as V, createWorkflow as W, createWorkflowJob as X, WorkflowJobOutput as Y, QueryType as Z, AuthAccessTokenArgs as _, defineGenerators as a, IdpUserTrigger as b, createExecutor as c, IncomingWebhookRequest as d, defineAuth as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, idpUserDeletedTrigger as j, authAccessTokenRevokedTrigger as k, Trigger as l, ScheduleArgs as m, output as n, definePlugins as o, incomingWebhookTrigger as p, WorkflowJobContext as q, t as r, defineIdp as s, infer as t, IncomingWebhookArgs as u, AuthAccessTokenTrigger as v, RecordUpdatedArgs as w, RecordCreatedArgs as x, IdpUserArgs as y, Operation as z };
761
- //# sourceMappingURL=index-BYk_9R3S.d.mts.map
869
+ export { createWorkflow as $, ResolverExecutedArgs as A, idpUserUpdatedTrigger as B, IdpUserCreatedArgs as C, RecordCreatedArgs as D, IdpUserUpdatedArgs as E, authAccessTokenRevokedTrigger as F, resolverExecutedTrigger as G, recordDeletedTrigger as H, authAccessTokenTrigger as I, Operation as J, FunctionOperation as K, idpUserCreatedTrigger as L, TailorDBTrigger as M, authAccessTokenIssuedTrigger as N, RecordDeletedArgs as O, authAccessTokenRefreshedTrigger as P, WorkflowConfig as Q, idpUserDeletedTrigger as R, IdpUserArgs as S, IdpUserTrigger as T, recordTrigger as U, recordCreatedTrigger as V, recordUpdatedTrigger as W, WorkflowOperation as X, WebhookOperation as Y, Workflow as Z, AuthAccessTokenArgs as _, defineGenerators as a, createWorkflowJob as at, AuthAccessTokenRevokedArgs as b, createExecutor as c, AuthInvoker as ct, IncomingWebhookRequest as d, WORKFLOW_TEST_ENV_KEY as et, IncomingWebhookTrigger as f, scheduleTrigger as g, ScheduleTrigger as h, defineConfig as i, WorkflowJobOutput as it, ResolverExecutedTrigger as j, RecordUpdatedArgs as k, Trigger as l, defineAuth as lt, ScheduleArgs as m, output as n, WorkflowJobContext as nt, definePlugins as o, QueryType as ot, incomingWebhookTrigger as p, GqlOperation as q, t as r, WorkflowJobInput as rt, defineIdp as s, createResolver as st, infer as t, WorkflowJob as tt, IncomingWebhookArgs as u, AuthAccessTokenIssuedArgs as v, IdpUserDeletedArgs as w, AuthAccessTokenTrigger as x, AuthAccessTokenRefreshedArgs as y, idpUserTrigger as z };
870
+ //# sourceMappingURL=index-BdlrrjvD.d.mts.map
@@ -1,7 +1,8 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
+ import { n as Plugin } from "./plugin-BC7WQrjm.mjs";
3
3
 
4
4
  //#region src/plugin/builtin/file-utils/index.d.ts
5
+ /** Unique identifier for the file utilities generator plugin. */
5
6
  declare const FileUtilsGeneratorID = "@tailor-platform/file-utils";
6
7
  type FileUtilsPluginOptions = {
7
8
  distPath: string;
@@ -15,4 +16,4 @@ type FileUtilsPluginOptions = {
15
16
  declare function fileUtilsPlugin(options: FileUtilsPluginOptions): Plugin<unknown, FileUtilsPluginOptions>;
16
17
  //#endregion
17
18
  export { fileUtilsPlugin as n, FileUtilsGeneratorID as t };
18
- //# sourceMappingURL=index-BQKAzTPA.d.mts.map
19
+ //# sourceMappingURL=index-Dlpe_4Nd.d.mts.map
@@ -1,7 +1,8 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
+ import { n as Plugin } from "./plugin-BC7WQrjm.mjs";
3
3
 
4
4
  //#region src/plugin/builtin/enum-constants/index.d.ts
5
+ /** Unique identifier for the enum constants generator plugin. */
5
6
  declare const EnumConstantsGeneratorID = "@tailor-platform/enum-constants";
6
7
  type EnumConstantsPluginOptions = {
7
8
  distPath: string;
@@ -15,4 +16,4 @@ type EnumConstantsPluginOptions = {
15
16
  declare function enumConstantsPlugin(options: EnumConstantsPluginOptions): Plugin<unknown, EnumConstantsPluginOptions>;
16
17
  //#endregion
17
18
  export { enumConstantsPlugin as n, EnumConstantsGeneratorID as t };
18
- //# sourceMappingURL=index-vVGamLOw.d.mts.map
19
+ //# sourceMappingURL=index-IHl7P_9I.d.mts.map
@@ -1,7 +1,8 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
+ import { n as Plugin } from "./plugin-BC7WQrjm.mjs";
3
3
 
4
4
  //#region src/plugin/builtin/kysely-type/index.d.ts
5
+ /** Unique identifier for the Kysely type generator plugin. */
5
6
  declare const KyselyGeneratorID = "@tailor-platform/kysely-type";
6
7
  type KyselyTypePluginOptions = {
7
8
  distPath: string;
@@ -15,4 +16,4 @@ type KyselyTypePluginOptions = {
15
16
  declare function kyselyTypePlugin(options: KyselyTypePluginOptions): Plugin<unknown, KyselyTypePluginOptions>;
16
17
  //#endregion
17
18
  export { kyselyTypePlugin as n, KyselyGeneratorID as t };
18
- //# sourceMappingURL=index-CgMytw2A.d.mts.map
19
+ //# sourceMappingURL=index-dg3Sf-No.d.mts.map
@@ -1,7 +1,8 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as Plugin } from "./plugin-IIDZW9GG.mjs";
2
+ import { n as Plugin } from "./plugin-BC7WQrjm.mjs";
3
3
 
4
4
  //#region src/plugin/builtin/seed/index.d.ts
5
+ /** Unique identifier for the seed generator plugin. */
5
6
  declare const SeedGeneratorID = "@tailor-platform/seed";
6
7
  type SeedPluginOptions = {
7
8
  distPath: string;
@@ -17,4 +18,4 @@ type SeedPluginOptions = {
17
18
  declare function seedPlugin(options: SeedPluginOptions): Plugin<unknown, SeedPluginOptions>;
18
19
  //#endregion
19
20
  export { seedPlugin as n, SeedGeneratorID as t };
20
- //# sourceMappingURL=index-CoReoodF.d.mts.map
21
+ //# sourceMappingURL=index-uNv9YJgx.d.mts.map
@@ -209,6 +209,7 @@ function generateUnifiedKyselyTypes(namespaceData) {
209
209
 
210
210
  //#endregion
211
211
  //#region src/plugin/builtin/kysely-type/index.ts
212
+ /** Unique identifier for the Kysely type generator plugin. */
212
213
  const KyselyGeneratorID = "@tailor-platform/kysely-type";
213
214
  /**
214
215
  * Plugin that generates Kysely type definitions for TailorDB types.
@@ -258,4 +259,4 @@ function kyselyTypePlugin(options) {
258
259
 
259
260
  //#endregion
260
261
  export { kyselyTypePlugin as n, KyselyGeneratorID as t };
261
- //# sourceMappingURL=kysely-type-BK0b4Rqt.mjs.map
262
+ //# sourceMappingURL=kysely-type-t5MbP7iJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"kysely-type-BK0b4Rqt.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, nestedOperatorFieldConfig]) => ({\n fieldName,\n ...generateFieldType(nestedOperatorFieldConfig),\n }));\n\n const fieldTypes = fieldResults.map((result) => `${result.fieldName}: ${result.type}`);\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const type = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n return { type, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n // Wrap enum types in parentheses before adding array suffix\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAS,YAAY,aAA0C;CAC7D,MAAM,gBAAgB,YAAY;AAElC,KAAI,iBAAiB,MAAM,QAAQ,cAAc,CAC/C,QAAO,cACJ,KAAK,MAAkC;AAEtC,SAAO,IADO,OAAO,MAAM,WAAW,IAAI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CACpC;AAED,qBAAiB,KAAK;KACpB,WAAW,GAAG;KACd,OAAO;KACP;KACD,CAAC;;GAGJ,MAAM,QAAkC,EAAE;AAC1C,OAAI,iBAAiB,SAAS,GAAG;IAC/B,MAAM,UAAU,2BAA2B,iBAAiB;AAC5D,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
1
+ {"version":3,"file":"kysely-type-t5MbP7iJ.mjs","names":[],"sources":["../src/plugin/builtin/kysely-type/type-processor.ts","../src/plugin/builtin/kysely-type/index.ts"],"sourcesContent":["import multiline from \"multiline-ts\";\nimport { type KyselyNamespaceMetadata, type KyselyTypeMetadata } from \"./types\";\nimport type { OperatorFieldConfig, TailorDBType } from \"@/types/tailordb\";\n\ntype UsedUtilityTypes = { Timestamp: boolean; Serial: boolean };\n\ntype FieldTypeResult = {\n type: string;\n usedUtilityTypes: UsedUtilityTypes;\n};\n\n/**\n * Get the enum type definition.\n * @param fieldConfig - The field configuration\n * @returns The enum type as a string union\n */\nfunction getEnumType(fieldConfig: OperatorFieldConfig): string {\n const allowedValues = fieldConfig.allowedValues;\n\n if (allowedValues && Array.isArray(allowedValues)) {\n return allowedValues\n .map((v: string | { value: string }) => {\n const value = typeof v === \"string\" ? v : v.value;\n return `\"${value}\"`;\n })\n .join(\" | \");\n }\n return \"string\";\n}\n\n/**\n * Get the nested object type definition.\n * @param fieldConfig - The field configuration\n * @returns The nested type with used utility types\n */\nfunction getNestedType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fields = fieldConfig.fields;\n if (!fields || typeof fields !== \"object\") {\n return {\n type: \"string\",\n usedUtilityTypes: { Timestamp: false, Serial: false },\n };\n }\n\n const fieldResults = Object.entries(fields).map(([fieldName, nestedOperatorFieldConfig]) => ({\n fieldName,\n ...generateFieldType(nestedOperatorFieldConfig),\n }));\n\n const fieldTypes = fieldResults.map((result) => `${result.fieldName}: ${result.type}`);\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const type = `{\\n ${fieldTypes.join(\";\\n \")}${fieldTypes.length > 0 ? \";\" : \"\"}\\n}`;\n return { type, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Get the base Kysely type for a field (without array/null modifiers).\n * @param fieldConfig - The field configuration\n * @returns The base type with used utility types\n */\nfunction getBaseType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const fieldType = fieldConfig.type;\n const usedUtilityTypes = { Timestamp: false, Serial: false };\n\n let type: string;\n switch (fieldType) {\n case \"uuid\":\n case \"string\":\n case \"decimal\":\n type = \"string\";\n break;\n case \"integer\":\n case \"float\":\n type = \"number\";\n break;\n case \"date\":\n case \"datetime\":\n usedUtilityTypes.Timestamp = true;\n type = \"Timestamp\";\n break;\n case \"bool\":\n case \"boolean\":\n type = \"boolean\";\n break;\n case \"enum\":\n type = getEnumType(fieldConfig);\n break;\n case \"nested\": {\n const nestedResult = getNestedType(fieldConfig);\n return nestedResult;\n }\n default:\n type = \"string\";\n break;\n }\n\n return { type, usedUtilityTypes };\n}\n\n/**\n * Generate the complete field type including array and null modifiers.\n * @param fieldConfig - The field configuration\n * @returns The complete field type with used utility types\n */\nfunction generateFieldType(fieldConfig: OperatorFieldConfig): FieldTypeResult {\n const baseTypeResult = getBaseType(fieldConfig);\n const usedUtilityTypes = { ...baseTypeResult.usedUtilityTypes };\n\n const isArray = fieldConfig.array === true;\n const isNullable = fieldConfig.required !== true;\n\n let finalType = baseTypeResult.type;\n if (isArray) {\n // Wrap enum types in parentheses before adding array suffix\n const needsParens = fieldConfig.type === \"enum\";\n finalType = needsParens ? `(${baseTypeResult.type})[]` : `${baseTypeResult.type}[]`;\n }\n if (isNullable) {\n finalType = `${finalType} | null`;\n }\n\n if (fieldConfig.serial) {\n usedUtilityTypes.Serial = true;\n finalType = `Serial<${finalType}>`;\n }\n if (fieldConfig.hooks?.create) {\n finalType = `Generated<${finalType}>`;\n }\n\n return { type: finalType, usedUtilityTypes };\n}\n\n/**\n * Generate the table interface.\n * @param type - The parsed TailorDB type\n * @returns The type definition and used utility types\n */\nfunction generateTableInterface(type: TailorDBType): {\n typeDef: string;\n usedUtilityTypes: UsedUtilityTypes;\n} {\n const fieldEntries = Object.entries(type.fields).filter(([fieldName]) => fieldName !== \"id\");\n\n const fieldResults = fieldEntries.map(([fieldName, parsedField]) => ({\n fieldName,\n ...generateFieldType(parsedField.config),\n }));\n\n const fields = [\n \"id: Generated<string>;\",\n ...fieldResults.map((result) => `${result.fieldName}: ${result.type};`),\n ];\n\n const aggregatedUtilityTypes = fieldResults.reduce(\n (acc, result) => ({\n Timestamp: acc.Timestamp || result.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || result.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const typeDef = multiline /* ts */ `\n ${type.name}: {\n ${fields.join(\"\\n\")}\n }\n `;\n\n return { typeDef, usedUtilityTypes: aggregatedUtilityTypes };\n}\n\n/**\n * Convert a TailorDBType into KyselyTypeMetadata.\n * @param type - Parsed TailorDB type\n * @returns Generated Kysely type metadata\n */\nexport async function processKyselyType(type: TailorDBType): Promise<KyselyTypeMetadata> {\n const result = generateTableInterface(type);\n\n return {\n name: type.name,\n typeDef: result.typeDef,\n usedUtilityTypes: result.usedUtilityTypes,\n };\n}\n\n/**\n * Generate unified types file from multiple namespaces.\n * @param namespaceData - Namespace metadata\n * @returns Generated types file contents\n */\nexport function generateUnifiedKyselyTypes(namespaceData: KyselyNamespaceMetadata[]): string {\n if (namespaceData.length === 0) {\n return \"\";\n }\n\n // Aggregate used utility types from all namespaces\n const globalUsedUtilityTypes = namespaceData.reduce(\n (acc, ns) => ({\n Timestamp: acc.Timestamp || ns.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || ns.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n const utilityTypeImports: string[] = [\"type Generated\"];\n if (globalUsedUtilityTypes.Timestamp) {\n utilityTypeImports.push(\"type Timestamp\");\n }\n if (globalUsedUtilityTypes.Serial) {\n utilityTypeImports.push(\"type Serial\");\n }\n\n const importsSection = multiline /* ts */ `\n import {\n createGetDB,\n ${utilityTypeImports.join(\",\\n\")},\n type NamespaceDB,\n type NamespaceInsertable,\n type NamespaceSelectable,\n type NamespaceTable,\n type NamespaceTableName,\n type NamespaceTransaction,\n type NamespaceUpdateable,\n } from \"@tailor-platform/sdk/kysely\";\n `;\n\n // Generate Namespace interface with multiple namespaces\n const namespaceInterfaces = namespaceData\n .map(({ namespace, types }) => {\n const typeDefsWithIndent = types\n .map((type) => {\n return type.typeDef\n .split(\"\\n\")\n .map((line) => (line.trim() ? ` ${line}` : \"\"))\n .join(\"\\n\");\n })\n .join(\"\\n\\n\");\n\n return ` \"${namespace}\": {\\n${typeDefsWithIndent}\\n }`;\n })\n .join(\",\\n\");\n\n const namespaceInterface = `export interface Namespace {\\n${namespaceInterfaces}\\n}`;\n\n const getDBFunction = multiline /* ts */ `\n export const getDB = createGetDB<Namespace>();\n\n export type DB<N extends keyof Namespace = keyof Namespace> = NamespaceDB<Namespace, N>;\n `;\n\n const utilityTypeExports = multiline /* ts */ `\n export type Transaction<K extends keyof Namespace | DB = keyof Namespace> =\n NamespaceTransaction<Namespace, K>;\n\n type TableName = NamespaceTableName<Namespace>;\n export type Table<T extends TableName> = NamespaceTable<Namespace, T>;\n\n export type Insertable<T extends TableName> = NamespaceInsertable<Namespace, T>;\n export type Selectable<T extends TableName> = NamespaceSelectable<Namespace, T>;\n export type Updateable<T extends TableName> = NamespaceUpdateable<Namespace, T>;\n `;\n\n return (\n [importsSection, namespaceInterface, getDBFunction, utilityTypeExports].join(\"\\n\\n\") + \"\\n\"\n );\n}\n","import { processKyselyType, generateUnifiedKyselyTypes } from \"./type-processor\";\nimport type { KyselyTypeMetadata, KyselyNamespaceMetadata } from \"./types\";\nimport type { Plugin } from \"@/types/plugin\";\nimport type { GeneratorResult, TailorDBReadyContext } from \"@/types/plugin-generation\";\n\n/** Unique identifier for the Kysely type generator plugin. */\nexport const KyselyGeneratorID = \"@tailor-platform/kysely-type\";\n\ntype KyselyTypePluginOptions = {\n distPath: string;\n};\n\n/**\n * Plugin that generates Kysely type definitions for TailorDB types.\n * @param options - Plugin options\n * @param options.distPath - Output file path for generated types\n * @returns Plugin instance with onTailorDBReady hook\n */\nexport function kyselyTypePlugin(\n options: KyselyTypePluginOptions,\n): Plugin<unknown, KyselyTypePluginOptions> {\n return {\n id: KyselyGeneratorID,\n description: \"Generates Kysely type definitions for TailorDB types\",\n pluginConfig: options,\n\n async onTailorDBReady(\n ctx: TailorDBReadyContext<KyselyTypePluginOptions>,\n ): Promise<GeneratorResult> {\n const allNamespaceData: KyselyNamespaceMetadata[] = [];\n\n for (const ns of ctx.tailordb) {\n const typeMetadataList: KyselyTypeMetadata[] = [];\n\n for (const type of Object.values(ns.types)) {\n const metadata = await processKyselyType(type);\n typeMetadataList.push(metadata);\n }\n\n if (typeMetadataList.length === 0) continue;\n\n const usedUtilityTypes = typeMetadataList.reduce(\n (acc, type) => ({\n Timestamp: acc.Timestamp || type.usedUtilityTypes.Timestamp,\n Serial: acc.Serial || type.usedUtilityTypes.Serial,\n }),\n { Timestamp: false, Serial: false },\n );\n\n allNamespaceData.push({\n namespace: ns.namespace,\n types: typeMetadataList,\n usedUtilityTypes,\n });\n }\n\n const files: GeneratorResult[\"files\"] = [];\n if (allNamespaceData.length > 0) {\n const content = generateUnifiedKyselyTypes(allNamespaceData);\n files.push({\n path: ctx.pluginConfig.distPath,\n content,\n });\n }\n\n return { files };\n },\n };\n}\n"],"mappings":";;;;;;;;;AAgBA,SAAS,YAAY,aAA0C;CAC7D,MAAM,gBAAgB,YAAY;AAElC,KAAI,iBAAiB,MAAM,QAAQ,cAAc,CAC/C,QAAO,cACJ,KAA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iBAAiB;KAC7C,GACD;KAAE,WAAW;KAAO,QAAQ;KAAO,CACpC;AAED,qBAAiB,KAAK;KACpB,WAAW,GAAG;KACd,OAAO;KACP;KACD,CAAC;;GAGJ,MAAM,QAAkC,EAAE;AAC1C,OAAI,iBAAiB,SAAS,GAAG;IAC/B,MAAM,UAAU,2BAA2B,iBAAiB;AAC5D,UAAM,KAAK;KACT,MAAM,IAAI,aAAa;KACvB;KACD,CAAC;;AAGJ,UAAO,EAAE,OAAO;;EAEnB"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-vVGamLOw.mjs";
2
+ import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../index-IHl7P_9I.mjs";
3
3
  export { EnumConstantsGeneratorID, enumConstantsPlugin };
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../chunk-COzJYswC.mjs";
3
- import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-CkKARYb7.mjs";
3
+ import { n as enumConstantsPlugin, t as EnumConstantsGeneratorID } from "../../../enum-constants-Piv_E-2M.mjs";
4
4
 
5
5
  export { EnumConstantsGeneratorID, enumConstantsPlugin };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-BQKAzTPA.mjs";
2
+ import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../index-Dlpe_4Nd.mjs";
3
3
  export { FileUtilsGeneratorID, fileUtilsPlugin };
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../chunk-COzJYswC.mjs";
3
- import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-D2TxR_kj.mjs";
3
+ import { n as fileUtilsPlugin, t as FileUtilsGeneratorID } from "../../../file-utils-B7xME5IK.mjs";
4
4
 
5
5
  export { FileUtilsGeneratorID, fileUtilsPlugin };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-CgMytw2A.mjs";
2
+ import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../index-dg3Sf-No.mjs";
3
3
  export { KyselyGeneratorID, kyselyTypePlugin };
@@ -1,5 +1,5 @@
1
1
 
2
2
  import "../../../chunk-COzJYswC.mjs";
3
- import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-BK0b4Rqt.mjs";
3
+ import { n as kyselyTypePlugin, t as KyselyGeneratorID } from "../../../kysely-type-t5MbP7iJ.mjs";
4
4
 
5
5
  export { KyselyGeneratorID, kyselyTypePlugin };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@tailor-platform/function-types" />
2
- import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-CoReoodF.mjs";
2
+ import { n as seedPlugin, t as SeedGeneratorID } from "../../../index-uNv9YJgx.mjs";
3
3
  export { SeedGeneratorID, seedPlugin };