@tailor-platform/sdk 2.0.0-next.1 → 2.0.0-next.3

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 (429) hide show
  1. package/CHANGELOG.md +514 -2
  2. package/README.md +9 -9
  3. package/agent-skills/{tailor-sdk → tailor}/SKILL.md +3 -1
  4. package/dist/aigateway-B3oZZE6v.mjs +15 -0
  5. package/dist/aigateway-B3oZZE6v.mjs.map +1 -0
  6. package/dist/application-D2hSK1ZL.mjs +3 -0
  7. package/dist/{application-DqS1yBg3.mjs → application-eHp9jXld.mjs} +1397 -684
  8. package/dist/application-eHp9jXld.mjs.map +1 -0
  9. package/dist/{authconnection-D2MhtTN5.mjs → authconnection-BGQM8FZI.mjs} +2 -2
  10. package/dist/authconnection-BGQM8FZI.mjs.map +1 -0
  11. package/dist/cli/cache/bundle-cache.d.mts +1 -0
  12. package/dist/cli/cache/store.d.mts +1 -0
  13. package/dist/cli/cache/types.d.mts +1 -0
  14. package/dist/cli/commands/api/api-call.d.mts +19 -0
  15. package/dist/cli/commands/api/index.d.mts +3 -0
  16. package/dist/cli/commands/deploy/aigateway.d.mts +1 -0
  17. package/dist/cli/commands/deploy/application.d.mts +1 -0
  18. package/dist/cli/commands/deploy/apply-phases.d.mts +1 -0
  19. package/dist/cli/commands/deploy/auth.d.mts +1 -0
  20. package/dist/cli/commands/deploy/deploy.d.mts +24 -0
  21. package/dist/cli/commands/deploy/executor.d.mts +1 -0
  22. package/dist/cli/commands/deploy/function-registry-types.d.mts +12 -0
  23. package/dist/cli/commands/deploy/function-registry.d.mts +2 -0
  24. package/dist/cli/commands/deploy/idp.d.mts +1 -0
  25. package/dist/cli/commands/deploy/resolver.d.mts +1 -0
  26. package/dist/cli/commands/deploy/secret-manager.d.mts +1 -0
  27. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
  28. package/dist/cli/commands/deploy/tailordb/index.d.mts +1 -0
  29. package/dist/cli/commands/deploy/types.d.mts +1 -0
  30. package/dist/cli/commands/deploy/workflow.d.mts +1 -0
  31. package/dist/cli/commands/executor/get.d.mts +29 -0
  32. package/dist/cli/commands/executor/jobs.d.mts +123 -0
  33. package/dist/cli/commands/executor/list.d.mts +19 -0
  34. package/dist/cli/commands/executor/transform.d.mts +41 -0
  35. package/dist/cli/commands/executor/trigger.d.mts +41 -0
  36. package/dist/cli/commands/executor/webhook.d.mts +22 -0
  37. package/dist/cli/commands/function/get.d.mts +18 -0
  38. package/dist/cli/commands/function/list.d.mts +22 -0
  39. package/dist/cli/commands/function/transform.d.mts +11 -0
  40. package/dist/cli/commands/generate/options.d.mts +7 -0
  41. package/dist/cli/commands/generate/seed/bundler.d.mts +26 -0
  42. package/dist/cli/commands/generate/service.d.mts +11 -0
  43. package/dist/cli/commands/machineuser/list.d.mts +27 -0
  44. package/dist/cli/commands/machineuser/token.d.mts +22 -0
  45. package/dist/cli/commands/oauth2client/get.d.mts +18 -0
  46. package/dist/cli/commands/oauth2client/list.d.mts +20 -0
  47. package/dist/cli/commands/oauth2client/transform.d.mts +20 -0
  48. package/dist/cli/commands/organization/folder/create.d.mts +18 -0
  49. package/dist/cli/commands/organization/folder/delete.d.mts +16 -0
  50. package/dist/cli/commands/organization/folder/get.d.mts +17 -0
  51. package/dist/cli/commands/organization/folder/list.d.mts +22 -0
  52. package/dist/cli/commands/organization/folder/update.d.mts +18 -0
  53. package/dist/cli/commands/organization/get.d.mts +16 -0
  54. package/dist/cli/commands/organization/list.d.mts +15 -0
  55. package/dist/cli/commands/organization/transform.d.mts +27 -0
  56. package/dist/cli/commands/organization/tree.d.mts +25 -0
  57. package/dist/cli/commands/organization/update.d.mts +17 -0
  58. package/dist/cli/commands/remove.d.mts +16 -0
  59. package/dist/cli/commands/show.d.mts +34 -0
  60. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +28 -0
  61. package/dist/cli/commands/tailordb/migrate/config.d.mts +19 -0
  62. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +223 -0
  63. package/dist/cli/commands/tailordb/migrate/generate.d.mts +17 -0
  64. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +202 -0
  65. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +98 -0
  66. package/dist/cli/commands/tailordb/migrate/types.d.mts +7 -0
  67. package/dist/cli/commands/tailordb/truncate.d.mts +19 -0
  68. package/dist/cli/commands/workflow/executions.d.mts +75 -0
  69. package/dist/cli/commands/workflow/get.d.mts +29 -0
  70. package/dist/cli/commands/workflow/list.d.mts +19 -0
  71. package/dist/cli/commands/workflow/resume.d.mts +23 -0
  72. package/dist/cli/commands/workflow/start.d.mts +61 -0
  73. package/dist/cli/commands/workflow/status.d.mts +5 -0
  74. package/dist/cli/commands/workflow/transform.d.mts +33 -0
  75. package/dist/cli/commands/workflow/wait.d.mts +16 -0
  76. package/dist/cli/commands/workflow/waiter.d.mts +23 -0
  77. package/dist/cli/commands/workspace/app/health.d.mts +18 -0
  78. package/dist/cli/commands/workspace/app/list.d.mts +22 -0
  79. package/dist/cli/commands/workspace/app/transform.d.mts +18 -0
  80. package/dist/cli/commands/workspace/create.d.mts +25 -0
  81. package/dist/cli/commands/workspace/delete.d.mts +15 -0
  82. package/dist/cli/commands/workspace/get.d.mts +17 -0
  83. package/dist/cli/commands/workspace/list.d.mts +17 -0
  84. package/dist/cli/commands/workspace/restore.d.mts +15 -0
  85. package/dist/cli/commands/workspace/transform.d.mts +16 -0
  86. package/dist/cli/commands/workspace/user/invite.d.mts +22 -0
  87. package/dist/cli/commands/workspace/user/list.d.mts +22 -0
  88. package/dist/cli/commands/workspace/user/remove.d.mts +17 -0
  89. package/dist/cli/commands/workspace/user/transform.d.mts +8 -0
  90. package/dist/cli/commands/workspace/user/update.d.mts +22 -0
  91. package/dist/cli/erd-viewer-assets/app.js +279 -36
  92. package/dist/cli/erd-viewer-assets/index.html +4 -0
  93. package/dist/cli/erd-viewer-assets/styles.css +252 -5
  94. package/dist/cli/index.d.mts +18 -3
  95. package/dist/cli/index.mjs +2193 -519
  96. package/dist/cli/index.mjs.map +1 -1
  97. package/dist/cli/lib.d.mts +81 -21048
  98. package/dist/cli/lib.mjs +8 -12
  99. package/dist/cli/lib.mjs.map +1 -1
  100. package/dist/cli/query/index.d.mts +35 -0
  101. package/dist/cli/services/application.d.mts +1 -0
  102. package/dist/cli/services/auth/service.d.mts +1 -0
  103. package/dist/cli/services/executor/service.d.mts +1 -0
  104. package/dist/cli/services/http-adapter/bundler.d.mts +1 -0
  105. package/dist/cli/services/http-adapter/service.d.mts +1 -0
  106. package/dist/cli/services/resolver/service.d.mts +1 -0
  107. package/dist/cli/services/tailordb/service.d.mts +1 -0
  108. package/dist/cli/services/workflow/bundler.d.mts +1 -0
  109. package/dist/cli/services/workflow/service.d.mts +1 -0
  110. package/dist/cli/shared/args.d.mts +13 -0
  111. package/dist/cli/shared/client.d.mts +1273 -0
  112. package/dist/cli/shared/config-loader.d.mts +26 -0
  113. package/dist/cli/shared/context.d.mts +28 -0
  114. package/dist/cli/shared/script-executor.d.mts +75 -0
  115. package/dist/cli/shared/seed-chunker.d.mts +46 -0
  116. package/dist/cli/shared/trigger-context.d.mts +1 -0
  117. package/dist/cli/shared/type-generator.d.mts +20 -0
  118. package/dist/cli/ts-hook.d.mts +4 -0
  119. package/dist/cli/ts-hook.mjs +303 -0
  120. package/dist/completion/zsh-worker.zsh +1577 -1098
  121. package/dist/configure/config/index.d.mts +21 -0
  122. package/dist/configure/config/types.d.mts +103 -0
  123. package/dist/configure/index.d.mts +122 -8
  124. package/dist/configure/index.mjs +74 -34
  125. package/dist/configure/index.mjs.map +1 -1
  126. package/dist/configure/services/aigateway/index.d.mts +17 -0
  127. package/dist/configure/services/aigateway/types.d.mts +11 -0
  128. package/dist/configure/services/auth/index.d.mts +34 -0
  129. package/dist/configure/services/auth/types.d.mts +172 -0
  130. package/dist/configure/services/executor/executor.d.mts +81 -0
  131. package/dist/configure/services/executor/index.d.mts +8 -0
  132. package/dist/configure/services/executor/operation.d.mts +45 -0
  133. package/dist/configure/services/executor/trigger/event.d.mts +272 -0
  134. package/dist/configure/services/executor/trigger/index.d.mts +8 -0
  135. package/dist/configure/services/executor/trigger/schedule.d.mts +25 -0
  136. package/dist/configure/services/executor/trigger/webhook.d.mts +44 -0
  137. package/dist/configure/services/executor/types.d.mts +2 -0
  138. package/dist/configure/services/http-adapter/http-adapter.d.mts +125 -0
  139. package/dist/configure/services/http-adapter/index.d.mts +2 -0
  140. package/dist/configure/services/idp/index.d.mts +64 -0
  141. package/dist/configure/services/idp/permission.d.mts +80 -0
  142. package/dist/configure/services/idp/types.d.mts +20 -0
  143. package/dist/configure/services/index.d.mts +32 -0
  144. package/dist/configure/services/resolver/index.d.mts +5 -0
  145. package/dist/configure/services/resolver/resolver.d.mts +75 -0
  146. package/dist/configure/services/resolver/types.d.mts +6 -0
  147. package/dist/configure/services/secrets/index.d.mts +38 -0
  148. package/dist/configure/services/secrets/types.d.mts +11 -0
  149. package/dist/configure/services/staticwebsite/index.d.mts +19 -0
  150. package/dist/configure/services/staticwebsite/types.d.mts +11 -0
  151. package/dist/configure/services/tailordb/index.d.mts +4 -0
  152. package/dist/configure/services/tailordb/permission.d.mts +119 -0
  153. package/dist/configure/services/tailordb/schema.d.mts +456 -0
  154. package/dist/configure/services/tailordb/types.d.mts +149 -0
  155. package/dist/configure/services/workflow/index.d.mts +6 -0
  156. package/dist/configure/services/workflow/job.d.mts +79 -0
  157. package/dist/configure/services/workflow/types.d.mts +2 -0
  158. package/dist/configure/services/workflow/wait-point.d.mts +73 -0
  159. package/dist/configure/services/workflow/workflow.d.mts +54 -0
  160. package/dist/configure/types/aigateway-name.d.mts +12 -0
  161. package/dist/configure/types/connection-name.d.mts +12 -0
  162. package/dist/configure/types/field-runtime.d.mts +17 -0
  163. package/dist/configure/types/field.d.mts +9 -0
  164. package/dist/configure/types/field.types.d.mts +109 -0
  165. package/dist/configure/types/idp-name.d.mts +12 -0
  166. package/dist/configure/types/index.d.mts +4 -0
  167. package/dist/configure/types/machine-user.d.mts +2 -0
  168. package/dist/configure/types/type.d.mts +82 -0
  169. package/dist/context-Bd266-ru.mjs.map +1 -1
  170. package/dist/{crashreport-BsjAkFWw.mjs → crashreport-Cg-pqRJV.mjs} +9 -11
  171. package/dist/{crashreport-BsjAkFWw.mjs.map → crashreport-Cg-pqRJV.mjs.map} +1 -1
  172. package/dist/{crashreport-pr6Rhvza.mjs → crashreport-D3RjuSYb.mjs} +1 -1
  173. package/dist/enum-constants-j9QBF0cB.mjs.map +1 -1
  174. package/dist/{errors-Dtf2WPaW.mjs → errors-118wUDRr.mjs} +2 -2
  175. package/dist/errors-118wUDRr.mjs.map +1 -0
  176. package/dist/field-runtime-CAnh_oow.mjs +183 -0
  177. package/dist/field-runtime-CAnh_oow.mjs.map +1 -0
  178. package/dist/{file-_oUZo76X.mjs → file-BbdFGdMV.mjs} +2 -10
  179. package/dist/file-BbdFGdMV.mjs.map +1 -0
  180. package/dist/{file-utils-DcyIPFQh.mjs → file-utils-CYZnO1pX.mjs} +5 -5
  181. package/dist/file-utils-CYZnO1pX.mjs.map +1 -0
  182. package/dist/{globals-Crz8o65k.mjs → globals-DhwZj0RB.mjs} +5 -47
  183. package/dist/globals-DhwZj0RB.mjs.map +1 -0
  184. package/dist/{idp-BDbK5gjm.mjs → idp-Bx25ZBdN.mjs} +9 -1
  185. package/dist/idp-Bx25ZBdN.mjs.map +1 -0
  186. package/dist/{interceptor-D-q1rvRl.mjs → interceptor-e33JtsC-.mjs} +2 -2
  187. package/dist/interceptor-e33JtsC-.mjs.map +1 -0
  188. package/dist/kysely/index.d.mts +2 -3
  189. package/dist/{kysely-type-DR8uzZTA.mjs → kysely-type-5eAChaHO.mjs} +4 -2
  190. package/dist/kysely-type-5eAChaHO.mjs.map +1 -0
  191. package/dist/{logger-CxF-Ex5d.mjs → logger-BEiZZ3qT.mjs} +3 -3
  192. package/dist/{logger-CxF-Ex5d.mjs.map → logger-BEiZZ3qT.mjs.map} +1 -1
  193. package/dist/parser/service/auth/index.d.mts +1 -0
  194. package/dist/parser/service/auth/schema.d.mts +1 -0
  195. package/dist/parser/service/http-adapter/index.d.mts +1 -0
  196. package/dist/parser/service/http-adapter/schema.d.mts +1 -0
  197. package/dist/parser/service/idp/types.d.mts +4 -0
  198. package/dist/parser/service/tailordb/types.d.mts +126 -0
  199. package/dist/platform-serialize-RoRtBS0v.mjs +46 -0
  200. package/dist/platform-serialize-RoRtBS0v.mjs.map +1 -0
  201. package/dist/plugin/builtin/enum-constants/index.d.mts +16 -1
  202. package/dist/plugin/builtin/file-utils/index.d.mts +16 -1
  203. package/dist/plugin/builtin/file-utils/index.mjs +1 -1
  204. package/dist/plugin/builtin/kysely-type/index.d.mts +16 -1
  205. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  206. package/dist/plugin/builtin/seed/index.d.mts +45 -1
  207. package/dist/plugin/builtin/seed/index.mjs +1 -1
  208. package/dist/plugin/get-generated-type.d.mts +17 -0
  209. package/dist/plugin/index.d.mts +3 -117
  210. package/dist/plugin/index.mjs +1 -1
  211. package/dist/plugin/index.mjs.map +1 -1
  212. package/dist/plugin/manager.d.mts +1 -0
  213. package/dist/plugin/types.d.mts +243 -0
  214. package/dist/plugin/with-context.d.mts +102 -0
  215. package/dist/{runtime-n9NCkjee.mjs → register-ts-hook-ZpBacA07.mjs} +4374 -2446
  216. package/dist/register-ts-hook-ZpBacA07.mjs.map +1 -0
  217. package/dist/{registry-DdsYlL_P.mjs → registry-DH4m7eYo.mjs} +4 -2
  218. package/dist/registry-DH4m7eYo.mjs.map +1 -0
  219. package/dist/{repl-editor-DmGr9zMw.mjs → repl-editor-BCozyiNq.mjs} +6 -5
  220. package/dist/{repl-editor-DmGr9zMw.mjs.map → repl-editor-BCozyiNq.mjs.map} +1 -1
  221. package/dist/runtime/aigateway.d.mts +35 -0
  222. package/dist/runtime/aigateway.mjs +3 -0
  223. package/dist/runtime/authconnection.d.mts +31 -2
  224. package/dist/runtime/authconnection.mjs +1 -1
  225. package/dist/runtime/context.d.mts +46 -2
  226. package/dist/runtime/file.d.mts +210 -2
  227. package/dist/runtime/file.mjs +2 -2
  228. package/dist/runtime/globals.d.mts +31 -19
  229. package/dist/runtime/iconv.d.mts +121 -2
  230. package/dist/runtime/idp.d.mts +186 -2
  231. package/dist/runtime/idp.mjs +1 -1
  232. package/dist/runtime/index.d.mts +47 -9
  233. package/dist/runtime/index.mjs +6 -5
  234. package/dist/runtime/secretmanager.d.mts +54 -2
  235. package/dist/runtime/types.d.mts +20 -0
  236. package/dist/runtime/workflow.d.mts +112 -2
  237. package/dist/runtime/workflow.mjs +2 -2
  238. package/dist/{schema-BhkpP5Hw.mjs → schema-89dYxNC2.mjs} +25 -187
  239. package/dist/schema-89dYxNC2.mjs.map +1 -0
  240. package/dist/{secret-file-DBqZhjFQ.mjs → secret-file-aoNXJmKa.mjs} +28 -3
  241. package/dist/secret-file-aoNXJmKa.mjs.map +1 -0
  242. package/dist/secretmanager-Bd45j7an.mjs +98 -0
  243. package/dist/secretmanager-Bd45j7an.mjs.map +1 -0
  244. package/dist/seed/index.d.mts +1 -2
  245. package/dist/{seed-jf3008-h.mjs → seed-CRSQJI_z.mjs} +16 -6
  246. package/dist/seed-CRSQJI_z.mjs.map +1 -0
  247. package/dist/service-CkIwEctX.mjs +3 -0
  248. package/dist/{service-DU1mVzri.mjs → service-DeZeYa06.mjs} +3 -3
  249. package/dist/{service-DU1mVzri.mjs.map → service-DeZeYa06.mjs.map} +1 -1
  250. package/dist/service-ufH7sS8o.mjs +797 -0
  251. package/dist/service-ufH7sS8o.mjs.map +1 -0
  252. package/dist/{client-z_oHGVNy.mjs → service_pb-CIrhGwHk.mjs} +38 -466
  253. package/dist/service_pb-CIrhGwHk.mjs.map +1 -0
  254. package/dist/service_pb-DjwIn4jO.mjs +3 -0
  255. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +204 -0
  256. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +58 -0
  257. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +316 -0
  258. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +161 -0
  259. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +2070 -0
  260. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +861 -0
  261. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +112 -0
  262. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +69 -0
  263. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +439 -0
  264. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +564 -0
  265. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +145 -0
  266. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +451 -0
  267. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +192 -0
  268. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +50 -0
  269. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +407 -0
  270. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +430 -0
  271. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +73 -0
  272. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +17 -0
  273. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +309 -0
  274. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +591 -0
  275. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +330 -0
  276. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +113 -0
  277. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +346 -0
  278. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +54 -0
  279. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +3576 -0
  280. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +187 -0
  281. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +29 -0
  282. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +429 -0
  283. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +90 -0
  284. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +684 -0
  285. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +797 -0
  286. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +330 -0
  287. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +183 -0
  288. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +842 -0
  289. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +276 -0
  290. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +2015 -0
  291. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +483 -0
  292. package/dist/{telemetry-CdqJEzkj.mjs → telemetry-BRVdwh14.mjs} +3 -3
  293. package/dist/telemetry-BRVdwh14.mjs.map +1 -0
  294. package/dist/telemetry-CkbkeJxl.mjs +3 -0
  295. package/dist/test-env-key-D7UkZp99.mjs +75 -0
  296. package/dist/test-env-key-D7UkZp99.mjs.map +1 -0
  297. package/dist/types/aigateway.generated.d.mts +9 -0
  298. package/dist/types/app-config.generated.d.mts +4 -0
  299. package/dist/types/auth-connection.generated.d.mts +20 -0
  300. package/dist/types/auth.generated.d.mts +145 -0
  301. package/dist/types/executor.generated.d.mts +177 -0
  302. package/dist/types/helpers.d.mts +39 -0
  303. package/dist/types/http-adapter.generated.d.mts +17 -0
  304. package/dist/{workflow.generated-DtQwEo-x.d.mts → types/idp.generated.d.mts} +98 -185
  305. package/dist/types/resolver.generated.d.mts +39 -0
  306. package/dist/types/secrets.generated.d.mts +14 -0
  307. package/dist/types/staticwebsite.generated.d.mts +10 -0
  308. package/dist/types/tailordb.generated.d.mts +428 -0
  309. package/dist/types/workflow.generated.d.mts +12 -0
  310. package/dist/types-C-lQ4se3.mjs +4 -0
  311. package/dist/types-CXF2OYdR.mjs +199 -0
  312. package/dist/types-CXF2OYdR.mjs.map +1 -0
  313. package/dist/utils/test/index.d.mts +5 -98
  314. package/dist/utils/test/index.mjs +4 -13
  315. package/dist/utils/test/index.mjs.map +1 -1
  316. package/dist/utils/test/mock.d.mts +87 -0
  317. package/dist/vitest/environment.d.mts +1 -2
  318. package/dist/vitest/environment.mjs +2 -2
  319. package/dist/vitest/environment.mjs.map +1 -1
  320. package/dist/vitest/index.d.mts +12 -428
  321. package/dist/vitest/index.mjs +741 -10
  322. package/dist/vitest/index.mjs.map +1 -1
  323. package/dist/vitest/mock-kysely.d.mts +62 -0
  324. package/dist/vitest/mock.d.mts +9 -0
  325. package/dist/vitest/mocks/aigateway.d.mts +30 -0
  326. package/dist/vitest/mocks/authconnection.d.mts +28 -0
  327. package/dist/vitest/mocks/file.d.mts +41 -0
  328. package/dist/vitest/mocks/iconv.d.mts +27 -0
  329. package/dist/vitest/mocks/idp.d.mts +44 -0
  330. package/dist/vitest/mocks/secretmanager.d.mts +33 -0
  331. package/dist/vitest/mocks/tailordb.d.mts +71 -0
  332. package/dist/vitest/mocks/workflow.d.mts +115 -0
  333. package/dist/vitest/setup.d.mts +1 -2
  334. package/dist/vitest/setup.mjs +2 -2
  335. package/dist/vitest/workflow-local.d.mts +40 -0
  336. package/dist/{workflow-DgemCAz3.mjs → workflow-Bo59B75H.mjs} +16 -4
  337. package/dist/workflow-Bo59B75H.mjs.map +1 -0
  338. package/docs/cli/application.md +98 -250
  339. package/docs/cli/auth.md +48 -292
  340. package/docs/cli/completion.md +1 -25
  341. package/docs/cli/crashreport.md +3 -61
  342. package/docs/cli/executor.md +72 -183
  343. package/docs/cli/function.md +14 -130
  344. package/docs/cli/organization.md +11 -221
  345. package/docs/cli/plugin.md +29 -0
  346. package/docs/cli/query.md +2 -22
  347. package/docs/cli/secret.md +71 -251
  348. package/docs/cli/setup.md +138 -40
  349. package/docs/cli/skills.md +50 -39
  350. package/docs/cli/staticwebsite.md +32 -180
  351. package/docs/cli/tailordb.md +97 -323
  352. package/docs/cli/upgrade.md +2 -22
  353. package/docs/cli/user.md +78 -247
  354. package/docs/cli/workflow.md +150 -172
  355. package/docs/cli/workspace.md +165 -538
  356. package/docs/cli-reference.md +184 -78
  357. package/docs/configuration.md +10 -4
  358. package/docs/github-actions.md +64 -24
  359. package/docs/migration/v2.md +735 -0
  360. package/docs/multi-environment.md +29 -7
  361. package/docs/plugin/index.md +6 -6
  362. package/docs/quickstart.md +8 -7
  363. package/docs/runtime.md +6 -2
  364. package/docs/services/aigateway.md +18 -2
  365. package/docs/services/auth.md +44 -52
  366. package/docs/services/executor.md +3 -3
  367. package/docs/services/http-adapter.md +16 -1
  368. package/docs/services/idp.md +55 -2
  369. package/docs/services/resolver.md +7 -7
  370. package/docs/services/secret.md +11 -11
  371. package/docs/services/staticwebsite.md +8 -2
  372. package/docs/services/tailordb-migration.md +24 -22
  373. package/docs/services/tailordb.md +39 -14
  374. package/docs/services/workflow.md +18 -18
  375. package/docs/testing.md +108 -50
  376. package/package.json +46 -35
  377. package/postinstall.mjs +4 -6
  378. package/dist/application-DB2r36Et.mjs +0 -3
  379. package/dist/application-DqS1yBg3.mjs.map +0 -1
  380. package/dist/authconnection-D2MhtTN5.mjs.map +0 -1
  381. package/dist/authconnection-DvUQAjQS.d.mts +0 -39
  382. package/dist/client-Dbohmtkv.mjs +0 -3
  383. package/dist/client-z_oHGVNy.mjs.map +0 -1
  384. package/dist/context-BuuIb8CC.d.mts +0 -68
  385. package/dist/errors-Dtf2WPaW.mjs.map +0 -1
  386. package/dist/field-DOsJCPFa.mjs +0 -22
  387. package/dist/field-DOsJCPFa.mjs.map +0 -1
  388. package/dist/file-BB8Vs9O_.d.mts +0 -250
  389. package/dist/file-_oUZo76X.mjs.map +0 -1
  390. package/dist/file-utils-DcyIPFQh.mjs.map +0 -1
  391. package/dist/globals-Crz8o65k.mjs.map +0 -1
  392. package/dist/http-adapter.generated-WgMnb7Sb.d.mts +0 -580
  393. package/dist/iconv-Co-TOPuH.d.mts +0 -122
  394. package/dist/idp-BDbK5gjm.mjs.map +0 -1
  395. package/dist/idp-DrhVrLmV.d.mts +0 -160
  396. package/dist/index-5vPyRu1y.d.mts +0 -18
  397. package/dist/index-B7AKc18V.d.mts +0 -47
  398. package/dist/index-BlpzXncY.d.mts +0 -1016
  399. package/dist/index-CK7u9isy.d.mts +0 -46
  400. package/dist/index-CNYe5lnW.d.mts +0 -18
  401. package/dist/index-DjUdWlzf.d.mts +0 -18
  402. package/dist/index-ZePLwxw7.d.mts +0 -208
  403. package/dist/interceptor-D-q1rvRl.mjs.map +0 -1
  404. package/dist/job-fuc3j1Ma.mjs +0 -53
  405. package/dist/job-fuc3j1Ma.mjs.map +0 -1
  406. package/dist/kysely-type-DR8uzZTA.mjs.map +0 -1
  407. package/dist/mock-BjFj5o1I.mjs +0 -804
  408. package/dist/mock-BjFj5o1I.mjs.map +0 -1
  409. package/dist/registry-DdsYlL_P.mjs.map +0 -1
  410. package/dist/runtime-n9NCkjee.mjs.map +0 -1
  411. package/dist/schema-BhkpP5Hw.mjs.map +0 -1
  412. package/dist/secret-file-DBqZhjFQ.mjs.map +0 -1
  413. package/dist/secretmanager-B3n4KHfm.d.mts +0 -55
  414. package/dist/seed-jf3008-h.mjs.map +0 -1
  415. package/dist/service-CCL8ruDf.mjs +0 -459
  416. package/dist/service-CCL8ruDf.mjs.map +0 -1
  417. package/dist/service-D6yonf2I.mjs +0 -3
  418. package/dist/telemetry-CdqJEzkj.mjs.map +0 -1
  419. package/dist/telemetry-ClwW5ohF.mjs +0 -3
  420. package/dist/test-env-key-D9kM6ETE.mjs +0 -49
  421. package/dist/test-env-key-D9kM6ETE.mjs.map +0 -1
  422. package/dist/types-B2RpYyA_.mjs +0 -371
  423. package/dist/types-B2RpYyA_.mjs.map +0 -1
  424. package/dist/types-ClhIrW_C.mjs +0 -4
  425. package/dist/types-DCUhgpyI.d.mts +0 -784
  426. package/dist/types-DhO_VEZd.d.mts +0 -574
  427. package/dist/types-DwDgacni.d.mts +0 -338
  428. package/dist/workflow-BbKvGLQg.d.mts +0 -96
  429. package/dist/workflow-DgemCAz3.mjs.map +0 -1
@@ -1,1016 +0,0 @@
1
- import { B as TailorActor, C as FieldMetadata, D as TailorField$1, E as FieldValidateInput, F as output$1, H as TailorInvoker, N as JsonValue, O as TailorFieldType, P as Prettify, T as FieldOutput, U as TailorUser, V as TailorEnv, b as ArrayFieldOutput, j as InferFieldsOutput, w as FieldOptions, x as DefinedFieldMetadata, z as InferredAttributeMap } from "./types-DCUhgpyI.mjs";
2
- import { _ as UserAttributeListKey, a as AuthServiceInput, c as DefinedAuth, f as MachineUserName, v as UserAttributeMap } from "./types-DwDgacni.mjs";
3
- import { A as ResolverExecutedTrigger$1, C as AuthAccessTokenTrigger$1, D as GqlOperation$1, E as FunctionOperation$1, M as TailorDBTrigger$1, N as WebhookOperation$1, O as IdpUserTrigger$1, P as WorkflowOperation$1, S as ResolverInput, T as ExecutorInput, i as Plugin, j as ScheduleTriggerInput, k as IncomingWebhookTrigger$1, x as Resolver } from "./types-DhO_VEZd.mjs";
4
- import { a as TailorDBInstance, m as AllowedValuesOutput, o as TailorDBType, p as AllowedValues, t as HttpAdapterConfigInput } from "./http-adapter.generated-WgMnb7Sb.mjs";
5
- import { S as IdPInput, T as AIGatewayInput, f as StaticWebsiteDefinitionBrand, h as SecretsDefinitionBrand, p as StaticWebsiteInput, r as AppConfig, v as IdpDefinitionBrand, w as AIGatewayDefinitionBrand } from "./workflow.generated-DtQwEo-x.mjs";
6
- import { i as Workflow } from "./index-ZePLwxw7.mjs";
7
- import { StandardSchemaV1 } from "@standard-schema/spec";
8
- import { Client } from "@urql/core";
9
- import { StandardCRON } from "ts-cron-validator";
10
-
11
- //#region src/configure/types/type.d.ts
12
- type TailorAnyField = TailorField<any>;
13
- /**
14
- * Full TailorField interface with builder methods.
15
- * Extends the minimal structural interface from types/ with fluent API methods.
16
- */
17
- interface TailorField<Defined extends DefinedFieldMetadata = DefinedFieldMetadata, Output = any, M extends FieldMetadata = FieldMetadata, T extends TailorFieldType = TailorFieldType> extends TailorField$1<Defined, Output, M, T> {
18
- readonly fields: Record<string, TailorAnyField>;
19
- _metadata: M;
20
- /**
21
- * Set a description for the field
22
- * @param description - The description text
23
- * @returns The field with updated metadata
24
- */
25
- description<CurrentDefined extends Defined>(this: CurrentDefined extends {
26
- description: unknown;
27
- } ? never : TailorField<CurrentDefined, Output>, description: string): TailorField<Prettify<CurrentDefined & {
28
- description: true;
29
- }>, Output>;
30
- /**
31
- * Set a custom type name for enum or nested types
32
- * @param typeName - The custom type name
33
- * @returns The field with updated metadata
34
- */
35
- typeName<CurrentDefined extends Defined>(this: CurrentDefined extends {
36
- typeName: unknown;
37
- } ? never : CurrentDefined extends {
38
- type: "enum" | "nested";
39
- } ? TailorField<CurrentDefined, Output> : never, typeName: string): TailorField<Prettify<CurrentDefined & {
40
- typeName: true;
41
- }>, Output>;
42
- /**
43
- * Add validation functions to the field
44
- * @param validate - One or more validation functions
45
- * @returns The field with updated metadata
46
- */
47
- validate<CurrentDefined extends Defined>(this: CurrentDefined extends {
48
- validate: unknown;
49
- } ? never : TailorField<CurrentDefined, Output>, ...validate: FieldValidateInput<Output>[]): TailorField<Prettify<CurrentDefined & {
50
- validate: true;
51
- }>, Output>;
52
- /**
53
- * Parse and validate a value against this field's validation rules
54
- * Returns StandardSchema Result type with success or failure
55
- * @param args - Value, context data, and user
56
- * @returns Validation result
57
- */
58
- parse(args: FieldParseArgs): StandardSchemaV1.Result<Output>;
59
- /**
60
- * Internal parse method that tracks field path for nested validation
61
- * @private
62
- * @param args - Parse arguments
63
- * @returns Validation result
64
- */
65
- _parseInternal(args: FieldParseInternalArgs): StandardSchemaV1.Result<Output>;
66
- }
67
- type FieldParseArgs = {
68
- value: unknown;
69
- data: unknown;
70
- user: TailorUser;
71
- };
72
- type FieldParseInternalArgs = {
73
- value: any;
74
- data: unknown;
75
- user: TailorUser;
76
- pathArray: string[];
77
- };
78
- /**
79
- * Create a UUID field for resolver input/output.
80
- * @param options - Field configuration options
81
- * @returns A UUID field
82
- * @example t.uuid()
83
- */
84
- //#endregion
85
- //#region src/configure/user.d.ts
86
- /** Represents an unauthenticated user in the Tailor platform. */
87
- declare const unauthenticatedTailorUser: TailorUser;
88
- //#endregion
89
- //#region src/configure/types/idp-name.d.ts
90
- interface IdpNameRegistry {}
91
- /**
92
- * IdP namespace name.
93
- *
94
- * When `tailor.d.ts` is generated (via `tailor-sdk deploy`/`generate`), this is narrowed
95
- * to the union of defined IdP names. When no IdPs are registered yet, falls back to
96
- * `string` to avoid blocking editing before the first generate run.
97
- */
98
- type IdpName = keyof IdpNameRegistry extends never ? string : keyof IdpNameRegistry & string;
99
- //#endregion
100
- //#region src/configure/services/auth/index.d.ts
101
- type MachineUserAttributeFields = Record<string, TailorField$1<DefinedFieldMetadata, unknown, FieldMetadata, TailorFieldType>>;
102
- type PlaceholderUser = TailorDBInstance<Record<string, never>, Record<string, never>>;
103
- type PlaceholderAttributeMap = UserAttributeMap<PlaceholderUser>;
104
- type PlaceholderAttributeList = UserAttributeListKey<PlaceholderUser>[];
105
- type UserProfileAuthInput<User extends TailorDBInstance, AttributeMap extends UserAttributeMap<User>, AttributeList extends UserAttributeListKey<User>[], MachineUserNames extends string, ConnectionNames extends string = string> = Omit<AuthServiceInput<User, AttributeMap, AttributeList, MachineUserNames, undefined, ConnectionNames>, "userProfile" | "machineUserAttributes"> & {
106
- userProfile: NonNullable<AuthServiceInput<User, AttributeMap, AttributeList, MachineUserNames, undefined>["userProfile"]>;
107
- machineUserAttributes?: never;
108
- };
109
- type MachineUserOnlyAuthInput<MachineUserNames extends string, MachineUserAttributes extends MachineUserAttributeFields, ConnectionNames extends string = string> = Omit<AuthServiceInput<PlaceholderUser, PlaceholderAttributeMap, PlaceholderAttributeList, MachineUserNames, MachineUserAttributes, ConnectionNames>, "userProfile" | "machineUserAttributes"> & {
110
- userProfile?: never;
111
- machineUserAttributes: MachineUserAttributes;
112
- };
113
- /**
114
- * Define an auth service for the Tailor SDK.
115
- * @template Name
116
- * @template User
117
- * @template AttributeMap
118
- * @template AttributeList
119
- * @template MachineUserNames
120
- * @param name - Auth service name
121
- * @param config - Auth service configuration
122
- * @returns Defined auth service
123
- */
124
- declare function defineAuth<const Name extends string, const User extends TailorDBInstance, const AttributeMap extends UserAttributeMap<User>, const AttributeList extends UserAttributeListKey<User>[], const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames>): DefinedAuth<Name, UserProfileAuthInput<User, AttributeMap, AttributeList, MachineUserNames, ConnectionNames>>;
125
- declare function defineAuth<const Name extends string, const MachineUserAttributes extends MachineUserAttributeFields, const MachineUserNames extends string, const ConnectionNames extends string = string>(name: Name, config: MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>): DefinedAuth<Name, MachineUserOnlyAuthInput<MachineUserNames, MachineUserAttributes, ConnectionNames>>;
126
- //#endregion
127
- //#region src/configure/services/resolver/resolver.d.ts
128
- type Context<Input extends Record<string, TailorAnyField> | undefined> = {
129
- input: Input extends Record<string, TailorAnyField> ? InferFieldsOutput<Input> : never;
130
- user: TailorUser;
131
- invoker?: TailorInvoker;
132
- env: TailorEnv;
133
- };
134
- type OutputType<O> = O extends TailorAnyField ? output$1<O> : O extends Record<string, TailorAnyField> ? InferFieldsOutput<O> : never;
135
- /**
136
- * Normalized output type that preserves generic type information.
137
- * - If Output is already a TailorField, use it as-is
138
- * - If Output is a Record of fields, wrap it as a nested TailorField
139
- */
140
- type NormalizedOutput<Output extends TailorAnyField | Record<string, TailorAnyField>> = Output extends TailorAnyField ? Output : TailorField<{
141
- type: "nested";
142
- array: false;
143
- }, InferFieldsOutput<Extract<Output, Record<string, TailorAnyField>>>>;
144
- type ResolverReturn<Input extends Record<string, TailorAnyField> | undefined, Output extends TailorAnyField | Record<string, TailorAnyField>> = Omit<ResolverInput, "input" | "output" | "body" | "authInvoker"> & Readonly<{
145
- input?: Input;
146
- output: NormalizedOutput<Output>;
147
- body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
148
- authInvoker?: MachineUserName;
149
- }>;
150
- /**
151
- * Create a resolver definition for the Tailor SDK.
152
- *
153
- * The `body` function receives a context with `input` (typed from `config.input`),
154
- * `user`, `invoker` (reflects `authInvoker` delegation), and `env`.
155
- * The return value of `body` must match the `output` type.
156
- *
157
- * `output` accepts either a single TailorField (e.g. `t.string()`) or a
158
- * Record of fields (e.g. `{ name: t.string(), age: t.int() }`).
159
- *
160
- * `publishEvents` enables publishing execution events for this resolver.
161
- * If not specified, this is automatically set to true when an executor uses this resolver
162
- * with `resolverExecutedTrigger`. If explicitly set to false while an executor uses this
163
- * resolver, an error will be thrown during apply.
164
- * @template Input
165
- * @template Output
166
- * @param config - Resolver configuration
167
- * @returns Normalized resolver configuration
168
- * @example
169
- * import { createResolver, t } from "@tailor-platform/sdk";
170
- *
171
- * export default createResolver({
172
- * name: "getUser",
173
- * operation: "query",
174
- * input: {
175
- * id: t.string(),
176
- * },
177
- * body: async ({ input, user }) => {
178
- * const db = getDB("tailordb");
179
- * const result = await db.selectFrom("User").selectAll().where("id", "=", input.id).executeTakeFirst();
180
- * return { name: result?.name ?? "", email: result?.email ?? "" };
181
- * },
182
- * output: t.object({
183
- * name: t.string(),
184
- * email: t.string(),
185
- * }),
186
- * });
187
- */
188
- declare function createResolver<Input extends Record<string, TailorAnyField> | undefined = undefined, Output extends TailorAnyField | Record<string, TailorAnyField> = TailorAnyField>(config: Omit<ResolverInput, "input" | "output" | "body" | "authInvoker"> & Readonly<{
189
- input?: Input;
190
- output: Output;
191
- body: (context: Context<Input>) => OutputType<Output> | Promise<OutputType<Output>>;
192
- authInvoker?: MachineUserName;
193
- }>): ResolverReturn<Input, Output>;
194
- type ResolverConfig = ReturnType<typeof createResolver<any, any>>;
195
- //#endregion
196
- //#region src/configure/services/resolver/types.d.ts
197
- type QueryType = Resolver["operation"];
198
- //#endregion
199
- //#region src/configure/services/executor/operation.d.ts
200
- /** Function-based executor operation. The body receives the trigger args and the `invoker`. */
201
- type FunctionOperation<Args> = Omit<FunctionOperation$1, "body" | "authInvoker"> & {
202
- body: (args: Args & {
203
- invoker?: TailorInvoker;
204
- }) => void | Promise<void>;
205
- authInvoker?: MachineUserName;
206
- };
207
- type UrqlOperationArgs = Parameters<Client["query"] | Client["mutation"]>;
208
- /** GraphQL-based executor operation. Executes a GraphQL query or mutation. */
209
- type GqlOperation<Args> = Omit<GqlOperation$1, "query" | "variables" | "authInvoker"> & {
210
- query: UrqlOperationArgs[0];
211
- variables?: (args: Args) => UrqlOperationArgs[1];
212
- authInvoker?: MachineUserName;
213
- };
214
- type RequestHeader = "A-IM" | "Accept" | "Accept-Additions" | "Accept-CH" | "Accept-Charset" | "Accept-Datetime" | "Accept-Encoding" | "Accept-Features" | "Accept-Language" | "Accept-Patch" | "Accept-Post" | "Accept-Ranges" | "Accept-Signature" | "Access-Control" | "Access-Control-Allow-Credentials" | "Access-Control-Allow-Headers" | "Access-Control-Allow-Methods" | "Access-Control-Allow-Origin" | "Access-Control-Expose-Headers" | "Access-Control-Max-Age" | "Access-Control-Request-Headers" | "Access-Control-Request-Method" | "Age" | "Allow" | "ALPN" | "Alt-Svc" | "Alt-Used" | "Alternates" | "AMP-Cache-Transform" | "Apply-To-Redirect-Ref" | "Authentication-Control" | "Authentication-Info" | "Authorization" | "Available-Dictionary" | "C-Ext" | "C-Man" | "C-Opt" | "C-PEP" | "C-PEP-Info" | "Cache-Control" | "Cache-Status" | "Cal-Managed-ID" | "CalDAV-Timezones" | "Capsule-Protocol" | "CDN-Cache-Control" | "CDN-Loop" | "Cert-Not-After" | "Cert-Not-Before" | "Clear-Site-Data" | "Client-Cert" | "Client-Cert-Chain" | "Close" | "CMCD-Object" | "CMCD-Request" | "CMCD-Session" | "CMCD-Status" | "CMSD-Dynamic" | "CMSD-Static" | "Concealed-Auth-Export" | "Configuration-Context" | "Connection" | "Content-Base" | "Content-Digest" | "Content-Disposition" | "Content-Encoding" | "Content-ID" | "Content-Language" | "Content-Length" | "Content-Location" | "Content-MD5" | "Content-Range" | "Content-Script-Type" | "Content-Security-Policy" | "Content-Security-Policy-Report-Only" | "Content-Style-Type" | "Content-Type" | "Content-Version" | "Cookie" | "Cookie2" | "Cross-Origin-Embedder-Policy" | "Cross-Origin-Embedder-Policy-Report-Only" | "Cross-Origin-Opener-Policy" | "Cross-Origin-Opener-Policy-Report-Only" | "Cross-Origin-Resource-Policy" | "CTA-Common-Access-Token" | "DASL" | "Date" | "DAV" | "Default-Style" | "Delta-Base" | "Deprecation" | "Depth" | "Derived-From" | "Destination" | "Differential-ID" | "Dictionary-ID" | "Digest" | "DPoP" | "DPoP-Nonce" | "Early-Data" | "EDIINT-Features" | "ETag" | "Expect" | "Expect-CT" | "Expires" | "Ext" | "Forwarded" | "From" | "GetProfile" | "Hobareg" | "Host" | "HTTP2-Settings" | "If" | "If-Match" | "If-Modified-Since" | "If-None-Match" | "If-Range" | "If-Schedule-Tag-Match" | "If-Unmodified-Since" | "IM" | "Include-Referred-Token-Binding-ID" | "Isolation" | "Keep-Alive" | "Label" | "Last-Event-ID" | "Last-Modified" | "Link" | "Link-Template" | "Location" | "Lock-Token" | "Man" | "Max-Forwards" | "Memento-Datetime" | "Meter" | "Method-Check" | "Method-Check-Expires" | "MIME-Version" | "Negotiate" | "NEL" | "OData-EntityId" | "OData-Isolation" | "OData-MaxVersion" | "OData-Version" | "Opt" | "Optional-WWW-Authenticate" | "Ordering-Type" | "Origin" | "Origin-Agent-Cluster" | "OSCORE" | "OSLC-Core-Version" | "Overwrite" | "P3P" | "PEP" | "PEP-Info" | "Permissions-Policy" | "PICS-Label" | "Ping-From" | "Ping-To" | "Position" | "Pragma" | "Prefer" | "Preference-Applied" | "Priority" | "ProfileObject" | "Protocol" | "Protocol-Info" | "Protocol-Query" | "Protocol-Request" | "Proxy-Authenticate" | "Proxy-Authentication-Info" | "Proxy-Authorization" | "Proxy-Features" | "Proxy-Instruction" | "Proxy-Status" | "Public" | "Public-Key-Pins" | "Public-Key-Pins-Report-Only" | "Range" | "Redirect-Ref" | "Referer" | "Referer-Root" | "Referrer-Policy" | "Refresh" | "Repeatability-Client-ID" | "Repeatability-First-Sent" | "Repeatability-Request-ID" | "Repeatability-Result" | "Replay-Nonce" | "Reporting-Endpoints" | "Repr-Digest" | "Retry-After" | "Safe" | "Schedule-Reply" | "Schedule-Tag" | "Sec-GPC" | "Sec-Purpose" | "Sec-Token-Binding" | "Sec-WebSocket-Accept" | "Sec-WebSocket-Extensions" | "Sec-WebSocket-Key" | "Sec-WebSocket-Protocol" | "Sec-WebSocket-Version" | "Security-Scheme" | "Server" | "Server-Timing" | "Set-Cookie" | "Set-Cookie2" | "SetProfile" | "Signature" | "Signature-Input" | "SLUG" | "SoapAction" | "Status-URI" | "Strict-Transport-Security" | "Sunset" | "Surrogate-Capability" | "Surrogate-Control" | "TCN" | "TE" | "Timeout" | "Timing-Allow-Origin" | "Topic" | "Traceparent" | "Tracestate" | "Trailer" | "Transfer-Encoding" | "TTL" | "Upgrade" | "Urgency" | "URI" | "Use-As-Dictionary" | "User-Agent" | "Variant-Vary" | "Vary" | "Via" | "Want-Content-Digest" | "Want-Digest" | "Want-Repr-Digest" | "Warning" | "WWW-Authenticate" | "X-Content-Type-Options" | "X-Frame-Options" | (string & {});
215
- /** Outbound webhook executor operation. Sends HTTP requests to external URLs. */
216
- type WebhookOperation<Args> = Omit<WebhookOperation$1, "url" | "requestBody" | "headers"> & {
217
- url: (args: Args) => string;
218
- requestBody?: (args: Args) => Record<string, unknown>;
219
- headers?: { [key in RequestHeader]?: string | {
220
- vault: string;
221
- key: string;
222
- } };
223
- };
224
- /**
225
- * Extract mainJob's Input type from Workflow.
226
- * Workflow<Job> -> Job is WorkflowJob<Name, Input, Output> -> Input
227
- */
228
- type WorkflowInput$1<W extends Workflow> = Parameters<W["trigger"]>[0];
229
- /** Workflow-triggering executor operation. Triggers a workflow in response to an event. */
230
- type WorkflowOperation<Args, W extends Workflow = Workflow> = Omit<WorkflowOperation$1, "workflowName" | "args" | "authInvoker"> & {
231
- workflow: W;
232
- args?: WorkflowInput$1<W> | ((args: Args) => WorkflowInput$1<W>);
233
- authInvoker?: MachineUserName;
234
- };
235
- type Operation<Args> = FunctionOperation<Args> | GqlOperation<Args> | WebhookOperation<Args> | WorkflowOperation<Args>;
236
- //#endregion
237
- //#region src/configure/services/executor/trigger/event.d.ts
238
- interface EventArgs {
239
- workspaceId: string;
240
- appNamespace: string;
241
- env: TailorEnv;
242
- actor: TailorActor | null;
243
- }
244
- interface RecordArgs extends EventArgs {
245
- typeName: string;
246
- }
247
- interface RecordCreatedArgs<T extends TailorDBType> extends RecordArgs {
248
- event: "created";
249
- rawEvent: "tailordb.type_record.created";
250
- newRecord: output$1<T>;
251
- }
252
- interface RecordUpdatedArgs<T extends TailorDBType> extends RecordArgs {
253
- event: "updated";
254
- rawEvent: "tailordb.type_record.updated";
255
- newRecord: output$1<T>;
256
- oldRecord: output$1<T>;
257
- }
258
- interface RecordDeletedArgs<T extends TailorDBType> extends RecordArgs {
259
- event: "deleted";
260
- rawEvent: "tailordb.type_record.deleted";
261
- oldRecord: output$1<T>;
262
- }
263
- /**
264
- * Args for resolverExecutedTrigger. This is a discriminated union on `success`.
265
- *
266
- * When `success` is true, `result` contains the resolver output and `error` is never.
267
- * When `success` is false, `error` contains the error message and `result` is never.
268
- *
269
- * Narrow on `success` to safely access either `result` or `error`.
270
- * @example
271
- * body: async (args) => {
272
- * if (args.success) {
273
- * console.log(args.result);
274
- * } else {
275
- * console.error(args.error);
276
- * }
277
- * }
278
- */
279
- type ResolverExecutedArgs<R extends ResolverConfig> = EventArgs & {
280
- resolverName: string;
281
- } & ({
282
- success: true;
283
- result: output$1<R["output"]>;
284
- error?: never;
285
- } | {
286
- success: false;
287
- result?: never;
288
- error: string;
289
- });
290
- interface IdpUserCreatedArgs extends EventArgs {
291
- event: "created";
292
- rawEvent: "idp.user.created";
293
- namespaceName: string;
294
- userId: string;
295
- }
296
- interface IdpUserUpdatedArgs extends EventArgs {
297
- event: "updated";
298
- rawEvent: "idp.user.updated";
299
- namespaceName: string;
300
- userId: string;
301
- }
302
- interface IdpUserDeletedArgs extends EventArgs {
303
- event: "deleted";
304
- rawEvent: "idp.user.deleted";
305
- namespaceName: string;
306
- userId: string;
307
- }
308
- type IdpUserArgs = IdpUserCreatedArgs | IdpUserUpdatedArgs | IdpUserDeletedArgs;
309
- interface AuthAccessTokenIssuedArgs extends EventArgs {
310
- event: "issued";
311
- rawEvent: "auth.access_token.issued";
312
- namespaceName: string;
313
- userId: string;
314
- }
315
- interface AuthAccessTokenRefreshedArgs extends EventArgs {
316
- event: "refreshed";
317
- rawEvent: "auth.access_token.refreshed";
318
- namespaceName: string;
319
- userId: string;
320
- }
321
- interface AuthAccessTokenRevokedArgs extends EventArgs {
322
- event: "revoked";
323
- rawEvent: "auth.access_token.revoked";
324
- namespaceName: string;
325
- userId: string;
326
- }
327
- type AuthAccessTokenArgs = AuthAccessTokenIssuedArgs | AuthAccessTokenRefreshedArgs | AuthAccessTokenRevokedArgs;
328
- declare const recordEventMap: {
329
- readonly created: "tailordb.type_record.created";
330
- readonly updated: "tailordb.type_record.updated";
331
- readonly deleted: "tailordb.type_record.deleted";
332
- };
333
- type RecordEventMap = typeof recordEventMap;
334
- type RecordEventKind = keyof RecordEventMap;
335
- type RecordArgsMap<T extends TailorDBType> = {
336
- created: RecordCreatedArgs<T>;
337
- updated: RecordUpdatedArgs<T>;
338
- deleted: RecordDeletedArgs<T>;
339
- };
340
- type RecordMultiArgs<T extends TailorDBType, K extends RecordEventKind[]> = RecordArgsMap<T>[K[number]];
341
- type TailorDBTrigger<Args> = TailorDBTrigger$1 & {
342
- __args: Args;
343
- };
344
- type RecordTriggerOptions<T extends TailorDBType, Args> = {
345
- type: T;
346
- condition?: (args: Args) => boolean;
347
- };
348
- /**
349
- * Create a trigger that fires when a TailorDB record is created.
350
- * @template T
351
- * @param options - Trigger options
352
- * @returns Record created trigger
353
- */
354
- declare function recordCreatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordCreatedArgs<T>>): TailorDBTrigger<RecordCreatedArgs<T>>;
355
- /**
356
- * Create a trigger that fires when a TailorDB record is updated.
357
- * @template T
358
- * @param options - Trigger options
359
- * @returns Record updated trigger
360
- */
361
- declare function recordUpdatedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordUpdatedArgs<T>>): TailorDBTrigger<RecordUpdatedArgs<T>>;
362
- /**
363
- * Create a trigger that fires when a TailorDB record is deleted.
364
- * @template T
365
- * @param options - Trigger options
366
- * @returns Record deleted trigger
367
- */
368
- declare function recordDeletedTrigger<T extends TailorDBType>(options: RecordTriggerOptions<T, RecordDeletedArgs<T>>): TailorDBTrigger<RecordDeletedArgs<T>>;
369
- type RecordTriggerMultiOptions<T extends TailorDBType, K extends RecordEventKind[]> = {
370
- type: T;
371
- events: K;
372
- condition?: (args: RecordMultiArgs<T, K>) => boolean;
373
- };
374
- /**
375
- * Create a trigger that fires on multiple TailorDB record event types.
376
- * @template T
377
- * @template K
378
- * @param options - Trigger options with events array
379
- * @returns TailorDB record trigger
380
- */
381
- declare function recordTrigger<T extends TailorDBType, const K extends [RecordEventKind, ...RecordEventKind[]]>(options: RecordTriggerMultiOptions<T, K>): TailorDBTrigger<RecordMultiArgs<T, K>>;
382
- type ResolverExecutedTrigger<Args> = ResolverExecutedTrigger$1 & {
383
- __args: Args;
384
- };
385
- type ResolverExecutedTriggerOptions<R extends ResolverConfig> = {
386
- resolver: R;
387
- condition?: (args: ResolverExecutedArgs<R>) => boolean;
388
- };
389
- /**
390
- * Create a trigger that fires when a resolver is executed.
391
- * @template R
392
- * @param options - Trigger options
393
- * @returns Resolver executed trigger
394
- */
395
- declare function resolverExecutedTrigger<R extends ResolverConfig>(options: ResolverExecutedTriggerOptions<R>): ResolverExecutedTrigger<ResolverExecutedArgs<R>>;
396
- declare const idpUserEventMap: {
397
- readonly created: "idp.user.created";
398
- readonly updated: "idp.user.updated";
399
- readonly deleted: "idp.user.deleted";
400
- };
401
- type IdpUserEventMap = typeof idpUserEventMap;
402
- type IdpUserEventKind = keyof IdpUserEventMap;
403
- type IdpUserArgsMap = {
404
- created: IdpUserCreatedArgs;
405
- updated: IdpUserUpdatedArgs;
406
- deleted: IdpUserDeletedArgs;
407
- };
408
- type IdpUserMultiArgs<K extends IdpUserEventKind[]> = IdpUserArgsMap[K[number]];
409
- type IdpUserTrigger<Args> = IdpUserTrigger$1 & {
410
- __args: Args;
411
- };
412
- type IdpUserSingleTriggerOptions = {
413
- /**
414
- * IdP namespace name to subscribe to. Required when the project defines
415
- * multiple IdPs; optional when a single IdP exists. Must match an IdP name
416
- * declared in `defineConfig({ idp: [...] })`.
417
- */
418
- idp?: IdpName;
419
- };
420
- /**
421
- * Create a trigger that fires when an IdP user is created.
422
- * @param options - Trigger options
423
- * @param options.idp - IdP namespace name to subscribe to
424
- * @returns IdP user created trigger
425
- */
426
- declare function idpUserCreatedTrigger(options?: IdpUserSingleTriggerOptions): IdpUserTrigger<IdpUserCreatedArgs>;
427
- /**
428
- * Create a trigger that fires when an IdP user is updated.
429
- * @param options - Trigger options
430
- * @param options.idp - IdP namespace name to subscribe to
431
- * @returns IdP user updated trigger
432
- */
433
- declare function idpUserUpdatedTrigger(options?: IdpUserSingleTriggerOptions): IdpUserTrigger<IdpUserUpdatedArgs>;
434
- /**
435
- * Create a trigger that fires when an IdP user is deleted.
436
- * @param options - Trigger options
437
- * @param options.idp - IdP namespace name to subscribe to
438
- * @returns IdP user deleted trigger
439
- */
440
- declare function idpUserDeletedTrigger(options?: IdpUserSingleTriggerOptions): IdpUserTrigger<IdpUserDeletedArgs>;
441
- type IdpUserTriggerOptions<K extends IdpUserEventKind[]> = {
442
- events: K;
443
- /**
444
- * IdP namespace name to subscribe to. Required when the project defines
445
- * multiple IdPs; optional when a single IdP exists. Must match an IdP name
446
- * declared in `defineConfig({ idp: [...] })`.
447
- */
448
- idp?: IdpName;
449
- };
450
- /**
451
- * Create a trigger that fires on multiple IdP user event types.
452
- * @template K
453
- * @param options - Trigger options with events array
454
- * @param options.events - IdP user event kinds to subscribe to
455
- * @param options.idp - IdP namespace name to subscribe to
456
- * @returns IdP user trigger
457
- */
458
- declare function idpUserTrigger<const K extends [IdpUserEventKind, ...IdpUserEventKind[]]>(options: IdpUserTriggerOptions<K>): IdpUserTrigger<IdpUserMultiArgs<K>>;
459
- declare const authAccessTokenEventMap: {
460
- readonly issued: "auth.access_token.issued";
461
- readonly refreshed: "auth.access_token.refreshed";
462
- readonly revoked: "auth.access_token.revoked";
463
- };
464
- type AuthAccessTokenEventMap = typeof authAccessTokenEventMap;
465
- type AuthAccessTokenEventKind = keyof AuthAccessTokenEventMap;
466
- type AuthAccessTokenArgsMap = {
467
- issued: AuthAccessTokenIssuedArgs;
468
- refreshed: AuthAccessTokenRefreshedArgs;
469
- revoked: AuthAccessTokenRevokedArgs;
470
- };
471
- type AuthAccessTokenMultiArgs<K extends AuthAccessTokenEventKind[]> = AuthAccessTokenArgsMap[K[number]];
472
- type AuthAccessTokenTrigger<Args> = AuthAccessTokenTrigger$1 & {
473
- __args: Args;
474
- };
475
- /**
476
- * Create a trigger that fires when an access token is issued.
477
- * @returns Auth access token issued trigger
478
- */
479
- declare function authAccessTokenIssuedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenIssuedArgs>;
480
- /**
481
- * Create a trigger that fires when an access token is refreshed.
482
- * @returns Auth access token refreshed trigger
483
- */
484
- declare function authAccessTokenRefreshedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRefreshedArgs>;
485
- /**
486
- * Create a trigger that fires when an access token is revoked.
487
- * @returns Auth access token revoked trigger
488
- */
489
- declare function authAccessTokenRevokedTrigger(): AuthAccessTokenTrigger<AuthAccessTokenRevokedArgs>;
490
- type AuthAccessTokenTriggerOptions<K extends AuthAccessTokenEventKind[]> = {
491
- events: K;
492
- };
493
- /**
494
- * Create a trigger that fires on multiple auth access token event types.
495
- * @template K
496
- * @param options - Trigger options with events array
497
- * @returns Auth access token trigger
498
- */
499
- declare function authAccessTokenTrigger<const K extends [AuthAccessTokenEventKind, ...AuthAccessTokenEventKind[]]>(options: AuthAccessTokenTriggerOptions<K>): AuthAccessTokenTrigger<AuthAccessTokenMultiArgs<K>>;
500
- //#endregion
501
- //#region src/configure/services/executor/trigger/schedule.d.ts
502
- type Timezone = "UTC" | "Pacific/Midway" | "Pacific/Niue" | "Pacific/Pago_Pago" | "America/Adak" | "Pacific/Honolulu" | "Pacific/Rarotonga" | "Pacific/Tahiti" | "Pacific/Marquesas" | "America/Anchorage" | "America/Juneau" | "America/Metlakatla" | "America/Nome" | "America/Sitka" | "America/Yakutat" | "Pacific/Gambier" | "America/Los_Angeles" | "America/Tijuana" | "America/Vancouver" | "Pacific/Pitcairn" | "America/Boise" | "America/Cambridge_Bay" | "America/Chihuahua" | "America/Creston" | "America/Dawson" | "America/Dawson_Creek" | "America/Denver" | "America/Edmonton" | "America/Fort_Nelson" | "America/Hermosillo" | "America/Inuvik" | "America/Mazatlan" | "America/Ojinaga" | "America/Phoenix" | "America/Whitehorse" | "America/Yellowknife" | "America/Bahia_Banderas" | "America/Belize" | "America/Chicago" | "America/Costa_Rica" | "America/El_Salvador" | "America/Guatemala" | "America/Indiana/Knox" | "America/Indiana/Tell_City" | "America/Managua" | "America/Matamoros" | "America/Menominee" | "America/Merida" | "America/Mexico_City" | "America/Monterrey" | "America/North_Dakota/Beulah" | "America/North_Dakota/Center" | "America/North_Dakota/New_Salem" | "America/Rainy_River" | "America/Rankin_Inlet" | "America/Regina" | "America/Resolute" | "America/Swift_Current" | "America/Tegucigalpa" | "America/Winnipeg" | "Pacific/Easter" | "Pacific/Galapagos" | "America/Atikokan" | "America/Bogota" | "America/Cancun" | "America/Cayman" | "America/Detroit" | "America/Eirunepe" | "America/Grand_Turk" | "America/Guayaquil" | "America/Havana" | "America/Indiana/Indianapolis" | "America/Indiana/Marengo" | "America/Indiana/Petersburg" | "America/Indiana/Vevay" | "America/Indiana/Vincennes" | "America/Indiana/Winamac" | "America/Iqaluit" | "America/Jamaica" | "America/Kentucky/Louisville" | "America/Kentucky/Monticello" | "America/Lima" | "America/Nassau" | "America/New_York" | "America/Nipigon" | "America/Panama" | "America/Pangnirtung" | "America/Port-au-Prince" | "America/Rio_Branco" | "America/Thunder_Bay" | "America/Toronto" | "America/Anguilla" | "America/Antigua" | "America/Aruba" | "America/Asuncion" | "America/Barbados" | "America/Blanc-Sablon" | "America/Boa_Vista" | "America/Campo_Grande" | "America/Caracas" | "America/Cuiaba" | "America/Curacao" | "America/Dominica" | "America/Glace_Bay" | "America/Goose_Bay" | "America/Grenada" | "America/Guadeloupe" | "America/Guyana" | "America/Halifax" | "America/Kralendijk" | "America/La_Paz" | "America/Lower_Princes" | "America/Manaus" | "America/Marigot" | "America/Martinique" | "America/Moncton" | "America/Montserrat" | "America/Porto_Velho" | "America/Port_of_Spain" | "America/Puerto_Rico" | "America/Santiago" | "America/Santo_Domingo" | "America/St_Barthelemy" | "America/St_Kitts" | "America/St_Lucia" | "America/St_Thomas" | "America/St_Vincent" | "America/Thule" | "America/Tortola" | "Atlantic/Bermuda" | "America/St_Johns" | "America/Araguaina" | "America/Argentina/Buenos_Aires" | "America/Argentina/Catamarca" | "America/Argentina/Cordoba" | "America/Argentina/Jujuy" | "America/Argentina/La_Rioja" | "America/Argentina/Mendoza" | "America/Argentina/Rio_Gallegos" | "America/Argentina/Salta" | "America/Argentina/San_Juan" | "America/Argentina/San_Luis" | "America/Argentina/Tucuman" | "America/Argentina/Ushuaia" | "America/Bahia" | "America/Belem" | "America/Cayenne" | "America/Fortaleza" | "America/Godthab" | "America/Maceio" | "America/Miquelon" | "America/Montevideo" | "America/Paramaribo" | "America/Punta_Arenas" | "America/Recife" | "America/Santarem" | "America/Sao_Paulo" | "Antarctica/Palmer" | "Antarctica/Rothera" | "Atlantic/Stanley" | "America/Noronha" | "Atlantic/South_Georgia" | "America/Scoresbysund" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Africa/Abidjan" | "Africa/Accra" | "Africa/Bamako" | "Africa/Banjul" | "Africa/Bissau" | "Africa/Casablanca" | "Africa/Conakry" | "Africa/Dakar" | "Africa/El_Aaiun" | "Africa/Freetown" | "Africa/Lome" | "Africa/Monrovia" | "Africa/Nouakchott" | "Africa/Ouagadougou" | "Africa/Sao_Tome" | "America/Danmarkshavn" | "Antarctica/Troll" | "Atlantic/Canary" | "Atlantic/Faroe" | "Atlantic/Madeira" | "Atlantic/Reykjavik" | "Atlantic/St_Helena" | "Europe/Dublin" | "Europe/Guernsey" | "Europe/Isle_of_Man" | "Europe/Jersey" | "Europe/Lisbon" | "Europe/London" | "Africa/Algiers" | "Africa/Bangui" | "Africa/Brazzaville" | "Africa/Ceuta" | "Africa/Douala" | "Africa/Kinshasa" | "Africa/Lagos" | "Africa/Libreville" | "Africa/Luanda" | "Africa/Malabo" | "Africa/Ndjamena" | "Africa/Niamey" | "Africa/Porto-Novo" | "Africa/Tunis" | "Africa/Windhoek" | "Arctic/Longyearbyen" | "Europe/Amsterdam" | "Europe/Andorra" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Gibraltar" | "Europe/Ljubljana" | "Europe/Luxembourg" | "Europe/Madrid" | "Europe/Malta" | "Europe/Monaco" | "Europe/Oslo" | "Europe/Paris" | "Europe/Podgorica" | "Europe/Prague" | "Europe/Rome" | "Europe/San_Marino" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Stockholm" | "Europe/Tirane" | "Europe/Vaduz" | "Europe/Vatican" | "Europe/Vienna" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "Africa/Blantyre" | "Africa/Bujumbura" | "Africa/Cairo" | "Africa/Gaborone" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Juba" | "Africa/Khartoum" | "Africa/Kigali" | "Africa/Lubumbashi" | "Africa/Lusaka" | "Africa/Maputo" | "Africa/Maseru" | "Africa/Mbabane" | "Africa/Tripoli" | "Asia/Amman" | "Asia/Beirut" | "Asia/Damascus" | "Asia/Famagusta" | "Asia/Gaza" | "Asia/Hebron" | "Asia/Jerusalem" | "Asia/Nicosia" | "Europe/Athens" | "Europe/Bucharest" | "Europe/Chisinau" | "Europe/Helsinki" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Mariehamn" | "Europe/Riga" | "Europe/Sofia" | "Europe/Tallinn" | "Europe/Uzhgorod" | "Europe/Vilnius" | "Europe/Zaporizhzhia" | "Africa/Addis_Ababa" | "Africa/Asmara" | "Africa/Dar_es_Salaam" | "Africa/Djibouti" | "Africa/Kampala" | "Africa/Mogadishu" | "Africa/Nairobi" | "Antarctica/Syowa" | "Asia/Aden" | "Asia/Baghdad" | "Asia/Bahrain" | "Asia/Kuwait" | "Asia/Qatar" | "Asia/Riyadh" | "Europe/Istanbul" | "Europe/Kirov" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Simferopol" | "Europe/Volgograd" | "Indian/Antananarivo" | "Indian/Comoro" | "Indian/Mayotte" | "Asia/Tehran" | "Asia/Baku" | "Asia/Dubai" | "Asia/Muscat" | "Asia/Tbilisi" | "Asia/Yerevan" | "Europe/Astrakhan" | "Europe/Samara" | "Europe/Saratov" | "Europe/Ulyanovsk" | "Indian/Mahe" | "Indian/Mauritius" | "Indian/Reunion" | "Asia/Kabul" | "Antarctica/Mawson" | "Asia/Aqtau" | "Asia/Aqtobe" | "Asia/Ashgabat" | "Asia/Atyrau" | "Asia/Dushanbe" | "Asia/Karachi" | "Asia/Oral" | "Asia/Qyzylorda" | "Asia/Samarkand" | "Asia/Tashkent" | "Asia/Yekaterinburg" | "Indian/Kerguelen" | "Indian/Maldives" | "Asia/Colombo" | "Asia/Kolkata" | "Asia/Kathmandu" | "Antarctica/Vostok" | "Asia/Almaty" | "Asia/Bishkek" | "Asia/Dhaka" | "Asia/Omsk" | "Asia/Qostanay" | "Asia/Thimphu" | "Asia/Urumqi" | "Indian/Chagos" | "Asia/Yangon" | "Indian/Cocos" | "Antarctica/Davis" | "Asia/Bangkok" | "Asia/Barnaul" | "Asia/Hovd" | "Asia/Ho_Chi_Minh" | "Asia/Jakarta" | "Asia/Krasnoyarsk" | "Asia/Novokuznetsk" | "Asia/Novosibirsk" | "Asia/Phnom_Penh" | "Asia/Pontianak" | "Asia/Tomsk" | "Asia/Vientiane" | "Indian/Christmas" | "Asia/Brunei" | "Asia/Choibalsan" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Kuala_Lumpur" | "Asia/Kuching" | "Asia/Macau" | "Asia/Makassar" | "Asia/Manila" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Taipei" | "Asia/Ulaanbaatar" | "Australia/Perth" | "Australia/Eucla" | "Asia/Chita" | "Asia/Dili" | "Asia/Jayapura" | "Asia/Khandyga" | "Asia/Pyongyang" | "Asia/Seoul" | "Asia/Tokyo" | "Asia/Yakutsk" | "Pacific/Palau" | "Australia/Adelaide" | "Australia/Broken_Hill" | "Australia/Darwin" | "Antarctica/DumontDUrville" | "Antarctica/Macquarie" | "Asia/Ust-Nera" | "Asia/Vladivostok" | "Australia/Brisbane" | "Australia/Currie" | "Australia/Hobart" | "Australia/Lindeman" | "Australia/Melbourne" | "Australia/Sydney" | "Pacific/Chuuk" | "Pacific/Guam" | "Pacific/Port_Moresby" | "Pacific/Saipan" | "Australia/Lord_Howe" | "Antarctica/Casey" | "Asia/Magadan" | "Asia/Sakhalin" | "Asia/Srednekolymsk" | "Pacific/Bougainville" | "Pacific/Efate" | "Pacific/Guadalcanal" | "Pacific/Kosrae" | "Pacific/Norfolk" | "Pacific/Noumea" | "Pacific/Pohnpei" | "Antarctica/McMurdo" | "Asia/Anadyr" | "Asia/Kamchatka" | "Pacific/Auckland" | "Pacific/Fiji" | "Pacific/Funafuti" | "Pacific/Kwajalein" | "Pacific/Majuro" | "Pacific/Nauru" | "Pacific/Tarawa" | "Pacific/Wake" | "Pacific/Wallis" | "Pacific/Chatham" | "Pacific/Apia" | "Pacific/Enderbury" | "Pacific/Fakaofo" | "Pacific/Tongatapu" | "Pacific/Kiritimati";
503
- type ScheduleTrigger<Args> = ScheduleTriggerInput & {
504
- __args: Args;
505
- };
506
- interface ScheduleArgs {
507
- env: TailorEnv;
508
- }
509
- interface ScheduleTriggerOptions<T extends string> {
510
- cron: StandardCRON<T> extends never ? never : T;
511
- timezone?: Timezone;
512
- }
513
- /**
514
- * Create a schedule-based trigger using a CRON expression and optional timezone.
515
- * @template T
516
- * @param options - Schedule options
517
- * @returns Schedule trigger
518
- */
519
- declare function scheduleTrigger<T extends string>(options: ScheduleTriggerOptions<T>): ScheduleTrigger<ScheduleArgs>;
520
- //#endregion
521
- //#region src/configure/services/executor/trigger/webhook.d.ts
522
- interface IncomingWebhookArgs<T extends IncomingWebhookRequest> {
523
- body: T["body"];
524
- headers: T["headers"];
525
- method: "POST" | "GET" | "PUT" | "DELETE";
526
- rawBody: string;
527
- env: TailorEnv;
528
- }
529
- interface IncomingWebhookRequest {
530
- body: Record<string, unknown>;
531
- headers: Record<string, string>;
532
- }
533
- interface IncomingWebhookResponseConfig<Args> {
534
- /**
535
- * Expression that returns the webhook HTTP response body.
536
- * Receives the same args as the executor operation.
537
- */
538
- body?: (args: Args) => JsonValue;
539
- /**
540
- * HTTP status code for the response.
541
- * If omitted and `body` is set, the platform uses 200.
542
- */
543
- statusCode?: number;
544
- }
545
- type IncomingWebhookResponse<Args> = ((args: Args) => JsonValue) | IncomingWebhookResponseConfig<Args>;
546
- interface IncomingWebhookTriggerOptions<Args> {
547
- response?: IncomingWebhookResponse<Args>;
548
- }
549
- type IncomingWebhookTrigger<Args> = IncomingWebhookTrigger$1 & {
550
- __args: Args;
551
- };
552
- /**
553
- * Create a trigger for incoming webhook requests.
554
- * @template T
555
- * @param options - Optional trigger options including response configuration
556
- * @returns Incoming webhook trigger
557
- */
558
- declare function incomingWebhookTrigger<T extends IncomingWebhookRequest>(options?: IncomingWebhookTriggerOptions<IncomingWebhookArgs<T>>): IncomingWebhookTrigger<IncomingWebhookArgs<T>>;
559
- //#endregion
560
- //#region src/configure/services/executor/trigger/index.d.ts
561
- type Trigger<Args> = TailorDBTrigger<Args> | ResolverExecutedTrigger<Args> | ScheduleTrigger<Args> | IncomingWebhookTrigger<Args> | IdpUserTrigger<Args> | AuthAccessTokenTrigger<Args>;
562
- //#endregion
563
- //#region src/configure/services/executor/executor.d.ts
564
- /**
565
- * Extract mainJob's Input type from Workflow.
566
- */
567
- type WorkflowInput<W extends Workflow> = Parameters<W["trigger"]>[0];
568
- type TriggerArgs<T extends Trigger<unknown>> = T extends {
569
- __args: infer Args;
570
- } ? Args : never;
571
- type ExecutorBase<T extends Trigger<unknown>> = Omit<ExecutorInput, "trigger" | "operation"> & {
572
- trigger: T;
573
- };
574
- /**
575
- * Executor type with conditional inference for workflow operations.
576
- * When operation.kind is "workflow", infers W from the workflow property
577
- * to ensure args type matches the workflow's mainJob input type.
578
- */
579
- type Executor<T extends Trigger<unknown>, O> = O extends {
580
- kind: "workflow";
581
- workflow: infer W extends Workflow;
582
- } ? ExecutorBase<T> & {
583
- operation: {
584
- kind: "workflow";
585
- workflow: W;
586
- args?: WorkflowInput<W> | ((args: TriggerArgs<T>) => WorkflowInput<W>);
587
- authInvoker?: MachineUserName;
588
- };
589
- } : ExecutorBase<T> & {
590
- operation: O;
591
- };
592
- /**
593
- * Create an executor configuration for the Tailor SDK.
594
- *
595
- * Executors are event-driven handlers that respond to record changes,
596
- * resolver executions, or other events.
597
- *
598
- * Operation kinds: "function", "graphql", "webhook", "workflow".
599
- * @template T
600
- * @template O
601
- * @param config - Executor configuration
602
- * @returns The same executor configuration
603
- * @example
604
- * import { createExecutor, recordCreatedTrigger } from "@tailor-platform/sdk";
605
- * import { order } from "../tailordb/order";
606
- *
607
- * export default createExecutor({
608
- * name: "order-created",
609
- * description: "Handles new order creation",
610
- * trigger: recordCreatedTrigger({ type: order }),
611
- * operation: {
612
- * kind: "function",
613
- * body: async ({ newRecord }) => {
614
- * console.log("New order:", newRecord.id);
615
- * },
616
- * },
617
- * });
618
- */
619
- declare function createExecutor<T extends Trigger<unknown>, O extends Operation<TriggerArgs<T>> | {
620
- kind: "workflow";
621
- workflow: Workflow;
622
- }>(config: Executor<T, O>): Executor<T, O>;
623
- /**
624
- * Create an executor configuration for the Tailor SDK.
625
- * This overload preserves source compatibility for legacy explicit generic calls,
626
- * where the first generic argument represents trigger args.
627
- * @template Args
628
- * @template O
629
- * @param config - Executor configuration
630
- * @returns The same executor configuration
631
- */
632
- declare function createExecutor<Args, O extends Operation<Args> | {
633
- kind: "workflow";
634
- workflow: Workflow;
635
- }>(config: Executor<Trigger<Args>, O>): Executor<Trigger<Args>, O>;
636
- //#endregion
637
- //#region src/configure/services/staticwebsite/index.d.ts
638
- /**
639
- * Define a static website configuration for the Tailor SDK.
640
- * @param name - Static website name
641
- * @param config - Static website configuration
642
- * @returns Defined static website
643
- */
644
- declare function defineStaticWebSite(name: string, config: Omit<StaticWebsiteInput, "name">): {
645
- readonly name: string;
646
- readonly url: `${string}:url`;
647
- readonly description?: string | undefined;
648
- readonly allowedIpAddresses?: string[] | undefined;
649
- readonly customDomains?: string[] | undefined;
650
- } & StaticWebsiteDefinitionBrand;
651
- //#endregion
652
- //#region src/configure/services/aigateway/index.d.ts
653
- /**
654
- * Define an AI Gateway configuration for the Tailor SDK.
655
- * @param name - AI Gateway name
656
- * @param config - AI Gateway configuration
657
- * @returns Defined AI Gateway
658
- */
659
- declare function defineAIGateway(name: string, config: Omit<AIGatewayInput, "name">): {
660
- readonly name: string;
661
- readonly cors?: string[] | undefined;
662
- readonly authNamespace: string;
663
- } & AIGatewayDefinitionBrand;
664
- //#endregion
665
- //#region src/parser/service/idp/types.d.ts
666
- type IdPUserField = "id" | "name" | "disabled";
667
- //#endregion
668
- //#region src/configure/services/idp/permission.d.ts
669
- type EqualityOperator = "=" | "!=";
670
- type ContainsOperator = "in" | "not in";
671
- type StringFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string ? K : never }[keyof User];
672
- type StringArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends string[] ? K : never }[keyof User];
673
- type BooleanFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean ? K : never }[keyof User];
674
- type BooleanArrayFieldKeys<User extends object> = { [K in keyof User]: User[K] extends boolean[] ? K : never }[keyof User];
675
- type UserStringOperand<User extends object = InferredAttributeMap> = {
676
- user: StringFieldKeys<User> | "id";
677
- };
678
- type UserStringArrayOperand<User extends object = InferredAttributeMap> = {
679
- user: StringArrayFieldKeys<User>;
680
- };
681
- type UserBooleanOperand<User extends object = InferredAttributeMap> = {
682
- user: BooleanFieldKeys<User> | "_loggedIn";
683
- };
684
- type UserBooleanArrayOperand<User extends object = InferredAttributeMap> = {
685
- user: BooleanArrayFieldKeys<User>;
686
- };
687
- type IdPUserOperand<Update extends boolean = false> = Update extends true ? {
688
- oldIdpUser: IdPUserField;
689
- } | {
690
- newIdpUser: IdPUserField;
691
- } : {
692
- idpUser: IdPUserField;
693
- };
694
- type StringEqualityCondition<User extends object, Update extends boolean> = readonly [string, EqualityOperator, string] | readonly [UserStringOperand<User>, EqualityOperator, string] | readonly [string, EqualityOperator, UserStringOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, string | UserStringOperand<User> | IdPUserOperand<Update>] | readonly [string | UserStringOperand<User>, EqualityOperator, IdPUserOperand<Update>];
695
- type BooleanEqualityCondition<User extends object, Update extends boolean> = readonly [boolean, EqualityOperator, boolean] | readonly [UserBooleanOperand<User>, EqualityOperator, boolean] | readonly [boolean, EqualityOperator, UserBooleanOperand<User>] | readonly [IdPUserOperand<Update>, EqualityOperator, boolean | UserBooleanOperand<User> | IdPUserOperand<Update>] | readonly [boolean | UserBooleanOperand<User>, EqualityOperator, IdPUserOperand<Update>];
696
- type EqualityCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringEqualityCondition<User, Update> | BooleanEqualityCondition<User, Update>;
697
- type StringContainsCondition<User extends object, Update extends boolean> = readonly [string, ContainsOperator, string[]] | readonly [UserStringOperand<User>, ContainsOperator, string[]] | readonly [string, ContainsOperator, UserStringArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, string[] | UserStringArrayOperand<User>];
698
- type BooleanContainsCondition<User extends object, Update extends boolean> = readonly [boolean, ContainsOperator, boolean[]] | readonly [UserBooleanOperand<User>, ContainsOperator, boolean[]] | readonly [boolean, ContainsOperator, UserBooleanArrayOperand<User>] | readonly [IdPUserOperand<Update>, ContainsOperator, boolean[] | UserBooleanArrayOperand<User>];
699
- type ContainsCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = StringContainsCondition<User, Update> | BooleanContainsCondition<User, Update>;
700
- type IdPPermissionCondition<User extends object = InferredAttributeMap, Update extends boolean = boolean> = EqualityCondition<User, Update> | ContainsCondition<User, Update>;
701
- type IdPActionPermission<User extends object = InferredAttributeMap, Update extends boolean = boolean> = {
702
- conditions: IdPPermissionCondition<User, Update> | readonly IdPPermissionCondition<User, Update>[];
703
- description?: string | undefined;
704
- /**
705
- * Whether matching users are granted (`true`) or denied (`false`).
706
- * Omitting `permit` in this object form defaults to `deny` and emits a
707
- * warning; set it explicitly. (The array shorthand defaults to `allow`.)
708
- */
709
- permit?: boolean;
710
- } | readonly [...IdPPermissionCondition<User, Update>, ...([] | [boolean])] | readonly [...IdPPermissionCondition<User, Update>[], ...([] | [boolean])];
711
- /**
712
- * Per-operation permission policies for an IdP service.
713
- * Defines create, read, update, delete, and sendPasswordResetEmail permissions.
714
- *
715
- * For update operations, use `newIdpUser`/`oldIdpUser` operands instead of `idpUser`.
716
- * @example
717
- * const permission: IdPPermission = {
718
- * create: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
719
- * read: [{ conditions: [[{ user: "_loggedIn" }, "=", true]], permit: true }],
720
- * update: [{ conditions: [[{ newIdpUser: "name" }, "=", { user: "id" }]], permit: true }],
721
- * delete: [{ conditions: [[{ user: "role" }, "=", "ADMIN"]], permit: true }],
722
- * sendPasswordResetEmail: [{ conditions: [], permit: true }],
723
- * };
724
- */
725
- type IdPPermission<User extends object = InferredAttributeMap> = {
726
- create: readonly IdPActionPermission<User, false>[];
727
- read: readonly IdPActionPermission<User, false>[];
728
- update: readonly IdPActionPermission<User, true>[];
729
- delete: readonly IdPActionPermission<User, false>[];
730
- sendPasswordResetEmail: readonly IdPActionPermission<User, false>[];
731
- };
732
- /**
733
- * Grants full IdP permission access without any conditions.
734
- *
735
- * Unsafe and intended only for local development, prototyping, or tests.
736
- * Do not use this in production environments, as it effectively disables
737
- * authorization checks.
738
- */
739
- declare const unsafeAllowAllIdPPermission: IdPPermission;
740
- //#endregion
741
- //#region src/configure/services/idp/index.d.ts
742
- /**
743
- * Define an IdP service configuration for the Tailor SDK.
744
- * @template TClients
745
- * @param name - IdP service name
746
- * @param config - IdP configuration
747
- * @returns Defined IdP service
748
- */
749
- declare function defineIdp<const TClients extends string[]>(name: string, config: Omit<IdPInput, "name" | "clients" | "permission"> & {
750
- clients: TClients;
751
- permission?: IdPPermission;
752
- }): {
753
- readonly name: string;
754
- readonly provider: (providerName: string, clientName: TClients[number]) => {
755
- readonly name: string;
756
- readonly kind: "BuiltInIdP";
757
- readonly namespace: string;
758
- readonly clientName: TClients[number];
759
- };
760
- readonly authorization?: "insecure" | "loggedIn" | {
761
- cel: string;
762
- } | undefined;
763
- readonly lang?: "en" | "ja" | undefined;
764
- readonly userAuthPolicy?: {
765
- useNonEmailIdentifier?: boolean | undefined;
766
- allowSelfPasswordReset?: boolean | undefined;
767
- passwordRequireUppercase?: boolean | undefined;
768
- passwordRequireLowercase?: boolean | undefined;
769
- passwordRequireNonAlphanumeric?: boolean | undefined;
770
- passwordRequireNumeric?: boolean | undefined;
771
- passwordMinLength?: number | undefined;
772
- passwordMaxLength?: number | undefined;
773
- allowedEmailDomains?: string[] | undefined;
774
- allowGoogleOauth?: boolean | undefined;
775
- allowMicrosoftOauth?: boolean | undefined;
776
- disablePasswordAuth?: boolean | undefined;
777
- } | undefined;
778
- readonly publishUserEvents?: boolean | undefined;
779
- readonly gqlOperations?: "query" | {
780
- create?: boolean | undefined;
781
- update?: boolean | undefined;
782
- delete?: boolean | undefined;
783
- read?: boolean | undefined;
784
- sendPasswordResetEmail?: boolean | undefined;
785
- } | undefined;
786
- readonly emailConfig?: {
787
- fromName?: string | undefined;
788
- passwordResetSubject?: string | undefined;
789
- } | undefined;
790
- readonly clients: TClients;
791
- readonly permission?: IdPPermission;
792
- } & IdpDefinitionBrand;
793
- //#endregion
794
- //#region src/configure/services/secrets/index.d.ts
795
- type SecretsVaultInput = Record<string, string>;
796
- type SecretsVaultInputNullish = Record<string, string | undefined | null>;
797
- type SecretsInput = Record<string, SecretsVaultInput>;
798
- type SecretsInputNullish = Record<string, SecretsVaultInputNullish>;
799
- type SecretsOptions = {
800
- readonly ignoreNullishValues: boolean;
801
- };
802
- type DefinedSecrets<T extends SecretsInputNullish> = {
803
- readonly vaults: T;
804
- readonly options: SecretsOptions;
805
- get<V extends Extract<keyof T, string>, S extends Extract<keyof T[V], string>>(vault: V, secret: S): Promise<string | undefined>;
806
- getAll<V extends Extract<keyof T, string>, S extends Extract<keyof T[V], string>>(vault: V, secrets: readonly S[]): Promise<(string | undefined)[]>;
807
- } & SecretsDefinitionBrand;
808
- /**
809
- * Define secrets configuration for the Tailor SDK.
810
- * Each key is a vault name, and its value is a record of secret name to secret value.
811
- * @param config - Secrets configuration mapping vault names to their secrets
812
- * @returns Defined secrets with typed runtime access methods
813
- */
814
- declare function defineSecretManager<const T extends SecretsInput>(config: T): DefinedSecrets<T>;
815
- /**
816
- * Define secrets configuration for the Tailor SDK with ignoreNullishValues option.
817
- * When `ignoreNullishValues` is true, secrets with nullish values are skipped during deploy
818
- * instead of causing an error. This is useful for CI environments where not all
819
- * secret values are available.
820
- * @param config - Secrets configuration mapping vault names to their secrets
821
- * @param options - Options for secret management behavior
822
- * @param options.ignoreNullishValues - When true, secrets with nullish values are skipped during deploy
823
- * @returns Defined secrets with typed runtime access methods
824
- */
825
- declare function defineSecretManager<const T extends SecretsInputNullish>(config: T, options: {
826
- ignoreNullishValues: true;
827
- }): DefinedSecrets<T>;
828
- //#endregion
829
- //#region src/configure/services/http-adapter/http-adapter.d.ts
830
- /**
831
- * Lowercase HTTP method keys accepted in `input`, derived from the config
832
- * schema via the generated type so they cannot drift.
833
- */
834
- type HttpMethodKey = keyof Required<HttpAdapterConfigInput["input"]>;
835
- /** Incoming HTTP request passed to an `input` handler. */
836
- type HttpAdapterRequest = {
837
- method: Uppercase<HttpMethodKey>;
838
- path: string;
839
- headers: Record<string, string>;
840
- query: Record<string, string>;
841
- body: string;
842
- };
843
- /** GraphQL request returned by an `input` handler. */
844
- type HttpAdapterGraphQLRequest = {
845
- query: string;
846
- variables?: Record<string, unknown>;
847
- operationName?: string;
848
- };
849
- /** Converts an incoming HTTP request into a GraphQL request. */
850
- type HttpAdapterInputFn = (req: HttpAdapterRequest) => HttpAdapterGraphQLRequest;
851
- /** GraphQL execution result passed to the `output` handler. */
852
- type HttpAdapterGraphQLResponse = {
853
- data?: unknown;
854
- errors?: unknown;
855
- extensions?: unknown;
856
- };
857
- /** HTTP response returned by the `output` handler. */
858
- type HttpAdapterResponse = {
859
- statusCode?: number;
860
- headers?: Record<string, string>;
861
- body: string;
862
- };
863
- /** Converts a GraphQL response into an HTTP response. */
864
- type HttpAdapterOutputFn = (resp: HttpAdapterGraphQLResponse) => HttpAdapterResponse;
865
- /**
866
- * Per-method input handlers. At least one method must be provided.
867
- * Each handler transforms an HTTP request into a GraphQL request.
868
- */
869
- type HttpAdapterInput = Partial<Record<HttpMethodKey, HttpAdapterInputFn>>;
870
- /**
871
- * HTTP adapter configuration accepted by `createHttpAdapter` with typed
872
- * `input` and `output` signatures.
873
- */
874
- type HttpAdapter = Omit<HttpAdapterConfigInput, "input" | "output"> & {
875
- input: HttpAdapterInput;
876
- output?: HttpAdapterOutputFn;
877
- };
878
- /**
879
- * Defines an HTTP adapter that translates HTTP requests to GraphQL queries
880
- * and shapes the GraphQL response back into an HTTP response.
881
- *
882
- * The adapter MUST be the default export of its file.
883
- * Files are discovered via the `httpAdapter.files` glob in `defineConfig()`.
884
- *
885
- * `input` is an object keyed by lowercase HTTP method (`get`, `post`, `put`,
886
- * `patch`, `delete`). At least one method must be declared; the methods the
887
- * adapter serves are derived from these keys.
888
- *
889
- * `output` is optional and shared across all methods. If you need different
890
- * response shapes per method, discriminate inside `output` based on the
891
- * GraphQL response shape.
892
- *
893
- * Each handler runs server-side and must be synchronous: Node APIs, `fetch`,
894
- * `async`/`await`, Promises, and top-level `await` are not available.
895
- *
896
- * Optional fields: `enabled` (default `true`; set `false` to deploy the adapter
897
- * without serving it) and `priority` (non-negative integer, default `0`; when
898
- * multiple adapters match the same request path, the lowest value wins).
899
- * @param config - HTTP adapter configuration
900
- * @returns Branded HTTP adapter definition
901
- * @example
902
- * export default createHttpAdapter({
903
- * name: "get-user",
904
- * pathPattern: "/users/*",
905
- * input: {
906
- * get: (req) => ({
907
- * query: `query($id: ID!) { user(id: $id) { id name } }`,
908
- * variables: { id: req.path.split("/")[2] },
909
- * }),
910
- * },
911
- * output: (resp) => ({
912
- * statusCode: 200,
913
- * headers: { "content-type": "application/json" },
914
- * body: JSON.stringify(resp.data),
915
- * }),
916
- * });
917
- */
918
- declare function createHttpAdapter(config: HttpAdapter): HttpAdapter;
919
- //#endregion
920
- //#region src/configure/config/index.d.ts
921
- /**
922
- * Define a Tailor SDK application configuration with shallow exactness.
923
- * @template Config
924
- * @param config - Application configuration
925
- * @returns The same configuration object
926
- */
927
- declare function defineConfig<const Config extends AppConfig & Record<Exclude<keyof Config, keyof AppConfig>, never>>(config: Config): Config;
928
- /**
929
- * Define plugins to be used with the Tailor SDK.
930
- * Plugins can generate additional types, resolvers, and executors
931
- * based on existing TailorDB types.
932
- * @param configs - Plugin configurations
933
- * @returns Plugin configurations as given
934
- */
935
- declare function definePlugins(...configs: Plugin<any, any>[]): Plugin<any, any>[];
936
- //#endregion
937
- //#region src/configure/index.d.ts
938
- type TailorOutput<T> = output$1<T>;
939
- type infer<T> = TailorOutput<T>;
940
- type output<T> = TailorOutput<T>;
941
- /** TailorDB field type builders. */
942
- declare const t: {
943
- uuid: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
944
- type: "uuid";
945
- array: Opt extends {
946
- array: true;
947
- } ? true : false;
948
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
949
- string: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
950
- type: "string";
951
- array: Opt extends {
952
- array: true;
953
- } ? true : false;
954
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
955
- bool: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
956
- type: "boolean";
957
- array: Opt extends {
958
- array: true;
959
- } ? true : false;
960
- }, Opt["optional"] extends true ? ArrayFieldOutput<boolean, Opt> | null : ArrayFieldOutput<boolean, Opt>, FieldMetadata, TailorFieldType>;
961
- int: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
962
- type: "integer";
963
- array: Opt extends {
964
- array: true;
965
- } ? true : false;
966
- }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>, FieldMetadata, TailorFieldType>;
967
- float: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
968
- type: "float";
969
- array: Opt extends {
970
- array: true;
971
- } ? true : false;
972
- }, Opt["optional"] extends true ? ArrayFieldOutput<number, Opt> | null : ArrayFieldOutput<number, Opt>, FieldMetadata, TailorFieldType>;
973
- decimal: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
974
- type: "decimal";
975
- array: Opt extends {
976
- array: true;
977
- } ? true : false;
978
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
979
- date: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
980
- type: "date";
981
- array: Opt extends {
982
- array: true;
983
- } ? true : false;
984
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
985
- datetime: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
986
- type: "datetime";
987
- array: Opt extends {
988
- array: true;
989
- } ? true : false;
990
- }, Opt["optional"] extends true ? ArrayFieldOutput<string | Date, Opt> | null : ArrayFieldOutput<string | Date, Opt>, FieldMetadata, TailorFieldType>;
991
- time: <const Opt extends FieldOptions>(options?: Opt) => TailorField<{
992
- type: "time";
993
- array: Opt extends {
994
- array: true;
995
- } ? true : false;
996
- }, Opt["optional"] extends true ? ArrayFieldOutput<string, Opt> | null : ArrayFieldOutput<string, Opt>, FieldMetadata, TailorFieldType>;
997
- enum: <const V extends AllowedValues, const Opt extends FieldOptions>(values: V, options?: Opt) => TailorField<{
998
- type: "enum";
999
- array: Opt extends {
1000
- array: true;
1001
- } ? true : false;
1002
- }, FieldOutput<AllowedValuesOutput<V>, Opt>>;
1003
- object: <const F extends Record<string, TailorAnyField>, const Opt extends FieldOptions>(fields: F, options?: Opt) => TailorField<{
1004
- type: "nested";
1005
- array: Opt extends {
1006
- array: true;
1007
- } ? true : false;
1008
- }, FieldOutput<InferFieldsOutput<F>, Opt>, FieldMetadata, TailorFieldType>;
1009
- };
1010
- declare namespace t {
1011
- type output<T> = TailorOutput<T>;
1012
- type infer<T> = TailorOutput<T>;
1013
- }
1014
- //#endregion
1015
- export { authAccessTokenTrigger as $, incomingWebhookTrigger as A, IdpUserCreatedArgs as B, Trigger as C, IncomingWebhookResponseConfig as D, IncomingWebhookResponse as E, AuthAccessTokenIssuedArgs as F, RecordDeletedArgs as G, IdpUserTrigger as H, AuthAccessTokenRefreshedArgs as I, ResolverExecutedTrigger as J, RecordUpdatedArgs as K, AuthAccessTokenRevokedArgs as L, ScheduleTrigger as M, scheduleTrigger as N, IncomingWebhookTrigger as O, AuthAccessTokenArgs as P, authAccessTokenRevokedTrigger as Q, AuthAccessTokenTrigger as R, createExecutor as S, IncomingWebhookRequest as T, IdpUserUpdatedArgs as U, IdpUserDeletedArgs as V, RecordCreatedArgs as W, authAccessTokenIssuedTrigger as X, TailorDBTrigger as Y, authAccessTokenRefreshedTrigger as Z, IdPPermission as _, IdpName as _t, definePlugins as a, recordDeletedTrigger as at, defineAIGateway as b, TailorField as bt, HttpAdapterGraphQLResponse as c, resolverExecutedTrigger as ct, HttpAdapterOutputFn as d, Operation as dt, idpUserCreatedTrigger as et, HttpAdapterRequest as f, WebhookOperation as ft, defineIdp as g, defineAuth as gt, defineSecretManager as h, createResolver as ht, defineConfig as i, recordCreatedTrigger as it, ScheduleArgs as j, IncomingWebhookTriggerOptions as k, HttpAdapterInput as l, FunctionOperation as lt, createHttpAdapter as m, QueryType as mt, output as n, idpUserTrigger as nt, HttpAdapter as o, recordTrigger as ot, HttpAdapterResponse as p, WorkflowOperation as pt, ResolverExecutedArgs as q, t as r, idpUserUpdatedTrigger as rt, HttpAdapterGraphQLRequest as s, recordUpdatedTrigger as st, infer as t, idpUserDeletedTrigger as tt, HttpAdapterInputFn as u, GqlOperation as ut, IdPPermissionCondition as v, IdpNameRegistry as vt, IncomingWebhookArgs as w, defineStaticWebSite as x, unsafeAllowAllIdPPermission as y, unauthenticatedTailorUser as yt, IdpUserArgs as z };
1016
- //# sourceMappingURL=index-BlpzXncY.d.mts.map