@tailor-platform/sdk 1.72.0 → 1.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/aigateway-B3oZZE6v.mjs +15 -0
  3. package/dist/aigateway-B3oZZE6v.mjs.map +1 -0
  4. package/dist/application-BhRnH42h.mjs +3 -0
  5. package/dist/{application-DmjIKQ-a.mjs → application-Dxhdq_nu.mjs} +21 -19
  6. package/dist/application-Dxhdq_nu.mjs.map +1 -0
  7. package/dist/{assert-CKfwrmCV.mjs → assert-DBxo8jPo.mjs} +1 -2
  8. package/dist/{assert-CKfwrmCV.mjs.map → assert-DBxo8jPo.mjs.map} +1 -1
  9. package/dist/{authconnection-D7lsvsKY.mjs → authconnection-BGQM8FZI.mjs} +2 -3
  10. package/dist/{authconnection-D7lsvsKY.mjs.map → authconnection-BGQM8FZI.mjs.map} +1 -1
  11. package/dist/{brand-DlnJ375c.mjs → brand-Eo4pLXPJ.mjs} +1 -2
  12. package/dist/{brand-DlnJ375c.mjs.map → brand-Eo4pLXPJ.mjs.map} +1 -1
  13. package/dist/cli/cache/bundle-cache.d.mts +1 -0
  14. package/dist/cli/cache/store.d.mts +1 -0
  15. package/dist/cli/cache/types.d.mts +1 -0
  16. package/dist/cli/commands/api/api-call.d.mts +19 -0
  17. package/dist/cli/commands/api/index.d.mts +3 -0
  18. package/dist/cli/commands/deploy/aigateway.d.mts +1 -0
  19. package/dist/cli/commands/deploy/application.d.mts +1 -0
  20. package/dist/cli/commands/deploy/auth.d.mts +1 -0
  21. package/dist/cli/commands/deploy/deploy.d.mts +24 -0
  22. package/dist/cli/commands/deploy/executor.d.mts +1 -0
  23. package/dist/cli/commands/deploy/function-registry-types.d.mts +12 -0
  24. package/dist/cli/commands/deploy/function-registry.d.mts +2 -0
  25. package/dist/cli/commands/deploy/idp.d.mts +1 -0
  26. package/dist/cli/commands/deploy/resolver.d.mts +1 -0
  27. package/dist/cli/commands/deploy/secret-manager.d.mts +1 -0
  28. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
  29. package/dist/cli/commands/deploy/tailordb/index.d.mts +1 -0
  30. package/dist/cli/commands/deploy/types.d.mts +1 -0
  31. package/dist/cli/commands/deploy/workflow.d.mts +1 -0
  32. package/dist/cli/commands/executor/get.d.mts +29 -0
  33. package/dist/cli/commands/executor/jobs.d.mts +123 -0
  34. package/dist/cli/commands/executor/list.d.mts +19 -0
  35. package/dist/cli/commands/executor/transform.d.mts +41 -0
  36. package/dist/cli/commands/executor/trigger.d.mts +41 -0
  37. package/dist/cli/commands/executor/webhook.d.mts +22 -0
  38. package/dist/cli/commands/function/get.d.mts +18 -0
  39. package/dist/cli/commands/function/list.d.mts +22 -0
  40. package/dist/cli/commands/function/transform.d.mts +11 -0
  41. package/dist/cli/commands/generate/options.d.mts +7 -0
  42. package/dist/cli/commands/generate/seed/bundler.d.mts +26 -0
  43. package/dist/cli/commands/generate/service.d.mts +12 -0
  44. package/dist/cli/commands/generate/types.d.mts +126 -0
  45. package/dist/cli/commands/machineuser/list.d.mts +27 -0
  46. package/dist/cli/commands/machineuser/token.d.mts +22 -0
  47. package/dist/cli/commands/oauth2client/get.d.mts +18 -0
  48. package/dist/cli/commands/oauth2client/list.d.mts +20 -0
  49. package/dist/cli/commands/oauth2client/transform.d.mts +20 -0
  50. package/dist/cli/commands/organization/folder/create.d.mts +18 -0
  51. package/dist/cli/commands/organization/folder/delete.d.mts +16 -0
  52. package/dist/cli/commands/organization/folder/get.d.mts +17 -0
  53. package/dist/cli/commands/organization/folder/list.d.mts +22 -0
  54. package/dist/cli/commands/organization/folder/update.d.mts +18 -0
  55. package/dist/cli/commands/organization/get.d.mts +16 -0
  56. package/dist/cli/commands/organization/list.d.mts +15 -0
  57. package/dist/cli/commands/organization/transform.d.mts +27 -0
  58. package/dist/cli/commands/organization/tree.d.mts +25 -0
  59. package/dist/cli/commands/organization/update.d.mts +17 -0
  60. package/dist/cli/commands/remove.d.mts +16 -0
  61. package/dist/cli/commands/show.d.mts +34 -0
  62. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +28 -0
  63. package/dist/cli/commands/tailordb/migrate/config.d.mts +19 -0
  64. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +211 -0
  65. package/dist/cli/commands/tailordb/migrate/generate.d.mts +17 -0
  66. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +202 -0
  67. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +113 -0
  68. package/dist/cli/commands/tailordb/migrate/types.d.mts +7 -0
  69. package/dist/cli/commands/tailordb/truncate.d.mts +19 -0
  70. package/dist/cli/commands/workflow/executions.d.mts +75 -0
  71. package/dist/cli/commands/workflow/get.d.mts +29 -0
  72. package/dist/cli/commands/workflow/list.d.mts +19 -0
  73. package/dist/cli/commands/workflow/resume.d.mts +23 -0
  74. package/dist/cli/commands/workflow/start.d.mts +63 -0
  75. package/dist/cli/commands/workflow/status.d.mts +5 -0
  76. package/dist/cli/commands/workflow/transform.d.mts +33 -0
  77. package/dist/cli/commands/workflow/wait.d.mts +16 -0
  78. package/dist/cli/commands/workflow/waiter.d.mts +23 -0
  79. package/dist/cli/commands/workspace/app/health.d.mts +18 -0
  80. package/dist/cli/commands/workspace/app/list.d.mts +22 -0
  81. package/dist/cli/commands/workspace/app/transform.d.mts +18 -0
  82. package/dist/cli/commands/workspace/create.d.mts +25 -0
  83. package/dist/cli/commands/workspace/delete.d.mts +15 -0
  84. package/dist/cli/commands/workspace/get.d.mts +17 -0
  85. package/dist/cli/commands/workspace/list.d.mts +17 -0
  86. package/dist/cli/commands/workspace/restore.d.mts +15 -0
  87. package/dist/cli/commands/workspace/transform.d.mts +16 -0
  88. package/dist/cli/commands/workspace/user/invite.d.mts +22 -0
  89. package/dist/cli/commands/workspace/user/list.d.mts +22 -0
  90. package/dist/cli/commands/workspace/user/remove.d.mts +17 -0
  91. package/dist/cli/commands/workspace/user/transform.d.mts +8 -0
  92. package/dist/cli/commands/workspace/user/update.d.mts +22 -0
  93. package/dist/cli/index.d.mts +1 -2
  94. package/dist/cli/index.mjs +21 -22
  95. package/dist/cli/index.mjs.map +1 -1
  96. package/dist/cli/lib.d.mts +80 -21402
  97. package/dist/cli/lib.mjs +8 -9
  98. package/dist/cli/lib.mjs.map +1 -1
  99. package/dist/cli/query/index.d.mts +35 -0
  100. package/dist/cli/services/application.d.mts +1 -0
  101. package/dist/cli/services/auth/service.d.mts +1 -0
  102. package/dist/cli/services/executor/service.d.mts +1 -0
  103. package/dist/cli/services/http-adapter/bundler.d.mts +1 -0
  104. package/dist/cli/services/http-adapter/service.d.mts +1 -0
  105. package/dist/cli/services/resolver/service.d.mts +1 -0
  106. package/dist/cli/services/tailordb/service.d.mts +1 -0
  107. package/dist/cli/services/workflow/bundler.d.mts +1 -0
  108. package/dist/cli/services/workflow/service.d.mts +1 -0
  109. package/dist/cli/shared/args.d.mts +13 -0
  110. package/dist/cli/shared/client.d.mts +1273 -0
  111. package/dist/cli/shared/config-loader.d.mts +44 -0
  112. package/dist/cli/shared/context.d.mts +28 -0
  113. package/dist/cli/shared/script-executor.d.mts +74 -0
  114. package/dist/cli/shared/seed-chunker.d.mts +46 -0
  115. package/dist/cli/shared/trigger-context.d.mts +1 -0
  116. package/dist/cli/shared/type-generator.d.mts +20 -0
  117. package/dist/cli/skills.mjs +1 -2
  118. package/dist/cli/skills.mjs.map +1 -1
  119. package/dist/completion/zsh-worker.zsh +1 -1
  120. package/dist/configure/config/index.d.mts +29 -0
  121. package/dist/configure/config/types.d.mts +103 -0
  122. package/dist/configure/index.d.mts +125 -7
  123. package/dist/configure/index.mjs +5 -6
  124. package/dist/configure/index.mjs.map +1 -1
  125. package/dist/configure/services/aigateway/index.d.mts +17 -0
  126. package/dist/configure/services/aigateway/types.d.mts +11 -0
  127. package/dist/configure/services/auth/index.d.mts +43 -0
  128. package/dist/{types-v_ErzNUF.d.mts → configure/services/auth/types.d.mts} +7 -172
  129. package/dist/configure/services/executor/executor.d.mts +82 -0
  130. package/dist/configure/services/executor/index.d.mts +8 -0
  131. package/dist/configure/services/executor/operation.d.mts +46 -0
  132. package/dist/configure/services/executor/trigger/event.d.mts +272 -0
  133. package/dist/configure/services/executor/trigger/index.d.mts +8 -0
  134. package/dist/configure/services/executor/trigger/schedule.d.mts +25 -0
  135. package/dist/configure/services/executor/trigger/webhook.d.mts +44 -0
  136. package/dist/configure/services/executor/types.d.mts +2 -0
  137. package/dist/configure/services/http-adapter/http-adapter.d.mts +125 -0
  138. package/dist/configure/services/http-adapter/index.d.mts +2 -0
  139. package/dist/configure/services/idp/index.d.mts +64 -0
  140. package/dist/configure/services/idp/permission.d.mts +80 -0
  141. package/dist/configure/services/idp/types.d.mts +20 -0
  142. package/dist/configure/services/index.d.mts +33 -0
  143. package/dist/configure/services/resolver/index.d.mts +5 -0
  144. package/dist/configure/services/resolver/resolver.d.mts +77 -0
  145. package/dist/configure/services/resolver/types.d.mts +6 -0
  146. package/dist/configure/services/secrets/index.d.mts +38 -0
  147. package/dist/configure/services/secrets/types.d.mts +11 -0
  148. package/dist/configure/services/staticwebsite/index.d.mts +19 -0
  149. package/dist/configure/services/staticwebsite/types.d.mts +11 -0
  150. package/dist/configure/services/tailordb/index.d.mts +4 -0
  151. package/dist/configure/services/tailordb/permission.d.mts +119 -0
  152. package/dist/configure/services/tailordb/schema.d.mts +451 -0
  153. package/dist/configure/services/tailordb/types.d.mts +149 -0
  154. package/dist/configure/services/workflow/index.d.mts +7 -0
  155. package/dist/configure/services/workflow/job.d.mts +81 -0
  156. package/dist/configure/services/workflow/test-env-key.d.mts +9 -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 +55 -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.d.mts +9 -0
  163. package/dist/configure/types/field.types.d.mts +109 -0
  164. package/dist/configure/types/idp-name.d.mts +12 -0
  165. package/dist/configure/types/index.d.mts +4 -0
  166. package/dist/configure/types/machine-user.d.mts +12 -0
  167. package/dist/configure/types/type.d.mts +99 -0
  168. package/dist/configure/user.d.mts +7 -0
  169. package/dist/{context-CDQqIv4u.mjs → context-Bd266-ru.mjs} +2 -3
  170. package/dist/{context-CDQqIv4u.mjs.map → context-Bd266-ru.mjs.map} +1 -1
  171. package/dist/{crashreport-BwF8cHF0.mjs → crashreport-Dy4ZzSkd.mjs} +1 -2
  172. package/dist/{crashreport-BqyvFk-_.mjs → crashreport-ayWANEZ6.mjs} +4 -5
  173. package/dist/{crashreport-BqyvFk-_.mjs.map → crashreport-ayWANEZ6.mjs.map} +1 -1
  174. package/dist/{enum-constants-C7DaWeQo.mjs → enum-constants-j9QBF0cB.mjs} +1 -2
  175. package/dist/{enum-constants-C7DaWeQo.mjs.map → enum-constants-j9QBF0cB.mjs.map} +1 -1
  176. package/dist/{errors-EsY4XO6O.mjs → errors-Dtf2WPaW.mjs} +1 -2
  177. package/dist/{errors-EsY4XO6O.mjs.map → errors-Dtf2WPaW.mjs.map} +1 -1
  178. package/dist/{field-C4zdJLW5.mjs → field-DOsJCPFa.mjs} +1 -2
  179. package/dist/{field-C4zdJLW5.mjs.map → field-DOsJCPFa.mjs.map} +1 -1
  180. package/dist/{file-BkxupbYP.mjs → file-_oUZo76X.mjs} +2 -3
  181. package/dist/{file-BkxupbYP.mjs.map → file-_oUZo76X.mjs.map} +1 -1
  182. package/dist/{file-utils-BHPxPXmn.mjs → file-utils-DcyIPFQh.mjs} +2 -3
  183. package/dist/{file-utils-BHPxPXmn.mjs.map → file-utils-DcyIPFQh.mjs.map} +1 -1
  184. package/dist/{globals-ByrCoDip.mjs → globals-B8XX5TRB.mjs} +3 -3
  185. package/dist/globals-B8XX5TRB.mjs.map +1 -0
  186. package/dist/{iconv-D1zmPjvi.mjs → iconv-D2vi8G36.mjs} +2 -3
  187. package/dist/{iconv-D1zmPjvi.mjs.map → iconv-D2vi8G36.mjs.map} +1 -1
  188. package/dist/{idp-ynUfzwpz.mjs → idp-Bx25ZBdN.mjs} +2 -3
  189. package/dist/{idp-ynUfzwpz.mjs.map → idp-Bx25ZBdN.mjs.map} +1 -1
  190. package/dist/{interceptor-DOqRkCya.mjs → interceptor-D-q1rvRl.mjs} +1 -2
  191. package/dist/{interceptor-DOqRkCya.mjs.map → interceptor-D-q1rvRl.mjs.map} +1 -1
  192. package/dist/{job-BpsFXPbi.mjs → job-CtU73PGa.mjs} +3 -4
  193. package/dist/{job-BpsFXPbi.mjs.map → job-CtU73PGa.mjs.map} +1 -1
  194. package/dist/kysely/index.d.mts +2 -3
  195. package/dist/kysely/index.mjs +0 -1
  196. package/dist/kysely/index.mjs.map +1 -1
  197. package/dist/{kysely-type-CSoZxVKN.mjs → kysely-type-D-zflMGf.mjs} +2 -3
  198. package/dist/{kysely-type-CSoZxVKN.mjs.map → kysely-type-D-zflMGf.mjs.map} +1 -1
  199. package/dist/{logger-DKF-JsAK.mjs → logger-BEiZZ3qT.mjs} +1 -2
  200. package/dist/{logger-DKF-JsAK.mjs.map → logger-BEiZZ3qT.mjs.map} +1 -1
  201. package/dist/{mock-wf5qeZLi.mjs → mock-Ce1GCi4-.mjs} +60 -5
  202. package/dist/mock-Ce1GCi4-.mjs.map +1 -0
  203. package/dist/{multiline-Cf9ODpr1.mjs → multiline-sfHpTZZK.mjs} +1 -2
  204. package/dist/{multiline-Cf9ODpr1.mjs.map → multiline-sfHpTZZK.mjs.map} +1 -1
  205. package/dist/{package-json-DcQApfPQ.mjs → package-json-8b0O9TlX.mjs} +1 -2
  206. package/dist/{package-json-DcQApfPQ.mjs.map → package-json-8b0O9TlX.mjs.map} +1 -1
  207. package/dist/package-json-Cv2Z-TqQ.mjs +3 -0
  208. package/dist/parser/generator-config/schema.d.mts +1 -0
  209. package/dist/parser/service/auth/index.d.mts +1 -0
  210. package/dist/parser/service/auth/schema.d.mts +1 -0
  211. package/dist/parser/service/http-adapter/index.d.mts +1 -0
  212. package/dist/parser/service/http-adapter/schema.d.mts +1 -0
  213. package/dist/parser/service/idp/types.d.mts +4 -0
  214. package/dist/parser/service/tailordb/types.d.mts +126 -0
  215. package/dist/plugin/builtin/enum-constants/index.d.mts +16 -1
  216. package/dist/plugin/builtin/enum-constants/index.mjs +1 -2
  217. package/dist/plugin/builtin/file-utils/index.d.mts +16 -1
  218. package/dist/plugin/builtin/file-utils/index.mjs +1 -2
  219. package/dist/plugin/builtin/kysely-type/index.d.mts +16 -1
  220. package/dist/plugin/builtin/kysely-type/index.mjs +1 -2
  221. package/dist/plugin/builtin/seed/index.d.mts +45 -1
  222. package/dist/plugin/builtin/seed/index.mjs +1 -2
  223. package/dist/plugin/get-generated-type.d.mts +17 -0
  224. package/dist/plugin/index.d.mts +3 -118
  225. package/dist/plugin/index.mjs +0 -1
  226. package/dist/plugin/index.mjs.map +1 -1
  227. package/dist/plugin/manager.d.mts +1 -0
  228. package/dist/plugin/types.d.mts +245 -0
  229. package/dist/plugin/with-context.d.mts +102 -0
  230. package/dist/{registry-D0uB0OrK.mjs → registry-BozuxbPp.mjs} +1 -2
  231. package/dist/{registry-D0uB0OrK.mjs.map → registry-BozuxbPp.mjs.map} +1 -1
  232. package/dist/{repl-editor-DD5YP5mt.mjs → repl-editor-BmQOyZJd.mjs} +2 -3
  233. package/dist/{repl-editor-DD5YP5mt.mjs.map → repl-editor-BmQOyZJd.mjs.map} +1 -1
  234. package/dist/{rolldown-runtime-BkoGK1jX.mjs → rolldown-runtime-DXywRVcq.mjs} +0 -1
  235. package/dist/runtime/aigateway.d.mts +35 -0
  236. package/dist/runtime/aigateway.mjs +3 -0
  237. package/dist/runtime/authconnection.d.mts +31 -2
  238. package/dist/runtime/authconnection.mjs +1 -2
  239. package/dist/runtime/context.d.mts +67 -2
  240. package/dist/runtime/context.mjs +1 -2
  241. package/dist/runtime/file.d.mts +249 -2
  242. package/dist/runtime/file.mjs +1 -2
  243. package/dist/runtime/globals.d.mts +31 -20
  244. package/dist/runtime/globals.mjs +0 -1
  245. package/dist/runtime/iconv.d.mts +121 -2
  246. package/dist/runtime/iconv.mjs +1 -2
  247. package/dist/runtime/idp.d.mts +186 -2
  248. package/dist/runtime/idp.mjs +1 -2
  249. package/dist/runtime/index.d.mts +47 -9
  250. package/dist/runtime/index.mjs +9 -9
  251. package/dist/runtime/secretmanager.d.mts +54 -2
  252. package/dist/runtime/secretmanager.mjs +1 -2
  253. package/dist/{types-DTcZ2Yax.d.mts → runtime/types.d.mts} +1 -2
  254. package/dist/runtime/workflow.d.mts +107 -2
  255. package/dist/runtime/workflow.mjs +2 -3
  256. package/dist/{runtime-Cd375HD-.mjs → runtime-CEFC05qX.mjs} +81 -130
  257. package/dist/runtime-CEFC05qX.mjs.map +1 -0
  258. package/dist/{schema-C4fkpWV_.mjs → schema-DAdZSFOd.mjs} +3 -4
  259. package/dist/{schema-C4fkpWV_.mjs.map → schema-DAdZSFOd.mjs.map} +1 -1
  260. package/dist/{secret-file-eB3R3Fil.mjs → secret-file-VSVGy1V0.mjs} +2 -3
  261. package/dist/{secret-file-eB3R3Fil.mjs.map → secret-file-VSVGy1V0.mjs.map} +1 -1
  262. package/dist/{secretmanager-h3tBJV8f.mjs → secretmanager-BVxw3ih_.mjs} +2 -3
  263. package/dist/{secretmanager-h3tBJV8f.mjs.map → secretmanager-BVxw3ih_.mjs.map} +1 -1
  264. package/dist/seed/index.d.mts +1 -2
  265. package/dist/seed/index.mjs +0 -1
  266. package/dist/seed/index.mjs.map +1 -1
  267. package/dist/{seed-YAbtMy65.mjs → seed-DoMTMLcm.mjs} +3 -4
  268. package/dist/{seed-YAbtMy65.mjs.map → seed-DoMTMLcm.mjs.map} +1 -1
  269. package/dist/service-BXmdFwSH.mjs +3 -0
  270. package/dist/{service-DDWgZL_L2.mjs → service-DBFZQloR.mjs} +3 -4
  271. package/dist/service-DBFZQloR.mjs.map +1 -0
  272. package/dist/{service-B2Jd9CxS.mjs → service-DiEtAsvc.mjs} +3 -4
  273. package/dist/{service-B2Jd9CxS.mjs.map → service-DiEtAsvc.mjs.map} +1 -1
  274. package/dist/{service_pb-BsBR6yW5.mjs → service_pb-CIrhGwHk.mjs} +1 -2
  275. package/dist/{service_pb-BsBR6yW5.mjs.map → service_pb-CIrhGwHk.mjs.map} +1 -1
  276. package/dist/{service_pb-BJ9GsAnW.mjs → service_pb-DjwIn4jO.mjs} +1 -2
  277. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +204 -0
  278. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +58 -0
  279. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +316 -0
  280. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +161 -0
  281. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +2070 -0
  282. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +861 -0
  283. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +112 -0
  284. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +69 -0
  285. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +439 -0
  286. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +564 -0
  287. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +145 -0
  288. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +451 -0
  289. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +192 -0
  290. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +50 -0
  291. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +407 -0
  292. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +430 -0
  293. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +73 -0
  294. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +17 -0
  295. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +309 -0
  296. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +591 -0
  297. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +330 -0
  298. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +113 -0
  299. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +346 -0
  300. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +54 -0
  301. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +3576 -0
  302. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +187 -0
  303. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +29 -0
  304. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +429 -0
  305. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +90 -0
  306. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +684 -0
  307. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +797 -0
  308. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +330 -0
  309. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +183 -0
  310. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +842 -0
  311. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +276 -0
  312. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +2015 -0
  313. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +483 -0
  314. package/dist/{telemetry-BQbbVo2t.mjs → telemetry-CdqJEzkj.mjs} +2 -3
  315. package/dist/{telemetry-BQbbVo2t.mjs.map → telemetry-CdqJEzkj.mjs.map} +1 -1
  316. package/dist/telemetry-ClwW5ohF.mjs +3 -0
  317. package/dist/types/aigateway.generated.d.mts +9 -0
  318. package/dist/types/app-config.generated.d.mts +4 -0
  319. package/dist/types/auth-connection.generated.d.mts +20 -0
  320. package/dist/types/auth.generated.d.mts +150 -0
  321. package/dist/types/executor.generated.d.mts +177 -0
  322. package/dist/types/generator-config.generated.d.mts +28 -0
  323. package/dist/types/helpers.d.mts +39 -0
  324. package/dist/types/http-adapter.generated.d.mts +17 -0
  325. package/dist/types/idp.generated.d.mts +584 -0
  326. package/dist/types/resolver.generated.d.mts +38 -0
  327. package/dist/types/secrets.generated.d.mts +14 -0
  328. package/dist/types/staticwebsite.generated.d.mts +10 -0
  329. package/dist/{types-rj8YJcEe.d.mts → types/tailordb.generated.d.mts} +2 -290
  330. package/dist/types/workflow.generated.d.mts +12 -0
  331. package/dist/types-qhFZ8y9B.mjs +4 -0
  332. package/dist/{types-D4QMmNWh.mjs → types-ywCGpzDZ.mjs} +2 -3
  333. package/dist/{types-D4QMmNWh.mjs.map → types-ywCGpzDZ.mjs.map} +1 -1
  334. package/dist/utils/test/index.d.mts +6 -89
  335. package/dist/utils/test/index.mjs +1 -2
  336. package/dist/utils/test/index.mjs.map +1 -1
  337. package/dist/utils/test/mock.d.mts +87 -0
  338. package/dist/vitest/environment.d.mts +1 -2
  339. package/dist/vitest/environment.mjs +1 -2
  340. package/dist/vitest/environment.mjs.map +1 -1
  341. package/dist/vitest/index.d.mts +4 -392
  342. package/dist/vitest/index.mjs +4 -5
  343. package/dist/vitest/index.mjs.map +1 -1
  344. package/dist/vitest/mock-kysely.d.mts +62 -0
  345. package/dist/vitest/mock.d.mts +364 -0
  346. package/dist/vitest/setup.d.mts +1 -2
  347. package/dist/vitest/setup.mjs +2 -3
  348. package/dist/vitest/setup.mjs.map +1 -1
  349. package/dist/{workflow-C8I7shjM.mjs → workflow-DSwnYPPP.mjs} +10 -4
  350. package/dist/workflow-DSwnYPPP.mjs.map +1 -0
  351. package/docs/runtime.md +5 -1
  352. package/docs/services/aigateway.md +14 -0
  353. package/docs/testing.md +48 -2
  354. package/package.json +6 -1
  355. package/dist/application-DmjIKQ-a.mjs.map +0 -1
  356. package/dist/application-a_ApFuPh.mjs +0 -4
  357. package/dist/authconnection-CqfaJfrC.d.mts +0 -32
  358. package/dist/context-CUBwSBq4.d.mts +0 -68
  359. package/dist/file-BzK8z3X-.d.mts +0 -250
  360. package/dist/globals-ByrCoDip.mjs.map +0 -1
  361. package/dist/iconv-kwrmd1U_.d.mts +0 -122
  362. package/dist/idp-BmYwCXnJ.d.mts +0 -187
  363. package/dist/index-BDBU7x-i.d.mts +0 -18
  364. package/dist/index-BSlv_YrG.d.mts +0 -46
  365. package/dist/index-BzGqTY5x.d.mts +0 -1315
  366. package/dist/index-D3_Au3wu.d.mts +0 -47
  367. package/dist/index-DtFRlrww.d.mts +0 -18
  368. package/dist/index-jeE3UvF2.d.mts +0 -18
  369. package/dist/mock-wf5qeZLi.mjs.map +0 -1
  370. package/dist/package-json-wzO6nV9O.mjs +0 -4
  371. package/dist/runtime-Cd375HD-.mjs.map +0 -1
  372. package/dist/secretmanager-CKLB3wAQ.d.mts +0 -55
  373. package/dist/service-CRaa4Joe.mjs +0 -4
  374. package/dist/service-DDWgZL_L2.mjs.map +0 -1
  375. package/dist/telemetry-w92bvGdC.mjs +0 -4
  376. package/dist/types-32lUMToj.mjs +0 -5
  377. package/dist/types-aqnqTCfO.d.mts +0 -602
  378. package/dist/workflow-C8I7shjM.mjs.map +0 -1
  379. package/dist/workflow-CMamswkK.d.mts +0 -96
  380. package/dist/workflow.generated-Da1zECDw.d.mts +0 -1348
@@ -1,602 +0,0 @@
1
- import { S as EnumValue, _ as TailorDBTypeMetadata, c as RawRelationConfig, d as TailorAnyDBField, f as TailorAnyDBType, s as PluginAttachment, y as TailorDBTypeParsedSettings } from "./types-rj8YJcEe.mjs";
2
- import { C as OAuth2Client, S as IdProvider, v as ValueOperand } from "./types-v_ErzNUF.mjs";
3
-
4
- //#region src/parser/service/tailordb/types.d.ts
5
- interface UserDefinedTypeSource {
6
- filePath: string;
7
- exportName: string;
8
- pluginId?: never;
9
- }
10
- interface PluginGeneratedTypeSource {
11
- filePath?: never;
12
- exportName: string;
13
- pluginId: string;
14
- pluginImportPath: string;
15
- originalFilePath: string;
16
- originalExportName: string;
17
- generatedTypeKind?: string;
18
- pluginConfig?: unknown;
19
- namespace?: string;
20
- }
21
- type TypeSourceInfoEntry = UserDefinedTypeSource | PluginGeneratedTypeSource;
22
- interface Script {
23
- expr: string;
24
- }
25
- interface OperatorValidateConfig {
26
- script: Script;
27
- errorMessage: string;
28
- }
29
- interface OperatorFieldHook {
30
- create?: Script;
31
- update?: Script;
32
- }
33
- interface OperatorFieldConfig {
34
- type: string;
35
- required?: boolean;
36
- description?: string;
37
- allowedValues?: EnumValue[];
38
- array?: boolean;
39
- index?: boolean;
40
- unique?: boolean;
41
- vector?: boolean;
42
- foreignKey?: boolean;
43
- foreignKeyType?: string;
44
- foreignKeyField?: string;
45
- rawRelation?: RawRelationConfig;
46
- validate?: OperatorValidateConfig[];
47
- hooks?: OperatorFieldHook;
48
- serial?: {
49
- start: number;
50
- maxValue?: number;
51
- format?: string;
52
- };
53
- scale?: number;
54
- fields?: Record<string, OperatorFieldConfig>;
55
- }
56
- type GqlPermissionAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert";
57
- type StandardPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
58
- type UserOperand = {
59
- user: string;
60
- };
61
- type StandardRecordOperand<Update extends boolean = false> = Update extends true ? {
62
- oldRecord: string;
63
- } | {
64
- newRecord: string;
65
- } : {
66
- record: string;
67
- };
68
- type PermissionOperand<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = UserOperand | ValueOperand | (Level extends "record" ? StandardRecordOperand<Update> : never);
69
- type StandardPermissionCondition<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = readonly [PermissionOperand<Level, Update>, StandardPermissionOperator, PermissionOperand<Level, Update>];
70
- type StandardActionPermission<Level extends "record" | "gql" = "record" | "gql", Update extends boolean = boolean> = {
71
- conditions: readonly StandardPermissionCondition<Level, Update>[];
72
- description?: string;
73
- permit: "allow" | "deny";
74
- };
75
- type StandardTailorTypePermission = {
76
- create: readonly StandardActionPermission<"record", false>[];
77
- read: readonly StandardActionPermission<"record", false>[];
78
- update: readonly StandardActionPermission<"record", true>[];
79
- delete: readonly StandardActionPermission<"record", false>[];
80
- };
81
- type StandardGqlPermissionPolicy = {
82
- conditions: readonly StandardPermissionCondition<"gql">[];
83
- actions: readonly ["all"] | readonly GqlPermissionAction[];
84
- permit: "allow" | "deny";
85
- description?: string;
86
- };
87
- type StandardTailorTypeGqlPermission = readonly StandardGqlPermissionPolicy[];
88
- interface Permissions {
89
- record?: StandardTailorTypePermission;
90
- gql?: StandardTailorTypeGqlPermission;
91
- }
92
- interface ParsedField {
93
- name: string;
94
- config: OperatorFieldConfig;
95
- relation?: {
96
- targetType: string;
97
- forwardName: string;
98
- backwardName: string;
99
- key: string;
100
- unique: boolean;
101
- };
102
- }
103
- interface ParsedRelationship {
104
- name: string;
105
- targetType: string;
106
- targetField: string;
107
- sourceField: string;
108
- isArray: boolean;
109
- description: string;
110
- }
111
- interface TailorDBType {
112
- name: string;
113
- pluralForm: string;
114
- description?: string;
115
- fields: Record<string, ParsedField>;
116
- forwardRelationships: Record<string, ParsedRelationship>;
117
- backwardRelationships: Record<string, ParsedRelationship>;
118
- settings: TailorDBTypeParsedSettings;
119
- permissions: Permissions;
120
- indexes?: TailorDBTypeMetadata["indexes"];
121
- files?: TailorDBTypeMetadata["files"];
122
- }
123
- //#endregion
124
- //#region src/types/generator-config.generated.d.ts
125
- type BaseGeneratorConfig = ["@tailor-platform/kysely-type", {
126
- distPath: string;
127
- }] | ["@tailor-platform/seed", {
128
- distPath: string;
129
- machineUserName?: string | undefined;
130
- disableIdpUserSync?: {
131
- userToIdp?: boolean | undefined;
132
- idpToUser?: boolean | undefined;
133
- } | undefined;
134
- }] | ["@tailor-platform/enum-constants", {
135
- distPath: string;
136
- }] | ["@tailor-platform/file-utils", {
137
- distPath: string;
138
- }] | {
139
- id: string;
140
- description: string;
141
- dependencies: ("tailordb" | "resolver" | "executor")[];
142
- aggregate: Function;
143
- processType?: Function | undefined;
144
- processResolver?: Function | undefined;
145
- processExecutor?: Function | undefined;
146
- processTailorDBNamespace?: Function | undefined;
147
- processResolverNamespace?: Function | undefined;
148
- };
149
- type BaseGeneratorConfigInput = BaseGeneratorConfig;
150
- //#endregion
151
- //#region src/types/executor.generated.d.ts
152
- type TailorDBTrigger = {
153
- /** TailorDB record event trigger */kind: "tailordb"; /** TailorDB event types to trigger on */
154
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[]; /** TailorDB type name to watch for events */
155
- typeName: string; /** Condition function to filter events */
156
- condition?: Function | undefined;
157
- };
158
- type ResolverExecutedTrigger = {
159
- kind: "resolverExecuted"; /** Name of the resolver to trigger on */
160
- resolverName: string; /** Condition function to filter events */
161
- condition?: Function | undefined;
162
- };
163
- type ScheduleTriggerInput = {
164
- kind: "schedule"; /** CRON expression for the schedule */
165
- cron: string; /** Timezone for the CRON schedule (default: UTC) */
166
- timezone?: string | undefined;
167
- };
168
- type IncomingWebhookTrigger = {
169
- kind: "incomingWebhook"; /** Response configuration */
170
- response?: {
171
- body?: Function | undefined;
172
- statusCode?: number | undefined;
173
- } | undefined;
174
- };
175
- type IdpUserTrigger = {
176
- /** IdP user event trigger */kind: "idpUser"; /** IdP user event types to trigger on */
177
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[]; /** IdP namespace name to subscribe to. If omitted, the project's only IdP is used; throws when multiple IdPs exist. */
178
- idp?: string | undefined;
179
- };
180
- type AuthAccessTokenTrigger = {
181
- /** Auth access token event trigger */kind: "authAccessToken"; /** Auth access token event types to trigger on */
182
- events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
183
- };
184
- type FunctionOperation = {
185
- kind: "function" | "jobFunction"; /** Function implementation */
186
- body: Function; /** Auth invoker for the function execution */
187
- authInvoker?: string | {
188
- namespace: string;
189
- machineUserName: string;
190
- } | undefined;
191
- };
192
- type GqlOperation = {
193
- kind: "graphql";
194
- query: string; /** Target application name for the GraphQL query */
195
- appName?: string | undefined; /** Function to compute GraphQL variables */
196
- variables?: Function | undefined; /** Auth invoker for the GraphQL execution */
197
- authInvoker?: string | {
198
- namespace: string;
199
- machineUserName: string;
200
- } | undefined;
201
- };
202
- type WebhookOperation = {
203
- kind: "webhook"; /** Function returning the webhook URL */
204
- url: Function; /** Function to compute the request body */
205
- requestBody?: Function | undefined; /** HTTP headers for the webhook request */
206
- headers?: {
207
- [x: string]: string | {
208
- vault: string;
209
- key: string;
210
- };
211
- } | undefined;
212
- };
213
- type WorkflowOperation = {
214
- kind: "workflow";
215
- workflowName: string;
216
- args?: Function | {
217
- [x: string]: unknown;
218
- } | undefined;
219
- authInvoker?: string | {
220
- namespace: string;
221
- machineUserName: string;
222
- } | undefined;
223
- };
224
- type ExecutorInput = {
225
- /** Executor name */name: string; /** Event trigger configuration */
226
- trigger: {
227
- kind: "tailordb";
228
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
229
- typeName: string;
230
- condition?: Function | undefined;
231
- } | {
232
- kind: "resolverExecuted";
233
- resolverName: string;
234
- condition?: Function | undefined;
235
- } | {
236
- kind: "schedule";
237
- cron: string;
238
- timezone?: string | undefined;
239
- } | {
240
- kind: "incomingWebhook";
241
- response?: {
242
- body?: Function | undefined;
243
- statusCode?: number | undefined;
244
- } | undefined;
245
- } | {
246
- kind: "idpUser";
247
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
248
- idp?: string | undefined;
249
- } | {
250
- kind: "authAccessToken";
251
- events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
252
- }; /** Operation to execute when triggered */
253
- operation: unknown; /** Executor description */
254
- description?: string | undefined; /** Whether the executor is disabled */
255
- disabled?: boolean | undefined;
256
- };
257
- type Executor = {
258
- /** Executor name */name: string; /** Whether the executor is disabled */
259
- disabled: boolean; /** Event trigger configuration */
260
- trigger: {
261
- kind: "tailordb";
262
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
263
- typeName: string;
264
- condition?: Function | undefined;
265
- } | {
266
- kind: "resolverExecuted";
267
- resolverName: string;
268
- condition?: Function | undefined;
269
- } | {
270
- kind: "schedule";
271
- cron: string;
272
- timezone: string;
273
- } | {
274
- kind: "incomingWebhook";
275
- response?: {
276
- body?: Function | undefined;
277
- statusCode?: number | undefined;
278
- } | undefined;
279
- } | {
280
- kind: "idpUser";
281
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
282
- idp?: string | undefined;
283
- } | {
284
- kind: "authAccessToken";
285
- events: ("auth.access_token.issued" | "auth.access_token.refreshed" | "auth.access_token.revoked")[];
286
- }; /** Operation to execute when triggered */
287
- operation: {
288
- kind: "workflow";
289
- workflowName: string;
290
- args?: Function | {
291
- [x: string]: unknown;
292
- } | undefined;
293
- authInvoker?: string | {
294
- namespace: string;
295
- machineUserName: string;
296
- } | undefined;
297
- } | {
298
- kind: "function" | "jobFunction";
299
- body: Function;
300
- authInvoker?: string | {
301
- namespace: string;
302
- machineUserName: string;
303
- } | undefined;
304
- } | {
305
- kind: "graphql";
306
- query: string;
307
- appName?: string | undefined;
308
- variables?: Function | undefined;
309
- authInvoker?: string | {
310
- namespace: string;
311
- machineUserName: string;
312
- } | undefined;
313
- } | {
314
- kind: "webhook";
315
- url: Function;
316
- requestBody?: Function | undefined;
317
- headers?: {
318
- [x: string]: string | {
319
- vault: string;
320
- key: string;
321
- };
322
- } | undefined;
323
- }; /** Executor description */
324
- description?: string | undefined;
325
- };
326
- //#endregion
327
- //#region src/types/resolver.generated.d.ts
328
- type Resolver = {
329
- /** GraphQL operation type (query or mutation) */operation: "query" | "mutation"; /** Resolver name */
330
- name: string; /** Resolver implementation function */
331
- body: Function; /** Output field definition */
332
- output: {
333
- type: "string" | "boolean" | "date" | "enum" | "uuid" | "integer" | "float" | "decimal" | "datetime" | "time" | "nested";
334
- metadata: {
335
- required?: boolean | undefined;
336
- array?: boolean | undefined; /** Resolver description */
337
- description?: string | undefined;
338
- allowedValues?: {
339
- value: string; /** Resolver description */
340
- description?: string | undefined;
341
- }[] | undefined;
342
- hooks?: {
343
- create?: Function | undefined;
344
- update?: Function | undefined;
345
- } | undefined;
346
- typeName?: string | undefined;
347
- };
348
- fields: {
349
- [x: string]: any;
350
- };
351
- }; /** Resolver description */
352
- description?: string | undefined; /** Input field definitions */
353
- input?: {
354
- [x: string]: any;
355
- } | undefined; /** Enable publishing events from this resolver */
356
- publishEvents?: boolean | undefined; /** Machine user to execute this resolver as */
357
- authInvoker?: string | {
358
- namespace: string;
359
- machineUserName: string;
360
- } | undefined;
361
- };
362
- type ResolverInput = Resolver;
363
- //#endregion
364
- //#region src/plugin/types.d.ts
365
- type GeneratorConfig = BaseGeneratorConfigInput;
366
- /**
367
- * A single generated file to write to disk.
368
- */
369
- interface GeneratedFile {
370
- path: string;
371
- content: string;
372
- skipIfExists?: boolean;
373
- executable?: boolean;
374
- }
375
- /**
376
- * Result returned by generation-time hooks.
377
- */
378
- interface GeneratorResult {
379
- files: GeneratedFile[];
380
- errors?: string[];
381
- }
382
- /**
383
- * Auth configuration available to generation-time hooks.
384
- */
385
- interface GeneratorAuthInput {
386
- name: string;
387
- userProfile?: {
388
- typeName: string;
389
- namespace: string;
390
- usernameField: string;
391
- };
392
- machineUsers?: Record<string, {
393
- attributes?: Record<string, unknown>;
394
- }>;
395
- oauth2Clients?: Record<string, OAuth2Client>;
396
- idProvider?: IdProvider;
397
- }
398
- /**
399
- * Namespace-level TailorDB data available to generation-time hooks.
400
- */
401
- interface TailorDBNamespaceData {
402
- /** Namespace name */
403
- namespace: string;
404
- /** All TailorDB types in this namespace, keyed by type name */
405
- types: Record<string, TailorDBType>;
406
- /** Source info for each type (file path, export name, plugin info) */
407
- sourceInfo: ReadonlyMap<string, TypeSourceInfoEntry>;
408
- /** Plugin attachments configured on each type via .plugin() method */
409
- pluginAttachments: ReadonlyMap<string, readonly PluginAttachment[]>;
410
- }
411
- /**
412
- * Namespace-level resolver data available to generation-time hooks.
413
- */
414
- interface ResolverNamespaceData {
415
- /** Namespace name */
416
- namespace: string;
417
- /** All resolvers in this namespace, keyed by resolver name */
418
- resolvers: Record<string, Resolver>;
419
- }
420
- /**
421
- * Context passed to plugin's onTailorDBReady hook.
422
- * @template PluginConfig - Plugin-level configuration type
423
- */
424
- interface TailorDBReadyContext<PluginConfig = unknown> {
425
- /** All TailorDB namespaces with their types and metadata */
426
- tailordb: TailorDBNamespaceData[];
427
- /** Auth configuration */
428
- auth?: GeneratorAuthInput;
429
- /** Base directory for generated files */
430
- baseDir: string;
431
- /** Path to tailor.config.ts */
432
- configPath: string;
433
- /** Plugin-level configuration passed via definePlugins() */
434
- pluginConfig: PluginConfig;
435
- }
436
- /**
437
- * Context passed to plugin's onResolverReady hook.
438
- * @template PluginConfig - Plugin-level configuration type
439
- */
440
- interface ResolverReadyContext<PluginConfig = unknown> {
441
- /** All TailorDB namespaces with their types and metadata */
442
- tailordb: TailorDBNamespaceData[];
443
- /** All resolver namespaces with their resolvers */
444
- resolvers: ResolverNamespaceData[];
445
- /** Auth configuration */
446
- auth?: GeneratorAuthInput;
447
- /** Base directory for generated files */
448
- baseDir: string;
449
- /** Path to tailor.config.ts */
450
- configPath: string;
451
- /** Plugin-level configuration passed via definePlugins() */
452
- pluginConfig: PluginConfig;
453
- }
454
- /**
455
- * Context passed to plugin's onExecutorReady hook.
456
- * @template PluginConfig - Plugin-level configuration type
457
- */
458
- interface ExecutorReadyContext<PluginConfig = unknown> {
459
- /** All TailorDB namespaces with their types and metadata */
460
- tailordb: TailorDBNamespaceData[];
461
- /** All resolver namespaces with their resolvers */
462
- resolvers: ResolverNamespaceData[];
463
- /** All executors, keyed by executor name */
464
- executors: Record<string, Executor>;
465
- /** Auth configuration */
466
- auth?: GeneratorAuthInput;
467
- /** Base directory for generated files */
468
- baseDir: string;
469
- /** Path to tailor.config.ts */
470
- configPath: string;
471
- /** Plugin-level configuration passed via definePlugins() */
472
- pluginConfig: PluginConfig;
473
- }
474
- type TypeConfigRequired<PluginConfig = unknown> = boolean | ((pluginConfig: PluginConfig | undefined) => boolean);
475
- /**
476
- * Interface for plugin configuration mapping.
477
- * Extend this interface via declaration merging to add typed plugin configs.
478
- */
479
- interface PluginConfigs<Fields extends string = string> {}
480
- /**
481
- * Context passed to plugin's process method
482
- */
483
- interface PluginProcessContext<TypeConfig = unknown, PluginConfig = unknown> {
484
- type: TailorAnyDBType;
485
- typeConfig: TypeConfig;
486
- pluginConfig: PluginConfig;
487
- namespace: string;
488
- }
489
- /**
490
- * Context passed to plugin's onNamespaceLoaded hook.
491
- */
492
- interface PluginNamespaceProcessContext<PluginConfig = unknown> {
493
- pluginConfig: PluginConfig;
494
- namespace: string;
495
- }
496
- /**
497
- * Interface representing a TailorDB type for plugin output.
498
- */
499
- interface TailorDBTypeForPlugin {
500
- readonly name: string;
501
- readonly fields: Record<string, unknown>;
502
- }
503
- type PluginGeneratedType = TailorDBTypeForPlugin;
504
- type PluginGeneratedTypes = Record<string, PluginGeneratedType>;
505
- interface PluginGeneratedResolver {
506
- name: string;
507
- operation: "query" | "mutation";
508
- inputFields?: Record<string, unknown>;
509
- outputFields: Record<string, unknown>;
510
- body: string;
511
- }
512
- interface PluginRecordTriggerConfig {
513
- kind: "tailordb";
514
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
515
- typeName: string;
516
- }
517
- interface PluginScheduleTriggerConfig {
518
- kind: "schedule";
519
- cron: string;
520
- timezone?: string;
521
- }
522
- interface PluginIncomingWebhookTriggerConfig {
523
- kind: "incomingWebhook";
524
- }
525
- type PluginTriggerConfig = PluginRecordTriggerConfig | PluginScheduleTriggerConfig | PluginIncomingWebhookTriggerConfig;
526
- type PluginInjectValue = string | number | boolean | null;
527
- type PluginInjectMap = Record<string, PluginInjectValue>;
528
- interface PluginFunctionOperationConfig {
529
- kind: "function";
530
- body: string;
531
- inject?: PluginInjectMap;
532
- }
533
- interface PluginGraphQLOperationConfig {
534
- kind: "graphql";
535
- query: string;
536
- appName?: string;
537
- variables?: string;
538
- }
539
- interface PluginWebhookOperationConfig {
540
- kind: "webhook";
541
- url: string;
542
- }
543
- interface PluginWorkflowOperationConfig {
544
- kind: "workflow";
545
- workflowName: string;
546
- }
547
- type PluginOperationConfig = PluginFunctionOperationConfig | PluginGraphQLOperationConfig | PluginWebhookOperationConfig | PluginWorkflowOperationConfig;
548
- type PluginExecutorContextValue = TailorAnyDBType | string | number | boolean | null | undefined;
549
- interface PluginExecutorContextBase {
550
- sourceType: TailorAnyDBType | null;
551
- namespace: string;
552
- }
553
- type PluginExecutorContext = PluginExecutorContextBase & {
554
- [key: string]: PluginExecutorContextValue;
555
- };
556
- interface PluginExecutorModule {
557
- default: unknown;
558
- }
559
- interface PluginGeneratedExecutorWithFile<Ctx = PluginExecutorContext> {
560
- name: string;
561
- resolve: () => Promise<PluginExecutorModule>;
562
- context: Ctx;
563
- }
564
- interface PluginGeneratedExecutorLegacy {
565
- name: string;
566
- description?: string;
567
- trigger: PluginTriggerConfig;
568
- operation: PluginOperationConfig;
569
- }
570
- type PluginGeneratedExecutor = PluginGeneratedExecutorWithFile | PluginGeneratedExecutorLegacy;
571
- interface PluginExtends {
572
- fields?: Record<string, TailorAnyDBField>;
573
- }
574
- interface PluginOutput {
575
- types?: PluginGeneratedTypes;
576
- resolvers?: PluginGeneratedResolver[];
577
- executors?: PluginGeneratedExecutor[];
578
- }
579
- interface TypePluginOutput extends PluginOutput {
580
- extends?: PluginExtends;
581
- }
582
- type NamespacePluginOutput = PluginOutput;
583
- /**
584
- * Plugin interface that all plugins must implement.
585
- * @template TypeConfig - Type for per-type configuration passed via .plugin() method
586
- * @template PluginConfig - Type for plugin-level configuration passed via definePlugins()
587
- */
588
- interface Plugin<TypeConfig = unknown, PluginConfig = unknown> {
589
- readonly id: string;
590
- readonly description: string;
591
- readonly importPath?: string;
592
- readonly typeConfigRequired?: TypeConfigRequired<PluginConfig>;
593
- readonly pluginConfig?: PluginConfig;
594
- onTypeLoaded?(context: PluginProcessContext<TypeConfig, PluginConfig>): TypePluginOutput | Promise<TypePluginOutput>;
595
- onNamespaceLoaded?(context: PluginNamespaceProcessContext<PluginConfig>): NamespacePluginOutput | Promise<NamespacePluginOutput>;
596
- onTailorDBReady?(context: TailorDBReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
597
- onResolverReady?(context: ResolverReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
598
- onExecutorReady?(context: ExecutorReadyContext<PluginConfig>): GeneratorResult | Promise<GeneratorResult>;
599
- }
600
- //#endregion
601
- export { IncomingWebhookTrigger as A, ResolverInput as C, FunctionOperation as D, ExecutorInput as E, WorkflowOperation as F, BaseGeneratorConfig as I, TailorDBType as L, ScheduleTriggerInput as M, TailorDBTrigger as N, GqlOperation as O, WebhookOperation as P, TypeSourceInfoEntry as R, Resolver as S, Executor as T, ResolverReadyContext as _, Plugin as a, TailorDBTypeForPlugin as b, PluginExecutorContextBase as c, PluginGeneratedResolver as d, PluginGeneratedType as f, ResolverNamespaceData as g, PluginProcessContext as h, NamespacePluginOutput as i, ResolverExecutedTrigger as j, IdpUserTrigger as k, PluginGeneratedExecutor as l, PluginOutput as m, GeneratorConfig as n, PluginConfigs as o, PluginNamespaceProcessContext as p, GeneratorResult as r, PluginExecutorContext as s, ExecutorReadyContext as t, PluginGeneratedExecutorWithFile as u, TailorDBNamespaceData as v, AuthAccessTokenTrigger as w, TypePluginOutput as x, TailorDBReadyContext as y };
602
- //# sourceMappingURL=types-aqnqTCfO.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"workflow-C8I7shjM.mjs","names":[],"sources":["../src/runtime/workflow.ts"],"sourcesContent":["/**\n * Workflow utilities.\n *\n * Thin typed wrapper around the platform-provided `tailor.workflow` runtime API.\n * At runtime this delegates to `globalThis.tailor.workflow`. Use `mockWorkflow`\n * from `@tailor-platform/sdk/vitest` to mock these calls in unit tests.\n * @example\n * import { workflow } from \"@tailor-platform/sdk/runtime\";\n *\n * const executionId = await workflow.triggerWorkflow(\"myWorkflow\", { data: \"value\" });\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Specifies the machine user that should be used to execute the workflow.\n * This allows workflows to run with specific authentication context.\n */\nexport interface AuthInvoker {\n /** The namespace where the machine user is defined */\n namespace: string;\n /** The name of the machine user to use for workflow execution */\n machineUserName: string;\n}\n\n/** Options for {@link triggerWorkflow}. */\nexport interface TriggerWorkflowOptions {\n /** Optional authentication invoker to specify which machine user should execute the workflow */\n authInvoker?: AuthInvoker;\n}\n\n/**\n * Platform API surface for `tailor.workflow`. Describes the shape the platform\n * runtime injects on `globalThis.tailor.workflow`.\n *\n * Each method below is also re-exported as a top-level named export from this\n * module so callers can either `import * as workflow from\n * \"@tailor-platform/sdk/runtime/workflow\"` or pick individual methods.\n */\nexport interface TailorWorkflowAPI {\n /**\n * Triggers a workflow and returns its execution ID.\n * @param workflowName - Workflow name as defined in tailor.config\n * @param args - Arguments forwarded to the workflow's main job\n * @param options - Optional trigger options (e.g. `authInvoker`)\n * @returns The execution ID of the triggered workflow\n */\n triggerWorkflow(\n workflowName: string,\n args?: any,\n options?: TriggerWorkflowOptions,\n ): Promise<string>;\n\n /**\n * Triggers a job function and returns its result.\n * @param jobName - Job name as defined in the workflow\n * @param args - Arguments forwarded to the job\n * @returns The job's return value\n */\n triggerJobFunction(jobName: string, args?: any): any;\n\n /**\n * Suspends the current workflow execution and waits for an external signal to resume.\n * @param key - Wait point key\n * @param payload - Optional payload to record with the wait point\n * @returns The payload supplied by the corresponding `resolve` call\n */\n wait(key: string, payload?: any): any;\n\n /**\n * Resolves a waiting workflow execution, causing it to resume.\n * @param executionId - The execution to resume\n * @param key - Wait point key to resolve\n * @param callback - Callback receiving the wait payload; its return value is forwarded to `wait`\n * @returns A promise that resolves once the resolve has been recorded\n */\n resolve(executionId: string, key: string, callback: (waitPayload: any) => any): Promise<void>;\n}\n\nconst api = (): TailorWorkflowAPI =>\n (globalThis as { tailor: { workflow: TailorWorkflowAPI } }).tailor.workflow;\n\n/**\n * See {@link TailorWorkflowAPI.triggerWorkflow}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.triggerWorkflow}\n * @returns The execution ID of the triggered workflow\n */\nexport const triggerWorkflow: TailorWorkflowAPI[\"triggerWorkflow\"] = (...args) =>\n api().triggerWorkflow(...args);\n\n/**\n * See {@link TailorWorkflowAPI.triggerJobFunction}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.triggerJobFunction}\n * @returns The job's return value\n */\nexport const triggerJobFunction: TailorWorkflowAPI[\"triggerJobFunction\"] = (...args) =>\n api().triggerJobFunction(...args);\n\n/**\n * See {@link TailorWorkflowAPI.wait}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.wait}\n * @returns The payload supplied by the corresponding `resolve` call\n */\nexport const wait: TailorWorkflowAPI[\"wait\"] = (...args) => api().wait(...args);\n\n/**\n * See {@link TailorWorkflowAPI.resolve}.\n * @param args - Forwarded to {@link TailorWorkflowAPI.resolve}\n * @returns A promise that resolves once the resolve has been recorded\n */\nexport const resolve: TailorWorkflowAPI[\"resolve\"] = (...args) => api().resolve(...args);\n"],"mappings":";;;;;;;;;;AA+EA,MAAM,YACH,WAA2D,OAAO;;;;;;AAOrE,MAAa,mBAAyD,GAAG,SACvE,IAAI,CAAC,CAAC,gBAAgB,GAAG,IAAI;;;;;;AAO/B,MAAa,sBAA+D,GAAG,SAC7E,IAAI,CAAC,CAAC,mBAAmB,GAAG,IAAI;;;;;;AAOlC,MAAa,QAAmC,GAAG,SAAS,IAAI,CAAC,CAAC,KAAK,GAAG,IAAI;;;;;;AAO9E,MAAa,WAAyC,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,GAAG,IAAI"}