@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
@@ -0,0 +1,211 @@
1
+ import { SnapshotFieldConfig, SnapshotGqlPermission, SnapshotIndexConfig, SnapshotRecordPermission, SnapshotRelationship, TailorDBSnapshotType } from "./snapshot-types.mjs";
2
+
3
+ //#region src/cli/commands/tailordb/migrate/diff-calculator.d.ts
4
+ /**
5
+ * Properties shared by all diff change variants
6
+ */
7
+ interface DiffChangeBase {
8
+ typeName: string;
9
+ reason?: string;
10
+ }
11
+ /**
12
+ * Type-level settings patch carried by legacy `type_modified` changes.
13
+ * Current SDK versions no longer produce this kind, but persisted
14
+ * diff.json files written by older versions may still contain it.
15
+ */
16
+ interface TypeSettingsPatch {
17
+ indexes?: Record<string, SnapshotIndexConfig>;
18
+ files?: Record<string, string>;
19
+ }
20
+ /**
21
+ * Permission state carried by `permission_modified` changes.
22
+ */
23
+ interface SnapshotPermissionState {
24
+ recordPermission?: SnapshotRecordPermission;
25
+ gqlPermission?: SnapshotGqlPermission;
26
+ }
27
+ /** A new type was added to the schema. */
28
+ interface TypeAddedChange extends DiffChangeBase {
29
+ kind: "type_added";
30
+ after: TailorDBSnapshotType;
31
+ }
32
+ /** An existing type was removed from the schema. */
33
+ interface TypeRemovedChange extends DiffChangeBase {
34
+ kind: "type_removed";
35
+ before: TailorDBSnapshotType;
36
+ }
37
+ /**
38
+ * Legacy type-level settings change. Kept for backward compatibility with
39
+ * diff.json files written by older SDK versions; `before`/`after` may be
40
+ * absent in those files, hence optional.
41
+ */
42
+ interface TypeModifiedChange extends DiffChangeBase {
43
+ kind: "type_modified";
44
+ before?: TypeSettingsPatch;
45
+ after?: TypeSettingsPatch;
46
+ }
47
+ /** A field was added to a type. */
48
+ interface FieldAddedChange extends DiffChangeBase {
49
+ kind: "field_added";
50
+ fieldName: string;
51
+ after: SnapshotFieldConfig;
52
+ }
53
+ /** A field was removed from a type. */
54
+ interface FieldRemovedChange extends DiffChangeBase {
55
+ kind: "field_removed";
56
+ fieldName: string;
57
+ before: SnapshotFieldConfig;
58
+ }
59
+ /** A field configuration was modified. */
60
+ interface FieldModifiedChange extends DiffChangeBase {
61
+ kind: "field_modified";
62
+ fieldName: string;
63
+ before: SnapshotFieldConfig;
64
+ after: SnapshotFieldConfig;
65
+ }
66
+ /** An index was added to a type. */
67
+ interface IndexAddedChange extends DiffChangeBase {
68
+ kind: "index_added";
69
+ indexName: string;
70
+ after: SnapshotIndexConfig;
71
+ }
72
+ /** An index was removed from a type. */
73
+ interface IndexRemovedChange extends DiffChangeBase {
74
+ kind: "index_removed";
75
+ indexName: string;
76
+ before: SnapshotIndexConfig;
77
+ }
78
+ /** An index configuration was modified. */
79
+ interface IndexModifiedChange extends DiffChangeBase {
80
+ kind: "index_modified";
81
+ indexName: string;
82
+ before: SnapshotIndexConfig;
83
+ after: SnapshotIndexConfig;
84
+ }
85
+ /** A file field was added to a type. `before`/`after` hold the description. */
86
+ interface FileAddedChange extends DiffChangeBase {
87
+ kind: "file_added";
88
+ fieldName: string;
89
+ after: string;
90
+ }
91
+ /** A file field was removed from a type. */
92
+ interface FileRemovedChange extends DiffChangeBase {
93
+ kind: "file_removed";
94
+ fieldName: string;
95
+ before: string;
96
+ }
97
+ /** A file field description was modified. */
98
+ interface FileModifiedChange extends DiffChangeBase {
99
+ kind: "file_modified";
100
+ fieldName: string;
101
+ before: string;
102
+ after: string;
103
+ }
104
+ /**
105
+ * A relationship was added to a type. `relationshipType` is optional for
106
+ * backward compatibility: diff.json files written by older SDK versions
107
+ * predate the field.
108
+ */
109
+ interface RelationshipAddedChange extends DiffChangeBase {
110
+ kind: "relationship_added";
111
+ relationshipName: string;
112
+ relationshipType?: "forward" | "backward";
113
+ after: SnapshotRelationship;
114
+ }
115
+ /** A relationship was removed from a type. */
116
+ interface RelationshipRemovedChange extends DiffChangeBase {
117
+ kind: "relationship_removed";
118
+ relationshipName: string;
119
+ relationshipType?: "forward" | "backward";
120
+ before: SnapshotRelationship;
121
+ }
122
+ /** A relationship configuration was modified. */
123
+ interface RelationshipModifiedChange extends DiffChangeBase {
124
+ kind: "relationship_modified";
125
+ relationshipName: string;
126
+ relationshipType?: "forward" | "backward";
127
+ before: SnapshotRelationship;
128
+ after: SnapshotRelationship;
129
+ }
130
+ /**
131
+ * Type-level permissions were modified. `before`/`after` are optional for
132
+ * robustness against hand-edited or legacy diff.json files; consumers guard
133
+ * on their presence.
134
+ */
135
+ interface PermissionModifiedChange extends DiffChangeBase {
136
+ kind: "permission_modified";
137
+ before?: SnapshotPermissionState;
138
+ after?: SnapshotPermissionState;
139
+ }
140
+ /**
141
+ * Single change in migration diff, discriminated by `kind` so that
142
+ * `before`/`after` are typed per change kind.
143
+ */
144
+ type DiffChange = TypeAddedChange | TypeRemovedChange | TypeModifiedChange | FieldAddedChange | FieldRemovedChange | FieldModifiedChange | IndexAddedChange | IndexRemovedChange | IndexModifiedChange | FileAddedChange | FileRemovedChange | FileModifiedChange | RelationshipAddedChange | RelationshipRemovedChange | RelationshipModifiedChange | PermissionModifiedChange;
145
+ /**
146
+ * Migration diff - changes between two schema versions
147
+ * Stored as XXXX/diff.json (e.g., 0001/diff.json)
148
+ */
149
+ interface MigrationDiff {
150
+ /** Format version for future compatibility */
151
+ version: number;
152
+ namespace: string;
153
+ createdAt: string;
154
+ description?: string;
155
+ changes: DiffChange[];
156
+ /** Whether there are breaking changes (data loss or constraint violations possible) */
157
+ hasBreakingChanges: boolean;
158
+ /** List of breaking changes */
159
+ breakingChanges: BreakingChangeInfo[];
160
+ /** Whether there are non-breaking changes that may cause data loss (e.g. field/type removal) */
161
+ hasWarnings: boolean;
162
+ /** List of non-breaking warnings */
163
+ warnings: WarningChangeInfo[];
164
+ /** Whether a migration script is required to handle data migration */
165
+ requiresMigrationScript: boolean;
166
+ }
167
+ /**
168
+ * Breaking change information in migration diff
169
+ */
170
+ interface BreakingChangeInfo {
171
+ typeName: string;
172
+ fieldName?: string;
173
+ reason: string;
174
+ /** If true, this change is not supported and migration generation will fail */
175
+ unsupported?: boolean;
176
+ /** If true, show 3-step migration instructions for this unsupported change */
177
+ showThreeStepHint?: boolean;
178
+ }
179
+ /**
180
+ * Warning change information in migration diff.
181
+ *
182
+ * Warnings are non-breaking changes that may still cause data loss
183
+ * (e.g. removing a field or type). Unlike breaking changes, a migration
184
+ * script is not required, but writing one is recommended if you need to
185
+ * preserve or transform data before the change applies.
186
+ */
187
+ interface WarningChangeInfo {
188
+ typeName: string;
189
+ fieldName?: string;
190
+ reason: string;
191
+ }
192
+ /**
193
+ * Check if a migration diff has any changes
194
+ * @param {MigrationDiff} diff - Migration diff to check
195
+ * @returns {boolean} True if diff has changes
196
+ */
197
+ declare function hasChanges(diff: MigrationDiff): boolean;
198
+ /**
199
+ * Format a migration diff for display
200
+ * @param {MigrationDiff} diff - Migration diff to format
201
+ * @returns {string} Formatted diff string
202
+ */
203
+ declare function formatMigrationDiff(diff: MigrationDiff): string;
204
+ /**
205
+ * Format a summary of the migration diff
206
+ * @param {MigrationDiff} diff - Migration diff to summarize
207
+ * @returns {string} Formatted summary string
208
+ */
209
+ declare function formatDiffSummary(diff: MigrationDiff): string;
210
+ //#endregion
211
+ export { BreakingChangeInfo, DiffChange, FieldAddedChange, FieldModifiedChange, FieldRemovedChange, FileAddedChange, FileModifiedChange, FileRemovedChange, IndexAddedChange, IndexModifiedChange, IndexRemovedChange, MigrationDiff, PermissionModifiedChange, RelationshipAddedChange, RelationshipModifiedChange, RelationshipRemovedChange, SnapshotPermissionState, TypeAddedChange, TypeModifiedChange, TypeRemovedChange, TypeSettingsPatch, WarningChangeInfo, formatDiffSummary, formatMigrationDiff, hasChanges };
@@ -0,0 +1,17 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/cli/commands/tailordb/migrate/generate.d.ts
4
+ interface GenerateOptions {
5
+ configPath?: string;
6
+ name?: string;
7
+ yes?: boolean;
8
+ init?: boolean;
9
+ }
10
+ /**
11
+ * Generate migration files for TailorDB schema changes
12
+ * @param {GenerateOptions} options - Generation options
13
+ * @returns {Promise<void>} Promise that resolves when generation is complete
14
+ */
15
+ declare function generate(options: GenerateOptions): Promise<void>;
16
+ //#endregion
17
+ export { GenerateOptions, generate };
@@ -0,0 +1,202 @@
1
+ //#region src/cli/commands/tailordb/migrate/snapshot-types.d.ts
2
+ /**
3
+ * Schema snapshot data model for TailorDB migrations.
4
+ *
5
+ * Leaf module: these types describe the persisted snapshot format
6
+ * (XXXX/schema.json) and are shared by snapshot.ts (snapshot management)
7
+ * and diff-calculator.ts (diff types and formatting) without creating
8
+ * import cycles between them.
9
+ */
10
+ /**
11
+ * Hook configuration in schema snapshot
12
+ */
13
+ interface SnapshotHook {
14
+ expr: string;
15
+ }
16
+ /**
17
+ * Validation configuration in schema snapshot
18
+ */
19
+ interface SnapshotValidation {
20
+ script?: {
21
+ expr: string;
22
+ };
23
+ errorMessage: string;
24
+ }
25
+ /**
26
+ * Serial configuration in schema snapshot
27
+ */
28
+ interface SnapshotSerial {
29
+ start: number;
30
+ maxValue?: number;
31
+ format?: string;
32
+ }
33
+ /**
34
+ * Enum value with optional description in schema snapshot
35
+ */
36
+ interface SnapshotEnumValue {
37
+ value: string;
38
+ description?: string;
39
+ }
40
+ /**
41
+ * Field configuration in schema snapshot
42
+ */
43
+ interface SnapshotFieldConfig {
44
+ type: string;
45
+ required: boolean;
46
+ array?: boolean;
47
+ index?: boolean;
48
+ unique?: boolean;
49
+ allowedValues?: SnapshotEnumValue[];
50
+ foreignKey?: boolean;
51
+ foreignKeyType?: string;
52
+ foreignKeyField?: string;
53
+ description?: string;
54
+ vector?: boolean;
55
+ hooks?: {
56
+ create?: SnapshotHook;
57
+ update?: SnapshotHook;
58
+ };
59
+ validate?: SnapshotValidation[];
60
+ serial?: SnapshotSerial;
61
+ scale?: number;
62
+ /** Nested fields (recursive) */
63
+ fields?: Record<string, SnapshotFieldConfig>;
64
+ }
65
+ /**
66
+ * Index configuration in schema snapshot
67
+ */
68
+ interface SnapshotIndexConfig {
69
+ fields: string[];
70
+ unique?: boolean;
71
+ }
72
+ /**
73
+ * Relationship configuration in schema snapshot
74
+ */
75
+ interface SnapshotRelationship {
76
+ targetType: string;
77
+ targetField: string;
78
+ sourceField: string;
79
+ isArray: boolean;
80
+ description: string;
81
+ }
82
+ /**
83
+ * Field-reference operand in a permission condition. Always an object with
84
+ * exactly one of `user` / `record` / `newRecord` / `oldRecord` keys.
85
+ */
86
+ type SnapshotFieldRefOperand = {
87
+ user: string;
88
+ } | {
89
+ record: string;
90
+ } | {
91
+ newRecord: string;
92
+ } | {
93
+ oldRecord: string;
94
+ };
95
+ /**
96
+ * Literal value operand (right-hand side of a permission condition). Matches
97
+ * the SDK-level value operand surface — primitives and their arrays — as
98
+ * defined in the Zod parser schema (RecordPermissionOperandSchema /
99
+ * GqlPermissionOperandSchema in parser/service/tailordb/schema.ts).
100
+ */
101
+ type SnapshotValueOperand = string | boolean | string[] | boolean[];
102
+ /**
103
+ * Permission operand union. Either a field-ref object or a literal value.
104
+ */
105
+ type SnapshotPermissionOperand = SnapshotFieldRefOperand | SnapshotValueOperand;
106
+ /**
107
+ * Permission operators
108
+ */
109
+ type SnapshotPermissionOperator = "eq" | "ne" | "in" | "nin" | "hasAny" | "nhasAny";
110
+ /**
111
+ * Permission condition tuple
112
+ */
113
+ type SnapshotPermissionCondition = readonly [SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotPermissionOperand];
114
+ /**
115
+ * Action permission policy
116
+ */
117
+ interface SnapshotActionPermission {
118
+ conditions: readonly SnapshotPermissionCondition[];
119
+ description?: string;
120
+ permit: "allow" | "deny";
121
+ }
122
+ /**
123
+ * Record-level permission configuration
124
+ */
125
+ interface SnapshotRecordPermission {
126
+ create: readonly SnapshotActionPermission[];
127
+ read: readonly SnapshotActionPermission[];
128
+ update: readonly SnapshotActionPermission[];
129
+ delete: readonly SnapshotActionPermission[];
130
+ }
131
+ /**
132
+ * GQL permission actions
133
+ */
134
+ type SnapshotGqlAction = "read" | "create" | "update" | "delete" | "aggregate" | "bulkUpsert" | "all";
135
+ /**
136
+ * GQL permission policy
137
+ */
138
+ interface SnapshotGqlPermissionPolicy {
139
+ conditions: readonly SnapshotPermissionCondition[];
140
+ actions: readonly SnapshotGqlAction[];
141
+ permit: "allow" | "deny";
142
+ description?: string;
143
+ }
144
+ /**
145
+ * GQL permission configuration
146
+ */
147
+ type SnapshotGqlPermission = readonly SnapshotGqlPermissionPolicy[];
148
+ /**
149
+ * Type definition in schema snapshot.
150
+ * `pluralForm` is always materialized — either set by the SDK user, derived
151
+ * via inflection at snapshot construction, or backfilled when loading legacy
152
+ * snapshots in `loadSnapshot`.
153
+ */
154
+ interface TailorDBSnapshotType {
155
+ name: string;
156
+ pluralForm: string;
157
+ description?: string;
158
+ fields: Record<string, SnapshotFieldConfig>;
159
+ settings?: {
160
+ aggregation?: boolean;
161
+ bulkUpsert?: boolean;
162
+ gqlOperations?: {
163
+ create?: boolean;
164
+ update?: boolean;
165
+ delete?: boolean;
166
+ read?: boolean;
167
+ };
168
+ publishEvents?: boolean;
169
+ };
170
+ indexes?: Record<string, SnapshotIndexConfig>;
171
+ files?: Record<string, string>;
172
+ forwardRelationships?: Record<string, SnapshotRelationship>;
173
+ backwardRelationships?: Record<string, SnapshotRelationship>;
174
+ permissions?: {
175
+ record?: SnapshotRecordPermission;
176
+ gql?: SnapshotGqlPermission;
177
+ };
178
+ }
179
+ /**
180
+ * Schema snapshot - full schema state at a point in time.
181
+ * Stored as XXXX/schema.json. Defined here (leaf module) so that
182
+ * snapshot-schema.ts can reference it without importing snapshot.ts.
183
+ */
184
+ interface SchemaSnapshot {
185
+ /** Format version for future compatibility */
186
+ version: number;
187
+ namespace: string;
188
+ createdAt: string;
189
+ types: Record<string, TailorDBSnapshotType>;
190
+ }
191
+ declare const normalizedSchemaSnapshotBrand: unique symbol;
192
+ /**
193
+ * Schema snapshot normalized to a canonical form for consistent comparison.
194
+ *
195
+ * Returned by snapshot creation and loading functions so drift detection stays
196
+ * stable when local definitions omit defaults that the platform materializes.
197
+ */
198
+ type NormalizedSchemaSnapshot = SchemaSnapshot & {
199
+ readonly [normalizedSchemaSnapshotBrand]: true;
200
+ };
201
+ //#endregion
202
+ export { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotActionPermission, SnapshotEnumValue, SnapshotFieldConfig, SnapshotFieldRefOperand, SnapshotGqlAction, SnapshotGqlPermission, SnapshotGqlPermissionPolicy, SnapshotHook, SnapshotIndexConfig, SnapshotPermissionCondition, SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotRecordPermission, SnapshotRelationship, SnapshotSerial, SnapshotValidation, SnapshotValueOperand, TailorDBSnapshotType };
@@ -0,0 +1,113 @@
1
+ import { TailorDBType } from "../../../../parser/service/tailordb/types.mjs";
2
+ import { NormalizedSchemaSnapshot, SchemaSnapshot, SnapshotActionPermission, SnapshotEnumValue, SnapshotFieldConfig, SnapshotFieldRefOperand, SnapshotGqlAction, SnapshotGqlPermission, SnapshotGqlPermissionPolicy, SnapshotHook, SnapshotIndexConfig, SnapshotPermissionCondition, SnapshotPermissionOperand, SnapshotPermissionOperator, SnapshotRecordPermission, SnapshotRelationship, SnapshotSerial, SnapshotValidation, SnapshotValueOperand, TailorDBSnapshotType } from "./snapshot-types.mjs";
3
+ import { MigrationDiff } from "./diff-calculator.mjs";
4
+
5
+ //#region src/cli/commands/tailordb/migrate/snapshot.d.ts
6
+ /**
7
+ * Initial schema migration number (0000)
8
+ */
9
+ declare const INITIAL_SCHEMA_NUMBER = 0;
10
+ /**
11
+ * Migration file names (used within migration directories)
12
+ */
13
+ declare const SCHEMA_FILE_NAME = "schema.json";
14
+ /** File name for migration diff metadata. */
15
+ declare const DIFF_FILE_NAME = "diff.json";
16
+ /** File name for migration script. */
17
+ declare const MIGRATE_FILE_NAME = "migrate.ts";
18
+ /** File name for generated DB type definitions. */
19
+ declare const DB_TYPES_FILE_NAME = "db.ts";
20
+ /**
21
+ * Migration file type
22
+ */
23
+ type MigrationFileType = "schema" | "diff" | "migrate" | "db";
24
+ /**
25
+ * Information about a migration
26
+ */
27
+ interface MigrationInfo {
28
+ /** Migration number (e.g., 1, 2, 3) */
29
+ number: number;
30
+ /** Migration number as 4-digit string (e.g., "0001", "0002") */
31
+ numberStr: string;
32
+ /** Migration file type */
33
+ type: MigrationFileType;
34
+ /** Path to migration file */
35
+ path: string;
36
+ /** Parsed content (schema snapshot or diff) */
37
+ content: SchemaSnapshot | MigrationDiff;
38
+ }
39
+ /**
40
+ * Get migration directory path for a given number
41
+ * @param {string} migrationsDir - Base migrations directory path
42
+ * @param {number} num - Migration number
43
+ * @returns {string} Full directory path for the migration
44
+ */
45
+ declare function getMigrationDirPath(migrationsDir: string, num: number): string;
46
+ /**
47
+ * Get migration file path for a given number and type
48
+ * @param {string} migrationsDir - Migrations directory path
49
+ * @param {number} num - Migration number
50
+ * @param {MigrationFileType} type - File type
51
+ * @returns {string} Full file path
52
+ */
53
+ declare function getMigrationFilePath(migrationsDir: string, num: number, type: MigrationFileType): string;
54
+ /**
55
+ * Create a schema snapshot from local type definitions
56
+ * @param {Record<string, TailorDBType>} types - Local type definitions
57
+ * @param {string} namespace - Namespace for the snapshot
58
+ * @returns {NormalizedSchemaSnapshot} Normalized schema snapshot
59
+ */
60
+ declare function createSnapshotFromLocalTypes(types: Record<string, TailorDBType>, namespace: string): NormalizedSchemaSnapshot;
61
+ /**
62
+ * Get all migration directories and their files, sorted by number
63
+ * @param {string} migrationsDir - Migrations directory path
64
+ * @returns {Array<{number: number, type: "schema" | "diff", path: string}>} Migration files sorted by number
65
+ */
66
+ declare function getMigrationFiles(migrationsDir: string): {
67
+ number: number;
68
+ type: "schema" | "diff";
69
+ path: string;
70
+ }[];
71
+ /**
72
+ * Get the next migration number for a directory
73
+ * Returns INITIAL_SCHEMA_NUMBER (0) if no migrations exist
74
+ * @param {string} migrationsDir - Migrations directory path
75
+ * @returns {number} Next migration number
76
+ */
77
+ declare function getNextMigrationNumber(migrationsDir: string): number;
78
+ /**
79
+ * Reconstruct the latest schema snapshot from all migration files
80
+ * Returns null if no migrations exist
81
+ * @param {string} migrationsDir - Migrations directory path
82
+ * @param {number} [maxVersion] - Optional maximum migration version to apply
83
+ * @returns {NormalizedSchemaSnapshot | null} Reconstructed normalized snapshot or null if no migrations exist
84
+ */
85
+ declare function reconstructSnapshotFromMigrations(migrationsDir: string, maxVersion?: number): NormalizedSchemaSnapshot | null;
86
+ /**
87
+ * Get the latest migration number from a directory
88
+ * Returns 0 if no migrations exist
89
+ * @param {string} migrationsDir - Migrations directory path
90
+ * @returns {number} Latest migration number or 0 if no migrations exist
91
+ */
92
+ declare function getLatestMigrationNumber(migrationsDir: string): number;
93
+ /**
94
+ * Compare two snapshots and generate a diff
95
+ * @param {SchemaSnapshot} previous - Previous schema snapshot
96
+ * @param {SchemaSnapshot} current - Current schema snapshot
97
+ * @returns {MigrationDiff} Migration diff between snapshots
98
+ */
99
+ declare function compareSnapshots(previous: SchemaSnapshot, current: SchemaSnapshot): MigrationDiff;
100
+ /**
101
+ * Compare a snapshot against canonical TailorDBSnapshotType-shaped local types.
102
+ * Callers are expected to pre-convert TailorDBService.types to TailorDBSnapshotType via
103
+ * `createSnapshotType`. As a safety net, `compareSnapshots` re-runs idempotent
104
+ * normalization on both sides, so a caller that forgets will still get correct
105
+ * comparisons (no silent false drift).
106
+ * @param {SchemaSnapshot} snapshot - Schema snapshot to compare against
107
+ * @param {Record<string, TailorDBSnapshotType>} localTypes - Local snapshot-shaped types
108
+ * @param {string} namespace - Namespace for comparison
109
+ * @returns {MigrationDiff} Migration diff
110
+ */
111
+ declare function compareLocalTypesWithSnapshot(snapshot: SchemaSnapshot, localTypes: Record<string, TailorDBSnapshotType>, namespace: string): MigrationDiff;
112
+ //#endregion
113
+ export { DB_TYPES_FILE_NAME, DIFF_FILE_NAME, INITIAL_SCHEMA_NUMBER, MIGRATE_FILE_NAME, MigrationFileType, MigrationInfo, type NormalizedSchemaSnapshot, SCHEMA_FILE_NAME, type SchemaSnapshot, type SnapshotFieldConfig, type TailorDBSnapshotType, compareLocalTypesWithSnapshot, compareSnapshots, createSnapshotFromLocalTypes, getLatestMigrationNumber, getMigrationDirPath, getMigrationFilePath, getMigrationFiles, getNextMigrationNumber, reconstructSnapshotFromMigrations };
@@ -0,0 +1,7 @@
1
+ //#region src/cli/commands/tailordb/migrate/types.d.ts
2
+ /**
3
+ * Label key for storing migration state in TailorDB Service metadata
4
+ */
5
+ declare const MIGRATION_LABEL_KEY = "sdk-migration";
6
+ //#endregion
7
+ export { MIGRATION_LABEL_KEY };
@@ -0,0 +1,19 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/cli/commands/tailordb/truncate.d.ts
4
+ interface TruncateOptions {
5
+ workspaceId?: string;
6
+ profile?: string;
7
+ configPath?: string;
8
+ all?: boolean;
9
+ namespace?: string;
10
+ types?: string[];
11
+ }
12
+ /**
13
+ * Truncate TailorDB data based on the given options.
14
+ * @param options - Truncate options (all, namespace, or types)
15
+ * @returns Promise that resolves when truncation completes
16
+ */
17
+ declare function truncate(options?: TruncateOptions): Promise<void>;
18
+ //#endregion
19
+ export { TruncateOptions, truncate };
@@ -0,0 +1,75 @@
1
+ import { Order } from "../../shared/args.mjs";
2
+ import { WorkflowExecutionInfo, WorkflowJobExecutionInfo } from "./transform.mjs";
3
+ import { WorkflowWaitUntil } from "./status.mjs";
4
+ import { WorkflowWaitResult } from "./waiter.mjs";
5
+ import { z } from "zod";
6
+
7
+ //#region src/cli/commands/workflow/executions.d.ts
8
+ type WorkflowLike = {
9
+ name: string;
10
+ };
11
+ type ListWorkflowExecutionsTypedOptions<W extends WorkflowLike = WorkflowLike> = {
12
+ workflow?: W;
13
+ status?: string;
14
+ workspaceId?: string;
15
+ profile?: string;
16
+ order?: Order;
17
+ limit?: number;
18
+ };
19
+ /**
20
+ * @deprecated Use ListWorkflowExecutionsTypedOptions instead.
21
+ */
22
+ interface ListWorkflowExecutionsOptions {
23
+ workspaceId?: string;
24
+ profile?: string;
25
+ workflowName?: string;
26
+ status?: string;
27
+ order?: Order;
28
+ limit?: number;
29
+ }
30
+ interface GetWorkflowExecutionOptions {
31
+ executionId: string;
32
+ workspaceId?: string;
33
+ profile?: string;
34
+ interval?: number;
35
+ timeout?: number;
36
+ until?: WorkflowWaitUntil;
37
+ logs?: boolean;
38
+ }
39
+ interface WorkflowExecutionDetailInfo extends WorkflowExecutionInfo {
40
+ jobDetails?: (WorkflowJobExecutionInfo & {
41
+ logs?: string;
42
+ result?: string;
43
+ })[];
44
+ }
45
+ interface WorkflowExecutionWaitInfo extends WorkflowExecutionDetailInfo {
46
+ statusClass: WorkflowWaitResult["statusClass"];
47
+ elapsedMs: number;
48
+ attempts: number;
49
+ timedOut: boolean;
50
+ lastError: string | null;
51
+ }
52
+ interface GetWorkflowExecutionResult {
53
+ execution: WorkflowExecutionDetailInfo;
54
+ wait: () => Promise<WorkflowExecutionWaitInfo>;
55
+ }
56
+ /**
57
+ * List workflow executions with optional filters.
58
+ *
59
+ * Returns at most `options.limit` items. When `limit` is omitted or 0 the
60
+ * function pages through every execution. The CLI caps this at 50 by
61
+ * default via `pagedLogArgs`; programmatic callers that want the same
62
+ * cap should pass `limit: 50` explicitly.
63
+ * @param options - Workflow execution listing options
64
+ * @returns List of workflow executions
65
+ */
66
+ declare function listWorkflowExecutions<W extends WorkflowLike>(options?: ListWorkflowExecutionsTypedOptions<W>): Promise<WorkflowExecutionInfo[]>;
67
+ declare function listWorkflowExecutions(options?: ListWorkflowExecutionsOptions): Promise<WorkflowExecutionInfo[]>;
68
+ /**
69
+ * Get a single workflow execution with optional logs.
70
+ * @param options - Workflow execution lookup options
71
+ * @returns Workflow execution with optional logs
72
+ */
73
+ declare function getWorkflowExecution(options: GetWorkflowExecutionOptions): Promise<GetWorkflowExecutionResult>;
74
+ //#endregion
75
+ export { GetWorkflowExecutionOptions, GetWorkflowExecutionResult, ListWorkflowExecutionsOptions, ListWorkflowExecutionsTypedOptions, WorkflowExecutionDetailInfo, WorkflowExecutionWaitInfo, getWorkflowExecution, listWorkflowExecutions };
@@ -0,0 +1,29 @@
1
+ import { WorkflowInfo } from "./transform.mjs";
2
+ import { z } from "zod";
3
+
4
+ //#region src/cli/commands/workflow/get.d.ts
5
+ type WorkflowLike = {
6
+ name: string;
7
+ };
8
+ type GetWorkflowTypedOptions<W extends WorkflowLike = WorkflowLike> = {
9
+ workflow: W;
10
+ workspaceId?: string;
11
+ profile?: string;
12
+ };
13
+ /**
14
+ * @deprecated Use GetWorkflowTypedOptions instead.
15
+ */
16
+ interface GetWorkflowOptions {
17
+ name: string;
18
+ workspaceId?: string;
19
+ profile?: string;
20
+ }
21
+ /**
22
+ * Get a workflow by name and return CLI-friendly info.
23
+ * @param options - Workflow lookup options
24
+ * @returns Workflow information
25
+ */
26
+ declare function getWorkflow<W extends WorkflowLike>(options: GetWorkflowTypedOptions<W>): Promise<WorkflowInfo>;
27
+ declare function getWorkflow(options: GetWorkflowOptions): Promise<WorkflowInfo>;
28
+ //#endregion
29
+ export { GetWorkflowOptions, GetWorkflowTypedOptions, getWorkflow };