@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,15 +1,14 @@
1
-
2
- import { t as db } from "./schema-C4fkpWV_.mjs";
3
- import { $ as CreateUserProfileConfigRequestSchema, A as UpdatePipelineServiceRequestSchema, At as Condition_Operator, B as UpdateExecutorExecutorRequestSchema, Ct as UserProfileProviderConfig_UserProfileProviderType, D as CreatePipelineResolverRequestSchema, Dt as ApplicationSchemaUpdateAttemptStatus, E as UpdateSecretManagerSecretRequestSchema, Et as UpdateApplicationRequestSchema, F as IdPPermissionOperator, G as CreateAuthHookRequestSchema, H as ExecutorTargetType, I as IdPPermissionPermit, J as CreateAuthOAuth2ClientRequestSchema, K as CreateAuthIDPConfigRequestSchema, L as FunctionExecution_Status, M as CreateIdPServiceRequestSchema, Mt as PageDirection, N as UpdateIdPServiceRequestSchema, O as CreatePipelineServiceRequestSchema, Ot as Subgraph_ServiceType, P as IdPLang, Q as CreateTenantConfigRequestSchema, S as UpdateStaticWebsiteRequestSchema, St as TenantProviderConfig_TenantProviderType, T as CreateSecretManagerVaultRequestSchema, Tt as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, U as ExecutorTriggerType, V as ExecutorJobStatus, W as CreateAuthConnectionRequestSchema, X as CreateAuthSCIMResourceRequestSchema, Y as CreateAuthSCIMConfigRequestSchema, Z as CreateAuthServiceRequestSchema, _ as TailorDBType_Permission_Operator, _t as AuthSCIMAttribute_Mutability, a as WorkspacePlatformUserRole, at as UpdateAuthSCIMConfigRequestSchema, b as AddCustomDomainRequestSchema, bt as AuthSCIMConfig_AuthorizationType, c as UpdateWorkflowRequestSchema, ct as UpdateTenantConfigRequestSchema, d as CreateTailorDBServiceRequestSchema, dt as AuthConnection_Type, et as UpdateAuthConnectionRequestSchema, f as CreateTailorDBTypeRequestSchema, ft as AuthHookPoint, g as TailorDBGQLPermission_Permit, gt as AuthOAuth2Client_GrantType, h as TailorDBGQLPermission_Operator, ht as AuthOAuth2Client_ClientType, it as UpdateAuthOAuth2ClientRequestSchema, j as PipelineResolver_OperationType, jt as FilterSchema, k as UpdatePipelineResolverRequestSchema, kt as ConditionSchema, l as WorkflowExecution_Status, lt as UpdateUserProfileConfigRequestSchema, m as TailorDBGQLPermission_Action, mt as AuthInvokerSchema, nt as UpdateAuthIDPConfigRequestSchema, o as CreateWorkflowJobFunctionRequestSchema, ot as UpdateAuthSCIMResourceRequestSchema, p as UpdateTailorDBTypeRequestSchema, pt as AuthIDPConfig_AuthType, q as CreateAuthMachineUserRequestSchema, rt as UpdateAuthMachineUserRequestSchema, s as CreateWorkflowRequestSchema, st as UpdateAuthServiceRequestSchema, t as OperatorService, tt as UpdateAuthHookRequestSchema, u as WorkflowJobExecution_Status, ut as AuthConnection_Status, v as TailorDBType_Permission_Permit, vt as AuthSCIMAttribute_Type, w as CreateSecretManagerSecretRequestSchema, wt as CreateApplicationRequestSchema, x as CreateStaticWebsiteRequestSchema, y as TailorDBType_PermitAction, yt as AuthSCIMAttribute_Uniqueness, z as CreateExecutorExecutorRequestSchema } from "./service_pb-BsBR6yW5.mjs";
4
- import { t as assertDefined } from "./assert-CKfwrmCV.mjs";
5
- import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-DKF-JsAK.mjs";
6
- import { $ as initOperatorClient, A as loadAccessToken, G as fetchMachineUserToken, I as loadWorkspaceId, K as fetchPaged, L as platformConfigFromProfile, N as loadMachineUserName, P as loadPlatformClientConfig, R as readPlatformConfig, S as getDistDir, T as loadConfig, V as writePlatformConfig, W as fetchAll, X as getOAuth2ClientId, Y as getConsoleBaseUrl, Z as getPlatformBaseUrl, b as hasGenerationHooks, d as assertUniqueLocalTailorDBTypeNames, et as isDefaultPlatform, f as assertUniqueTailorDBTypeNamesWithExternal, h as platformBundleDefinePlugin, j as loadConfigPath, k as hasUserTokenEntry, l as buildExecutorArgsExpr, m as stringifyFunction, n as generatePluginFilesIfNeeded, nt as byName, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, tt as resolveStaticWebsiteUrls, u as buildResolverOperationHookExpr, w as hashFile, x as createBundleCache, y as getPluginGenerationDependencies } from "./application-DmjIKQ-a.mjs";
7
- import { o as loadFilesWithIgnores, t as createExecutorService } from "./service-B2Jd9CxS.mjs";
8
- import { t as multiline } from "./multiline-Cf9ODpr1.mjs";
9
- import { t as readPackageJson } from "./package-json-DcQApfPQ.mjs";
10
- import { i as userAgent } from "./secret-file-eB3R3Fil.mjs";
11
- import { n as isCLIError, t as createCLIError } from "./errors-EsY4XO6O.mjs";
12
- import { r as withSpan } from "./telemetry-BQbbVo2t.mjs";
1
+ import { t as db } from "./schema-DAdZSFOd.mjs";
2
+ import { $ as CreateUserProfileConfigRequestSchema, A as UpdatePipelineServiceRequestSchema, At as Condition_Operator, B as UpdateExecutorExecutorRequestSchema, Ct as UserProfileProviderConfig_UserProfileProviderType, D as CreatePipelineResolverRequestSchema, Dt as ApplicationSchemaUpdateAttemptStatus, E as UpdateSecretManagerSecretRequestSchema, Et as UpdateApplicationRequestSchema, F as IdPPermissionOperator, G as CreateAuthHookRequestSchema, H as ExecutorTargetType, I as IdPPermissionPermit, J as CreateAuthOAuth2ClientRequestSchema, K as CreateAuthIDPConfigRequestSchema, L as FunctionExecution_Status, M as CreateIdPServiceRequestSchema, Mt as PageDirection, N as UpdateIdPServiceRequestSchema, O as CreatePipelineServiceRequestSchema, Ot as Subgraph_ServiceType, P as IdPLang, Q as CreateTenantConfigRequestSchema, S as UpdateStaticWebsiteRequestSchema, St as TenantProviderConfig_TenantProviderType, T as CreateSecretManagerVaultRequestSchema, Tt as GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus, U as ExecutorTriggerType, V as ExecutorJobStatus, W as CreateAuthConnectionRequestSchema, X as CreateAuthSCIMResourceRequestSchema, Y as CreateAuthSCIMConfigRequestSchema, Z as CreateAuthServiceRequestSchema, _ as TailorDBType_Permission_Operator, _t as AuthSCIMAttribute_Mutability, a as WorkspacePlatformUserRole, at as UpdateAuthSCIMConfigRequestSchema, b as AddCustomDomainRequestSchema, bt as AuthSCIMConfig_AuthorizationType, c as UpdateWorkflowRequestSchema, ct as UpdateTenantConfigRequestSchema, d as CreateTailorDBServiceRequestSchema, dt as AuthConnection_Type, et as UpdateAuthConnectionRequestSchema, f as CreateTailorDBTypeRequestSchema, ft as AuthHookPoint, g as TailorDBGQLPermission_Permit, gt as AuthOAuth2Client_GrantType, h as TailorDBGQLPermission_Operator, ht as AuthOAuth2Client_ClientType, it as UpdateAuthOAuth2ClientRequestSchema, j as PipelineResolver_OperationType, jt as FilterSchema, k as UpdatePipelineResolverRequestSchema, kt as ConditionSchema, l as WorkflowExecution_Status, lt as UpdateUserProfileConfigRequestSchema, m as TailorDBGQLPermission_Action, mt as AuthInvokerSchema, nt as UpdateAuthIDPConfigRequestSchema, o as CreateWorkflowJobFunctionRequestSchema, ot as UpdateAuthSCIMResourceRequestSchema, p as UpdateTailorDBTypeRequestSchema, pt as AuthIDPConfig_AuthType, q as CreateAuthMachineUserRequestSchema, rt as UpdateAuthMachineUserRequestSchema, s as CreateWorkflowRequestSchema, st as UpdateAuthServiceRequestSchema, t as OperatorService, tt as UpdateAuthHookRequestSchema, u as WorkflowJobExecution_Status, ut as AuthConnection_Status, v as TailorDBType_Permission_Permit, vt as AuthSCIMAttribute_Type, w as CreateSecretManagerSecretRequestSchema, wt as CreateApplicationRequestSchema, x as CreateStaticWebsiteRequestSchema, y as TailorDBType_PermitAction, yt as AuthSCIMAttribute_Uniqueness, z as CreateExecutorExecutorRequestSchema } from "./service_pb-CIrhGwHk.mjs";
3
+ import { t as assertDefined } from "./assert-DBxo8jPo.mjs";
4
+ import { a as parseBoolean, i as symbols, n as logger, r as styles, t as CIPromptError } from "./logger-BEiZZ3qT.mjs";
5
+ import { $ as initOperatorClient, A as loadAccessToken, G as fetchMachineUserToken, I as loadWorkspaceId, K as fetchPaged, L as platformConfigFromProfile, N as loadMachineUserName, P as loadPlatformClientConfig, R as readPlatformConfig, S as getDistDir, T as loadConfig, V as writePlatformConfig, W as fetchAll, X as getOAuth2ClientId, Y as getConsoleBaseUrl, Z as getPlatformBaseUrl, b as hasGenerationHooks, d as assertUniqueLocalTailorDBTypeNames, et as isDefaultPlatform, f as assertUniqueTailorDBTypeNamesWithExternal, h as platformBundleDefinePlugin, j as loadConfigPath, k as hasUserTokenEntry, l as buildExecutorArgsExpr, m as stringifyFunction, n as generatePluginFilesIfNeeded, nt as byName, p as TailorDBTypeSchema, r as loadApplication, s as HTTP_METHODS, t as defineApplication, tt as resolveStaticWebsiteUrls, u as buildResolverOperationHookExpr, w as hashFile, x as createBundleCache, y as getPluginGenerationDependencies } from "./application-Dxhdq_nu.mjs";
6
+ import { o as loadFilesWithIgnores, t as createExecutorService } from "./service-DiEtAsvc.mjs";
7
+ import { t as multiline } from "./multiline-sfHpTZZK.mjs";
8
+ import { t as readPackageJson } from "./package-json-8b0O9TlX.mjs";
9
+ import { i as userAgent } from "./secret-file-VSVGy1V0.mjs";
10
+ import { n as isCLIError, t as createCLIError } from "./errors-Dtf2WPaW.mjs";
11
+ import { r as withSpan } from "./telemetry-CdqJEzkj.mjs";
13
12
  import { arg, createDefineCommand, defineCommand, runCommand } from "politty";
14
13
  import { z } from "zod";
15
14
  import { ScalarType, create, fromJson, toJson } from "@bufbuild/protobuf";
@@ -1118,9 +1117,10 @@ function extractAttributesFromConfig(config) {
1118
1117
  * @param machineUserNames - Registered machine user names (used to narrow `authInvoker` strings)
1119
1118
  * @param idpNames - Registered IdP names (used to narrow `idpUser*Trigger({ idp })` strings)
1120
1119
  * @param connectionNames - Registered auth connection names (used to narrow `getConnectionToken()` strings)
1120
+ * @param aiGatewayNames - Registered AI Gateway names (used to narrow `aigateway.get()` strings)
1121
1121
  * @returns Generated type definition source
1122
1122
  */
1123
- function generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames, connectionNames) {
1123
+ function generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames, connectionNames, aiGatewayNames) {
1124
1124
  const mapFields = attributeMap ? Object.entries(attributeMap).map(([key, value]) => ` ${key}: ${value};`).join("\n") : "";
1125
1125
  const mapBody = !attributeMap || Object.keys(attributeMap).length === 0 ? "{}" : `{
1126
1126
  ${mapFields}
@@ -1144,6 +1144,10 @@ ${machineUserFields}
1144
1144
  ${idpNameFields}
1145
1145
  }`;
1146
1146
  const connectionNameFields = connectionNames?.length ? connectionNames.map((name) => ` ${isValidIdentifier(name) ? name : JSON.stringify(name)}: true;`).join("\n") : "";
1147
+ const connectionNameBody = !connectionNames || connectionNames.length === 0 ? "{}" : `{
1148
+ ${connectionNameFields}
1149
+ }`;
1150
+ const aiGatewayNameFields = aiGatewayNames?.length ? aiGatewayNames.map((name) => ` ${isValidIdentifier(name) ? name : JSON.stringify(name)}: true;`).join("\n") : "";
1147
1151
  return multiline`
1148
1152
  // This file is auto-generated by @tailor-platform/sdk
1149
1153
  // Do not edit this file manually
@@ -1155,8 +1159,9 @@ declare module "@tailor-platform/sdk" {
1155
1159
  interface Env ${envBody}
1156
1160
  interface MachineUserNameRegistry ${machineUserBody}
1157
1161
  interface IdpNameRegistry ${idpNameBody}
1158
- interface ConnectionNameRegistry ${!connectionNames || connectionNames.length === 0 ? "{}" : `{
1159
- ${connectionNameFields}
1162
+ interface ConnectionNameRegistry ${connectionNameBody}
1163
+ interface AIGatewayNameRegistry ${!aiGatewayNames || aiGatewayNames.length === 0 ? "{}" : `{
1164
+ ${aiGatewayNameFields}
1160
1165
  }`}
1161
1166
  }
1162
1167
 
@@ -1166,8 +1171,12 @@ export {};
1166
1171
  }
1167
1172
  function collectAttributesFromConfig(config) {
1168
1173
  const idpNames = config.idp?.length ? [...new Set(config.idp.map((idp) => idp.name))] : void 0;
1174
+ const aiGatewayNames = config.aiGateways?.length ? [...new Set(config.aiGateways.map((gateway) => gateway.name))] : void 0;
1169
1175
  const auth = config.auth;
1170
- if (!auth || typeof auth !== "object") return idpNames ? { idpNames } : {};
1176
+ if (!auth || typeof auth !== "object") return idpNames || aiGatewayNames ? {
1177
+ idpNames,
1178
+ aiGatewayNames
1179
+ } : {};
1171
1180
  const machineUsersObj = auth.machineUsers;
1172
1181
  const machineUserNames = machineUsersObj && typeof machineUsersObj === "object" ? Object.keys(machineUsersObj) : void 0;
1173
1182
  const connectionsObj = auth.connections;
@@ -1195,7 +1204,8 @@ function collectAttributesFromConfig(config) {
1195
1204
  attributeList,
1196
1205
  machineUserNames,
1197
1206
  idpNames,
1198
- connectionNames
1207
+ connectionNames,
1208
+ aiGatewayNames
1199
1209
  };
1200
1210
  }
1201
1211
  if ("machineUserAttributes" in auth) {
@@ -1203,7 +1213,8 @@ function collectAttributesFromConfig(config) {
1203
1213
  if (!machineUserAttributes) return {
1204
1214
  machineUserNames,
1205
1215
  idpNames,
1206
- connectionNames
1216
+ connectionNames,
1217
+ aiGatewayNames
1207
1218
  };
1208
1219
  return {
1209
1220
  attributeMap: Object.entries(machineUserAttributes).reduce((acc, [key, field]) => {
@@ -1212,13 +1223,15 @@ function collectAttributesFromConfig(config) {
1212
1223
  }, {}),
1213
1224
  machineUserNames,
1214
1225
  idpNames,
1215
- connectionNames
1226
+ connectionNames,
1227
+ aiGatewayNames
1216
1228
  };
1217
1229
  }
1218
1230
  return {
1219
1231
  machineUserNames,
1220
1232
  idpNames,
1221
- connectionNames
1233
+ connectionNames,
1234
+ aiGatewayNames
1222
1235
  };
1223
1236
  }
1224
1237
  /**
@@ -1243,16 +1256,17 @@ function resolveTypeDefinitionPath(configPath) {
1243
1256
  async function generateUserTypes(options) {
1244
1257
  const { config, configPath } = options;
1245
1258
  try {
1246
- const { attributeMap, attributeList, machineUserNames, idpNames, connectionNames } = extractAttributesFromConfig(config);
1259
+ const { attributeMap, attributeList, machineUserNames, idpNames, connectionNames, aiGatewayNames } = extractAttributesFromConfig(config);
1247
1260
  if (!attributeMap && !attributeList) logger.info("No attributes found in configuration", { mode: "plain" });
1248
1261
  if (attributeMap) logger.debug(`Extracted AttributeMap: ${JSON.stringify(attributeMap)}`);
1249
1262
  if (attributeList) logger.debug(`Extracted AttributeList: ${JSON.stringify(attributeList)}`);
1250
1263
  if (machineUserNames?.length) logger.debug(`Extracted MachineUserNames: ${JSON.stringify(machineUserNames)}`);
1251
1264
  if (idpNames?.length) logger.debug(`Extracted IdpNames: ${JSON.stringify(idpNames)}`);
1252
1265
  if (connectionNames?.length) logger.debug(`Extracted ConnectionNames: ${JSON.stringify(connectionNames)}`);
1266
+ if (aiGatewayNames?.length) logger.debug(`Extracted AIGatewayNames: ${JSON.stringify(aiGatewayNames)}`);
1253
1267
  const env = config.env;
1254
1268
  if (env) logger.debug(`Extracted Env: ${JSON.stringify(env)}`);
1255
- const typeDefContent = generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames, connectionNames);
1269
+ const typeDefContent = generateTypeDefinition(attributeMap, attributeList, env, machineUserNames, idpNames, connectionNames, aiGatewayNames);
1256
1270
  const outputPath = resolveTypeDefinitionPath(configPath);
1257
1271
  fs$1.mkdirSync(path.dirname(outputPath), { recursive: true });
1258
1272
  fs$1.writeFileSync(outputPath, typeDefContent);
@@ -1806,14 +1820,13 @@ async function buildMetaRequest(params) {
1806
1820
  * @template T
1807
1821
  * @param params - Resource fetch parameters
1808
1822
  * @param params.client - Operator client instance
1809
- * @param params.workspaceId - Workspace ID
1810
1823
  * @param params.fetchPage - Function that fetches one resource page
1811
1824
  * @param params.getName - Function that extracts the resource name
1812
1825
  * @param params.getTrn - Function that builds the resource TRN
1813
1826
  * @returns Existing resources keyed by resource name, with SDK labels attached
1814
1827
  */
1815
1828
  async function fetchExistingResourcesWithLabels(params) {
1816
- const { client, workspaceId, fetchPage, getName, getTrn } = params;
1829
+ const { client, fetchPage, getName, getTrn } = params;
1817
1830
  const withoutLabel = await fetchAll(async (pageToken, maxPageSize) => {
1818
1831
  try {
1819
1832
  return await fetchPage(pageToken, maxPageSize);
@@ -1826,7 +1839,7 @@ async function fetchExistingResourcesWithLabels(params) {
1826
1839
  await Promise.all(withoutLabel.map(async (resource) => {
1827
1840
  const name = getName(resource);
1828
1841
  if (!name) return;
1829
- const { metadata } = await client.getMetadata({ trn: getTrn(workspaceId, name) });
1842
+ const { metadata } = await client.getMetadata({ trn: getTrn(name) });
1830
1843
  existingResources[name] = {
1831
1844
  resource,
1832
1845
  label: metadata?.labels[sdkNameLabelKey],
@@ -1931,7 +1944,6 @@ async function planAIGateway(context) {
1931
1944
  const resourceOwners = /* @__PURE__ */ new Set();
1932
1945
  const existingGateways = await fetchExistingResourcesWithLabels({
1933
1946
  client,
1934
- workspaceId,
1935
1947
  fetchPage: async (pageToken, pageSize) => {
1936
1948
  const { aigateways, nextPageToken } = await client.listAIGateways({
1937
1949
  workspaceId,
@@ -1941,7 +1953,7 @@ async function planAIGateway(context) {
1941
1953
  return [aigateways, nextPageToken];
1942
1954
  },
1943
1955
  getName: (resource) => resource.name,
1944
- getTrn: (workspaceId, name) => resourceTrn(workspaceId, "aigateway", name)
1956
+ getTrn: (name) => resourceTrn(workspaceId, "aigateway", name)
1945
1957
  });
1946
1958
  const aiGatewayServices = forRemoval ? [] : application.aiGatewayServices;
1947
1959
  const expectedLocalWebsites = new Set(application.staticWebsiteServices.map((website) => website.name));
@@ -2726,8 +2738,9 @@ async function planFunctionRegistry(client, workspaceId, appName, appId, entries
2726
2738
  const conflicts = [];
2727
2739
  const unmanaged = [];
2728
2740
  const resourceOwners = /* @__PURE__ */ new Set();
2729
- const existingFunctions = await fetchAll(async (pageToken, maxPageSize) => {
2730
- try {
2741
+ const existingMap = await fetchExistingResourcesWithLabels({
2742
+ client,
2743
+ fetchPage: async (pageToken, maxPageSize) => {
2731
2744
  const response = await client.listFunctionRegistries({
2732
2745
  workspaceId,
2733
2746
  pageToken,
@@ -2737,20 +2750,10 @@ async function planFunctionRegistry(client, workspaceId, appName, appId, entries
2737
2750
  name: f.name,
2738
2751
  contentHash: f.contentHash
2739
2752
  })), response.nextPageToken];
2740
- } catch (error) {
2741
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
2742
- throw error;
2743
- }
2753
+ },
2754
+ getName: (func) => func.name,
2755
+ getTrn: (name) => resourceTrn(workspaceId, "function_registry", name)
2744
2756
  });
2745
- const existingMap = {};
2746
- await Promise.all(existingFunctions.map(async (func) => {
2747
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "function_registry", func.name) });
2748
- existingMap[func.name] = {
2749
- resource: func,
2750
- label: metadata?.labels[sdkNameLabelKey],
2751
- allLabels: metadata?.labels
2752
- };
2753
- }));
2754
2757
  for (const entry of entries) {
2755
2758
  const existing = existingMap[entry.name];
2756
2759
  const metaRequest = await buildMetaRequest({
@@ -3408,29 +3411,19 @@ async function planServices$3(client, workspaceId, appName, appId, idps, idpUser
3408
3411
  const conflicts = [];
3409
3412
  const unmanaged = [];
3410
3413
  const resourceOwners = /* @__PURE__ */ new Set();
3411
- const withoutLabel = await fetchAll(async (pageToken, maxPageSize) => {
3412
- try {
3414
+ const existingServices = await fetchExistingResourcesWithLabels({
3415
+ client,
3416
+ fetchPage: async (pageToken, maxPageSize) => {
3413
3417
  const { idpServices, nextPageToken } = await client.listIdPServices({
3414
3418
  workspaceId,
3415
3419
  pageToken,
3416
3420
  pageSize: maxPageSize
3417
3421
  });
3418
3422
  return [idpServices, nextPageToken];
3419
- } catch (error) {
3420
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
3421
- throw error;
3422
- }
3423
+ },
3424
+ getName: (resource) => resource.namespace?.name,
3425
+ getTrn: (name) => resourceTrn(workspaceId, "idp", name)
3423
3426
  });
3424
- const existingServices = {};
3425
- await Promise.all(withoutLabel.map(async (resource) => {
3426
- if (!resource.namespace?.name) return;
3427
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "idp", resource.namespace.name) });
3428
- existingServices[resource.namespace.name] = {
3429
- resource,
3430
- label: metadata?.labels[sdkNameLabelKey],
3431
- allLabels: metadata?.labels
3432
- };
3433
- }));
3434
3427
  for (const idp of idps) {
3435
3428
  const namespaceName = idp.name;
3436
3429
  const existing = existingServices[namespaceName];
@@ -3806,29 +3799,19 @@ async function planServices$2(client, workspaceId, appName, appId, auths, forceA
3806
3799
  const conflicts = [];
3807
3800
  const unmanaged = [];
3808
3801
  const resourceOwners = /* @__PURE__ */ new Set();
3809
- const withoutLabel = await fetchAll(async (pageToken, maxPageSize) => {
3810
- try {
3802
+ const existingServices = await fetchExistingResourcesWithLabels({
3803
+ client,
3804
+ fetchPage: async (pageToken, maxPageSize) => {
3811
3805
  const { authServices, nextPageToken } = await client.listAuthServices({
3812
3806
  workspaceId,
3813
3807
  pageToken,
3814
3808
  pageSize: maxPageSize
3815
3809
  });
3816
3810
  return [authServices, nextPageToken];
3817
- } catch (error) {
3818
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
3819
- throw error;
3820
- }
3811
+ },
3812
+ getName: (resource) => resource.namespace?.name,
3813
+ getTrn: (name) => resourceTrn(workspaceId, "auth", name)
3821
3814
  });
3822
- const existingServices = {};
3823
- await Promise.all(withoutLabel.map(async (resource) => {
3824
- if (!resource.namespace?.name) return;
3825
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "auth", resource.namespace.name) });
3826
- existingServices[resource.namespace.name] = {
3827
- resource,
3828
- label: metadata?.labels[sdkNameLabelKey],
3829
- allLabels: metadata?.labels
3830
- };
3831
- }));
3832
3815
  for (const auth of auths) {
3833
3816
  const { config } = auth;
3834
3817
  const existing = existingServices[config.name];
@@ -5159,7 +5142,6 @@ async function planExecutor(context) {
5159
5142
  const resourceOwners = /* @__PURE__ */ new Set();
5160
5143
  const existingExecutors = await fetchExistingResourcesWithLabels({
5161
5144
  client,
5162
- workspaceId,
5163
5145
  fetchPage: async (pageToken, pageSize) => {
5164
5146
  const { executors, nextPageToken } = await client.listExecutorExecutors({
5165
5147
  workspaceId,
@@ -5169,7 +5151,7 @@ async function planExecutor(context) {
5169
5151
  return [executors, nextPageToken];
5170
5152
  },
5171
5153
  getName: (resource) => resource.name,
5172
- getTrn: (workspaceId, name) => resourceTrn(workspaceId, "executor", name)
5154
+ getTrn: (name) => resourceTrn(workspaceId, "executor", name)
5173
5155
  });
5174
5156
  const executors = forRemoval ? {} : await application.executorService?.loadExecutors() ?? {};
5175
5157
  for (const executor of Object.values(executors)) {
@@ -5594,29 +5576,19 @@ async function planServices$1(client, workspaceId, appName, appId, pipelines) {
5594
5576
  const conflicts = [];
5595
5577
  const unmanaged = [];
5596
5578
  const resourceOwners = /* @__PURE__ */ new Set();
5597
- const withoutLabel = await fetchAll(async (pageToken, maxPageSize) => {
5598
- try {
5579
+ const existingServices = await fetchExistingResourcesWithLabels({
5580
+ client,
5581
+ fetchPage: async (pageToken, maxPageSize) => {
5599
5582
  const { pipelineServices, nextPageToken } = await client.listPipelineServices({
5600
5583
  workspaceId,
5601
5584
  pageToken,
5602
5585
  pageSize: maxPageSize
5603
5586
  });
5604
5587
  return [pipelineServices, nextPageToken];
5605
- } catch (error) {
5606
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
5607
- throw error;
5608
- }
5588
+ },
5589
+ getName: (resource) => resource.namespace?.name,
5590
+ getTrn: (name) => resourceTrn(workspaceId, "pipeline", name)
5609
5591
  });
5610
- const existingServices = {};
5611
- await Promise.all(withoutLabel.map(async (resource) => {
5612
- if (!resource.namespace?.name) return;
5613
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "pipeline", resource.namespace.name) });
5614
- existingServices[resource.namespace.name] = {
5615
- resource,
5616
- label: metadata?.labels[sdkNameLabelKey],
5617
- allLabels: metadata?.labels
5618
- };
5619
- }));
5620
5592
  for (const pipeline of pipelines) {
5621
5593
  const existing = existingServices[pipeline.namespace];
5622
5594
  const metaRequest = await buildMetaRequest({
@@ -5929,28 +5901,19 @@ async function planSecretManager(context) {
5929
5901
  const conflicts = [];
5930
5902
  const unmanaged = [];
5931
5903
  const resourceOwners = /* @__PURE__ */ new Set();
5932
- const existingVaultList = await fetchAll(async (pageToken, maxPageSize) => {
5933
- try {
5904
+ const existingVaults = await fetchExistingResourcesWithLabels({
5905
+ client,
5906
+ fetchPage: async (pageToken, maxPageSize) => {
5934
5907
  const { vaults, nextPageToken } = await client.listSecretManagerVaults({
5935
5908
  workspaceId,
5936
5909
  pageToken,
5937
5910
  pageSize: maxPageSize
5938
5911
  });
5939
5912
  return [vaults, nextPageToken];
5940
- } catch (error) {
5941
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
5942
- throw error;
5943
- }
5913
+ },
5914
+ getName: (resource) => resource.name,
5915
+ getTrn: (name) => resourceTrn(workspaceId, "vault", name)
5944
5916
  });
5945
- const existingVaults = {};
5946
- await Promise.all(existingVaultList.map(async (resource) => {
5947
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "vault", resource.name) });
5948
- existingVaults[resource.name] = {
5949
- resource,
5950
- label: metadata?.labels[sdkNameLabelKey],
5951
- allLabels: metadata?.labels
5952
- };
5953
- }));
5954
5917
  const state = loadSecretsState();
5955
5918
  const skippedSecrets = [];
5956
5919
  await Promise.all(secretVaults.map(async (vault) => {
@@ -6190,7 +6153,6 @@ async function planStaticWebsite(context) {
6190
6153
  const resourceOwners = /* @__PURE__ */ new Set();
6191
6154
  const existingWebsites = await fetchExistingResourcesWithLabels({
6192
6155
  client,
6193
- workspaceId,
6194
6156
  fetchPage: async (pageToken, pageSize) => {
6195
6157
  const { staticwebsites, nextPageToken } = await client.listStaticWebsites({
6196
6158
  workspaceId,
@@ -6200,7 +6162,7 @@ async function planStaticWebsite(context) {
6200
6162
  return [staticwebsites, nextPageToken];
6201
6163
  },
6202
6164
  getName: (resource) => resource.name,
6203
- getTrn: (workspaceId, name) => resourceTrn(workspaceId, "staticwebsite", name)
6165
+ getTrn: (name) => resourceTrn(workspaceId, "staticwebsite", name)
6204
6166
  });
6205
6167
  const ownedWebsiteNames = /* @__PURE__ */ new Set();
6206
6168
  const staticWebsiteServices = forRemoval ? [] : application.staticWebsiteServices;
@@ -9877,29 +9839,19 @@ async function planServices(client, workspaceId, appName, appId, tailordbs) {
9877
9839
  const conflicts = [];
9878
9840
  const unmanaged = [];
9879
9841
  const resourceOwners = /* @__PURE__ */ new Set();
9880
- const withoutLabel = await fetchAll(async (pageToken, maxPageSize) => {
9881
- try {
9842
+ const existingServices = await fetchExistingResourcesWithLabels({
9843
+ client,
9844
+ fetchPage: async (pageToken, maxPageSize) => {
9882
9845
  const { tailordbServices, nextPageToken } = await client.listTailorDBServices({
9883
9846
  workspaceId,
9884
9847
  pageToken,
9885
9848
  pageSize: maxPageSize
9886
9849
  });
9887
9850
  return [tailordbServices, nextPageToken];
9888
- } catch (error) {
9889
- if (error instanceof ConnectError && error.code === Code.NotFound) return [[], ""];
9890
- throw error;
9891
- }
9851
+ },
9852
+ getName: (resource) => resource.namespace?.name,
9853
+ getTrn: (name) => resourceTrn(workspaceId, "tailordb", name)
9892
9854
  });
9893
- const existingServices = {};
9894
- await Promise.all(withoutLabel.map(async (resource) => {
9895
- if (!resource.namespace?.name) return;
9896
- const { metadata } = await client.getMetadata({ trn: resourceTrn(workspaceId, "tailordb", resource.namespace.name) });
9897
- existingServices[resource.namespace.name] = {
9898
- resource,
9899
- label: metadata?.labels[sdkNameLabelKey],
9900
- allLabels: metadata?.labels
9901
- };
9902
- }));
9903
9855
  for (const tailordb of tailordbs) {
9904
9856
  const existing = existingServices[tailordb.namespace];
9905
9857
  const metaRequest = await buildMetaRequest({
@@ -10429,7 +10381,6 @@ async function planWorkflow(client, workspaceId, appName, appId, workflows, main
10429
10381
  const retainedWorkflowJobNames = /* @__PURE__ */ new Set();
10430
10382
  const existingWorkflows = await fetchExistingResourcesWithLabels({
10431
10383
  client,
10432
- workspaceId,
10433
10384
  fetchPage: async (pageToken, pageSize) => {
10434
10385
  const response = await client.listWorkflows({
10435
10386
  workspaceId,
@@ -10439,7 +10390,7 @@ async function planWorkflow(client, workspaceId, appName, appId, workflows, main
10439
10390
  return [response.workflows, response.nextPageToken];
10440
10391
  },
10441
10392
  getName: (resource) => resource.name,
10442
- getTrn: (workspaceId, name) => resourceTrn(workspaceId, "workflow", name)
10393
+ getTrn: (name) => resourceTrn(workspaceId, "workflow", name)
10443
10394
  });
10444
10395
  for (const workflow of Object.values(workflows)) {
10445
10396
  const existing = existingWorkflows[workflow.name];
@@ -16209,7 +16160,7 @@ async function generate(options) {
16209
16160
  if (options.init) await handleInitOption(namespacesWithMigrations, options.yes);
16210
16161
  let pluginManager;
16211
16162
  if (plugins.length > 0) pluginManager = new PluginManager(plugins);
16212
- const { defineApplication } = await import("./application-a_ApFuPh.mjs");
16163
+ const { defineApplication } = await import("./application-BhRnH42h.mjs");
16213
16164
  const application = defineApplication({
16214
16165
  config,
16215
16166
  pluginManager
@@ -18139,7 +18090,7 @@ async function runRepl(options) {
18139
18090
  const execute = await prepareQueryExecutor(options);
18140
18091
  const historyPath = getReplHistoryPath(options.engine, options.profile, options.workspaceId);
18141
18092
  const validate = createReplValidator(options.engine);
18142
- const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-DD5YP5mt.mjs");
18093
+ const { highlightSqlLine, highlightGraphqlLine, replTransform } = await import("./repl-editor-BmQOyZJd.mjs");
18143
18094
  const highlight = options.engine === "sql" ? highlightSqlLine : highlightGraphqlLine;
18144
18095
  const prompt = createPrompt({
18145
18096
  prefix: "",
@@ -18474,4 +18425,4 @@ function isDeno() {
18474
18425
 
18475
18426
  //#endregion
18476
18427
  export { getOrganization as $, generateAllTypeManifestsFromSnapshot as $t, listCommand$3 as A, apiCommand as An, getExecutorWaitFailureMessage as At, show as B, paginationArgs as Bn, listWorkflowExecutions as Bt, listCommand$2 as C, getNamespacesWithMigrations as Cn, listWebhookExecutors as Ct, waitWorkflowExecution as D, PluginManager as Dn, listCommand$9 as Dt, waitCommand as E, sdkNameLabelKey as En, triggerExecutor as Et, generateCommand as F, configArg as Fn, startWorkflow as Ft, removeCommand$1 as G, deploy as Gt, extractOwnedNamespaces as H, workspaceArgs as Hn, formatKeyValueTable as Ht, generateMigrationScript as I, confirmationArgs as In, getCommand$5 as It, organizationTree as J, bundleMigrationScript as Jt, updateCommand$1 as K, executeScript as Kt, writeDbTypesFile as L, deploymentArgs as Ln, getWorkflow as Lt, truncate as M, assertWritable as Mn, listExecutorJobs as Mt, truncateCommand as N, defineAppCommand as Nn, watchExecutorJob as Nt, resumeCommand as O, generateUserTypes as On, listExecutors as Ot, generate as P, commonArgs as Pn, startCommand as Pt, getCommand$1 as Q, compareSnapshotWithRemote as Qt, getConfiguredEditorCommand as R, isVerbose as Rn, executionsCommand as Rt, listApps as S, hasChanges as Sn, getFunctionRegistry as St, healthCommand as T, resourceTrn as Tn, triggerCommand as Tt, logBetaWarning as U, getCommand$6 as Ut, showCommand as V, toPageDirection as Vn, functionExecutionStatusToString as Vt, remove as W, getExecutor as Wt, listCommand$4 as X, handleOptionalToRequiredError as Xt, treeCommand as Y, MIGRATION_LABEL_KEY as Yt, listOrganizations as Z, parseMigrationLabelNumber as Zt, getWorkspace as _, reconstructSnapshotFromMigrations as _n, listMachineUsers as _t, updateUser as a, SCHEMA_FILE_NAME as an, getFolder as at, createCommand as b, formatDiffSummary as bn, listFunctionRegistries as bt, listCommand as c, compareSnapshots as cn, createCommand$1 as ct, inviteUser as d, getMigrationDirPath as dn, listOAuth2Clients as dt, protoGqlPermission as en, updateCommand$2 as et, restoreCommand as f, getMigrationFilePath as fn, getCommand$3 as ft, getCommand as g, loadDiff as gn, listCommand$7 as gt, listWorkspaces as h, isValidMigrationNumber as hn, tokenCommand as ht, updateCommand as i, MIGRATE_FILE_NAME as in, getCommand$2 as it, listWorkflows as j, apiCall as jn, jobsCommand as jt, resumeWorkflow as k, prompt as kn, getExecutorJob as kt, listUsers as l, createSnapshotFromLocalTypes as ln, createFolder as lt, listCommand$1 as m, getNextMigrationNumber as mn, getMachineUserToken as mt, query as n, DIFF_FILE_NAME as nn, listCommand$5 as nt, removeCommand as o, assertValidMigrationFiles as on, deleteCommand$1 as ot, restoreWorkspace as p, getMigrationFiles as pn, getOAuth2Client as pt, updateOrganization as q, waitForExecution as qt, queryCommand as r, INITIAL_SCHEMA_NUMBER as rn, listFolders as rt, removeUser as s, compareLocalTypesWithSnapshot as sn, deleteFolder as st, isNativeTypeScriptRuntime as t, DB_TYPES_FILE_NAME as tn, updateFolder as tt, inviteCommand as u, getLatestMigrationNumber as un, listCommand$6 as ut, deleteCommand as v, formatMigrationNumber as vn, generate$1 as vt, getAppHealth as w, ensureConfigId as wn, webhookCommand as wt, createWorkspace as x, formatMigrationDiff as xn, getCommand$4 as xt, deleteWorkspace as y, parseMigrationNumberArg as yn, listCommand$8 as yt, openInConfiguredEditor as z, pagedLogArgs as zn, getWorkflowExecution as zt };
18477
- //# sourceMappingURL=runtime-Cd375HD-.mjs.map
18428
+ //# sourceMappingURL=runtime-CEFC05qX.mjs.map