@tailor-platform/sdk 2.3.0 → 2.5.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 (257) hide show
  1. package/CHANGELOG.md +171 -0
  2. package/README.md +1 -1
  3. package/dist/aigateway-DsWDjzk4.mjs +2 -0
  4. package/dist/{aigateway-DR4Kwuik.mjs.map → aigateway-DsWDjzk4.mjs.map} +1 -1
  5. package/dist/application-DFOUovmN.mjs +1 -0
  6. package/dist/application-D_4vg1KR.mjs +192 -0
  7. package/dist/application-D_4vg1KR.mjs.map +1 -0
  8. package/dist/assert-WeXvmG4j.mjs +2 -0
  9. package/dist/{assert-DBxo8jPo.mjs.map → assert-WeXvmG4j.mjs.map} +1 -1
  10. package/dist/authconnection-CynFBIv8.mjs +2 -0
  11. package/dist/{authconnection-CZvi9ANm.mjs.map → authconnection-CynFBIv8.mjs.map} +1 -1
  12. package/dist/brand-C8nMKhJC.mjs +2 -0
  13. package/dist/{brand-Eo4pLXPJ.mjs.map → brand-C8nMKhJC.mjs.map} +1 -1
  14. package/dist/cli/commands/deploy/deploy.d.mts +2 -2
  15. package/dist/cli/commands/deploy/deployment-target.d.mts +2 -0
  16. package/dist/cli/commands/deploy/event-subscriptions.d.mts +3 -0
  17. package/dist/cli/commands/deploy/tailordb/apply.d.mts +3 -0
  18. package/dist/cli/commands/deploy/tailordb/index.d.mts +3 -10
  19. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +5 -0
  20. package/dist/cli/commands/deploy/tailordb/plan.d.mts +8 -0
  21. package/dist/cli/commands/executor/jobs.d.mts +1 -1
  22. package/dist/cli/commands/generate/seed/bundler.d.mts +2 -2
  23. package/dist/cli/commands/show.d.mts +1 -1
  24. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +15 -15
  25. package/dist/cli/commands/tailordb/migrate/generate.d.mts +7 -3
  26. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +1 -1
  27. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +43 -0
  28. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +62 -0
  29. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +12 -0
  30. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +12 -0
  31. package/dist/cli/commands/tailordb/migrate/snapshot-remote.d.mts +1 -0
  32. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +3 -1
  33. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +5 -117
  34. package/dist/cli/commands/tailordb/truncate.d.mts +2 -2
  35. package/dist/cli/lib.d.mts +8 -4
  36. package/dist/cli/lib.mjs +1 -9
  37. package/dist/cli/lib.mjs.map +1 -1
  38. package/dist/cli/main.mjs +1170 -7686
  39. package/dist/cli/main.mjs.map +1 -1
  40. package/dist/cli/shared/seed-chunker.d.mts +5 -5
  41. package/dist/cli/ts-hook.mjs +3 -1
  42. package/dist/completion/zsh-worker.zsh +99 -18
  43. package/dist/configure/config/index.d.mts +2 -2
  44. package/dist/configure/config/types.d.mts +2 -2
  45. package/dist/configure/index.d.mts +49 -12
  46. package/dist/configure/index.mjs +1 -1267
  47. package/dist/configure/index.mjs.map +1 -1
  48. package/dist/configure/services/aigateway/index.d.mts +5 -4
  49. package/dist/configure/services/aigateway/types.d.mts +6 -1
  50. package/dist/configure/services/auth/types.d.mts +3 -3
  51. package/dist/configure/services/idp/types.d.mts +1 -1
  52. package/dist/configure/services/tailordb/permission.d.mts +1 -1
  53. package/dist/configure/services/tailordb/schema.d.mts +5 -9
  54. package/dist/configure/services/tailordb/types.d.mts +8 -5
  55. package/dist/configure/services/workflow/execution-policy.d.mts +3 -3
  56. package/dist/configure/services/workflow/job.d.mts +12 -2
  57. package/dist/configure/types/auth-namespace-name.d.mts +18 -0
  58. package/dist/configure/types/field.types.d.mts +1 -1
  59. package/dist/configure/types/permission-operand.types.d.mts +1 -1
  60. package/dist/context-D0QjfxzD.mjs +2 -0
  61. package/dist/{context-DYQVYWqZ.mjs.map → context-D0QjfxzD.mjs.map} +1 -1
  62. package/dist/crashreport-B-_HTKLr.mjs +42 -0
  63. package/dist/{crashreport-CIIfLnoO.mjs.map → crashreport-B-_HTKLr.mjs.map} +1 -1
  64. package/dist/crashreport-BmsRIdpy.mjs +1 -0
  65. package/dist/errors-DSEXKRVD.mjs +2 -0
  66. package/dist/errors-DSEXKRVD.mjs.map +1 -0
  67. package/dist/file-COPYfju_.mjs +2 -0
  68. package/dist/file-COPYfju_.mjs.map +1 -0
  69. package/dist/globals-CMHSnj4w.mjs +2 -0
  70. package/dist/{globals-B2nlxBrz.mjs.map → globals-CMHSnj4w.mjs.map} +1 -1
  71. package/dist/iconv-DlFMt2gW.mjs +2 -0
  72. package/dist/{iconv-QWaZh0TT.mjs.map → iconv-DlFMt2gW.mjs.map} +1 -1
  73. package/dist/idp-G_ojPBB5.mjs +2 -0
  74. package/dist/{idp-RA_swu-h.mjs.map → idp-G_ojPBB5.mjs.map} +1 -1
  75. package/dist/interceptor-DQg3cR_9.mjs +2 -0
  76. package/dist/{interceptor-e33JtsC-.mjs.map → interceptor-DQg3cR_9.mjs.map} +1 -1
  77. package/dist/kysely/index.mjs +1 -31
  78. package/dist/kysely/index.mjs.map +1 -1
  79. package/dist/kysely-type-BTi3BMtL.mjs +43 -0
  80. package/dist/kysely-type-BTi3BMtL.mjs.map +1 -0
  81. package/dist/logger-BcGy-u7G.mjs +9 -0
  82. package/dist/{logger-DSdExfor.mjs.map → logger-BcGy-u7G.mjs.map} +1 -1
  83. package/dist/logger-DP2BjQ93.mjs +2 -0
  84. package/dist/{logger-BtX0suGY.mjs.map → logger-DP2BjQ93.mjs.map} +1 -1
  85. package/dist/multiline-EyzjEwn9.mjs +3 -0
  86. package/dist/{multiline-sfHpTZZK.mjs.map → multiline-EyzjEwn9.mjs.map} +1 -1
  87. package/dist/node-builtins-oBl7EbyV.mjs +2 -0
  88. package/dist/{node-builtins-CmaL2Cbq.mjs.map → node-builtins-oBl7EbyV.mjs.map} +1 -1
  89. package/dist/package-json-C690ceex.mjs +2 -0
  90. package/dist/{package-json-8b0O9TlX.mjs.map → package-json-C690ceex.mjs.map} +1 -1
  91. package/dist/package-json-CmqhDJ__.mjs +1 -0
  92. package/dist/parser/service/tailordb/type-source.d.mts +5 -5
  93. package/dist/parser/service/tailordb/types.d.mts +4 -4
  94. package/dist/platform-serialize-DkiTdHOt.mjs +2 -0
  95. package/dist/{platform-serialize-RoRtBS0v.mjs.map → platform-serialize-DkiTdHOt.mjs.map} +1 -1
  96. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  97. package/dist/plugin/builtin/enum-constants/index.mjs +5 -114
  98. package/dist/plugin/builtin/enum-constants/index.mjs.map +1 -1
  99. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  100. package/dist/plugin/builtin/file-utils/index.mjs +22 -101
  101. package/dist/plugin/builtin/file-utils/index.mjs.map +1 -1
  102. package/dist/plugin/builtin/kysely-type/index.d.mts +9 -2
  103. package/dist/plugin/builtin/kysely-type/index.mjs +1 -275
  104. package/dist/plugin/builtin/seed/index.d.mts +5 -0
  105. package/dist/plugin/builtin/seed/index.mjs +1 -3
  106. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -6
  107. package/dist/plugin/get-generated-table.d.mts +16 -0
  108. package/dist/plugin/index.d.mts +3 -2
  109. package/dist/plugin/index.mjs +1 -251
  110. package/dist/plugin/index.mjs.map +1 -1
  111. package/dist/plugin/types.d.mts +32 -25
  112. package/dist/plugin/with-context.d.mts +4 -4
  113. package/dist/register-ts-hook-Drnaproy.mjs +640 -0
  114. package/dist/register-ts-hook-Drnaproy.mjs.map +1 -0
  115. package/dist/registry-HlEaGvl5.mjs +2 -0
  116. package/dist/{registry-BIGVUrMB.mjs.map → registry-HlEaGvl5.mjs.map} +1 -1
  117. package/dist/repl-editor-BG1aDOfH.mjs +2 -0
  118. package/dist/{repl-editor-BCozyiNq.mjs.map → repl-editor-BG1aDOfH.mjs.map} +1 -1
  119. package/dist/runtime/aigateway.mjs +1 -3
  120. package/dist/runtime/authconnection.mjs +1 -3
  121. package/dist/runtime/context.mjs +1 -3
  122. package/dist/runtime/file.d.mts +28 -28
  123. package/dist/runtime/file.mjs +1 -3
  124. package/dist/runtime/globals.mjs +1 -1
  125. package/dist/runtime/iconv.mjs +1 -3
  126. package/dist/runtime/idp.mjs +1 -3
  127. package/dist/runtime/index.mjs +1 -11
  128. package/dist/runtime/logger.mjs +1 -3
  129. package/dist/runtime/secretmanager.mjs +1 -3
  130. package/dist/runtime/types.d.mts +1 -1
  131. package/dist/runtime/workflow.mjs +1 -3
  132. package/dist/schema-Ze_dI5VX.mjs +2 -0
  133. package/dist/schema-Ze_dI5VX.mjs.map +1 -0
  134. package/dist/secret-file-C9wp_FCX.mjs +2 -0
  135. package/dist/{secret-file-C3J4Gy8r.mjs.map → secret-file-C9wp_FCX.mjs.map} +1 -1
  136. package/dist/secretmanager-5olfnI1b.mjs +2 -0
  137. package/dist/{secretmanager-IY4UvinW.mjs.map → secretmanager-5olfnI1b.mjs.map} +1 -1
  138. package/dist/secretmanager-vHQoXdQz.mjs +2 -0
  139. package/dist/{secretmanager-CYlpffsz.mjs.map → secretmanager-vHQoXdQz.mjs.map} +1 -1
  140. package/dist/seed/index.d.mts +4 -4
  141. package/dist/seed/index.mjs +8 -244
  142. package/dist/seed/index.mjs.map +1 -1
  143. package/dist/seed-DwqRFdqP.mjs +207 -0
  144. package/dist/seed-DwqRFdqP.mjs.map +1 -0
  145. package/dist/service-BVe9u2Rt.mjs +7 -0
  146. package/dist/service-BVe9u2Rt.mjs.map +1 -0
  147. package/dist/service-CpZELSBa.mjs +1 -0
  148. package/dist/service-DlgaUO4V.mjs +2 -0
  149. package/dist/{service-hZskxZmg.mjs.map → service-DlgaUO4V.mjs.map} +1 -1
  150. package/dist/service_pb-DGKCLuAs.mjs +2 -0
  151. package/dist/{service_pb-BEWj1pOV.mjs.map → service_pb-DGKCLuAs.mjs.map} +1 -1
  152. package/dist/service_pb-_aeFE-Nv.mjs +1 -0
  153. package/dist/telemetry-Bklv9kQY.mjs +2 -0
  154. package/dist/{telemetry-BRVdwh14.mjs.map → telemetry-Bklv9kQY.mjs.map} +1 -1
  155. package/dist/telemetry-DXHP3VVi.mjs +1 -0
  156. package/dist/type-source--ZNcV8RJ.mjs +2 -0
  157. package/dist/type-source--ZNcV8RJ.mjs.map +1 -0
  158. package/dist/types/aigateway.generated.d.mts +2 -2
  159. package/dist/types/auth.generated.d.mts +3 -3
  160. package/dist/types/executor.generated.d.mts +2 -2
  161. package/dist/types/tailordb.generated.d.mts +12 -12
  162. package/dist/user-agent-vdHYF3QL.mjs +2 -0
  163. package/dist/{user-agent-Bgsszb5I.mjs.map → user-agent-vdHYF3QL.mjs.map} +1 -1
  164. package/dist/utils/test/index.d.mts +4 -4
  165. package/dist/utils/test/index.mjs +1 -109
  166. package/dist/utils/test/index.mjs.map +1 -1
  167. package/dist/vitest/environment.mjs +1 -41
  168. package/dist/vitest/environment.mjs.map +1 -1
  169. package/dist/vitest/index.mjs +1 -1980
  170. package/dist/vitest/index.mjs.map +1 -1
  171. package/dist/vitest/mocks/file.d.mts +8 -8
  172. package/dist/vitest/setup.mjs +1 -140
  173. package/dist/vitest/setup.mjs.map +1 -1
  174. package/dist/wait-point-invoker-eiP-IIux.mjs +2 -0
  175. package/dist/wait-point-invoker-eiP-IIux.mjs.map +1 -0
  176. package/dist/wait-point-registry-BrkwfyjS.mjs +2 -0
  177. package/dist/{wait-point-registry-TL99zotw.mjs.map → wait-point-registry-BrkwfyjS.mjs.map} +1 -1
  178. package/dist/workflow-Cs9ISw6j.mjs +2 -0
  179. package/dist/{workflow-Bamae_Yc.mjs.map → workflow-Cs9ISw6j.mjs.map} +1 -1
  180. package/dist/workspace_resource_pb--GeYQPXu.mjs +2 -0
  181. package/dist/{workspace_resource_pb-HNIL_Vfj.mjs.map → workspace_resource_pb--GeYQPXu.mjs.map} +1 -1
  182. package/docs/cli/application.md +3 -1
  183. package/docs/cli/function.md +77 -13
  184. package/docs/cli/setup.md +24 -14
  185. package/docs/cli/tailordb.md +32 -30
  186. package/docs/cli/workspace.md +2 -2
  187. package/docs/cli-reference.md +23 -22
  188. package/docs/configuration.md +2 -2
  189. package/docs/github-actions.md +10 -9
  190. package/docs/migration/v2.md +16 -4
  191. package/docs/migration/v3.md +123 -0
  192. package/docs/plugin/custom.md +130 -85
  193. package/docs/plugin/index.md +3 -3
  194. package/docs/quickstart.md +1 -1
  195. package/docs/services/aigateway.md +33 -9
  196. package/docs/services/executor.md +5 -1
  197. package/docs/services/tailordb-migration.md +68 -54
  198. package/docs/services/tailordb.md +7 -7
  199. package/docs/services/workflow.md +10 -9
  200. package/docs/testing.md +1 -1
  201. package/package.json +16 -16
  202. package/postinstall.mjs +1 -1
  203. package/dist/aigateway-DR4Kwuik.mjs +0 -9
  204. package/dist/application-BZfk4HKm.mjs +0 -3
  205. package/dist/application-F-nl107y.mjs +0 -6019
  206. package/dist/application-F-nl107y.mjs.map +0 -1
  207. package/dist/assert-DBxo8jPo.mjs +0 -9
  208. package/dist/authconnection-CZvi9ANm.mjs +0 -9
  209. package/dist/brand-Eo4pLXPJ.mjs +0 -36
  210. package/dist/context-DYQVYWqZ.mjs +0 -23
  211. package/dist/crashreport-CIIfLnoO.mjs +0 -423
  212. package/dist/crashreport-CINZ5dVN.mjs +0 -3
  213. package/dist/errors-BVb6vYGy.mjs +0 -89
  214. package/dist/errors-BVb6vYGy.mjs.map +0 -1
  215. package/dist/file-BUcmVIH2.mjs +0 -58
  216. package/dist/file-BUcmVIH2.mjs.map +0 -1
  217. package/dist/globals-B2nlxBrz.mjs +0 -126
  218. package/dist/iconv-QWaZh0TT.mjs +0 -38
  219. package/dist/idp-RA_swu-h.mjs +0 -82
  220. package/dist/interceptor-e33JtsC-.mjs +0 -33
  221. package/dist/logger-BtX0suGY.mjs +0 -48
  222. package/dist/logger-DSdExfor.mjs +0 -358
  223. package/dist/multiline-sfHpTZZK.mjs +0 -38
  224. package/dist/node-builtins-CmaL2Cbq.mjs +0 -36
  225. package/dist/package-json-8b0O9TlX.mjs +0 -17
  226. package/dist/package-json-Cv2Z-TqQ.mjs +0 -3
  227. package/dist/platform-serialize-RoRtBS0v.mjs +0 -46
  228. package/dist/plugin/builtin/kysely-type/index.mjs.map +0 -1
  229. package/dist/plugin/builtin/seed/types.d.mts +0 -2
  230. package/dist/plugin/get-generated-type.d.mts +0 -16
  231. package/dist/register-ts-hook-ClI226n2.mjs +0 -25543
  232. package/dist/register-ts-hook-ClI226n2.mjs.map +0 -1
  233. package/dist/registry-BIGVUrMB.mjs +0 -54
  234. package/dist/repl-editor-BCozyiNq.mjs +0 -251
  235. package/dist/schema--xYWRGfe.mjs +0 -639
  236. package/dist/schema--xYWRGfe.mjs.map +0 -1
  237. package/dist/secret-file-C3J4Gy8r.mjs +0 -64
  238. package/dist/secretmanager-CYlpffsz.mjs +0 -13
  239. package/dist/secretmanager-IY4UvinW.mjs +0 -131
  240. package/dist/seed-xqM9WIHP.mjs +0 -483
  241. package/dist/seed-xqM9WIHP.mjs.map +0 -1
  242. package/dist/service-C_WpbKHu.mjs +0 -898
  243. package/dist/service-C_WpbKHu.mjs.map +0 -1
  244. package/dist/service-D1RCdzIL.mjs +0 -3
  245. package/dist/service-hZskxZmg.mjs +0 -131
  246. package/dist/service_pb-BEWj1pOV.mjs +0 -167
  247. package/dist/service_pb-BjlhvK9E.mjs +0 -3
  248. package/dist/telemetry-BRVdwh14.mjs +0 -84
  249. package/dist/telemetry-CkbkeJxl.mjs +0 -3
  250. package/dist/type-source-DH_LH20p.mjs +0 -13
  251. package/dist/type-source-DH_LH20p.mjs.map +0 -1
  252. package/dist/user-agent-Bgsszb5I.mjs +0 -28
  253. package/dist/wait-point-invoker-__oE88_P.mjs +0 -148
  254. package/dist/wait-point-invoker-__oE88_P.mjs.map +0 -1
  255. package/dist/wait-point-registry-TL99zotw.mjs +0 -47
  256. package/dist/workflow-Bamae_Yc.mjs +0 -34
  257. package/dist/workspace_resource_pb-HNIL_Vfj.mjs +0 -860
@@ -1,7 +1,7 @@
1
1
  import { JsonObject } from "type-fest";
2
2
  //#region src/cli/shared/seed-chunker.d.ts
3
3
  /**
4
- * Seed data keyed by type name, with an array of records per type.
4
+ * Seed data keyed by table name, with an array of records per table.
5
5
  */
6
6
  type SeedData = Record<string, JsonObject[]>;
7
7
  /**
@@ -32,10 +32,10 @@ type ChunkSeedDataOptions = {
32
32
  * Algorithm:
33
33
  * 1. Calculate the available budget for the arg field (maxMessageSize - codeByteSize - overhead)
34
34
  * 2. If all data fits in one message, return a single chunk
35
- * 3. Otherwise, iterate through types in dependency order:
36
- * - If a type fits in the current chunk, add it
37
- * - If adding a type would exceed the budget, finalize the current chunk and start a new one
38
- * - If a single type exceeds the budget, split its records across multiple chunks
35
+ * 3. Otherwise, iterate through tables in dependency order:
36
+ * - If a table fits in the current chunk, add it
37
+ * - If adding a table would exceed the budget, finalize the current chunk and start a new one
38
+ * - If a single table exceeds the budget, split its records across multiple chunks
39
39
  * - If a single record exceeds the budget, throw an error
40
40
  * @param options - Chunking options
41
41
  * @returns Array of seed chunks
@@ -287,7 +287,9 @@ export async function load(url, context, nextLoad) {
287
287
  return nextLoad(url, context);
288
288
  }
289
289
 
290
- // Sync hooks for module.registerHooks() (Node >= 22.15.0).
290
+ // Sync hooks for module.registerHooks() (Node >= 22.15.0). Node < 22.18.0 crashes
291
+ // on require() of scheme-only builtins (node:sqlite, node:test, node:sea) once both
292
+ // resolve and load are registered — nodejs/node#58607, fixed by nodejs/node#58612.
291
293
  export function resolveSync(specifier, context, nextResolve) {
292
294
  const resolved = resolveTsSync(specifier, context, nextResolve);
293
295
  return isProjectLocalSpecifier(specifier) ? propagateImportNonce(resolved, context) : resolved;
@@ -1,5 +1,5 @@
1
1
  # politty-completion-version: 1
2
- # politty-bin-sig: 1786713018
2
+ # politty-bin-sig: 1787528353
3
3
  # politty-bin-path: /home/runner/work/sdk/sdk/node_modules/.bin/tailor
4
4
  # program: tailor
5
5
  # shell: zsh
@@ -590,12 +590,22 @@ __tailor_worker_opt_takes_value() {
590
590
  function:logs:--profile|function:logs:-p|function:logs:--p) return 0 ;;
591
591
  function:logs:--order) return 0 ;;
592
592
  function:logs:--limit|function:logs:-l|function:logs:--l) return 0 ;;
593
+ function:run:--workspace-id|function:run:--workspaceId|function:run:-w|function:run:--w) return 0 ;;
594
+ function:run:--profile|function:run:-p|function:run:--p) return 0 ;;
595
+ function:run:--name|function:run:-n|function:run:--n) return 0 ;;
596
+ function:run:--arg|function:run:-a|function:run:--a) return 0 ;;
597
+ function:run:--machine-user|function:run:--machineUser|function:run:-m|function:run:--m) return 0 ;;
598
+ function:run:--config|function:run:-c|function:run:--c) return 0 ;;
593
599
  function:test-run:--workspace-id|function:test-run:--workspaceId|function:test-run:-w|function:test-run:--w) return 0 ;;
594
600
  function:test-run:--profile|function:test-run:-p|function:test-run:--p) return 0 ;;
595
601
  function:test-run:--name|function:test-run:-n|function:test-run:--n) return 0 ;;
596
602
  function:test-run:--arg|function:test-run:-a|function:test-run:--a) return 0 ;;
597
603
  function:test-run:--machine-user|function:test-run:--machineUser|function:test-run:-m|function:test-run:--m) return 0 ;;
598
604
  function:test-run:--config|function:test-run:-c|function:test-run:--c) return 0 ;;
605
+ function:script:--workspace-id|function:script:--workspaceId|function:script:-w|function:script:--w) return 0 ;;
606
+ function:script:--profile|function:script:-p|function:script:--p) return 0 ;;
607
+ function:script:--config|function:script:-c|function:script:--c) return 0 ;;
608
+ function:script:--namespace) return 0 ;;
599
609
  generate:--config|generate:-c|generate:--c) return 0 ;;
600
610
  init:--template|init:-t|init:--t) return 0 ;;
601
611
  login:--profile|login:-p|login:--p) return 0 ;;
@@ -696,7 +706,7 @@ __tailor_worker_opt_takes_value() {
696
706
  secret:delete:--vault-name|secret:delete:--vaultName|secret:delete:-V|secret:delete:--V) return 0 ;;
697
707
  secret:delete:--name|secret:delete:-n|secret:delete:--n) return 0 ;;
698
708
  setup:branch:--name|setup:branch:-n|setup:branch:--n) return 0 ;;
699
- setup:branch:--branch) return 0 ;;
709
+ setup:branch:--target) return 0 ;;
700
710
  setup:branch:--environment) return 0 ;;
701
711
  setup:branch:--dir|setup:branch:-d|setup:branch:--d) return 0 ;;
702
712
  setup:tag:--name|setup:tag:-n|setup:tag:--n) return 0 ;;
@@ -716,6 +726,7 @@ __tailor_worker_opt_takes_value() {
716
726
  setup:coordinate:--action) return 0 ;;
717
727
  setup:coordinate:--branch) return 0 ;;
718
728
  setup:coordinate:--environment) return 0 ;;
729
+ setup:deps:--provider) return 0 ;;
719
730
  show:--workspace-id|show:--workspaceId|show:-w|show:--w) return 0 ;;
720
731
  show:--profile|show:-p|show:--p) return 0 ;;
721
732
  show:--config|show:-c|show:--c) return 0 ;;
@@ -739,6 +750,7 @@ __tailor_worker_opt_takes_value() {
739
750
  tailordb:truncate:--namespace|tailordb:truncate:-n|tailordb:truncate:--n) return 0 ;;
740
751
  tailordb:migration:generate:--config|tailordb:migration:generate:-c|tailordb:migration:generate:--c) return 0 ;;
741
752
  tailordb:migration:generate:--name|tailordb:migration:generate:-n|tailordb:migration:generate:--n) return 0 ;;
753
+ tailordb:migration:generate:--namespace) return 0 ;;
742
754
  tailordb:migration:generate:--rename) return 0 ;;
743
755
  tailordb:migration:generate:--drop) return 0 ;;
744
756
  tailordb:migration:generate:--expand-contract|tailordb:migration:generate:--expandContract) return 0 ;;
@@ -901,7 +913,9 @@ __tailor_worker_is_subcmd() {
901
913
  function:get) return 0 ;;
902
914
  function:list) return 0 ;;
903
915
  function:logs) return 0 ;;
916
+ function:run) return 0 ;;
904
917
  function:test-run) return 0 ;;
918
+ function:script) return 0 ;;
905
919
  :function) return 0 ;;
906
920
  :generate) return 0 ;;
907
921
  :init) return 0 ;;
@@ -948,7 +962,7 @@ __tailor_worker_is_subcmd() {
948
962
  setup:preview) return 0 ;;
949
963
  setup:action) return 0 ;;
950
964
  setup:coordinate) return 0 ;;
951
- setup:renovate) return 0 ;;
965
+ setup:deps) return 0 ;;
952
966
  setup:check) return 0 ;;
953
967
  setup:delete) return 0 ;;
954
968
  :setup) return 0 ;;
@@ -1649,9 +1663,9 @@ __tailor_worker_complete_function_logs() {
1649
1663
  esac
1650
1664
  }
1651
1665
 
1652
- __tailor_worker_complete_function_test_run() {
1666
+ __tailor_worker_complete_function_run() {
1653
1667
  local -a _vals=()
1654
- if __tailor_worker_opt_takes_value "function:test-run" "${words[CURRENT-1]}"; then return 0; fi
1668
+ if __tailor_worker_opt_takes_value "function:run" "${words[CURRENT-1]}"; then return 0; fi
1655
1669
  if (( _after_dd )); then
1656
1670
  case "$_pos_count" in
1657
1671
  0)
@@ -1667,6 +1681,62 @@ __tailor_worker_complete_function_test_run() {
1667
1681
  __tailor_worker_not_used "--arg" "-a" "--a" && _opts+=("--arg:JSON argument to pass to the function")
1668
1682
  __tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Machine user name for authentication. Falls back to the active profile's default machine user.")
1669
1683
  __tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to SDK config file")
1684
+ __tailor_worker_not_used "--allow-schema-drift" "--allowSchemaDrift" && _opts+=("--allow-schema-drift:Run a scaffolded script even when its schema snapshot no longer matches")
1685
+ __tailor_worker_not_used "--help" && _opts+=("--help:Show help")
1686
+ __tailor_worker_cdescribe 'options' _opts
1687
+ return 0
1688
+ fi
1689
+ case "$_pos_count" in
1690
+ 0)
1691
+ ;;
1692
+ esac
1693
+ }
1694
+
1695
+ __tailor_worker_complete_function_script() {
1696
+ local -a _vals=()
1697
+ case "${words[CURRENT-1]}" in
1698
+ --config|-c|--c)
1699
+ setopt local_options null_glob
1700
+ local _cur="${words[CURRENT]:-}" _dir _prefix _f _out
1701
+ local -a _exts=("ts")
1702
+ if [[ -z "$_cur" || "$_cur" != */* ]]; then
1703
+ _dir="."
1704
+ _prefix="$_cur"
1705
+ elif [[ "$_cur" == */ ]]; then
1706
+ _dir="${_cur%/}"
1707
+ _prefix=""
1708
+ else
1709
+ _dir="${_cur%/*}"
1710
+ _prefix="${_cur##*/}"
1711
+ fi
1712
+ for _f in "$_dir"/"$_prefix"*(N/); do
1713
+ _out="${_f#./}"
1714
+ __tailor_worker_add_path_candidate "$_out"
1715
+ done
1716
+ local _ext
1717
+ for _f in "$_dir"/"$_prefix"*(N.); do
1718
+ _out="${_f#./}"
1719
+ for _ext in "${_exts[@]}"; do
1720
+ [[ -n "$_ext" && "$_out" == *."$_ext" ]] && { __tailor_worker_add_path_candidate "$_out"; break; }
1721
+ done
1722
+ done
1723
+ return 0 ;;
1724
+ esac
1725
+ if __tailor_worker_opt_takes_value "function:script" "${words[CURRENT-1]}"; then return 0; fi
1726
+ if (( _after_dd )); then
1727
+ case "$_pos_count" in
1728
+ 0)
1729
+ ;;
1730
+ esac
1731
+ return 0
1732
+ fi
1733
+ if [[ "${words[CURRENT]}" == -* ]]; then
1734
+ local -a _opts=()
1735
+ __tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
1736
+ __tailor_worker_not_used "--profile" "-p" "--p" && _opts+=("--profile:Workspace profile")
1737
+ __tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
1738
+ __tailor_worker_not_used "--namespace" && _opts+=("--namespace:Target TailorDB namespace (required when the config does not pin one)")
1739
+ __tailor_worker_not_used "--remote" && _opts+=("--remote:Generate script-scoped DB types from the deployed schema")
1670
1740
  __tailor_worker_not_used "--help" && _opts+=("--help:Show help")
1671
1741
  __tailor_worker_cdescribe 'options' _opts
1672
1742
  return 0
@@ -1687,7 +1757,7 @@ __tailor_worker_complete_function() {
1687
1757
  __tailor_worker_cdescribe 'options' _opts
1688
1758
  return 0
1689
1759
  fi
1690
- local -a _subs=("get:Get a function registry by name" "list:List function registries in a workspace" "logs:List or get function execution logs." "test-run:Run a function on the Tailor Platform server without deploying.")
1760
+ local -a _subs=("get:Get a function registry by name" "list:List function registries in a workspace" "logs:List or get function execution logs." "run:Run a function on the Tailor Platform server without deploying." "test-run:Run a function on the Tailor Platform server without deploying." "script:Scaffold a one-off script to run with \`function run\`.")
1691
1761
  __tailor_worker_cdescribe 'subcommands' _subs
1692
1762
  }
1693
1763
 
@@ -2245,7 +2315,7 @@ __tailor_worker_complete_profile_create() {
2245
2315
  __tailor_worker_not_used "--user" "-u" "--u" && _opts+=("--user:User email address or machine user client ID")
2246
2316
  __tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:Workspace ID")
2247
2317
  __tailor_worker_not_used "--permission" && _opts+=("--permission:Profile permission. 'read' blocks all write commands while the profile is active.")
2248
- __tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Default machine user name for application-data commands (query, workflow start, function test-run, machineuser token).")
2318
+ __tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Default machine user name for application-data commands (query, workflow start, function run, machineuser token).")
2249
2319
  __tailor_worker_not_used "--machine-user-override" "--machineUserOverride" && _opts+=("--machine-user-override:Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user.")
2250
2320
  __tailor_worker_not_used "--platform-url" "--platformUrl" && _opts+=("--platform-url:Platform API base URL for this profile.")
2251
2321
  __tailor_worker_not_used "--oauth2-client-id" "--oauth2ClientId" && _opts+=("--oauth2-client-id:OAuth2 client ID for logging in to this profile's platform.")
@@ -2319,7 +2389,7 @@ __tailor_worker_complete_profile_update() {
2319
2389
  __tailor_worker_not_used "--user" "-u" "--u" && _opts+=("--user:New user email address or machine user client ID")
2320
2390
  __tailor_worker_not_used "--workspace-id" "--workspaceId" "-w" "--w" && _opts+=("--workspace-id:New workspace ID")
2321
2391
  __tailor_worker_not_used "--permission" && _opts+=("--permission:Profile permission. 'read' blocks all write commands; 'write' lifts the restriction.")
2322
- __tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Default machine user name for application-data commands (query, workflow start, function test-run, machineuser token). Pass an empty string to clear.")
2392
+ __tailor_worker_not_used "--machine-user" "--machineUser" "-m" "--m" && _opts+=("--machine-user:Default machine user name for application-data commands (query, workflow start, function run, machineuser token). Pass an empty string to clear.")
2323
2393
  __tailor_worker_not_used "--machine-user-override" "--machineUserOverride" && _opts+=("--machine-user-override:Whether the command line or TAILOR_PLATFORM_MACHINE_USER_NAME may override the profile's machine user. 'deny' requires --machine-user; 'allow' lifts the restriction.")
2324
2394
  __tailor_worker_not_used "--platform-url" "--platformUrl" && _opts+=("--platform-url:Platform API base URL for this profile. Pass an empty string to clear.")
2325
2395
  __tailor_worker_not_used "--oauth2-client-id" "--oauth2ClientId" && _opts+=("--oauth2-client-id:OAuth2 client ID for logging in to this profile's platform. Pass an empty string to clear.")
@@ -2627,7 +2697,7 @@ __tailor_worker_complete_setup_branch() {
2627
2697
  if [[ "${words[CURRENT]}" == -* ]]; then
2628
2698
  local -a _opts=()
2629
2699
  __tailor_worker_not_used "--name" "-n" "--n" && _opts+=("--name:Name (defaults to the config 'name')")
2630
- __tailor_worker_not_used "--branch" && _opts+=("--branch:Deploy trigger branch (defaults to the detected default branch)")
2700
+ __tailor_worker_not_used "--target" && _opts+=("--target:Deploy trigger branch (defaults to the detected default branch)")
2631
2701
  __tailor_worker_not_used "--environment" && _opts+=("--environment:GitHub Environment for the plan/deploy jobs (defaults to the workspace name)")
2632
2702
  __tailor_worker_not_used "--erd-preview" "--erdPreview" && _opts+=("--erd-preview:Add PR ERD viewer artifacts with current/diff previews for TailorDB namespaces")
2633
2703
  __tailor_worker_not_used "--dir" "-d" "--d" && _opts+=("--dir:App directory (for monorepo setups)")
@@ -2709,12 +2779,19 @@ __tailor_worker_complete_setup_coordinate() {
2709
2779
  fi
2710
2780
  }
2711
2781
 
2712
- __tailor_worker_complete_setup_renovate() {
2782
+ __tailor_worker_complete_setup_deps() {
2713
2783
  local -a _vals=()
2714
- if __tailor_worker_opt_takes_value "setup:renovate" "${words[CURRENT-1]}"; then return 0; fi
2784
+ case "${words[CURRENT-1]}" in
2785
+ --provider)
2786
+ _vals=("renovate")
2787
+ __tailor_worker_cdescribe 'completions' _vals
2788
+ return 0 ;;
2789
+ esac
2790
+ if __tailor_worker_opt_takes_value "setup:deps" "${words[CURRENT-1]}"; then return 0; fi
2715
2791
  if (( _after_dd )); then return 0; fi
2716
2792
  if [[ "${words[CURRENT]}" == -* ]]; then
2717
2793
  local -a _opts=()
2794
+ __tailor_worker_not_used "--provider" && _opts+=("--provider:Dependency update provider to configure")
2718
2795
  __tailor_worker_not_used "--help" && _opts+=("--help:Show help")
2719
2796
  __tailor_worker_cdescribe 'options' _opts
2720
2797
  return 0
@@ -2767,7 +2844,7 @@ __tailor_worker_complete_setup() {
2767
2844
  __tailor_worker_cdescribe 'options' _opts
2768
2845
  return 0
2769
2846
  fi
2770
- local -a _subs=("branch:Generate a branch-target deploy workflow (push to branch triggers deploy)." "tag:Generate a tag-target deploy workflow (tag push triggers deploy)." "preview:Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace)." "action:Generate a per-app composite action for use with setup coordinate (monorepo multi-app deploys)." "coordinate:Generate a coordinator workflow that orchestrates multiple --action-generated composite actions." "renovate:Generate a Renovate config for Tailor dependency and workflow updates." "check:Audit generated workflows for drift against the current config/repo (read-only)." "delete:Delete managed workflow/action file(s) and their .github/tailor.lock entries.")
2847
+ local -a _subs=("branch:Generate a branch-target deploy workflow (push to branch triggers deploy)." "tag:Generate a tag-target deploy workflow (tag push triggers deploy)." "preview:Generate a preview workflow (PR open/sync triggers deploy to a per-PR workspace)." "action:Generate a per-app composite action for use with setup coordinate (monorepo multi-app deploys)." "coordinate:Generate a coordinator workflow that orchestrates multiple --action-generated composite actions." "deps:Generate a dependency update config for Tailor dependency and workflow updates." "check:Audit generated workflows for drift against the current config/repo (read-only)." "delete:Delete managed workflow/action file(s) and their .github/tailor.lock entries.")
2771
2848
  __tailor_worker_cdescribe 'subcommands' _subs
2772
2849
  }
2773
2850
 
@@ -3051,9 +3128,11 @@ __tailor_worker_complete_tailordb_migration_generate() {
3051
3128
  __tailor_worker_not_used "--config" "-c" "--c" && _opts+=("--config:Path to Tailor config file")
3052
3129
  __tailor_worker_not_used "--name" "-n" "--n" && _opts+=("--name:Optional description for the migration")
3053
3130
  __tailor_worker_not_used "--init" && _opts+=("--init:Delete existing migrations and start fresh")
3054
- _opts+=("--rename:Record a field or type rename instead of remove + add (format\: \"Type.oldField\:newField\" or \"OldType\:NewType\"; repeatable). Renames require a migration script that copies the data.")
3055
- _opts+=("--drop:Confirm that a removed field or type is a genuine removal, not a rename (format\: \"Type.field\" or \"Type\"; repeatable). Required in non-interactive runs for a removal with rename candidates.")
3056
- _opts+=("--expand-contract:Convert a field type through a temporary field (format\: \"Type.field\"; repeatable). Generates two migrations.")
3131
+ __tailor_worker_not_used "--data-only" "--dataOnly" && _opts+=("--data-only:Create a migration with no schema changes whose migration script runs a standalone data transformation")
3132
+ __tailor_worker_not_used "--namespace" && _opts+=("--namespace:Target TailorDB namespace for --data-only (required if multiple namespaces exist)")
3133
+ _opts+=("--rename:Record a field or table rename instead of remove + add (format\: \"Table.oldField\:newField\" or \"OldTable\:NewTable\"; repeatable). Renames require a migration script that copies the data.")
3134
+ _opts+=("--drop:Confirm that a removed field or table is a genuine removal, not a rename (format\: \"Table.field\" or \"Table\"; repeatable). Required in non-interactive runs for a removal with rename candidates.")
3135
+ _opts+=("--expand-contract:Convert a field type through a temporary field (format\: \"Table.field\"; repeatable). Generates two migrations.")
3057
3136
  __tailor_worker_not_used "--help" && _opts+=("--help:Show help")
3058
3137
  __tailor_worker_cdescribe 'options' _opts
3059
3138
  return 0
@@ -3449,7 +3528,7 @@ __tailor_worker_complete_tailordb_migration() {
3449
3528
  __tailor_worker_cdescribe 'options' _opts
3450
3529
  return 0
3451
3530
  fi
3452
- local -a _subs=("generate:Generate migration files by detecting schema differences between current local types and the previous migration snapshot." "rebaseline:Collapse the full migration history into a new 0000 baseline." "script:Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none." "set:Set migration checkpoint to a specific number." "status:Show the current migration status for TailorDB namespaces, including applied and pending migrations." "sync:Sync remote TailorDB schema to a specific migration snapshot (recovery from --no-schema-check drift)." "test:Test pending migrations with seed fixtures or cloned data in a temporary workspace." "validate:Validate the full migration history, unreviewed generated migration scripts, and schema drift (local types vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found.")
3531
+ local -a _subs=("generate:Generate migration files by detecting schema differences between current local tables and the previous migration snapshot." "rebaseline:Collapse the full migration history into a new 0000 baseline." "script:Add a migration script (migrate.ts) template to an existing migration directory, or record with --no-script that a migration intentionally has none." "set:Set migration checkpoint to a specific number." "status:Show the current migration status for TailorDB namespaces, including applied and pending migrations." "sync:Sync remote TailorDB schema to a specific migration snapshot (recovery from --no-schema-check drift)." "test:Test pending migrations with seed fixtures or cloned data in a temporary workspace." "validate:Validate the full migration history, unreviewed generated migration scripts, and schema drift (local tables vs. migration snapshot, remote schema vs. migration checkpoint) without deploying. This includes the migration and schema-drift checks used by 'deploy' and exits with a non-zero code when issues are found.")
3453
3532
  __tailor_worker_cdescribe 'subcommands' _subs
3454
3533
  }
3455
3534
 
@@ -4332,7 +4411,9 @@ _tailor_worker_completions() {
4332
4411
  function:get) __tailor_worker_complete_function_get ;;
4333
4412
  function:list) __tailor_worker_complete_function_list ;;
4334
4413
  function:logs) __tailor_worker_complete_function_logs ;;
4335
- function:test-run) __tailor_worker_complete_function_test_run ;;
4414
+ function:run) __tailor_worker_complete_function_run ;;
4415
+ function:test-run) __tailor_worker_complete_function_run ;;
4416
+ function:script) __tailor_worker_complete_function_script ;;
4336
4417
  function) __tailor_worker_complete_function ;;
4337
4418
  generate) __tailor_worker_complete_generate ;;
4338
4419
  init) __tailor_worker_complete_init ;;
@@ -4379,7 +4460,7 @@ _tailor_worker_completions() {
4379
4460
  setup:preview) __tailor_worker_complete_setup_preview ;;
4380
4461
  setup:action) __tailor_worker_complete_setup_action ;;
4381
4462
  setup:coordinate) __tailor_worker_complete_setup_coordinate ;;
4382
- setup:renovate) __tailor_worker_complete_setup_renovate ;;
4463
+ setup:deps) __tailor_worker_complete_setup_deps ;;
4383
4464
  setup:check) __tailor_worker_complete_setup_check ;;
4384
4465
  setup:delete) __tailor_worker_complete_setup_delete ;;
4385
4466
  setup) __tailor_worker_complete_setup ;;
@@ -10,8 +10,8 @@ import { AppConfig } from "./types.mjs";
10
10
  declare function defineConfig<const Config extends AppConfig & Record<Exclude<keyof Config, keyof AppConfig>, never>>(config: Config): Config;
11
11
  /**
12
12
  * Define plugins to be used with the Tailor SDK.
13
- * Plugins can generate additional types, resolvers, and executors
14
- * based on existing TailorDB types.
13
+ * Plugins can generate additional tables, resolvers, and executors
14
+ * based on existing TailorDB tables.
15
15
  * @param configs - Plugin configurations
16
16
  * @returns Plugin configurations as given
17
17
  */
@@ -108,7 +108,7 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
108
108
  allowedIpAddresses?: string[];
109
109
  /** Disable GraphQL introspection in production. */
110
110
  disableIntrospection?: boolean;
111
- /** TailorDB service configuration with type definition files. */
111
+ /** TailorDB service configuration with table definition files. */
112
112
  db?: TailorDBServiceInput;
113
113
  /** Resolver service configuration with resolver files. */
114
114
  resolver?: ResolverServiceInput;
@@ -142,4 +142,4 @@ interface AppConfig<Auth extends AuthConfig = AuthConfig, Idp extends IdPConfig[
142
142
  logLevel?: LogLevelInput;
143
143
  }
144
144
  //#endregion
145
- export { AllowedSecretEnvValue, AppConfig, EnvEntry, EnvValue, ExecutorServiceConfig, ExecutorServiceInput, HttpAdapterServiceInput, LogLevel, LogLevelInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput };
145
+ export { AppConfig, EnvEntry, EnvValue, ExecutorServiceConfig, ExecutorServiceInput, HttpAdapterServiceInput, LogLevel, LogLevelInput, ResolverExternalConfig, ResolverServiceConfig, ResolverServiceInput, WorkflowServiceConfig, WorkflowServiceInput };
@@ -1,4 +1,4 @@
1
- import { ArrayFieldOutput, FieldMetadata, FieldOptions, FieldOutput, TailorFieldType } from "./types/field.types.mjs";
1
+ import { FieldMetadata, FieldOptions, FieldOutput, TailorFieldType } from "./types/field.types.mjs";
2
2
  import { AttributeList, Attributes, Env, TailorPrincipal } from "../runtime/types.mjs";
3
3
  import { DeepWritable, NullableToOptional, output as output$1 } from "../types/helpers.mjs";
4
4
  import { IsAutoFilledDBField, IsReadOnlyDBField, PluginAttachment } from "./services/tailordb/types.mjs";
@@ -7,9 +7,10 @@ import { BuiltinIdP, IDToken, IdProvider, OAuth2ClientInput, OIDC, SAML, SCIMAtt
7
7
  import { AuthConfig, AuthConnectionTokenResult, AuthExternalConfig, AuthOwnConfig, AuthServiceInput, BeforeLoginClaims, BeforeLoginHookArgs, DefinedAuth, FederatedIdentity, FederatedIdentityClaims, FederatedIdentityProvider, MachineUserName, MachineUserNameRegistry, OAuth2ClientGrantType, SCIMAttributeType, UserAttributeKey, UserAttributeListKey, UserAttributes, UsernameFieldKey, ValueOperand } from "./services/auth/types.mjs";
8
8
  import { AllowedValues, AllowedValuesOutput } from "./types/field.mjs";
9
9
  import { Resolver } from "../types/resolver.generated.mjs";
10
- import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedType, PluginNamespaceProcessContext, PluginOutput, PluginProcessContext, ResolverNamespaceData, ResolverReadyContext, TailorDBNamespaceData, TailorDBReadyContext, TailorDBTypeForPlugin, TypePluginOutput } from "../plugin/types.mjs";
10
+ import { ExecutorReadyContext, GeneratorResult, NamespacePluginOutput, Plugin, PluginConfigs, PluginExecutorContext, PluginExecutorContextBase, PluginGeneratedExecutor, PluginGeneratedExecutorWithFile, PluginGeneratedResolver, PluginGeneratedTable, PluginNamespaceProcessContext, PluginOutput, PluginTableProcessContext, ResolverNamespaceData, ResolverReadyContext, TablePluginOutput, TailorDBNamespaceData, TailorDBReadyContext, TailorDBTableForPlugin } from "../plugin/types.mjs";
11
11
  import { PermissionCondition, TailorTypeGqlPermission, TailorTypePermission, unsafeAllowAllGqlPermission, unsafeAllowAllTypePermission } from "./services/tailordb/permission.mjs";
12
12
  import { TailorAnyDBField, TailorAnyDBType, TailorDBField, TailorDBInstance, TailorDBType, db } from "./services/tailordb/schema.mjs";
13
+ import { AuthNamespaceName, AuthNamespaceNameRegistry } from "./types/auth-namespace-name.mjs";
13
14
  import { AIGatewayConfig } from "./services/aigateway/types.mjs";
14
15
  import { IdPPermission, IdPPermissionCondition, unsafeAllowAllIdPPermission } from "./services/idp/permission.mjs";
15
16
  import { IdPEmailConfig, IdPGqlOperations, IdPGqlOperationsInput } from "../types/idp.generated.mjs";
@@ -57,55 +58,91 @@ declare const t: {
57
58
  array: Opt extends {
58
59
  array: true;
59
60
  } ? true : false;
60
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
61
+ }, Opt["optional"] extends true ? ([Opt] extends [{
62
+ array: true;
63
+ }] ? string[] : string) | null : [Opt] extends [{
64
+ array: true;
65
+ }] ? string[] : string, FieldMetadata, TailorFieldType>;
61
66
  string: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
62
67
  type: "string";
63
68
  array: Opt extends {
64
69
  array: true;
65
70
  } ? true : false;
66
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
71
+ }, Opt["optional"] extends true ? ([Opt] extends [{
72
+ array: true;
73
+ }] ? string[] : string) | null : [Opt] extends [{
74
+ array: true;
75
+ }] ? string[] : string, FieldMetadata, TailorFieldType>;
67
76
  bool: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
68
77
  type: "boolean";
69
78
  array: Opt extends {
70
79
  array: true;
71
80
  } ? true : false;
72
- }, Opt["optional"] extends true ? ArrayFieldOutput<boolean, Opt> | null : ArrayFieldOutput<boolean, Opt>, FieldMetadata, TailorFieldType>;
81
+ }, Opt["optional"] extends true ? ([Opt] extends [{
82
+ array: true;
83
+ }] ? boolean[] : boolean) | null : [Opt] extends [{
84
+ array: true;
85
+ }] ? boolean[] : boolean, FieldMetadata, TailorFieldType>;
73
86
  int: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
74
87
  type: "integer";
75
88
  array: Opt extends {
76
89
  array: true;
77
90
  } ? true : false;
78
- }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>, FieldMetadata, TailorFieldType>;
91
+ }, Opt["optional"] extends true ? ([Opt] extends [{
92
+ array: true;
93
+ }] ? number[] : number) | null : [Opt] extends [{
94
+ array: true;
95
+ }] ? number[] : number, FieldMetadata, TailorFieldType>;
79
96
  float: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
80
97
  type: "float";
81
98
  array: Opt extends {
82
99
  array: true;
83
100
  } ? true : false;
84
- }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>, FieldMetadata, TailorFieldType>;
101
+ }, Opt["optional"] extends true ? ([Opt] extends [{
102
+ array: true;
103
+ }] ? number[] : number) | null : [Opt] extends [{
104
+ array: true;
105
+ }] ? number[] : number, FieldMetadata, TailorFieldType>;
85
106
  decimal: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
86
107
  type: "decimal";
87
108
  array: Opt extends {
88
109
  array: true;
89
110
  } ? true : false;
90
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
111
+ }, Opt["optional"] extends true ? ([Opt] extends [{
112
+ array: true;
113
+ }] ? string[] : string) | null : [Opt] extends [{
114
+ array: true;
115
+ }] ? string[] : string, FieldMetadata, TailorFieldType>;
91
116
  date: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
92
117
  type: "date";
93
118
  array: Opt extends {
94
119
  array: true;
95
120
  } ? true : false;
96
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
121
+ }, Opt["optional"] extends true ? ([Opt] extends [{
122
+ array: true;
123
+ }] ? string[] : string) | null : [Opt] extends [{
124
+ array: true;
125
+ }] ? string[] : string, FieldMetadata, TailorFieldType>;
97
126
  datetime: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
98
127
  type: "datetime";
99
128
  array: Opt extends {
100
129
  array: true;
101
130
  } ? true : false;
102
- }, Opt["optional"] extends true ? ArrayFieldOutput<string | Date, Opt> | null : ArrayFieldOutput<string | Date, Opt>, FieldMetadata, TailorFieldType>;
131
+ }, Opt["optional"] extends true ? ([Opt] extends [{
132
+ array: true;
133
+ }] ? (string | Date)[] : string | Date) | null : [Opt] extends [{
134
+ array: true;
135
+ }] ? (string | Date)[] : string | Date, FieldMetadata, TailorFieldType>;
103
136
  time: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
104
137
  type: "time";
105
138
  array: Opt extends {
106
139
  array: true;
107
140
  } ? true : false;
108
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
141
+ }, Opt["optional"] extends true ? ([Opt] extends [{
142
+ array: true;
143
+ }] ? string[] : string) | null : [Opt] extends [{
144
+ array: true;
145
+ }] ? string[] : string, FieldMetadata, TailorFieldType>;
109
146
  enum: <const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt) => TailorField<{
110
147
  type: "enum";
111
148
  array: Opt extends {
@@ -132,4 +169,4 @@ declare namespace t {
132
169
  type infer<T> = TailorOutput<T>;
133
170
  }
134
171
  //#endregion
135
- export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type IsAutoFilledDBField, type IsReadOnlyDBField, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, ParameterizedWaitPointInstance, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedType, type PluginNamespaceProcessContext, type PluginOutput, type PluginProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type ResolvedExecutionPolicyInstance, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverPermission, type ResolverPermissionCondition, type ResolverPermissionPolicy, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, TailorDBTrigger, type TailorDBType, type TailorDBTypeForPlugin, type TailorField, type TailorPrincipal, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type TypePluginOutput, type UserAttributeKey, type UserAttributeListKey, type UserAttributes, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowExecutionArgs, WorkflowExecutionCompletedArgs, WorkflowExecutionResumedArgs, WorkflowExecutionRetriedArgs, WorkflowExecutionStartedArgs, WorkflowExecutionTrigger, WorkflowExecutionWaitResolvedArgs, WorkflowExecutionWaitStartedArgs, WorkflowJob, WorkflowJobContext, WorkflowJobExecutionArgs, WorkflowJobExecutionCompletedArgs, WorkflowJobExecutionStartedArgs, WorkflowJobExecutionTrigger, WorkflowJobExecutionWaitResolvedArgs, WorkflowJobExecutionWaitStartedArgs, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger };
172
+ export { type AIGatewayConfig, type AIGatewayName, type AIGatewayNameRegistry, type AttributeList, type Attributes, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, type AuthNamespaceName, type AuthNamespaceNameRegistry, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginClaims, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type ConnectionName, type ConnectionNameRegistry, type DefinedAuth, type Env, type ExecutionPolicyConcurrency, type ExecutionPolicyDefInput, type ExecutionPolicyExactInstance, type ExecutionPolicyGroupOptions, type ExecutionPolicyInstance, type ExecutionPolicyWildcardInstance, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLQuery, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, HttpAdapterTypedDocumentNode, type IDToken, type IdPConfig, type IdPEmailConfig, type IdPExternalConfig, type IdPGqlOperations, type IdPGqlOperationsInput as IdPGqlOperationsConfig, type IdPPermission, type IdPPermissionCondition, type IdProvider as IdProviderConfig, type IdpName, type IdpNameRegistry, IdpUserArgs, IdpUserCreatedArgs, IdpUserDeletedArgs, IdpUserTrigger, IdpUserUpdatedArgs, IncomingWebhookArgs, IncomingWebhookRequest, IncomingWebhookResponse, IncomingWebhookResponseConfig, IncomingWebhookTrigger, IncomingWebhookTriggerOptions, type IsAutoFilledDBField, type IsReadOnlyDBField, type MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, ParameterizedWaitPointInstance, type PermissionCondition, type Plugin, type PluginAttachment, type PluginConfigs, type PluginExecutorContext, type PluginExecutorContextBase, type PluginGeneratedExecutor, type PluginGeneratedExecutorWithFile, type PluginGeneratedResolver, type PluginGeneratedTable, type PluginNamespaceProcessContext, type PluginOutput, type PluginTableProcessContext, type QueryType, RecordCreatedArgs, RecordDeletedArgs, RecordUpdatedArgs, type ResolvedExecutionPolicyInstance, type Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, type ResolverPermission, type ResolverPermissionCondition, type ResolverPermissionPolicy, type ResolverReadyContext, type ResolverServiceConfig, type ResolverServiceInput, type RetryPolicy, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleArgs, ScheduleTrigger, type SecretsConfig, type StaticWebsiteConfig, type TablePluginOutput, type TailorAnyDBField, type TailorAnyDBType, type TailorDBField, type TailorDBInstance, type TailorDBNamespaceData, type TailorDBReadyContext, type TailorDBTableForPlugin, TailorDBTrigger, type TailorDBType, type TailorField, type TailorPrincipal, type TailorTypeGqlPermission, type TailorTypePermission, type TenantProvider as TenantProviderConfig, Trigger, type UserAttributeKey, type UserAttributeListKey, type UserAttributes, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowExecutionArgs, WorkflowExecutionCompletedArgs, WorkflowExecutionResumedArgs, WorkflowExecutionRetriedArgs, WorkflowExecutionStartedArgs, WorkflowExecutionTrigger, WorkflowExecutionWaitResolvedArgs, WorkflowExecutionWaitStartedArgs, WorkflowJob, WorkflowJobContext, WorkflowJobExecutionArgs, WorkflowJobExecutionCompletedArgs, WorkflowJobExecutionStartedArgs, WorkflowJobExecutionTrigger, WorkflowJobExecutionWaitResolvedArgs, WorkflowJobExecutionWaitStartedArgs, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWaitPoint, createWaitPoints, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWorkflowExecutionPolicies, defineWorkflowExecutionPolicy, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission, workflowExecutionCompletedTrigger, workflowExecutionResumedTrigger, workflowExecutionRetriedTrigger, workflowExecutionStartedTrigger, workflowExecutionTrigger, workflowExecutionWaitResolvedTrigger, workflowExecutionWaitStartedTrigger, workflowJobExecutionCompletedTrigger, workflowJobExecutionStartedTrigger, workflowJobExecutionTrigger, workflowJobExecutionWaitResolvedTrigger, workflowJobExecutionWaitStartedTrigger };