@tailor-platform/sdk 1.71.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 (382) hide show
  1. package/CHANGELOG.md +46 -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 +801 -206
  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 +124 -25
  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/cli/setup.md +129 -19
  352. package/docs/cli-reference.md +9 -4
  353. package/docs/runtime.md +5 -1
  354. package/docs/services/aigateway.md +14 -0
  355. package/docs/testing.md +48 -2
  356. package/package.json +6 -1
  357. package/dist/application-DmjIKQ-a.mjs.map +0 -1
  358. package/dist/application-a_ApFuPh.mjs +0 -4
  359. package/dist/authconnection-CqfaJfrC.d.mts +0 -32
  360. package/dist/context-CUBwSBq4.d.mts +0 -68
  361. package/dist/file-BzK8z3X-.d.mts +0 -250
  362. package/dist/globals-ByrCoDip.mjs.map +0 -1
  363. package/dist/iconv-kwrmd1U_.d.mts +0 -122
  364. package/dist/idp-BmYwCXnJ.d.mts +0 -187
  365. package/dist/index-BDBU7x-i.d.mts +0 -18
  366. package/dist/index-BSlv_YrG.d.mts +0 -46
  367. package/dist/index-BzGqTY5x.d.mts +0 -1315
  368. package/dist/index-D3_Au3wu.d.mts +0 -47
  369. package/dist/index-DtFRlrww.d.mts +0 -18
  370. package/dist/index-jeE3UvF2.d.mts +0 -18
  371. package/dist/mock-wf5qeZLi.mjs.map +0 -1
  372. package/dist/package-json-wzO6nV9O.mjs +0 -4
  373. package/dist/runtime-Cd375HD-.mjs.map +0 -1
  374. package/dist/secretmanager-CKLB3wAQ.d.mts +0 -55
  375. package/dist/service-CRaa4Joe.mjs +0 -4
  376. package/dist/service-DDWgZL_L2.mjs.map +0 -1
  377. package/dist/telemetry-w92bvGdC.mjs +0 -4
  378. package/dist/types-32lUMToj.mjs +0 -5
  379. package/dist/types-aqnqTCfO.d.mts +0 -602
  380. package/dist/workflow-C8I7shjM.mjs.map +0 -1
  381. package/dist/workflow-CMamswkK.d.mts +0 -96
  382. package/dist/workflow.generated-Da1zECDw.d.mts +0 -1348
@@ -1,4 +0,0 @@
1
-
2
- import { n as generatePluginFilesIfNeeded, r as loadApplication, t as defineApplication } from "./application-DmjIKQ-a.mjs";
3
-
4
- export { defineApplication, generatePluginFilesIfNeeded };
@@ -1,32 +0,0 @@
1
- import { n as AuthConnectionTokenResult$1 } from "./types-v_ErzNUF.mjs";
2
- import { ConnectionName } from "@tailor-platform/sdk";
3
-
4
- //#region src/runtime/authconnection.d.ts
5
- declare namespace authconnection_d_exports {
6
- export { TailorAuthconnectionAPI, getConnectionToken };
7
- }
8
- /**
9
- * Platform API surface for `tailor.authconnection`. Describes the shape the
10
- * platform runtime injects on `globalThis.tailor.authconnection`.
11
- *
12
- * Each method below is also re-exported as a top-level named export from this
13
- * module so callers can either `import * as authconnection from
14
- * "@tailor-platform/sdk/runtime/authconnection"` or pick individual methods.
15
- */
16
- interface TailorAuthconnectionAPI {
17
- /**
18
- * Returns the access token for the given auth connection.
19
- * @param connectionName - Auth connection name as defined in tailor.config
20
- * @returns Token payload
21
- */
22
- getConnectionToken(connectionName: ConnectionName): Promise<AuthConnectionTokenResult$1>;
23
- }
24
- /**
25
- * See {@link TailorAuthconnectionAPI.getConnectionToken}.
26
- * @param args - Forwarded to {@link TailorAuthconnectionAPI.getConnectionToken}
27
- * @returns Token payload
28
- */
29
- declare const getConnectionToken: TailorAuthconnectionAPI["getConnectionToken"];
30
- //#endregion
31
- export { authconnection_d_exports as n, getConnectionToken as r, TailorAuthconnectionAPI as t };
32
- //# sourceMappingURL=authconnection-CqfaJfrC.d.mts.map
@@ -1,68 +0,0 @@
1
- declare namespace context_d_exports {
2
- export { ContextInvoker, Invoker, TailorContextAPI, getInvoker };
3
- }
4
- /**
5
- * Execution context utilities.
6
- *
7
- * Thin typed wrapper around the platform-provided `tailor.context` runtime API.
8
- * At runtime this delegates to `globalThis.tailor.context`.
9
- * @example
10
- * import { context } from "@tailor-platform/sdk/runtime";
11
- *
12
- * const invoker = context.getInvoker();
13
- * if (invoker) {
14
- * console.log(invoker.id, invoker.type, invoker.attributes, invoker.attributeList);
15
- * }
16
- */
17
- /**
18
- * Information about the invoker of the current function execution.
19
- *
20
- * Matches the shape of `TailorUser` and `TailorActor` — `attributes` is the
21
- * attribute map and `attributeList` is the array of attribute IDs.
22
- */
23
- interface Invoker {
24
- /** The invoker's ID */
25
- id: string;
26
- /** The invoker's type */
27
- type: "user" | "machine_user";
28
- /** The workspace ID */
29
- workspaceId: string;
30
- /** A map of the invoker's attributes */
31
- attributes: Record<string, unknown>;
32
- /** The list of attribute IDs */
33
- attributeList: string[];
34
- }
35
- /**
36
- * Raw platform-side invoker payload returned by `tailor.context.getInvoker()`.
37
- * The wrapper normalizes this into {@link Invoker}.
38
- * @internal
39
- */
40
- interface ContextInvoker {
41
- /** The invoker's ID */
42
- id: string;
43
- /** The invoker's type */
44
- type: "user" | "machine_user";
45
- /** The workspace ID */
46
- workspaceId: string;
47
- /** The invoker's attribute IDs */
48
- attributes: string[];
49
- /** The invoker's attribute map */
50
- attributeMap: Record<string, unknown>;
51
- }
52
- /**
53
- * Platform API surface for `tailor.context`. Describes the shape the platform
54
- * runtime injects on `globalThis.tailor.context`.
55
- * @internal
56
- */
57
- interface TailorContextAPI {
58
- getInvoker(): ContextInvoker | null;
59
- }
60
- /**
61
- * Returns information about the invoker of the current function execution,
62
- * or `null` for anonymous invocations.
63
- * @returns Invoker details, or `null` when the call is anonymous
64
- */
65
- declare function getInvoker(): Invoker | null;
66
- //#endregion
67
- export { getInvoker as a, context_d_exports as i, Invoker as n, TailorContextAPI as r, ContextInvoker as t };
68
- //# sourceMappingURL=context-CUBwSBq4.d.mts.map
@@ -1,250 +0,0 @@
1
- declare namespace file_d_exports {
2
- export { DownloadMetadata, FileDownloadAsBase64Response, FileDownloadResponse, FileDownloadStreamResponse, FileMetadata, FileStreamIterator, FileUploadOptions, FileUploadResponse, FileUploadStreamOptions, StreamMetadata, StreamValue, TailorDBFileAPI, TailorDBFileError, TailorDBFileErrorCode, UploadMetadata, deleteFile as delete, deleteFile, download, downloadAsBase64, downloadStream, getMetadata, openDownloadStream, upload, uploadStream };
3
- }
4
- /**
5
- * TailorDB file (BLOB) utilities.
6
- *
7
- * Thin typed wrapper around the platform-provided `tailordb.file` runtime API.
8
- * At runtime this delegates to `globalThis.tailordb.file`. Use `mockFile` from
9
- * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.
10
- * @example
11
- * import { file } from "@tailor-platform/sdk/runtime";
12
- *
13
- * const { metadata } = await file.upload(
14
- * "my-namespace",
15
- * "Document",
16
- * "attachment",
17
- * recordId,
18
- * bytes,
19
- * );
20
- */
21
- /** Upload response metadata. */
22
- interface UploadMetadata {
23
- fileSize: number;
24
- sha256sum: string;
25
- }
26
- /** Download response metadata. */
27
- interface DownloadMetadata {
28
- contentType: string;
29
- fileSize: number;
30
- sha256sum: string;
31
- lastUploadedAt: string;
32
- }
33
- /** File metadata (for {@link getMetadata}). */
34
- interface FileMetadata {
35
- contentType: string;
36
- fileSize: number;
37
- sha256sum: string;
38
- urlPath: string;
39
- lastUploadedAt?: string;
40
- }
41
- /** Stream metadata (first chunk emitted by {@link openDownloadStream}). */
42
- interface StreamMetadata {
43
- contentType: string;
44
- fileSize: number;
45
- sha256sum: string;
46
- }
47
- /** Upload options. */
48
- interface FileUploadOptions {
49
- contentType?: string;
50
- }
51
- /** Upload stream options. */
52
- interface FileUploadStreamOptions {
53
- contentType?: string;
54
- fileSize?: number;
55
- }
56
- /** Upload response. */
57
- interface FileUploadResponse {
58
- metadata: UploadMetadata;
59
- }
60
- /** Download response. */
61
- interface FileDownloadResponse {
62
- data: Uint8Array;
63
- metadata: DownloadMetadata;
64
- }
65
- /** Download-as-Base64 response. */
66
- interface FileDownloadAsBase64Response {
67
- data: string;
68
- metadata: DownloadMetadata;
69
- }
70
- /** Download stream response. */
71
- interface FileDownloadStreamResponse {
72
- body: ReadableStream<Uint8Array>;
73
- metadata: DownloadMetadata;
74
- }
75
- /** Stream chunk types emitted by {@link FileStreamIterator}. */
76
- type StreamValue = {
77
- type: "metadata";
78
- metadata: StreamMetadata;
79
- } | {
80
- type: "chunk";
81
- data: Uint8Array;
82
- position: number;
83
- } | {
84
- type: "complete";
85
- };
86
- /** Stream iterator returned by {@link openDownloadStream}. */
87
- interface FileStreamIterator extends AsyncIterableIterator<StreamValue> {
88
- next(): Promise<IteratorResult<StreamValue>>;
89
- close(): Promise<void>;
90
- }
91
- /** Error code emitted by {@link TailorDBFileError}. */
92
- type TailorDBFileErrorCode = "INVALID_PARAMS" | "INVALID_DATA_TYPE" | "OPERATION_FAILED" | "DELETE_FAILED" | "STREAM_OPEN_FAILED" | "STREAM_READ_ERROR" | "STREAM_ERROR" | "FILE_TOO_LARGE";
93
- /**
94
- * Type-only shape of the `TailorDBFileError` runtime class. The class itself
95
- * is provided by the platform runtime (and by `injectMocks` in tests); this
96
- * interface mirrors it so callers can `import type { TailorDBFileError }` from
97
- * the wrapper module without depending on any ambient declaration.
98
- */
99
- interface TailorDBFileError extends Error {
100
- name: "TailorDBFileError";
101
- code?: TailorDBFileErrorCode;
102
- cause?: unknown;
103
- }
104
- /**
105
- * Platform API surface for `tailordb.file`. Describes the shape the platform
106
- * runtime injects on `globalThis.tailordb.file`.
107
- *
108
- * Each method below is also re-exported as a top-level named export from this
109
- * module (e.g. `upload`, `download`, `deleteFile`) so callers can either
110
- * `import * as file from "@tailor-platform/sdk/runtime/file"` or pick
111
- * individual methods.
112
- */
113
- interface TailorDBFileAPI {
114
- /**
115
- * Upload a file to TailorDB.
116
- * @param namespace - TailorDB namespace
117
- * @param typeName - TailorDB type name
118
- * @param fieldName - File field name on the type
119
- * @param recordId - Record ID owning the field
120
- * @param data - File contents
121
- * @param options - Upload options (e.g. `contentType`)
122
- * @returns Upload response containing the file metadata
123
- */
124
- upload(namespace: string, typeName: string, fieldName: string, recordId: string, data: string | ArrayBuffer | Uint8Array | number[], options?: FileUploadOptions): Promise<FileUploadResponse>;
125
- /**
126
- * Download a file from TailorDB.
127
- *
128
- * Throws `TailorDBFileError` with code `FILE_TOO_LARGE` when the file
129
- * exceeds 10MB — use {@link downloadStream} for large files.
130
- * @param namespace - TailorDB namespace
131
- * @param typeName - TailorDB type name
132
- * @param fieldName - File field name on the type
133
- * @param recordId - Record ID owning the field
134
- * @returns Bytes and metadata for the file
135
- */
136
- download(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<FileDownloadResponse>;
137
- /**
138
- * Download a file from TailorDB as a Base64-encoded string.
139
- *
140
- * Throws `TailorDBFileError` with code `FILE_TOO_LARGE` when the file
141
- * exceeds 10MB — use {@link downloadStream} for large files.
142
- * @param namespace - TailorDB namespace
143
- * @param typeName - TailorDB type name
144
- * @param fieldName - File field name on the type
145
- * @param recordId - Record ID owning the field
146
- * @returns Base64-encoded contents and metadata for the file
147
- */
148
- downloadAsBase64(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<FileDownloadAsBase64Response>;
149
- /**
150
- * Delete a file from TailorDB. Exported as `deleteFile` (and aliased as
151
- * `delete`) so it can be used both with named and namespace imports.
152
- * @param namespace - TailorDB namespace
153
- * @param typeName - TailorDB type name
154
- * @param fieldName - File field name on the type
155
- * @param recordId - Record ID owning the field
156
- * @returns Resolves once the file has been deleted
157
- */
158
- delete(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<void>;
159
- /**
160
- * Get file metadata from TailorDB.
161
- * @param namespace - TailorDB namespace
162
- * @param typeName - TailorDB type name
163
- * @param fieldName - File field name on the type
164
- * @param recordId - Record ID owning the field
165
- * @returns Metadata for the stored file
166
- */
167
- getMetadata(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<FileMetadata>;
168
- /**
169
- * Open a download stream for large files.
170
- * @deprecated Use {@link downloadStream} instead.
171
- * @param namespace - TailorDB namespace
172
- * @param typeName - TailorDB type name
173
- * @param fieldName - File field name on the type
174
- * @param recordId - Record ID owning the field
175
- * @returns Async iterator yielding file chunks; call `close()` to release resources
176
- */
177
- openDownloadStream(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<FileStreamIterator>;
178
- /**
179
- * Download a file as a ReadableStream.
180
- * @param namespace - TailorDB namespace
181
- * @param typeName - TailorDB type name
182
- * @param fieldName - File field name on the type
183
- * @param recordId - Record ID owning the field
184
- * @returns ReadableStream body and metadata for the file
185
- */
186
- downloadStream(namespace: string, typeName: string, fieldName: string, recordId: string): Promise<FileDownloadStreamResponse>;
187
- /**
188
- * Upload a file using a ReadableStream.
189
- * @param namespace - TailorDB namespace
190
- * @param typeName - TailorDB type name
191
- * @param fieldName - File field name on the type
192
- * @param recordId - Record ID owning the field
193
- * @param readableStream - ReadableStream providing the file data
194
- * @param options - Upload stream options (e.g. `contentType`, `fileSize`)
195
- * @returns Upload response containing the file metadata
196
- */
197
- uploadStream(namespace: string, typeName: string, fieldName: string, recordId: string, readableStream: ReadableStream<Uint8Array | ArrayBuffer>, options?: FileUploadStreamOptions): Promise<FileUploadResponse>;
198
- }
199
- /**
200
- * See {@link TailorDBFileAPI.upload}.
201
- * @param args - Forwarded to {@link TailorDBFileAPI.upload}
202
- * @returns Upload response containing the file metadata
203
- */
204
- declare const upload: TailorDBFileAPI["upload"];
205
- /**
206
- * See {@link TailorDBFileAPI.download}.
207
- * @param args - Forwarded to {@link TailorDBFileAPI.download}
208
- * @returns Bytes and metadata for the file
209
- */
210
- declare const download: TailorDBFileAPI["download"];
211
- /**
212
- * See {@link TailorDBFileAPI.downloadAsBase64}.
213
- * @param args - Forwarded to {@link TailorDBFileAPI.downloadAsBase64}
214
- * @returns Base64-encoded contents and metadata for the file
215
- */
216
- declare const downloadAsBase64: TailorDBFileAPI["downloadAsBase64"];
217
- /**
218
- * See {@link TailorDBFileAPI.delete}.
219
- * @param args - Forwarded to {@link TailorDBFileAPI.delete}
220
- * @returns Resolves once the file has been deleted
221
- */
222
- declare const deleteFile: TailorDBFileAPI["delete"];
223
- /**
224
- * See {@link TailorDBFileAPI.getMetadata}.
225
- * @param args - Forwarded to {@link TailorDBFileAPI.getMetadata}
226
- * @returns Metadata for the stored file
227
- */
228
- declare const getMetadata: TailorDBFileAPI["getMetadata"];
229
- /**
230
- * See {@link TailorDBFileAPI.openDownloadStream}.
231
- * @deprecated Use {@link downloadStream} instead.
232
- * @param args - Forwarded to {@link TailorDBFileAPI.openDownloadStream}
233
- * @returns Async iterator yielding file chunks; call `close()` to release resources
234
- */
235
- declare const openDownloadStream: TailorDBFileAPI["openDownloadStream"];
236
- /**
237
- * See {@link TailorDBFileAPI.downloadStream}.
238
- * @param args - Forwarded to {@link TailorDBFileAPI.downloadStream}
239
- * @returns ReadableStream body and metadata for the file
240
- */
241
- declare const downloadStream: TailorDBFileAPI["downloadStream"];
242
- /**
243
- * See {@link TailorDBFileAPI.uploadStream}.
244
- * @param args - Forwarded to {@link TailorDBFileAPI.uploadStream}
245
- * @returns Upload response containing the file metadata
246
- */
247
- declare const uploadStream: TailorDBFileAPI["uploadStream"];
248
- //#endregion
249
- export { upload as C, openDownloadStream as S, download as _, FileMetadata as a, file_d_exports as b, FileUploadResponse as c, StreamValue as d, TailorDBFileAPI as f, deleteFile as g, UploadMetadata as h, FileDownloadStreamResponse as i, FileUploadStreamOptions as l, TailorDBFileErrorCode as m, FileDownloadAsBase64Response as n, FileStreamIterator as o, TailorDBFileError as p, FileDownloadResponse as r, FileUploadOptions as s, DownloadMetadata as t, StreamMetadata as u, downloadAsBase64 as v, uploadStream as w, getMetadata as x, downloadStream as y };
250
- //# sourceMappingURL=file-BzK8z3X-.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"globals-ByrCoDip.mjs","names":[],"sources":["../src/vitest/workflow-runtime.ts","../src/vitest/globals.ts"],"sourcesContent":["// Default `tailor.workflow` runner installed by the `tailor-runtime` environment.\n// Must stay free of `vitest` (`vi`): it loads via `./globals` in the environment\n// realm where `vi` is unavailable, hence relative imports only (no `@/` alias).\nimport { runRegisteredJob, runRegisteredWorkflow } from \"../configure/services/workflow/registry\";\n\nexport interface DefaultWorkflowRuntime {\n triggerJobFunction: (name: string, args?: unknown) => unknown;\n triggerWorkflow: (name: string, args?: unknown, options?: unknown) => Promise<string>;\n wait: (key: string, payload?: unknown) => unknown;\n resolve: (\n executionId: string,\n key: string,\n callback: (payload: unknown) => unknown,\n ) => Promise<void>;\n}\n\nexport function createDefaultWorkflowRuntime(): DefaultWorkflowRuntime {\n return {\n triggerJobFunction: (name, args) => runRegisteredJob(name, args),\n triggerWorkflow: (name, args) => runRegisteredWorkflow(name, args),\n wait: (key: string): unknown => {\n throw new Error(\n `No wait handler for \"${key}\". Acquire mockWorkflow() and call setWaitHandler(...).`,\n );\n },\n resolve: async (): Promise<void> => {\n throw new Error(\n \"No resolve handler. Acquire mockWorkflow() and call setResolveHandler(...).\",\n );\n },\n };\n}\n","/**\n * Base platform globals for the tailor-runtime test environment.\n *\n * This module is intentionally free of any `vitest` (`vi`) dependency so it can\n * be imported from the Vitest *environment* module (which runs in a realm where\n * `vi` is not available). It installs only the always-present structural pieces:\n *\n * - `globalThis.tailor` / `globalThis.tailordb` container objects\n * - `globalThis.tailor.context.getInvoker` default stub\n * - the platform error classes (`TailorErrors`, `TailorErrorMessage`,\n * `TailorDBFileError`)\n * - the `__tailorRuntimeActive` sentinel flag\n *\n * The per-namespace mock behavior (TailorDB client, workflow, secretmanager, …)\n * is installed on demand by the `xMock()` factories in `./mock`, which run in\n * test context where `vi` *is* available.\n */\n\nimport { createDefaultWorkflowRuntime } from \"./workflow-runtime\";\nimport type { ContextInvoker } from \"../runtime/context\";\nimport type { TailorDBFileErrorCode } from \"../runtime/file\";\n\n// Sentinel set when the tailor-runtime environment is active. setup.ts reads it\n// to decide whether to run its blocked-globals lifecycle and config-secret\n// loading.\nexport const RUNTIME_FLAG_KEY = \"__tailorRuntimeActive\";\n\n// ---------------------------------------------------------------------------\n// Error class mocks\n// ---------------------------------------------------------------------------\n\ninterface TailorErrorItem {\n message: string;\n path: (string | number)[];\n}\n\nclass TailorErrorsMock extends Error {\n errors: TailorErrorItem[];\n\n constructor(errors: TailorErrorItem[]) {\n if (!Array.isArray(errors)) {\n throw new TypeError(\"TailorErrors: errors must be an array\");\n }\n const validated = errors.map((e, i) => {\n if (typeof e.message !== \"string\") {\n throw new TypeError(`TailorErrors: errors[${i}].message must be a string`);\n }\n if (!Array.isArray(e.path)) {\n throw new TypeError(`TailorErrors: errors[${i}].path must be an array`);\n }\n return { message: e.message, path: e.path };\n });\n // Match the PF runtime's TailorErrors serialization, which prefixes the\n // JSON payload with \"TailorErrors: \". Other SDK code (e.g. apply\n // integration fixtures) strips this prefix before JSON.parse.\n super(`TailorErrors: ${JSON.stringify({ errors: validated })}`);\n this.name = \"TailorErrors\";\n this.errors = validated;\n }\n}\n\nclass TailorErrorMessageMock extends Error {\n constructor(message: string) {\n super(message);\n this.name = \"TailorErrorMessage\";\n }\n}\n\nclass TailorDBFileErrorMock extends Error {\n code?: TailorDBFileErrorCode;\n override cause: unknown;\n\n constructor(message: string, code?: TailorDBFileErrorCode, cause?: unknown) {\n super(message);\n this.name = \"TailorDBFileError\";\n this.code = code;\n this.cause = cause;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Base install / cleanup\n// ---------------------------------------------------------------------------\n\n// Stub-only injection. SDK consumers configure invokers at the body level\n// (resolver/executor/workflow `.body()` `invoker` arg) or, for bundled tests,\n// via `vi.spyOn(globalThis.tailor.context, \"getInvoker\")`.\nfunction defaultGetInvoker(): ContextInvoker | null {\n return null;\n}\n\n/**\n * Install the always-present base platform globals (containers, context stub,\n * error classes, runtime flag). Per-namespace mocks are layered on top by the\n * `xMock()` factories in `./mock`.\n * @param global - The global object to install into (typically `globalThis`)\n */\nexport function installPlatformGlobals(global: typeof globalThis): void {\n const g = global as Record<string, unknown>;\n\n g[RUNTIME_FLAG_KEY] = true;\n\n // Containers. Namespace mocks (secretmanager, …) are added to these by the\n // corresponding `xMock()` on acquisition. `workflow` carries a default runner\n // so `.trigger()` runs the real job chain locally without `mockWorkflow()`;\n // `mockWorkflow()` overlays and restores it.\n g.tailor = {\n context: { getInvoker: defaultGetInvoker },\n workflow: createDefaultWorkflowRuntime(),\n };\n g.tailordb = {};\n\n g.TailorErrors = TailorErrorsMock;\n g.TailorErrorMessage = TailorErrorMessageMock;\n g.TailorDBFileError = TailorDBFileErrorMock;\n}\n\n/**\n * Remove the base platform globals (and anything the namespace mocks layered on\n * top, since they live under the same containers).\n * @param global - The global object to clean up (typically `globalThis`)\n */\nexport function cleanupPlatformGlobals(global: typeof globalThis): void {\n const g = global as Record<string, unknown>;\n delete g.tailordb;\n delete g.tailor;\n delete g.TailorErrors;\n delete g.TailorErrorMessage;\n delete g.TailorDBFileError;\n delete g[RUNTIME_FLAG_KEY];\n}\n"],"mappings":";;;;AAgBA,SAAgB,+BAAuD;CACrE,OAAO;EACL,qBAAqB,MAAM,SAAS,iBAAiB,MAAM,IAAI;EAC/D,kBAAkB,MAAM,SAAS,sBAAsB,MAAM,IAAI;EACjE,OAAO,QAAyB;GAC9B,MAAM,IAAI,MACR,wBAAwB,IAAI,wDAC9B;EACF;EACA,SAAS,YAA2B;GAClC,MAAM,IAAI,MACR,6EACF;EACF;CACF;AACF;;;;;;;;;;;;;;;;;;;;;ACNA,MAAa,mBAAmB;AAWhC,IAAM,mBAAN,cAA+B,MAAM;CACnC;CAEA,YAAY,QAA2B;EACrC,IAAI,CAAC,MAAM,QAAQ,MAAM,GACvB,MAAM,IAAI,UAAU,uCAAuC;EAE7D,MAAM,YAAY,OAAO,KAAK,GAAG,MAAM;GACrC,IAAI,OAAO,EAAE,YAAY,UACvB,MAAM,IAAI,UAAU,wBAAwB,EAAE,2BAA2B;GAE3E,IAAI,CAAC,MAAM,QAAQ,EAAE,IAAI,GACvB,MAAM,IAAI,UAAU,wBAAwB,EAAE,wBAAwB;GAExE,OAAO;IAAE,SAAS,EAAE;IAAS,MAAM,EAAE;GAAK;EAC5C,CAAC;EAID,MAAM,iBAAiB,KAAK,UAAU,EAAE,QAAQ,UAAU,CAAC,GAAG;EAC9D,KAAK,OAAO;EACZ,KAAK,SAAS;CAChB;AACF;AAEA,IAAM,yBAAN,cAAqC,MAAM;CACzC,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAEA,IAAM,wBAAN,cAAoC,MAAM;CACxC;CACA,AAAS;CAET,YAAY,SAAiB,MAA8B,OAAiB;EAC1E,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,OAAO;EACZ,KAAK,QAAQ;CACf;AACF;AASA,SAAS,oBAA2C;CAClD,OAAO;AACT;;;;;;;AAQA,SAAgB,uBAAuB,QAAiC;CACtE,MAAM,IAAI;CAEV,EAAE,oBAAoB;CAMtB,EAAE,SAAS;EACT,SAAS,EAAE,YAAY,kBAAkB;EACzC,UAAU,6BAA6B;CACzC;CACA,EAAE,WAAW,CAAC;CAEd,EAAE,eAAe;CACjB,EAAE,qBAAqB;CACvB,EAAE,oBAAoB;AACxB;;;;;;AAOA,SAAgB,uBAAuB,QAAiC;CACtE,MAAM,IAAI;CACV,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;CACT,OAAO,EAAE;AACX"}
@@ -1,122 +0,0 @@
1
- declare namespace iconv_d_exports {
2
- export { Iconv, IconvConstructor, IconvInstance, TailorIconvAPI, convert, convertBuffer, decode, encode, encodings };
3
- }
4
- /**
5
- * Character encoding conversion utilities.
6
- *
7
- * Thin typed wrapper around the platform-provided `tailor.iconv` runtime API.
8
- * At runtime this delegates to `globalThis.tailor.iconv`, which is provided by
9
- * the Tailor Platform Function runtime. Use `mockIconv` from
10
- * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.
11
- * @example
12
- * import { iconv } from "@tailor-platform/sdk/runtime";
13
- *
14
- * const utf8 = iconv.convert(sjisBuffer, "Shift_JIS", "UTF-8"); // string
15
- * const sjis = iconv.convert("こんにちは", "UTF-8", "Shift_JIS"); // Uint8Array
16
- *
17
- * const conv = new iconv.Iconv("Shift_JIS", "UTF-8");
18
- * const out = conv.convert(sjisBuffer);
19
- */
20
- /** Instance methods exposed by `tailor.iconv.Iconv`. */
21
- interface IconvInstance {
22
- convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;
23
- }
24
- /** Constructor shape for `tailor.iconv.Iconv`. */
25
- interface IconvConstructor {
26
- new (fromEncoding: string, toEncoding: string): IconvInstance;
27
- }
28
- /**
29
- * Platform API surface for `tailor.iconv`. Describes the shape the platform
30
- * runtime injects on `globalThis.tailor.iconv` so the wrapper and ambient
31
- * globals stay in sync.
32
- *
33
- * Each method below is also re-exported as a top-level named export from this
34
- * module (e.g. `convert`, `decode`, `encode`) so callers can either
35
- * `import * as iconv from "@tailor-platform/sdk/runtime/iconv"` or pick
36
- * individual methods.
37
- */
38
- interface TailorIconvAPI {
39
- /**
40
- * Convert a string or buffer between encodings.
41
- * @param str - Input data to convert
42
- * @param fromEncoding - Source encoding name
43
- * @param toEncoding - Target encoding name
44
- * @returns `string` when `toEncoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
45
- */
46
- convert<T extends string>(str: string | Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: T): T extends "UTF8" | "UTF-8" ? string : Uint8Array;
47
- /**
48
- * Convert a buffer between encodings.
49
- * @param buffer - Input bytes to convert
50
- * @param fromEncoding - Source encoding name
51
- * @param toEncoding - Target encoding name
52
- * @returns `string` when `toEncoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
53
- */
54
- convertBuffer<T extends string>(buffer: Uint8Array | ArrayBuffer, fromEncoding: string, toEncoding: T): T extends "UTF8" | "UTF-8" ? string : Uint8Array;
55
- /**
56
- * Decode a buffer to a UTF-8 string using the given source encoding.
57
- * @param buffer - Input bytes
58
- * @param encoding - Source encoding name
59
- * @returns Decoded UTF-8 string
60
- */
61
- decode(buffer: Uint8Array | ArrayBuffer, encoding: string): string;
62
- /**
63
- * Encode a UTF-8 string into the given target encoding.
64
- * @param str - Input string
65
- * @param encoding - Target encoding name
66
- * @returns `string` when `encoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
67
- */
68
- encode<T extends string>(str: string, encoding: T): T extends "UTF8" | "UTF-8" ? string : Uint8Array;
69
- /**
70
- * Returns the list of supported encoding names.
71
- * @returns Array of encoding names supported by the platform iconv runtime
72
- */
73
- encodings(): string[];
74
- /** Constructor for the stateful {@link Iconv} converter. */
75
- Iconv: IconvConstructor;
76
- }
77
- /**
78
- * See {@link TailorIconvAPI.convert}.
79
- * @param args - Forwarded to {@link TailorIconvAPI.convert}
80
- * @returns `string` when `toEncoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
81
- */
82
- declare const convert: TailorIconvAPI["convert"];
83
- /**
84
- * See {@link TailorIconvAPI.convertBuffer}.
85
- * @param args - Forwarded to {@link TailorIconvAPI.convertBuffer}
86
- * @returns `string` when `toEncoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
87
- */
88
- declare const convertBuffer: TailorIconvAPI["convertBuffer"];
89
- /**
90
- * See {@link TailorIconvAPI.decode}.
91
- * @param args - Forwarded to {@link TailorIconvAPI.decode}
92
- * @returns Decoded UTF-8 string
93
- */
94
- declare const decode: TailorIconvAPI["decode"];
95
- /**
96
- * See {@link TailorIconvAPI.encode}.
97
- * @param args - Forwarded to {@link TailorIconvAPI.encode}
98
- * @returns `string` when `encoding` is `"UTF8"` or `"UTF-8"`, otherwise `Uint8Array`.
99
- */
100
- declare const encode: TailorIconvAPI["encode"];
101
- /**
102
- * See {@link TailorIconvAPI.encodings}.
103
- * @returns Array of encoding names supported by the platform iconv runtime
104
- */
105
- declare const encodings: TailorIconvAPI["encodings"];
106
- /**
107
- * Stateful converter for repeated conversions between a fixed encoding pair.
108
- * Compatible with the `node-iconv` API surface.
109
- */
110
- declare class Iconv {
111
- private impl;
112
- constructor(fromEncoding: string, toEncoding: string);
113
- /**
114
- * Convert input using this converter's fixed encoding pair.
115
- * @param input - Bytes or string to convert
116
- * @returns Encoded output (string for UTF-8 targets, otherwise `Uint8Array`).
117
- */
118
- convert(input: string | Uint8Array | ArrayBuffer): string | Uint8Array;
119
- }
120
- //#endregion
121
- export { convert as a, encode as c, TailorIconvAPI as i, encodings as l, IconvConstructor as n, convertBuffer as o, IconvInstance as r, decode as s, Iconv as t, iconv_d_exports as u };
122
- //# sourceMappingURL=iconv-kwrmd1U_.d.mts.map
@@ -1,187 +0,0 @@
1
- declare namespace idp_d_exports {
2
- export { Client, ClientConfig, CreateUserInput, IdpClientConstructor, IdpClientInstance, ListUsersOptions, ListUsersResponse, SendPasswordResetEmailInput, TailorIdpAPI, UnenrollMfaInput, UpdateUserInput, User, UserQuery };
3
- }
4
- /**
5
- * IDP (Identity Provider) utilities.
6
- *
7
- * Thin typed wrapper around the platform-provided `tailor.idp` runtime API.
8
- * At runtime this delegates to `globalThis.tailor.idp`. Use `mockIdp` from
9
- * `@tailor-platform/sdk/vitest` to mock these calls in unit tests.
10
- * @example
11
- * import { idp } from "@tailor-platform/sdk/runtime";
12
- *
13
- * const client = new idp.Client({ namespace: "my-namespace" });
14
- * const { users } = await client.users({ first: 10 });
15
- */
16
- /** Configuration object for {@link Client}. */
17
- interface ClientConfig {
18
- namespace: string;
19
- }
20
- /** User record returned by IDP operations. */
21
- interface User {
22
- id: string;
23
- name: string;
24
- disabled: boolean;
25
- createdAt?: string;
26
- /**
27
- * True when the user has at least one enrolled MFA second factor. False when
28
- * the namespace has MFA disabled or the user has not enrolled a factor.
29
- */
30
- mfaEnrolled: boolean;
31
- /**
32
- * Enrolled MFA second factor IDs. Pass an entry into
33
- * {@link Client.unenrollMfa} to remove that factor.
34
- */
35
- mfaFactorIds: string[];
36
- }
37
- /** Filter options for {@link Client.users}. */
38
- interface UserQuery {
39
- /** Filter by user IDs */
40
- ids?: string[];
41
- /** Filter by user names */
42
- names?: string[];
43
- }
44
- /** Pagination/filter options for {@link Client.users}. */
45
- interface ListUsersOptions {
46
- /** Maximum number of users to return */
47
- first?: number;
48
- /** Page token for pagination */
49
- after?: string;
50
- /** Query filter for users */
51
- query?: UserQuery;
52
- }
53
- /** Response shape for {@link Client.users}. */
54
- interface ListUsersResponse {
55
- users: User[];
56
- nextPageToken: string | null;
57
- totalCount: number;
58
- }
59
- /** Input for {@link Client.createUser}. */
60
- interface CreateUserInput {
61
- /** The user's name (typically email) */
62
- name: string;
63
- /** The user's password. If omitted, the user is created without a password (cannot log in with any password). */
64
- password?: string;
65
- /** Whether the user is disabled */
66
- disabled?: boolean;
67
- }
68
- /** Input for {@link Client.updateUser}. */
69
- interface UpdateUserInput {
70
- /** The user's ID */
71
- id: string;
72
- /** New name for the user */
73
- name?: string;
74
- /** New password for the user. Cannot be used with clearPassword. */
75
- password?: string;
76
- /** If true, remove the user's password. Cannot be used with password. */
77
- clearPassword?: boolean;
78
- /** New disabled status for the user */
79
- disabled?: boolean;
80
- }
81
- /** Input for {@link Client.sendPasswordResetEmail}. */
82
- interface SendPasswordResetEmailInput {
83
- /** The ID of the user */
84
- userId: string;
85
- /** The URI to redirect to after password reset */
86
- redirectUri: string;
87
- /** The sender display name. Defaults to 'Tailor Platform IdP'. */
88
- fromName?: string;
89
- /** The email subject line. Defaults to the localized default subject. */
90
- subject?: string;
91
- }
92
- /** Input for {@link Client.unenrollMfa}. */
93
- interface UnenrollMfaInput {
94
- /** The ID of the user whose factor will be unenrolled. */
95
- userId: string;
96
- /**
97
- * The ID of the factor to unenroll. Factor IDs are exposed on the user
98
- * record (see {@link User.mfaFactorIds}).
99
- */
100
- mfaFactorId: string;
101
- }
102
- /** Instance methods exposed by `tailor.idp.Client`. */
103
- interface IdpClientInstance {
104
- users(options?: ListUsersOptions): Promise<ListUsersResponse>;
105
- user(userId: string): Promise<User>;
106
- userByName(name: string): Promise<User>;
107
- createUser(input: CreateUserInput): Promise<User>;
108
- updateUser(input: UpdateUserInput): Promise<User>;
109
- deleteUser(userId: string): Promise<boolean>;
110
- sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;
111
- unenrollMfa(input: UnenrollMfaInput): Promise<boolean>;
112
- }
113
- /**
114
- * Constructor shape for `tailor.idp.Client`.
115
- * @internal
116
- */
117
- interface IdpClientConstructor {
118
- new (config: ClientConfig): IdpClientInstance;
119
- }
120
- /**
121
- * Platform API surface for `tailor.idp`. Describes the shape the platform
122
- * runtime injects on `globalThis.tailor.idp`.
123
- * @internal
124
- */
125
- interface TailorIdpAPI {
126
- Client: IdpClientConstructor;
127
- }
128
- /**
129
- * IDP Client for user management operations.
130
- *
131
- * Wraps the platform-provided `tailor.idp.Client` and exposes the same surface.
132
- */
133
- declare class Client {
134
- #private;
135
- constructor(config: ClientConfig);
136
- /**
137
- * List users in the namespace with optional filtering and pagination.
138
- * @param options - Pagination and filter options
139
- * @returns Page of users with `nextPageToken` and `totalCount`
140
- */
141
- users(options?: ListUsersOptions): Promise<ListUsersResponse>;
142
- /**
143
- * Get a user by ID.
144
- * @param userId - IDP user ID
145
- * @returns The matching user
146
- */
147
- user(userId: string): Promise<User>;
148
- /**
149
- * Get a user by name.
150
- * @param name - IDP user name
151
- * @returns The matching user
152
- */
153
- userByName(name: string): Promise<User>;
154
- /**
155
- * Create a new user.
156
- * @param input - User attributes
157
- * @returns The newly created user
158
- */
159
- createUser(input: CreateUserInput): Promise<User>;
160
- /**
161
- * Update an existing user.
162
- * @param input - User ID plus attributes to update
163
- * @returns The updated user
164
- */
165
- updateUser(input: UpdateUserInput): Promise<User>;
166
- /**
167
- * Delete a user by ID.
168
- * @param userId - IDP user ID
169
- * @returns `true` when the user was deleted
170
- */
171
- deleteUser(userId: string): Promise<boolean>;
172
- /**
173
- * Send a password reset email to a user.
174
- * @param input - Target user ID and redirect URI
175
- * @returns `true` when the email was queued
176
- */
177
- sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;
178
- /**
179
- * Unenroll an MFA factor from a user.
180
- * @param input - Target user ID and factor ID (see {@link User.mfaFactorIds})
181
- * @returns `true` when the factor was removed
182
- */
183
- unenrollMfa(input: UnenrollMfaInput): Promise<boolean>;
184
- }
185
- //#endregion
186
- export { IdpClientInstance as a, SendPasswordResetEmailInput as c, UpdateUserInput as d, User as f, IdpClientConstructor as i, TailorIdpAPI as l, idp_d_exports as m, ClientConfig as n, ListUsersOptions as o, UserQuery as p, CreateUserInput as r, ListUsersResponse as s, Client as t, UnenrollMfaInput as u };
187
- //# sourceMappingURL=idp-BmYwCXnJ.d.mts.map