@tailor-platform/sdk 1.76.1 → 1.78.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 (301) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/{application-BUfYmf0O.mjs → application-CUxVA7Fs.mjs} +378 -1679
  3. package/dist/application-CUxVA7Fs.mjs.map +1 -0
  4. package/dist/application-Dp_-ioiP.mjs +3 -0
  5. package/dist/cli/cache/bundle-cache.d.mts +2 -1
  6. package/dist/cli/cache/store.d.mts +1 -1
  7. package/dist/cli/commands/api/index.d.mts +1 -0
  8. package/dist/cli/commands/deploy/aigateway.d.mts +5 -1
  9. package/dist/cli/commands/deploy/application.d.mts +7 -1
  10. package/dist/cli/commands/deploy/apply-phases.d.mts +14 -1
  11. package/dist/cli/commands/deploy/auth.d.mts +5 -1
  12. package/dist/cli/commands/deploy/deploy.d.mts +13 -3
  13. package/dist/cli/commands/deploy/executor.d.mts +7 -1
  14. package/dist/cli/commands/deploy/function-registry.d.mts +5 -0
  15. package/dist/cli/commands/deploy/idp.d.mts +5 -1
  16. package/dist/cli/commands/deploy/resolver.d.mts +5 -1
  17. package/dist/cli/commands/deploy/secret-manager.d.mts +5 -1
  18. package/dist/cli/commands/deploy/staticwebsite.d.mts +5 -1
  19. package/dist/cli/commands/deploy/tailordb/index.d.mts +8 -1
  20. package/dist/cli/commands/deploy/types.d.mts +3 -1
  21. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +3 -1
  22. package/dist/cli/commands/deploy/workflow.d.mts +4 -1
  23. package/dist/cli/commands/executor/get.d.mts +0 -1
  24. package/dist/cli/commands/executor/jobs.d.mts +0 -1
  25. package/dist/cli/commands/executor/list.d.mts +0 -1
  26. package/dist/cli/commands/executor/transform.d.mts +1 -0
  27. package/dist/cli/commands/executor/trigger.d.mts +0 -1
  28. package/dist/cli/commands/executor/webhook.d.mts +0 -1
  29. package/dist/cli/commands/function/get.d.mts +0 -1
  30. package/dist/cli/commands/function/list.d.mts +0 -1
  31. package/dist/cli/commands/function/transform.d.mts +1 -0
  32. package/dist/cli/commands/generate/service.d.mts +5 -1
  33. package/dist/cli/commands/generate/types.d.mts +3 -1
  34. package/dist/cli/commands/machineuser/list.d.mts +0 -1
  35. package/dist/cli/commands/machineuser/token.d.mts +0 -1
  36. package/dist/cli/commands/oauth2client/get.d.mts +0 -1
  37. package/dist/cli/commands/oauth2client/list.d.mts +0 -1
  38. package/dist/cli/commands/oauth2client/transform.d.mts +1 -0
  39. package/dist/cli/commands/organization/folder/create.d.mts +0 -1
  40. package/dist/cli/commands/organization/folder/delete.d.mts +0 -1
  41. package/dist/cli/commands/organization/folder/get.d.mts +0 -1
  42. package/dist/cli/commands/organization/folder/list.d.mts +0 -1
  43. package/dist/cli/commands/organization/folder/update.d.mts +0 -1
  44. package/dist/cli/commands/organization/get.d.mts +0 -1
  45. package/dist/cli/commands/organization/list.d.mts +0 -1
  46. package/dist/cli/commands/organization/transform.d.mts +2 -0
  47. package/dist/cli/commands/organization/tree.d.mts +0 -1
  48. package/dist/cli/commands/organization/update.d.mts +0 -1
  49. package/dist/cli/commands/remove.d.mts +0 -1
  50. package/dist/cli/commands/show.d.mts +9 -4
  51. package/dist/cli/commands/tailordb/migrate/config.d.mts +0 -1
  52. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +0 -1
  53. package/dist/cli/commands/tailordb/migrate/generate.d.mts +0 -1
  54. package/dist/cli/commands/tailordb/migrate/snapshot.d.mts +1 -1
  55. package/dist/cli/commands/tailordb/truncate.d.mts +0 -1
  56. package/dist/cli/commands/workflow/executions.d.mts +0 -1
  57. package/dist/cli/commands/workflow/get.d.mts +2 -1
  58. package/dist/cli/commands/workflow/list.d.mts +0 -1
  59. package/dist/cli/commands/workflow/resume.d.mts +0 -1
  60. package/dist/cli/commands/workflow/start.d.mts +0 -1
  61. package/dist/cli/commands/workflow/status.d.mts +1 -0
  62. package/dist/cli/commands/workflow/transform.d.mts +1 -0
  63. package/dist/cli/commands/workflow/wait.d.mts +0 -1
  64. package/dist/cli/commands/workflow/waiter.d.mts +1 -1
  65. package/dist/cli/commands/workspace/app/health.d.mts +0 -1
  66. package/dist/cli/commands/workspace/app/list.d.mts +0 -1
  67. package/dist/cli/commands/workspace/app/transform.d.mts +2 -0
  68. package/dist/cli/commands/workspace/create.d.mts +3 -1
  69. package/dist/cli/commands/workspace/delete.d.mts +0 -1
  70. package/dist/cli/commands/workspace/get.d.mts +0 -1
  71. package/dist/cli/commands/workspace/list.d.mts +1 -1
  72. package/dist/cli/commands/workspace/restore.d.mts +0 -1
  73. package/dist/cli/commands/workspace/transform.d.mts +4 -0
  74. package/dist/cli/commands/workspace/user/invite.d.mts +0 -1
  75. package/dist/cli/commands/workspace/user/list.d.mts +0 -1
  76. package/dist/cli/commands/workspace/user/remove.d.mts +0 -1
  77. package/dist/cli/commands/workspace/user/transform.d.mts +1 -0
  78. package/dist/cli/commands/workspace/user/update.d.mts +0 -1
  79. package/dist/cli/index.d.mts +3 -1
  80. package/dist/cli/index.mjs +660 -56
  81. package/dist/cli/index.mjs.map +1 -1
  82. package/dist/cli/lib.d.mts +4 -2
  83. package/dist/cli/lib.mjs +3 -3
  84. package/dist/cli/lib.mjs.map +1 -1
  85. package/dist/cli/query/index.d.mts +0 -1
  86. package/dist/cli/services/application.d.mts +12 -1
  87. package/dist/cli/services/auth/service.d.mts +2 -0
  88. package/dist/cli/services/executor/service.d.mts +1 -1
  89. package/dist/cli/services/http-adapter/bundler.d.mts +3 -1
  90. package/dist/cli/services/http-adapter/service.d.mts +2 -1
  91. package/dist/cli/services/resolver/service.d.mts +1 -1
  92. package/dist/cli/services/tailordb/service.d.mts +3 -1
  93. package/dist/cli/services/workflow/bundler.d.mts +2 -1
  94. package/dist/cli/services/workflow/service.d.mts +1 -1
  95. package/dist/cli/shared/args.d.mts +1 -1
  96. package/dist/cli/shared/client.d.mts +1 -1
  97. package/dist/cli/shared/config-loader.d.mts +0 -1
  98. package/dist/cli/shared/context.d.mts +2 -1
  99. package/dist/cli/shared/script-executor.d.mts +0 -1
  100. package/dist/cli/shared/seed-chunker.d.mts +7 -3
  101. package/dist/cli/shared/type-generator.d.mts +0 -1
  102. package/dist/cli/shared/workspace-name.d.mts +1 -0
  103. package/dist/cli/skills.mjs +1 -1
  104. package/dist/completion/zsh-worker.zsh +18 -1
  105. package/dist/configure/config/index.d.mts +0 -1
  106. package/dist/configure/config/types.d.mts +2 -2
  107. package/dist/configure/index.d.mts +2 -1
  108. package/dist/configure/index.mjs +248 -4
  109. package/dist/configure/index.mjs.map +1 -1
  110. package/dist/configure/services/aigateway/index.d.mts +0 -1
  111. package/dist/configure/services/aigateway/types.d.mts +0 -1
  112. package/dist/configure/services/auth/index.d.mts +0 -1
  113. package/dist/configure/services/auth/types.d.mts +14 -13
  114. package/dist/configure/services/executor/executor.d.mts +0 -1
  115. package/dist/configure/services/executor/index.d.mts +1 -0
  116. package/dist/configure/services/executor/operation.d.mts +1 -2
  117. package/dist/configure/services/executor/trigger/event.d.mts +0 -1
  118. package/dist/configure/services/executor/trigger/index.d.mts +0 -1
  119. package/dist/configure/services/executor/trigger/schedule.d.mts +0 -1
  120. package/dist/configure/services/executor/trigger/webhook.d.mts +0 -1
  121. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -2
  122. package/dist/configure/services/idp/index.d.mts +1 -5
  123. package/dist/configure/services/idp/permission.d.mts +4 -5
  124. package/dist/configure/services/idp/types.d.mts +0 -1
  125. package/dist/configure/services/index.d.mts +5 -0
  126. package/dist/configure/services/resolver/resolver.d.mts +0 -1
  127. package/dist/configure/services/resolver/types.d.mts +0 -1
  128. package/dist/configure/services/secrets/index.d.mts +0 -1
  129. package/dist/configure/services/secrets/types.d.mts +0 -1
  130. package/dist/configure/services/staticwebsite/index.d.mts +0 -1
  131. package/dist/configure/services/staticwebsite/types.d.mts +0 -1
  132. package/dist/configure/services/tailordb/permission.d.mts +4 -5
  133. package/dist/configure/services/tailordb/schema.d.mts +21 -8
  134. package/dist/configure/services/tailordb/types.d.mts +4 -5
  135. package/dist/configure/services/workflow/execution-policy.d.mts +0 -1
  136. package/dist/configure/services/workflow/execution-policy.types.d.mts +0 -1
  137. package/dist/configure/services/workflow/index.d.mts +1 -0
  138. package/dist/configure/services/workflow/job.d.mts +0 -1
  139. package/dist/configure/services/workflow/wait-point.d.mts +0 -1
  140. package/dist/configure/services/workflow/workflow.d.mts +0 -1
  141. package/dist/configure/types/field-runtime.d.mts +1 -1
  142. package/dist/configure/types/field.d.mts +1 -2
  143. package/dist/configure/types/field.types.d.mts +1 -2
  144. package/dist/configure/types/type.d.mts +1 -1
  145. package/dist/configure/user.d.mts +0 -1
  146. package/dist/{crashreport-ayWANEZ6.mjs → crashreport-BNWUM6Kf.mjs} +4 -3
  147. package/dist/{crashreport-ayWANEZ6.mjs.map → crashreport-BNWUM6Kf.mjs.map} +1 -1
  148. package/dist/{crashreport-Dy4ZzSkd.mjs → crashreport-BafWvjjX.mjs} +1 -1
  149. package/dist/errors-DVFS0AZk.mjs +100 -0
  150. package/dist/errors-DVFS0AZk.mjs.map +1 -0
  151. package/dist/{globals-CcU1ONiK.mjs → globals-CvizbGLY.mjs} +2 -2
  152. package/dist/{globals-CcU1ONiK.mjs.map → globals-CvizbGLY.mjs.map} +1 -1
  153. package/dist/kysely/index.d.mts +3 -4
  154. package/dist/{logger-BEiZZ3qT.mjs → logger-BwS4ppwO.mjs} +3 -3
  155. package/dist/logger-BwS4ppwO.mjs.map +1 -0
  156. package/dist/parser/service/auth/index.d.mts +1 -1
  157. package/dist/parser/service/auth/schema.d.mts +1 -0
  158. package/dist/parser/service/http-adapter/index.d.mts +1 -1
  159. package/dist/parser/service/idp/types.d.mts +1 -0
  160. package/dist/parser/service/tailordb/types.d.mts +0 -1
  161. package/dist/plugin/builtin/enum-constants/index.d.mts +0 -1
  162. package/dist/plugin/builtin/file-utils/index.d.mts +0 -1
  163. package/dist/plugin/builtin/kysely-type/index.d.mts +0 -1
  164. package/dist/plugin/builtin/seed/index.d.mts +0 -1
  165. package/dist/plugin/builtin/seed/index.mjs +1 -1
  166. package/dist/plugin/get-generated-type.d.mts +0 -1
  167. package/dist/plugin/manager.d.mts +3 -1
  168. package/dist/plugin/types.d.mts +0 -1
  169. package/dist/plugin/with-context.d.mts +0 -1
  170. package/dist/{registry-NfSW0BRo.mjs → registry-CYBRvfaU.mjs} +4 -49
  171. package/dist/registry-CYBRvfaU.mjs.map +1 -0
  172. package/dist/runtime/aigateway.d.mts +0 -2
  173. package/dist/runtime/authconnection.d.mts +0 -2
  174. package/dist/runtime/globals.d.mts +0 -1
  175. package/dist/runtime/index.d.mts +0 -1
  176. package/dist/runtime/types.d.mts +16 -7
  177. package/dist/{runtime-_vUgjiqT.mjs → runtime-BD2vYJFT.mjs} +2382 -1167
  178. package/dist/runtime-BD2vYJFT.mjs.map +1 -0
  179. package/dist/{schema-DrVyN-LP.mjs → schema-U6DxoZ8D.mjs} +204 -3
  180. package/dist/schema-U6DxoZ8D.mjs.map +1 -0
  181. package/dist/{secret-file-VSVGy1V0.mjs → secret-file-DBqZhjFQ.mjs} +2 -27
  182. package/dist/{secret-file-VSVGy1V0.mjs.map → secret-file-DBqZhjFQ.mjs.map} +1 -1
  183. package/dist/{secretmanager-Bd45j7an.mjs → secretmanager-IY4UvinW.mjs} +42 -9
  184. package/dist/secretmanager-IY4UvinW.mjs.map +1 -0
  185. package/dist/seed/index.d.mts +3 -2
  186. package/dist/{seed-fm0LeYP2.mjs → seed-DFFigL8V.mjs} +3 -13
  187. package/dist/seed-DFFigL8V.mjs.map +1 -0
  188. package/dist/service-CghpdV-9.mjs +3 -0
  189. package/dist/{service-DBFZQloR.mjs → service-Cp0I7ZFe.mjs} +3 -3
  190. package/dist/{service-DBFZQloR.mjs.map → service-Cp0I7ZFe.mjs.map} +1 -1
  191. package/dist/{service-BCRJ-3NV.mjs → service-D12iQGcS.mjs} +2 -2
  192. package/dist/{service-BCRJ-3NV.mjs.map → service-D12iQGcS.mjs.map} +1 -1
  193. package/dist/service_pb-BoLM0X4K.mjs +167 -0
  194. package/dist/service_pb-BoLM0X4K.mjs.map +1 -0
  195. package/dist/{service_pb-B2FF59sP.mjs → service_pb-r1T7kpJc.mjs} +1 -1
  196. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +0 -1
  197. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +0 -1
  198. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +0 -1
  199. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +0 -1
  200. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +0 -1
  201. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +0 -1
  202. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +0 -1
  203. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +0 -1
  204. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +0 -1
  205. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +0 -1
  206. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +0 -1
  207. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +0 -1
  208. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +0 -1
  209. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +0 -1
  210. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +0 -1
  211. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +0 -1
  212. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +0 -1
  213. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +0 -1
  214. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +0 -1
  215. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +0 -1
  216. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +0 -1
  217. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +0 -1
  218. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +0 -1
  219. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +0 -1
  220. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +0 -1
  221. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +0 -1
  222. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +0 -1
  223. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +0 -1
  224. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +0 -1
  225. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +0 -1
  226. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +0 -1
  227. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +0 -1
  228. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +0 -1
  229. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +0 -1
  230. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +0 -1
  231. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +0 -1
  232. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +0 -1
  233. package/dist/test-env-key-DuZycyWM.mjs +49 -0
  234. package/dist/test-env-key-DuZycyWM.mjs.map +1 -0
  235. package/dist/type-source-DH_LH20p.mjs +13 -0
  236. package/dist/type-source-DH_LH20p.mjs.map +1 -0
  237. package/dist/types/aigateway.generated.d.mts +5 -2
  238. package/dist/types/auth-connection.generated.d.mts +11 -5
  239. package/dist/types/auth.generated.d.mts +118 -85
  240. package/dist/types/executor.generated.d.mts +76 -84
  241. package/dist/types/helpers.d.mts +5 -5
  242. package/dist/types/http-adapter.generated.d.mts +11 -5
  243. package/dist/types/idp.generated.d.mts +536 -524
  244. package/dist/types/resolver.generated.d.mts +24 -10
  245. package/dist/types/staticwebsite.generated.d.mts +7 -3
  246. package/dist/types/tailordb.generated.d.mts +55 -29
  247. package/dist/types/workflow.generated.d.mts +9 -4
  248. package/dist/user-agent-DX2Jnw0-.mjs +28 -0
  249. package/dist/user-agent-DX2Jnw0-.mjs.map +1 -0
  250. package/dist/utils/test/index.d.mts +0 -1
  251. package/dist/utils/test/index.mjs +1 -1
  252. package/dist/utils/test/mock.d.mts +0 -1
  253. package/dist/vitest/environment.mjs +1 -1
  254. package/dist/vitest/index.d.mts +9 -9
  255. package/dist/vitest/index.mjs +600 -185
  256. package/dist/vitest/index.mjs.map +1 -1
  257. package/dist/vitest/mock-kysely.d.mts +0 -1
  258. package/dist/vitest/mock.d.mts +8 -8
  259. package/dist/vitest/mocks/aigateway.d.mts +16 -6
  260. package/dist/vitest/mocks/authconnection.d.mts +16 -6
  261. package/dist/vitest/mocks/file.d.mts +24 -6
  262. package/dist/vitest/mocks/iconv.d.mts +28 -4
  263. package/dist/vitest/mocks/idp.d.mts +26 -10
  264. package/dist/vitest/mocks/secretmanager.d.mts +16 -5
  265. package/dist/vitest/mocks/tailordb.d.mts +54 -10
  266. package/dist/vitest/mocks/workflow.d.mts +48 -11
  267. package/dist/vitest/setup.mjs +2 -2
  268. package/dist/{service_pb-B5w9rjPY.mjs → workspace_resource_pb-Db3fv68L.mjs} +57 -165
  269. package/dist/workspace_resource_pb-Db3fv68L.mjs.map +1 -0
  270. package/docs/cli/application.md +58 -11
  271. package/docs/cli/setup.md +1 -1
  272. package/docs/cli/workspace.md +6 -4
  273. package/docs/cli-reference.md +12 -8
  274. package/docs/runtime.md +3 -4
  275. package/docs/services/aigateway.md +2 -0
  276. package/docs/services/tailordb.md +52 -1
  277. package/docs/services/workflow.md +1 -1
  278. package/docs/testing.md +103 -89
  279. package/package.json +16 -16
  280. package/dist/application-BUfYmf0O.mjs.map +0 -1
  281. package/dist/application-DbvD5UUz.mjs +0 -3
  282. package/dist/cli/shared/trigger-context.d.mts +0 -1
  283. package/dist/errors-Dtf2WPaW.mjs +0 -42
  284. package/dist/errors-Dtf2WPaW.mjs.map +0 -1
  285. package/dist/field-runtime-9bfXBAOK.mjs +0 -183
  286. package/dist/field-runtime-9bfXBAOK.mjs.map +0 -1
  287. package/dist/job-D-PbD1P3.mjs +0 -55
  288. package/dist/job-D-PbD1P3.mjs.map +0 -1
  289. package/dist/logger-BEiZZ3qT.mjs.map +0 -1
  290. package/dist/registry-NfSW0BRo.mjs.map +0 -1
  291. package/dist/resource_pb-BRv7AMXK.mjs +0 -49
  292. package/dist/resource_pb-BRv7AMXK.mjs.map +0 -1
  293. package/dist/runtime-_vUgjiqT.mjs.map +0 -1
  294. package/dist/schema-DrVyN-LP.mjs.map +0 -1
  295. package/dist/secretmanager-Bd45j7an.mjs.map +0 -1
  296. package/dist/seed-fm0LeYP2.mjs.map +0 -1
  297. package/dist/service-CPMlIg3X.mjs +0 -3
  298. package/dist/service_pb-B5w9rjPY.mjs.map +0 -1
  299. package/dist/types-BwzB2okW.mjs +0 -199
  300. package/dist/types-BwzB2okW.mjs.map +0 -1
  301. package/dist/types-KlawuVKa.mjs +0 -4
@@ -59,19 +59,66 @@ tailor-sdk deploy [options]
59
59
 
60
60
  **Options**
61
61
 
62
- | Option | Alias | Description | Required | Default | Env |
63
- | ------------------------------- | ----- | ------------------------------------------------------------------------------------ | -------- | -------------------- | --------------------------------- |
64
- | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
65
- | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
66
- | `--config <CONFIG>` | `-c` | Path to SDK config file. Use comma-separated paths to deploy multiple apps together. | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
67
- | `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
68
- | `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
69
- | `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - |
70
- | `--no-validate` | - | Skip client-side validation against platform resource constraints | No | - | - |
71
- | `--no-cache` | - | Disable bundle caching for this run | No | - | - |
72
- | `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
62
+ | Option | Alias | Description | Required | Default | Env |
63
+ | --------------------------------------- | ----- | ------------------------------------------------------------------------------------ | -------- | -------------------- | --------------------------------- |
64
+ | `--workspace-id <WORKSPACE_ID>` | `-w` | Workspace ID | No | - | `TAILOR_PLATFORM_WORKSPACE_ID` |
65
+ | `--profile <PROFILE>` | `-p` | Workspace profile | No | - | `TAILOR_PLATFORM_PROFILE` |
66
+ | `--config <CONFIG>` | `-c` | Path to SDK config file. Use comma-separated paths to deploy multiple apps together. | No | `"tailor.config.ts"` | `TAILOR_PLATFORM_SDK_CONFIG_PATH` |
67
+ | `--yes` | `-y` | Skip confirmation prompts | No | `false` | - |
68
+ | `--create-workspace` | - | Create a workspace when the account has none | No | - | - |
69
+ | `--workspace-name <WORKSPACE_NAME>` | - | Name for a workspace created during deploy | No | - | - |
70
+ | `--workspace-region <WORKSPACE_REGION>` | - | Region for a workspace created during deploy | No | - | - |
71
+ | `--organization-id <ORGANIZATION_ID>` | - | Organization ID for a workspace created during deploy | No | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
72
+ | `--folder-id <FOLDER_ID>` | - | Folder ID for a workspace created during deploy | No | - | `TAILOR_PLATFORM_FOLDER_ID` |
73
+ | `--dry-run` | `-d` | Run the command without making any changes | No | - | - |
74
+ | `--no-schema-check` | - | Skip schema diff check against migration snapshots | No | - | - |
75
+ | `--no-validate` | - | Skip client-side validation against platform resource constraints | No | - | - |
76
+ | `--no-cache` | - | Disable bundle caching for this run | No | - | - |
77
+ | `--clean-cache` | - | Clean the bundle cache before building | No | - | - |
73
78
 
74
79
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
80
+ **Workspace Selection:**
81
+
82
+ After validating the configuration file, `deploy` resolves a workspace before bundling the
83
+ application. Explicit configuration takes precedence in this order: `--workspace-id`,
84
+ `TAILOR_PLATFORM_WORKSPACE_ID`, and the selected profile. Otherwise, `deploy` reuses the workspace
85
+ previously selected for that configuration from project-local state. Each config file keeps an
86
+ independent selection, including when multiple configs share a directory. An explicit workspace also
87
+ updates this selection. Saved selections are verified against the workspaces currently visible to
88
+ the authenticated user before reuse, and `deploy` warns when it uses one.
89
+
90
+ When the project has no saved selection, `deploy` discovers the account's workspaces:
91
+
92
+ - One or more workspaces open a selection prompt in an interactive terminal, with an option to
93
+ create a new workspace. With one workspace in non-interactive or JSON mode, it is selected
94
+ automatically. With multiple workspaces, pass `--workspace-id` instead.
95
+ - No workspaces open a guided creation flow in an interactive terminal. The flow asks for a name,
96
+ fetches the available regions from the Platform, and confirms before creating anything. After
97
+ creation, the output shows how to reuse the workspace with `--workspace-id` or
98
+ `TAILOR_PLATFORM_WORKSPACE_ID` from CI or another machine.
99
+
100
+ In CI and other non-interactive environments, workspace creation must be explicit:
101
+
102
+ ```bash
103
+ tailor-sdk deploy \
104
+ --create-workspace \
105
+ --workspace-name example-workspace \
106
+ --workspace-region us-west
107
+ ```
108
+
109
+ `--create-workspace` only creates when the account has no workspace. If the existing workspace
110
+ matches the requested name, region, organization, and folder, `deploy` reuses it so the same command
111
+ is safe to rerun. If multiple workspaces exist, the flag never creates another one or guesses which
112
+ workspace to use. `--yes` skips deployment confirmation but does not authorize workspace creation.
113
+
114
+ If a saved workspace has been deleted or is no longer accessible, interactive terminals return to
115
+ workspace selection. Non-interactive environments stop with `WORKSPACE_CONTEXT_STALE` instead of
116
+ silently switching to another workspace. Automatically selected targets are printed with their
117
+ region, organization, and workspace ID.
118
+
119
+ `--dry-run` never creates a workspace or writes project context. When an account has no workspace,
120
+ create one explicitly before requesting a deployment plan.
121
+
75
122
  **Config File Modification:**
76
123
 
77
124
  On first run, `deploy` automatically injects a stable `id: "<uuid>"` field into your `defineConfig({...})` call in `tailor.config.ts`. This UUID is used to track your application across renames so the SDK can recognize ownership across renames. Commit the generated id to version control. See [Configuration](../configuration.md#application-settings) for details.
package/docs/cli/setup.md CHANGED
@@ -174,7 +174,7 @@ tailor-sdk setup tag [options]
174
174
  | Option | Alias | Description | Required | Default |
175
175
  | ----------------------------- | ----- | ---------------------------------------------------------------------------- | -------- | ------- |
176
176
  | `--name <NAME>` | `-n` | Name (defaults to the config 'name') | No | - |
177
- | `--tag-pattern <TAG_PATTERN>` | - | Tag glob to match (defaults to v\*) | No | `"v*"` |
177
+ | `--tag-pattern <TAG_PATTERN>` | - | Tag glob to match (defaults to v*) | No | `"v*"` |
178
178
  | `--branch <BRANCH>` | - | Tag-reachability guard branch (no guard when omitted) | No | - |
179
179
  | `--environment <ENVIRONMENT>` | - | GitHub Environment for the plan/deploy jobs (defaults to the workspace name) | No | - |
180
180
  | `--dir <DIR>` | `-d` | App directory (for monorepo setups) | No | `"."` |
@@ -106,6 +106,7 @@ tailor-sdk workspace create [options]
106
106
  | `--organization-id <ORGANIZATION_ID>` | `-o` | Organization ID to workspace associate with | No | - | `TAILOR_PLATFORM_ORGANIZATION_ID` |
107
107
  | `--folder-id <FOLDER_ID>` | `-f` | Folder ID to workspace associate with | No | - | `TAILOR_PLATFORM_FOLDER_ID` |
108
108
  | `--profile-name <PROFILE_NAME>` | `-p` | Profile name to create | No | - | - |
109
+ | `--profile <PROFILE>` | - | Workspace profile used for authentication and Platform selection | No | - | `TAILOR_PLATFORM_PROFILE` |
109
110
  | `--profile-user <PROFILE_USER>` | - | User email for the profile (defaults to current user) | No | - | - |
110
111
  | `--permission <PERMISSION>` | - | Profile permission (requires --profile-name). 'read' blocks all write commands while the profile is active. | No | `"write"` | - |
111
112
 
@@ -161,10 +162,11 @@ tailor-sdk workspace list [options]
161
162
 
162
163
  **Options**
163
164
 
164
- | Option | Alias | Description | Required | Default |
165
- | ----------------- | ----- | -------------------------------------------------------- | -------- | -------- |
166
- | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` |
167
- | `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - |
165
+ | Option | Alias | Description | Required | Default | Env |
166
+ | --------------------- | ----- | ---------------------------------------------------------------- | -------- | -------- | ------------------------- |
167
+ | `--order <ORDER>` | - | Sort order (asc or desc) | No | `"desc"` | - |
168
+ | `--limit <LIMIT>` | `-l` | Maximum number of items to return (0 or omit: unlimited) | No | - | - |
169
+ | `--profile <PROFILE>` | - | Workspace profile used for authentication and Platform selection | No | - | `TAILOR_PLATFORM_PROFILE` |
168
170
 
169
171
  See [Global Options](../cli-reference.md#global-options) for options available to all commands.
170
172
 
@@ -11,12 +11,13 @@ tailor-sdk <command> [options]
11
11
  ## Global Options
12
12
 
13
13
  <a id="global-options"></a>
14
- | Option | Alias | Description | Required | Default |
15
- |--------|-------|-------------|----------|---------|
16
- | `--env-file <ENV_FILE>` | `-e` | Path to the environment file (error if not found) | No | - |
17
- | `--env-file-if-exists <ENV_FILE_IF_EXISTS>` | - | Path to the environment file (ignored if not found) | No | - |
18
- | `--verbose` | - | Enable verbose logging | No | `false` |
19
- | `--json` | `-j` | Output as JSON | No | `false` |
14
+
15
+ | Option | Alias | Description | Required | Default |
16
+ | ------------------------------------------- | ----- | --------------------------------------------------- | -------- | ------- |
17
+ | `--env-file <ENV_FILE>` | `-e` | Path to the environment file (error if not found) | No | - |
18
+ | `--env-file-if-exists <ENV_FILE_IF_EXISTS>` | - | Path to the environment file (ignored if not found) | No | - |
19
+ | `--verbose` | - | Enable verbose logging | No | `false` |
20
+ | `--json` | `-j` | Output as JSON | No | `false` |
20
21
 
21
22
  ### JSON Output
22
23
 
@@ -27,8 +28,11 @@ human-readable text or empty stdout.
27
28
  Commands that only perform side effects and do not define a structured result may leave stdout empty
28
29
  even when `--json` is passed.
29
30
 
30
- Errors, warnings, progress, and diagnostic messages are written to stderr. On failure, check the
31
- non-zero exit code and read stderr; stdout is not guaranteed to contain a JSON error object.
31
+ Errors, warnings, progress, and diagnostic messages are written to stderr. After argument parsing,
32
+ a command failure under `--json` emits a JSON error envelope to stderr. CLI errors include a stable
33
+ `error.code` and may include structured `error.next` and `error.context` fields for automated
34
+ recovery. Diagnostic lines may precede the error envelope, and stdout is not guaranteed to contain
35
+ an error object.
32
36
 
33
37
  ## Common Options
34
38
 
package/docs/runtime.md CHANGED
@@ -95,17 +95,16 @@ import { expect, test } from "vitest";
95
95
 
96
96
  test("encodes via iconv", () => {
97
97
  using iconvM = mockIconv();
98
- iconvM.setResolver(() => new Uint8Array([0x82, 0xa0]));
98
+ iconvM.convert.mockReturnValue(new Uint8Array([0x82, 0xa0]));
99
99
 
100
100
  const out = iconv.convert("あ", "UTF-8", "Shift_JIS");
101
101
 
102
102
  expect(out).toEqual(new Uint8Array([0x82, 0xa0]));
103
- expect(iconvM.calls[0]?.method).toBe("convert");
103
+ expect(iconvM.convert).toHaveBeenCalledWith("", "UTF-8", "Shift_JIS");
104
104
  }); // iconvM disposed here — the iconv mock is removed (previous state restored)
105
105
 
106
106
  test("reads from a vault", async () => {
107
- using sm = mockSecretmanager();
108
- sm.setSecrets({ "my-vault": { API_KEY: "sk-123" } });
107
+ using sm = mockSecretmanager({ secrets: { "my-vault": { API_KEY: "sk-123" } } });
109
108
 
110
109
  await expect(secretmanager.getSecret("my-vault", "API_KEY")).resolves.toBe("sk-123");
111
110
  });
@@ -111,3 +111,5 @@ const { url } = await aigateway.get("my-aigateway");
111
111
  ```
112
112
 
113
113
  Type narrowing is provided by the generated `tailor.d.ts` (the `AIGatewayNameRegistry` interface). Run `tailor-sdk generate` (or `deploy`) after defining new AI Gateways to refresh it. Before the first generate run, `get()` accepts any string.
114
+
115
+ The same URL is also shown by `tailor-sdk show`, which lists the URL of each AI Gateway defined in `aiGateways` once it has been deployed.
@@ -344,7 +344,7 @@ export const user = db
344
344
 
345
345
  ### Validation
346
346
 
347
- Add validation rules to fields. Validators receive three arguments (executed after hooks):
347
+ Add validation rules to fields. Validators receive three arguments (executed after hooks and built-in type validation):
348
348
 
349
349
  - `value`: Field value after hook transformation
350
350
  - `data`: Entire record data after hook transformations (for accessing other field values)
@@ -352,6 +352,13 @@ Add validation rules to fields. Validators receive three arguments (executed aft
352
352
 
353
353
  Validators return `true` for success, `false` for failure. Use array form `[validator, errorMessage]` for custom error messages.
354
354
 
355
+ **Note:** Custom validators run only when built-in type validation succeeds, so `value` always has the field's declared type. For array fields, the validator is called once with the complete array, not per element:
356
+
357
+ ```typescript
358
+ // value is string[], not string
359
+ db.string({ array: true }).validate(({ value }) => value.length >= 2);
360
+ ```
361
+
355
362
  #### Field-level Validation
356
363
 
357
364
  Set validators directly on individual fields:
@@ -543,6 +550,48 @@ db.type("User", {
543
550
  });
544
551
  ```
545
552
 
553
+ #### GraphQL Operations
554
+
555
+ Control which GraphQL operations (`create`, `update`, `delete`, `read`) are exposed for a type. All operations are enabled by default.
556
+
557
+ ```typescript
558
+ db.type("Order", {
559
+ status: db.string(),
560
+ }).features({
561
+ gqlOperations: {
562
+ delete: false, // Disable the delete mutation
563
+ },
564
+ });
565
+ ```
566
+
567
+ Use the `"query"` alias to disable all mutations at once (read-only type: `create`/`update`/`delete` false, `read` true):
568
+
569
+ ```typescript
570
+ db.type("AuditLog", {
571
+ action: db.string(),
572
+ }).features({
573
+ gqlOperations: "query",
574
+ });
575
+ ```
576
+
577
+ **Namespace-level default**
578
+
579
+ Set a default for every type in a TailorDB namespace in `tailor.config.ts`. A type's own `.features({ gqlOperations })` always takes precedence over this default.
580
+
581
+ ```typescript
582
+ // tailor.config.ts
583
+ export default defineConfig({
584
+ db: {
585
+ tailordb: {
586
+ files: ["./tailordb/*.ts"],
587
+ gqlOperations: { delete: false }, // Default for every type in this namespace
588
+ },
589
+ },
590
+ });
591
+ ```
592
+
593
+ This default is re-evaluated on every `tailor-sdk deploy`, so changing it also updates types that already exist on the platform, not only newly created ones.
594
+
546
595
  ### Field Extraction (`pickFields` / `omitFields`)
547
596
 
548
597
  Extract subsets of fields from a `TailorDBType` for reuse in resolvers, executors, seed schemas, etc.
@@ -570,6 +619,8 @@ Available options:
570
619
  | `optional` | Makes the selected fields optional |
571
620
  | `array` | Makes the selected fields array types |
572
621
 
622
+ **Note:** The `array` option cannot change fields with custom validation — their validators expect the original value shape. Define a new field with a matching validator instead.
623
+
573
624
  #### `omitFields(keys)`
574
625
 
575
626
  Return all fields except the specified ones:
@@ -397,7 +397,7 @@ export default defineConfig({
397
397
 
398
398
  `key` accepts `[a-z0-9_:.-]` and must start with `[a-z0-9]`. An exact key must also end with `[a-z0-9]`; a wildcard prefix (`matchType: "prefix"`) may end with any of those characters, since the platform appends a trailing `*` after it. The platform-registered key — including that trailing `*` when wildcarded — is 2 to 64 characters long, so a wildcard prefix must be at most 63 characters. `foo:bar` is a valid exact key; `tenant-api` with `matchType: "prefix"` registers `tenant-api*` as a wildcard prefix.
399
399
 
400
- An exact-key policy applies to dispatches whose runtime key equals the policy key. A wildcard policy applies to every dispatch whose runtime key begins with the prefix; each concrete resolved key gets its own independent pool of the declared size (a `cap = 3` wildcard yields three concurrent dispatches per resolved key, not three across every match). The longest matching prefix wins when a dispatch could match more than one wildcard.
400
+ An exact-key policy applies to dispatches whose runtime key equals the policy key. A wildcard policy applies to every dispatch whose runtime key begins with the prefix; each concrete resolved key gets its own independent pool of the declared size (a `cap = 3` wildcard yields three concurrent dispatches per resolved key, not three across every match). When a dispatch matches more than one policy (for example, an exact key that also falls under a wildcard prefix, or two wildcard prefixes where one starts with the other), every matching policy's cap is enforced independently, and the tightest one blocks.
401
401
 
402
402
  ### Referencing a Policy from a Workflow
403
403