@tailor-platform/sdk 2.0.0-next.0 → 2.0.0-next.2

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 (208) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/dist/application-Dtqap5jM.mjs +3 -0
  3. package/dist/{client-CobIRHl-.mjs → application-XuMWK4eq.mjs} +5869 -25
  4. package/dist/application-XuMWK4eq.mjs.map +1 -0
  5. package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
  6. package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
  7. package/dist/{authconnection-D8SJGMpj.mjs → authconnection-D2MhtTN5.mjs} +2 -3
  8. package/dist/{authconnection-D8SJGMpj.mjs.map → authconnection-D2MhtTN5.mjs.map} +1 -1
  9. package/dist/{authconnection-BIYzEh2p.d.mts → authconnection-DvUQAjQS.d.mts} +1 -1
  10. package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
  11. package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
  12. package/dist/cli/index.mjs +241 -237
  13. package/dist/cli/index.mjs.map +1 -1
  14. package/dist/cli/lib.d.mts +547 -620
  15. package/dist/cli/lib.mjs +9 -11
  16. package/dist/cli/lib.mjs.map +1 -1
  17. package/dist/completion/zsh-worker.zsh +4108 -0
  18. package/dist/configure/index.d.mts +9 -7
  19. package/dist/configure/index.mjs +76 -40
  20. package/dist/configure/index.mjs.map +1 -1
  21. package/dist/{context-s0lxhu8_.mjs → context-Bd266-ru.mjs} +2 -3
  22. package/dist/context-Bd266-ru.mjs.map +1 -0
  23. package/dist/{context-CUBwSBq4.d.mts → context-C2lEi9uw.d.mts} +7 -28
  24. package/dist/{crashreport-D1wKBJ8N.mjs → crashreport-BMWcxeSE.mjs} +1 -2
  25. package/dist/{crashreport-BhD0y14F.mjs → crashreport-DFq-vsU0.mjs} +21 -14
  26. package/dist/{crashreport-BhD0y14F.mjs.map → crashreport-DFq-vsU0.mjs.map} +1 -1
  27. package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
  28. package/dist/enum-constants-j9QBF0cB.mjs.map +1 -0
  29. package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
  30. package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
  31. package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
  32. package/dist/field-DOsJCPFa.mjs.map +1 -0
  33. package/dist/{file-B58Dm-2P.mjs → file-BbdFGdMV.mjs} +3 -12
  34. package/dist/file-BbdFGdMV.mjs.map +1 -0
  35. package/dist/{file-BzK8z3X-.d.mts → file-Dq3NIt_F.d.mts} +3 -42
  36. package/dist/{file-utils-BHPxPXmn.mjs → file-utils-CYZnO1pX.mjs} +6 -7
  37. package/dist/file-utils-CYZnO1pX.mjs.map +1 -0
  38. package/dist/{globals-ByrCoDip.mjs → globals-Cf0sxIt8.mjs} +53 -5
  39. package/dist/globals-Cf0sxIt8.mjs.map +1 -0
  40. package/dist/http-adapter.generated-DFsXDdm5.d.mts +581 -0
  41. package/dist/{iconv-kwrmd1U_.d.mts → iconv-Co-TOPuH.d.mts} +1 -1
  42. package/dist/{iconv-DreIffeM.mjs → iconv-D2vi8G36.mjs} +2 -3
  43. package/dist/{iconv-DreIffeM.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
  44. package/dist/{idp-Ch95ag8h.mjs → idp-BDbK5gjm.mjs} +2 -3
  45. package/dist/{idp-Ch95ag8h.mjs.map → idp-BDbK5gjm.mjs.map} +1 -1
  46. package/dist/{idp-BlBPtXJ-.d.mts → idp-DrhVrLmV.d.mts} +1 -1
  47. package/dist/{index-CLxubakC.d.mts → index-BI-_j9Z3.d.mts} +49 -261
  48. package/dist/{index-CPRnOjjt.d.mts → index-C4JirJH8.d.mts} +2 -2
  49. package/dist/{index-CQZVJ5SX.d.mts → index-CZfWhr0a.d.mts} +2 -2
  50. package/dist/{index-DRhMpdnA.d.mts → index-Cg8VKAdN.d.mts} +8 -8
  51. package/dist/{index-CfRFkXIO.d.mts → index-DYRjoLXD.d.mts} +2 -2
  52. package/dist/index-lFpcjHPU.d.mts +201 -0
  53. package/dist/{index-DUupuPhZ.d.mts → index-nW7hE6oE.d.mts} +2 -2
  54. package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
  55. package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
  56. package/dist/kysely/index.mjs +0 -1
  57. package/dist/kysely/index.mjs.map +1 -1
  58. package/dist/{kysely-type-D1e0Vwkd.mjs → kysely-type-DR8uzZTA.mjs} +2 -3
  59. package/dist/kysely-type-DR8uzZTA.mjs.map +1 -0
  60. package/dist/{logger-DpJyJvNz.mjs → logger-CxF-Ex5d.mjs} +1 -2
  61. package/dist/{logger-DpJyJvNz.mjs.map → logger-CxF-Ex5d.mjs.map} +1 -1
  62. package/dist/{mock-DMgIygjE.mjs → mock-FPxmnt-y.mjs} +9 -56
  63. package/dist/mock-FPxmnt-y.mjs.map +1 -0
  64. package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
  65. package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
  66. package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
  67. package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
  68. package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
  69. package/dist/plugin/builtin/enum-constants/index.d.mts +1 -1
  70. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  71. package/dist/plugin/builtin/file-utils/index.d.mts +1 -1
  72. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  73. package/dist/plugin/builtin/kysely-type/index.d.mts +1 -1
  74. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  75. package/dist/plugin/builtin/seed/index.d.mts +1 -1
  76. package/dist/plugin/builtin/seed/index.mjs +1 -2
  77. package/dist/plugin/index.d.mts +4 -5
  78. package/dist/plugin/index.mjs +0 -1
  79. package/dist/plugin/index.mjs.map +1 -1
  80. package/dist/registry-DH4m7eYo.mjs +53 -0
  81. package/dist/registry-DH4m7eYo.mjs.map +1 -0
  82. package/dist/{repl-editor-CJG3sz7A.mjs → repl-editor-DmGr9zMw.mjs} +2 -3
  83. package/dist/{repl-editor-CJG3sz7A.mjs.map → repl-editor-DmGr9zMw.mjs.map} +1 -1
  84. package/dist/{chunk-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
  85. package/dist/runtime/authconnection.d.mts +1 -1
  86. package/dist/runtime/authconnection.mjs +1 -2
  87. package/dist/runtime/context.d.mts +1 -1
  88. package/dist/runtime/context.mjs +1 -2
  89. package/dist/runtime/file.d.mts +2 -2
  90. package/dist/runtime/file.mjs +2 -3
  91. package/dist/runtime/globals.d.mts +8 -41
  92. package/dist/runtime/globals.mjs +0 -1
  93. package/dist/runtime/iconv.d.mts +1 -1
  94. package/dist/runtime/iconv.mjs +1 -2
  95. package/dist/runtime/idp.d.mts +1 -1
  96. package/dist/runtime/idp.mjs +1 -2
  97. package/dist/runtime/index.d.mts +8 -8
  98. package/dist/runtime/index.mjs +7 -8
  99. package/dist/runtime/secretmanager.d.mts +1 -1
  100. package/dist/runtime/secretmanager.mjs +1 -2
  101. package/dist/runtime/workflow.d.mts +2 -2
  102. package/dist/runtime/workflow.mjs +1 -2
  103. package/dist/{runtime-C7qTBDD2.mjs → runtime-CY4JvrDj.mjs} +1069 -542
  104. package/dist/runtime-CY4JvrDj.mjs.map +1 -0
  105. package/dist/{schema-1msIhXwA.mjs → schema-Dtw9Orye.mjs} +18 -16
  106. package/dist/schema-Dtw9Orye.mjs.map +1 -0
  107. package/dist/{secret-file-CWzF8rry.mjs → secret-file-VSVGy1V0.mjs} +27 -3
  108. package/dist/{secret-file-CWzF8rry.mjs.map → secret-file-VSVGy1V0.mjs.map} +1 -1
  109. package/dist/{secretmanager-CKLB3wAQ.d.mts → secretmanager-B3n4KHfm.d.mts} +1 -1
  110. package/dist/{secretmanager-B9h-U_8U.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
  111. package/dist/{secretmanager-B9h-U_8U.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
  112. package/dist/seed/index.mjs +0 -1
  113. package/dist/seed/index.mjs.map +1 -1
  114. package/dist/{seed-BH2FbrPV.mjs → seed-izIEyP3z.mjs} +7 -19
  115. package/dist/seed-izIEyP3z.mjs.map +1 -0
  116. package/dist/service-DCqIWibD.mjs +3 -0
  117. package/dist/{service-DMohAx8a2.mjs → service-DU1mVzri2.mjs} +3 -4
  118. package/dist/{service-DMohAx8a2.mjs.map → service-DU1mVzri2.mjs.map} +1 -1
  119. package/dist/{service-wI3Hvrgx.mjs → service-DjyqbCaJ.mjs} +9 -10
  120. package/dist/service-DjyqbCaJ.mjs.map +1 -0
  121. package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
  122. package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
  123. package/dist/telemetry-ClwW5ohF.mjs +3 -0
  124. package/dist/test-env-key-D7UkZp99.mjs +75 -0
  125. package/dist/test-env-key-D7UkZp99.mjs.map +1 -0
  126. package/dist/type-source-DH_LH20p.mjs +13 -0
  127. package/dist/type-source-DH_LH20p.mjs.map +1 -0
  128. package/dist/types-74etvaxy.mjs +4 -0
  129. package/dist/{plugin-C_FyVSdl.d.mts → types-BDRml5C3.d.mts} +128 -188
  130. package/dist/{types-CmzfQP_m.mjs → types-BQijbo4m.mjs} +10 -11
  131. package/dist/types-BQijbo4m.mjs.map +1 -0
  132. package/dist/types-BX4q6Mo6.d.mts +339 -0
  133. package/dist/types-BZ7QKVE8.d.mts +21 -0
  134. package/dist/{tailordb-BlBGmQK-.d.mts → types-CdcQh4Z2.d.mts} +92 -242
  135. package/dist/utils/test/index.d.mts +6 -14
  136. package/dist/utils/test/index.mjs +4 -14
  137. package/dist/utils/test/index.mjs.map +1 -1
  138. package/dist/vitest/environment.mjs +1 -2
  139. package/dist/vitest/environment.mjs.map +1 -1
  140. package/dist/vitest/index.d.mts +42 -5
  141. package/dist/vitest/index.mjs +133 -4
  142. package/dist/vitest/index.mjs.map +1 -1
  143. package/dist/vitest/setup.mjs +2 -3
  144. package/dist/vitest/setup.mjs.map +1 -1
  145. package/dist/{workflow--aPbA8Uq.mjs → workflow-BOmaZwwG.mjs} +9 -5
  146. package/dist/workflow-BOmaZwwG.mjs.map +1 -0
  147. package/dist/{workflow-CMamswkK.d.mts → workflow-BVy4XWjS.d.mts} +15 -10
  148. package/dist/workflow.generated-ClEjBYhm.d.mts +671 -0
  149. package/docs/cli/application.md +0 -2
  150. package/docs/cli/completion.md +3 -0
  151. package/docs/cli/crashreport.md +0 -2
  152. package/docs/cli/executor.md +53 -0
  153. package/docs/cli/function.md +1 -1
  154. package/docs/cli/setup.md +35 -33
  155. package/docs/cli/user.md +3 -3
  156. package/docs/cli/workflow.md +157 -20
  157. package/docs/cli/workspace.md +3 -3
  158. package/docs/cli-reference.md +26 -20
  159. package/docs/configuration.md +0 -2
  160. package/docs/github-actions.md +29 -16
  161. package/docs/migration/v2.md +475 -0
  162. package/docs/plugin/custom.md +2 -2
  163. package/docs/plugin/index.md +1 -1
  164. package/docs/runtime.md +4 -4
  165. package/docs/services/aigateway.md +97 -0
  166. package/docs/services/auth.md +31 -14
  167. package/docs/services/executor.md +3 -5
  168. package/docs/services/resolver.md +8 -10
  169. package/docs/services/tailordb.md +15 -13
  170. package/docs/services/workflow.md +17 -19
  171. package/docs/testing.md +75 -56
  172. package/package.json +18 -17
  173. package/dist/actor-J2gJ0eK5.d.mts +0 -24
  174. package/dist/application-76hhIhnJ.mjs +0 -5594
  175. package/dist/application-76hhIhnJ.mjs.map +0 -1
  176. package/dist/application-av2raLs6.mjs +0 -4
  177. package/dist/cli/skills.d.mts +0 -1
  178. package/dist/cli/skills.mjs +0 -22
  179. package/dist/cli/skills.mjs.map +0 -1
  180. package/dist/client-C68VWo4g.mjs +0 -4
  181. package/dist/client-CobIRHl-.mjs.map +0 -1
  182. package/dist/context-s0lxhu8_.mjs.map +0 -1
  183. package/dist/enum-constants-C7DaWeQo.mjs.map +0 -1
  184. package/dist/env-B-g-qgE4.d.mts +0 -7
  185. package/dist/field-C4zdJLW5.mjs.map +0 -1
  186. package/dist/file-B58Dm-2P.mjs.map +0 -1
  187. package/dist/file-utils-BHPxPXmn.mjs.map +0 -1
  188. package/dist/globals-ByrCoDip.mjs.map +0 -1
  189. package/dist/job-BpsFXPbi.mjs +0 -54
  190. package/dist/job-BpsFXPbi.mjs.map +0 -1
  191. package/dist/kysely-type-D1e0Vwkd.mjs.map +0 -1
  192. package/dist/mock-DMgIygjE.mjs.map +0 -1
  193. package/dist/package-json-wzO6nV9O.mjs +0 -4
  194. package/dist/registry-D0uB0OrK.mjs +0 -178
  195. package/dist/registry-D0uB0OrK.mjs.map +0 -1
  196. package/dist/runtime-C7qTBDD2.mjs.map +0 -1
  197. package/dist/schema-1msIhXwA.mjs.map +0 -1
  198. package/dist/seed-BH2FbrPV.mjs.map +0 -1
  199. package/dist/service-BHQIerYh.mjs +0 -4
  200. package/dist/service-wI3Hvrgx.mjs.map +0 -1
  201. package/dist/telemetry-w92bvGdC.mjs +0 -4
  202. package/dist/types-2Be3wSMc.mjs +0 -5
  203. package/dist/types-CmzfQP_m.mjs.map +0 -1
  204. package/dist/workflow--aPbA8Uq.mjs.map +0 -1
  205. package/dist/workflow.generated-Bf1tWylx.d.mts +0 -1416
  206. package/docs/generator/builtin.md +0 -257
  207. package/docs/generator/custom.md +0 -147
  208. package/docs/generator/index.md +0 -66
@@ -1,7 +1,9 @@
1
- /// <reference types="@tailor-platform/sdk/runtime/globals" />
2
- import { M as TailorInvoker, N as TailorUser, O as AttributeList, P as unauthenticatedTailorUser, _ as PluginAttachment, k as AttributeMap, o as ValueOperand } from "../tailordb-BlBGmQK-.mjs";
3
- import { A as BeforeLoginHookArgs, B as TailorAnyDBField, C as IdPGqlOperationsInput, D as AuthExternalConfig, E as AuthConnectionTokenResult, F as UserAttributeListKey, G as db, H as TailorDBField, I as UserAttributeMap, J as TailorTypePermission, K as PermissionCondition, L as UsernameFieldKey, M as OAuth2ClientGrantType, N as SCIMAttributeType, O as AuthOwnConfig, P as UserAttributeKey, R as AuthConnectionConfig, S as IdPGqlOperations, T as AuthConfig, U as TailorDBInstance, V as TailorAnyDBType, W as TailorDBType, X as unsafeAllowAllTypePermission, Y as unsafeAllowAllGqlPermission, _ as IdPConfig, a as ExecutorServiceConfig, c as ResolverServiceConfig, d as WorkflowServiceInput, f as StaticWebsiteConfig, h as SecretsConfig, j as DefinedAuth, k as AuthServiceInput, l as ResolverServiceInput, n as RetryPolicy, o as ExecutorServiceInput, q as TailorTypeGqlPermission, s as ResolverExternalConfig, t as ConcurrencyPolicy, u as WorkflowServiceConfig, v as IdPExternalConfig, x as IdPEmailConfig, z as AuthConnectionOAuth2Config } from "../workflow.generated-Bf1tWylx.mjs";
4
- import { B as IdProvider, G as SCIMAttribute, H as OAuth2ClientInput, J as SCIMConfig, K as SCIMAttributeMapping, R as BuiltinIdP, U as OIDC, W as SAML, X as TenantProvider, Y as SCIMResource, _ as ResolverNamespaceData, a as PluginExecutorContextBase, b as TailorDBReadyContext, c as PluginGeneratedResolver, d as PluginOutput, f as PluginProcessContext, g as GeneratorResult, h as ExecutorReadyContext, i as PluginExecutorContext, l as PluginGeneratedType, m as TypePluginOutput, n as Plugin, o as PluginGeneratedExecutor, p as TailorDBTypeForPlugin, q as SCIMAuthorization, r as PluginConfigs, s as PluginGeneratedExecutorWithFile, t as NamespacePluginOutput, u as PluginNamespaceProcessContext, v as ResolverReadyContext, x as Resolver, y as TailorDBNamespaceData, z as IDToken } from "../plugin-C_FyVSdl.mjs";
5
- import { t as Env } from "../env-B-g-qgE4.mjs";
6
- import { $ as authAccessTokenIssuedTrigger, A as IncomingWebhookResponseConfig, At as TailorField, B as AuthAccessTokenRevokedArgs, C as defineWaitPoint, Ct as WORKFLOW_TEST_ENV_KEY, D as IncomingWebhookArgs, Dt as defineAuth, E as Trigger, Et as AuthInvoker, F as ScheduleTrigger, G as IdpUserTrigger, H as IdpUserArgs, I as scheduleTrigger, J as RecordDeletedArgs, K as IdpUserUpdatedArgs, L as AuthAccessTokenArgs, M as IncomingWebhookTriggerOptions, Mt as MachineUserNameRegistry, N as incomingWebhookTrigger, O as IncomingWebhookRequest, Ot as IdpName, P as ScheduleArgs, Q as TailorDBTrigger, R as AuthAccessTokenIssuedArgs, S as WaitPointInstance, St as createWorkflowJob, T as createExecutor, Tt as createResolver, U as IdpUserCreatedArgs, V as AuthAccessTokenTrigger, W as IdpUserDeletedArgs, X as ResolverExecutedArgs, Y as RecordUpdatedArgs, Z as ResolverExecutedTrigger, _ as defineIdp, _t as Workflow, a as defineGenerators, at as idpUserTrigger, b as unsafeAllowAllIdPPermission, bt as WorkflowJob, c as HttpAdapterGraphQLRequest, ct as recordDeletedTrigger, d as HttpAdapterInputFn, dt as resolverExecutedTrigger, et as authAccessTokenRefreshedTrigger, f as HttpAdapterOutputFn, ft as FunctionOperation, g as defineSecretManager, gt as WorkflowOperation, h as createHttpAdapter, ht as WebhookOperation, i as defineConfig, it as idpUserDeletedTrigger, j as IncomingWebhookTrigger, jt as MachineUserName, k as IncomingWebhookResponse, kt as IdpNameRegistry, l as HttpAdapterGraphQLResponse, lt as recordTrigger, m as HttpAdapterResponse, mt as Operation, n as output, nt as authAccessTokenTrigger, o as definePlugins, ot as idpUserUpdatedTrigger, p as HttpAdapterRequest, pt as GqlOperation, q as RecordCreatedArgs, r as t, rt as idpUserCreatedTrigger, s as HttpAdapter, st as recordCreatedTrigger, t as __Infer, tt as authAccessTokenRevokedTrigger, u as HttpAdapterInput, ut as recordUpdatedTrigger, v as IdPPermission, vt as WorkflowConfig, w as defineWaitPoints, wt as QueryType, x as defineStaticWebSite, xt as WorkflowJobContext, y as IdPPermissionCondition, yt as createWorkflow, z as AuthAccessTokenRefreshedArgs } from "../index-CLxubakC.mjs";
7
- export { type AttributeList, type AttributeMap, AuthAccessTokenArgs, AuthAccessTokenIssuedArgs, AuthAccessTokenRefreshedArgs, AuthAccessTokenRevokedArgs, AuthAccessTokenTrigger, type AuthConfig, type AuthConnectionConfig, type AuthConnectionOAuth2Config, type AuthConnectionTokenResult, type AuthExternalConfig, AuthInvoker, type AuthOwnConfig, type AuthServiceInput, type BeforeLoginHookArgs, type BuiltinIdP, type ConcurrencyPolicy, type DefinedAuth, type Env, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, 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 MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, 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 Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, 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 TailorInvoker, type TailorTypeGqlPermission, type TailorTypePermission, type TailorUser, type TenantProvider as TenantProviderConfig, Trigger, type TypePluginOutput, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WORKFLOW_TEST_ENV_KEY, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
1
+ import { n as AttributeMap, o as TailorPrincipal, r as Env, t as AttributeList } from "../types-BZ7QKVE8.mjs";
2
+ import { s as PluginAttachment } from "../types-CdcQh4Z2.mjs";
3
+ import { A as SCIMAuthorization, C as IdProvider, D as SAML, E as OIDC, F as AuthConnectionOAuth2Config, M as SCIMResource, N as TenantProvider, O as SCIMAttribute, P as AuthConnectionConfig, S as IDToken, T as OAuth2ClientInput, _ as UserAttributeListKey, a as AuthServiceInput, b as ValueOperand, c as DefinedAuth, d as FederatedIdentityProvider, f as MachineUserName, g as UserAttributeKey, h as SCIMAttributeType, i as AuthOwnConfig, j as SCIMConfig, k as SCIMAttributeMapping, l as FederatedIdentity, m as OAuth2ClientGrantType, n as AuthConnectionTokenResult, o as BeforeLoginClaims, p as MachineUserNameRegistry, r as AuthExternalConfig, s as BeforeLoginHookArgs, t as AuthConfig, u as FederatedIdentityClaims, v as UserAttributeMap, x as BuiltinIdP, y as UsernameFieldKey } from "../types-BX4q6Mo6.mjs";
4
+ import { _ as TailorDBNamespaceData, a as PluginConfigs, b as TypePluginOutput, c as PluginGeneratedExecutor, d as PluginGeneratedType, f as PluginNamespaceProcessContext, g as ResolverReadyContext, h as ResolverNamespaceData, i as Plugin, l as PluginGeneratedExecutorWithFile, m as PluginProcessContext, n as GeneratorResult, o as PluginExecutorContext, p as PluginOutput, r as NamespacePluginOutput, s as PluginExecutorContextBase, t as ExecutorReadyContext, u as PluginGeneratedResolver, v as TailorDBReadyContext, x as Resolver, y as TailorDBTypeForPlugin } from "../types-BDRml5C3.mjs";
5
+ import { a as TailorDBInstance, c as PermissionCondition, d as unsafeAllowAllGqlPermission, f as unsafeAllowAllTypePermission, i as TailorDBField, l as TailorTypeGqlPermission, n as TailorAnyDBField, o as TailorDBType, r as TailorAnyDBType, s as db, u as TailorTypePermission } from "../http-adapter.generated-DFsXDdm5.mjs";
6
+ import { C as AIGatewayConfig, _ as IdPExternalConfig, a as ExecutorServiceInput, b as IdPGqlOperations, c as ResolverServiceInput, d as StaticWebsiteConfig, g as IdPConfig, i as ExecutorServiceConfig, l as WorkflowServiceConfig, m as SecretsConfig, n as RetryPolicy, o as ResolverExternalConfig, s as ResolverServiceConfig, t as ConcurrencyPolicy, u as WorkflowServiceInput, x as IdPGqlOperationsInput, y as IdPEmailConfig } from "../workflow.generated-ClEjBYhm.mjs";
7
+ import { a as WorkflowConfig, c as WorkflowJobContext, i as Workflow, l as createWorkflowJob, n as defineWaitPoint, o as createWorkflow, r as defineWaitPoints, s as WorkflowJob, t as WaitPointInstance } from "../index-lFpcjHPU.mjs";
8
+ import { $ as authAccessTokenTrigger, A as incomingWebhookTrigger, B as IdpUserCreatedArgs, C as Trigger, D as IncomingWebhookResponseConfig, E as IncomingWebhookResponse, F as AuthAccessTokenIssuedArgs, G as RecordDeletedArgs, H as IdpUserTrigger, I as AuthAccessTokenRefreshedArgs, J as ResolverExecutedTrigger, K as RecordUpdatedArgs, L as AuthAccessTokenRevokedArgs, M as ScheduleTrigger, N as scheduleTrigger, O as IncomingWebhookTrigger, P as AuthAccessTokenArgs, Q as authAccessTokenRevokedTrigger, R as AuthAccessTokenTrigger, S as createExecutor, T as IncomingWebhookRequest, U as IdpUserUpdatedArgs, V as IdpUserDeletedArgs, W as RecordCreatedArgs, X as authAccessTokenIssuedTrigger, Y as TailorDBTrigger, Z as authAccessTokenRefreshedTrigger, _ as IdPPermission, _t as IdpName, a as definePlugins, at as recordDeletedTrigger, b as defineAIGateway, c as HttpAdapterGraphQLResponse, ct as resolverExecutedTrigger, d as HttpAdapterOutputFn, dt as Operation, et as idpUserCreatedTrigger, f as HttpAdapterRequest, ft as WebhookOperation, g as defineIdp, gt as defineAuth, h as defineSecretManager, ht as createResolver, i as defineConfig, it as recordCreatedTrigger, j as ScheduleArgs, k as IncomingWebhookTriggerOptions, l as HttpAdapterInput, lt as FunctionOperation, m as createHttpAdapter, mt as QueryType, n as output, nt as idpUserTrigger, o as HttpAdapter, ot as recordTrigger, p as HttpAdapterResponse, pt as WorkflowOperation, q as ResolverExecutedArgs, r as t, rt as idpUserUpdatedTrigger, s as HttpAdapterGraphQLRequest, st as recordUpdatedTrigger, t as __Infer, tt as idpUserDeletedTrigger, u as HttpAdapterInputFn, ut as GqlOperation, v as IdPPermissionCondition, vt as IdpNameRegistry, w as IncomingWebhookArgs, x as defineStaticWebSite, y as unsafeAllowAllIdPPermission, yt as TailorField, z as IdpUserArgs } from "../index-BI-_j9Z3.mjs";
9
+ export { type AIGatewayConfig, type AttributeList, type AttributeMap, 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 DefinedAuth, type Env, type ExecutorReadyContext, type ExecutorServiceConfig, type ExecutorServiceInput, type FederatedIdentity, type FederatedIdentityClaims, type FederatedIdentityProvider, FunctionOperation, type GeneratorResult, GqlOperation, HttpAdapter, HttpAdapterGraphQLRequest, HttpAdapterGraphQLResponse, HttpAdapterInput, HttpAdapterInputFn, HttpAdapterOutputFn, HttpAdapterRequest, HttpAdapterResponse, 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 MachineUserName, type MachineUserNameRegistry, type NamespacePluginOutput, type OAuth2ClientInput as OAuth2Client, type OAuth2ClientGrantType, type OIDC, Operation, 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 Resolver, ResolverExecutedArgs, ResolverExecutedTrigger, type ResolverExternalConfig, type ResolverNamespaceData, 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 UserAttributeMap, type UsernameFieldKey, type ValueOperand, WaitPointInstance, WebhookOperation, Workflow, WorkflowConfig, WorkflowJob, WorkflowJobContext, WorkflowOperation, type WorkflowServiceConfig, type WorkflowServiceInput, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, infer, output, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
@@ -1,33 +1,15 @@
1
+ import { t as t$1 } from "../types-BQijbo4m.mjs";
2
+ import { t as brandValue } from "../brand-Eo4pLXPJ.mjs";
3
+ import { t as db } from "../schema-Dtw9Orye.mjs";
4
+ import { a as registerJob, n as dispatchTriggerJob, r as dispatchTriggerWorkflow } from "../registry-DH4m7eYo.mjs";
5
+ import { i as withWorkflowTestInvoker } from "../test-env-key-D7UkZp99.mjs";
1
6
 
2
- import { t as t$1 } from "../types-CmzfQP_m.mjs";
3
- import { t as brandValue } from "../brand-DlnJ375c.mjs";
4
- import { t as db } from "../schema-1msIhXwA.mjs";
5
- import { r as dispatchTriggerWorkflow, s as registerWorkflow, u as WORKFLOW_TEST_ENV_KEY } from "../registry-D0uB0OrK.mjs";
6
- import { t as createWorkflowJob } from "../job-BpsFXPbi.mjs";
7
-
8
- //#region src/types/user.ts
9
- /** Represents an unauthenticated user in the Tailor platform. */
10
- const unauthenticatedTailorUser = {
11
- id: "00000000-0000-0000-0000-000000000000",
12
- type: "",
13
- workspaceId: "00000000-0000-0000-0000-000000000000",
14
- attributes: null,
15
- attributeList: []
16
- };
17
-
18
- //#endregion
19
7
  //#region src/configure/services/auth/index.ts
20
8
  /* @__NO_SIDE_EFFECTS__ */
21
9
  function defineAuth(name, config) {
22
10
  return {
23
11
  ...config,
24
12
  name,
25
- invoker(machineUser) {
26
- return {
27
- namespace: name,
28
- machineUserName: machineUser
29
- };
30
- },
31
13
  getConnectionToken(connectionName) {
32
14
  return tailor.authconnection.getConnectionToken(connectionName);
33
15
  }
@@ -80,7 +62,7 @@ const unsafeAllowAllGqlPermission = [{
80
62
  * Create a resolver definition for the Tailor SDK.
81
63
  *
82
64
  * The `body` function receives a context with `input` (typed from `config.input`),
83
- * `user`, `invoker` (reflects `authInvoker` delegation), and `env`.
65
+ * `caller`, `invoker` (reflects configured machine-user delegation), and `env`.
84
66
  * The return value of `body` must match the `output` type.
85
67
  *
86
68
  * `output` accepts either a single TailorField (e.g. `t.string()`) or a
@@ -103,7 +85,7 @@ const unsafeAllowAllGqlPermission = [{
103
85
  * input: {
104
86
  * id: t.string(),
105
87
  * },
106
- * body: async ({ input, user }) => {
88
+ * body: async ({ input, caller }) => {
107
89
  * const db = getDB("tailordb");
108
90
  * const result = await db.selectFrom("User").selectAll().where("id", "=", input.id).executeTakeFirst();
109
91
  * return { name: result?.name ?? "", email: result?.email ?? "" };
@@ -370,6 +352,55 @@ function incomingWebhookTrigger(options) {
370
352
  };
371
353
  }
372
354
 
355
+ //#endregion
356
+ //#region src/configure/services/workflow/job.ts
357
+ /**
358
+ * Create a workflow job definition.
359
+ *
360
+ * All jobs must be named exports from the workflow file.
361
+ * Job names must be unique across the entire project.
362
+ *
363
+ * Input and output must be JsonValue-compatible (primitives, plain objects, arrays).
364
+ * Functions and objects with a `toJSON` method are rejected at the type level;
365
+ * class instances exposing methods are rejected via the property walk.
366
+ * @param config - Job configuration with name and body function.
367
+ * @param config.name - Unique job name across the project.
368
+ * @param config.body - Function that processes the job input.
369
+ * @returns A WorkflowJob that can be triggered from other jobs.
370
+ * @example
371
+ * // Simple job with async body:
372
+ * export const fetchData = createWorkflowJob({
373
+ * name: "fetch-data",
374
+ * body: async (input: { id: string }) => {
375
+ * const db = getDB("tailordb");
376
+ * return await db.selectFrom("Table").selectAll().where("id", "=", input.id).executeTakeFirst();
377
+ * },
378
+ * });
379
+ * @example
380
+ * // Orchestrator job that fans out to other jobs.
381
+ * export const orchestrate = createWorkflowJob({
382
+ * name: "orchestrate",
383
+ * body: (input: { orderId: string }) => {
384
+ * const inventory = checkInventory.trigger({ orderId: input.orderId });
385
+ * const payment = processPayment.trigger({ orderId: input.orderId });
386
+ * return { inventory, payment };
387
+ * },
388
+ * });
389
+ */
390
+ function createWorkflowJob(config) {
391
+ const userBody = config.body;
392
+ const body = process.env.TAILOR_PLATFORM_BUNDLE ? userBody : (input, context) => withWorkflowTestInvoker(context.invoker, () => userBody(input, context));
393
+ if (!process.env.TAILOR_PLATFORM_BUNDLE) registerJob(config.name, body);
394
+ const trigger = process.env.TAILOR_PLATFORM_BUNDLE ? () => {
395
+ throw new Error("This workflow job's .trigger() is rewritten at build time and is unavailable in the bundle");
396
+ } : (args) => dispatchTriggerJob(config.name, args);
397
+ return brandValue({
398
+ name: config.name,
399
+ trigger,
400
+ body
401
+ }, "workflow-job");
402
+ }
403
+
373
404
  //#endregion
374
405
  //#region src/configure/services/workflow/wait-point.ts
375
406
  function getPlatformWorkflow() {
@@ -468,8 +499,8 @@ function defineWaitPoints(builder) {
468
499
  * export const fetchData = createWorkflowJob({ name: "fetch-data", body: async (input: { id: string }) => ({ id: input.id }) });
469
500
  * export const processData = createWorkflowJob({
470
501
  * name: "process-data",
471
- * body: async (input: { id: string }) => {
472
- * const data = await fetchData.trigger({ id: input.id });
502
+ * body: (input: { id: string }) => {
503
+ * const data = fetchData.trigger({ id: input.id });
473
504
  * return { data };
474
505
  * },
475
506
  * });
@@ -481,7 +512,6 @@ function defineWaitPoints(builder) {
481
512
  * });
482
513
  */
483
514
  function createWorkflow(config) {
484
- if (!process.env.TAILOR_PLATFORM_BUNDLE) registerWorkflow(config.name, config.mainJob.name);
485
515
  return brandValue({
486
516
  ...config,
487
517
  trigger: process.env.TAILOR_PLATFORM_BUNDLE ? async () => {
@@ -509,6 +539,22 @@ function defineStaticWebSite(name, config) {
509
539
  };
510
540
  }
511
541
 
542
+ //#endregion
543
+ //#region src/configure/services/aigateway/index.ts
544
+ /**
545
+ * Define an AI Gateway configuration for the Tailor SDK.
546
+ * @param name - AI Gateway name
547
+ * @param config - AI Gateway configuration
548
+ * @returns Defined AI Gateway
549
+ */
550
+ /* @__NO_SIDE_EFFECTS__ */
551
+ function defineAIGateway(name, config) {
552
+ return {
553
+ ...config,
554
+ name
555
+ };
556
+ }
557
+
512
558
  //#endregion
513
559
  //#region src/configure/services/idp/permission.ts
514
560
  /**
@@ -637,7 +683,7 @@ function createHttpAdapter(config) {
637
683
  }
638
684
 
639
685
  //#endregion
640
- //#region src/configure/config.ts
686
+ //#region src/configure/config/index.ts
641
687
  /**
642
688
  * Define a Tailor SDK application configuration with shallow exactness.
643
689
  * @template Config
@@ -649,16 +695,6 @@ function defineConfig(config) {
649
695
  return config;
650
696
  }
651
697
  /**
652
- * Define generators to be used with the Tailor SDK.
653
- * @deprecated Use definePlugins() with generation hooks (onTypeLoaded, generate, etc.) instead.
654
- * @param configs - Generator configurations
655
- * @returns Generator configurations as given
656
- */
657
- /* @__NO_SIDE_EFFECTS__ */
658
- function defineGenerators(...configs) {
659
- return configs;
660
- }
661
- /**
662
698
  * Define plugins to be used with the Tailor SDK.
663
699
  * Plugins can generate additional types, resolvers, and executors
664
700
  * based on existing TailorDB types.
@@ -676,5 +712,5 @@ function definePlugins(...configs) {
676
712
  const t = t$1;
677
713
 
678
714
  //#endregion
679
- export { WORKFLOW_TEST_ENV_KEY, authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAuth, defineConfig, defineGenerators, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unauthenticatedTailorUser, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
715
+ export { authAccessTokenIssuedTrigger, authAccessTokenRefreshedTrigger, authAccessTokenRevokedTrigger, authAccessTokenTrigger, createExecutor, createHttpAdapter, createResolver, createWorkflow, createWorkflowJob, db, defineAIGateway, defineAuth, defineConfig, defineIdp, definePlugins, defineSecretManager, defineStaticWebSite, defineWaitPoint, defineWaitPoints, idpUserCreatedTrigger, idpUserDeletedTrigger, idpUserTrigger, idpUserUpdatedTrigger, incomingWebhookTrigger, recordCreatedTrigger, recordDeletedTrigger, recordTrigger, recordUpdatedTrigger, resolverExecutedTrigger, scheduleTrigger, t, unsafeAllowAllGqlPermission, unsafeAllowAllIdPPermission, unsafeAllowAllTypePermission };
680
716
  //# sourceMappingURL=index.mjs.map