@tailor-platform/sdk 2.33.0 → 2.34.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 (329) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/dist/ai/index.d.mts +1 -3
  3. package/dist/{application-Bet1K5C4.mjs → application-CwpOIOTt.mjs} +1 -1
  4. package/dist/application-Nce5z46R.mjs +207 -0
  5. package/dist/application-Nce5z46R.mjs.map +1 -0
  6. package/dist/cli/cache/bundle-cache.d.mts +1 -0
  7. package/dist/cli/commands/api/api-call.d.mts +1 -3
  8. package/dist/cli/commands/deploy/aigateway.d.mts +1 -0
  9. package/dist/cli/commands/deploy/app-id-lock.d.mts +1 -3
  10. package/dist/cli/commands/deploy/application.d.mts +1 -0
  11. package/dist/cli/commands/deploy/auth.d.mts +1 -0
  12. package/dist/cli/commands/deploy/config-id-injector.d.mts +1 -3
  13. package/dist/cli/commands/deploy/confirm.d.mts +1 -0
  14. package/dist/cli/commands/deploy/deploy.d.mts +4 -3
  15. package/dist/cli/commands/deploy/executor.d.mts +1 -0
  16. package/dist/cli/commands/deploy/function-registry-types.d.mts +1 -3
  17. package/dist/cli/commands/deploy/function-registry.d.mts +1 -0
  18. package/dist/cli/commands/deploy/idp.d.mts +1 -0
  19. package/dist/cli/commands/deploy/owned-resource.d.mts +3 -0
  20. package/dist/cli/commands/deploy/resolver.d.mts +1 -0
  21. package/dist/cli/commands/deploy/secret-manager.d.mts +1 -0
  22. package/dist/cli/commands/deploy/staticwebsite.d.mts +1 -0
  23. package/dist/cli/commands/deploy/tailordb/plan.d.mts +1 -0
  24. package/dist/cli/commands/deploy/workflow-execution-policy.d.mts +2 -1
  25. package/dist/cli/commands/deploy/workflow.d.mts +1 -0
  26. package/dist/cli/commands/executor/get.d.mts +0 -2
  27. package/dist/cli/commands/executor/jobs.d.mts +0 -2
  28. package/dist/cli/commands/executor/list.d.mts +1 -3
  29. package/dist/cli/commands/executor/transform.d.mts +1 -3
  30. package/dist/cli/commands/executor/trigger.d.mts +0 -2
  31. package/dist/cli/commands/executor/webhook.d.mts +1 -3
  32. package/dist/cli/commands/function/get.d.mts +0 -2
  33. package/dist/cli/commands/function/list.d.mts +0 -2
  34. package/dist/cli/commands/function/transform.d.mts +1 -3
  35. package/dist/cli/commands/generate/options.d.mts +1 -3
  36. package/dist/cli/commands/generate/seed/bundler.d.mts +1 -3
  37. package/dist/cli/commands/generate/service.d.mts +1 -3
  38. package/dist/cli/commands/machineuser/list.d.mts +1 -3
  39. package/dist/cli/commands/machineuser/token.d.mts +1 -3
  40. package/dist/cli/commands/oauth2client/get.d.mts +1 -3
  41. package/dist/cli/commands/oauth2client/list.d.mts +1 -3
  42. package/dist/cli/commands/oauth2client/transform.d.mts +1 -3
  43. package/dist/cli/commands/organization/folder/create.d.mts +0 -2
  44. package/dist/cli/commands/organization/folder/delete.d.mts +0 -2
  45. package/dist/cli/commands/organization/folder/get.d.mts +0 -2
  46. package/dist/cli/commands/organization/folder/list.d.mts +0 -2
  47. package/dist/cli/commands/organization/folder/update.d.mts +0 -2
  48. package/dist/cli/commands/organization/get.d.mts +0 -2
  49. package/dist/cli/commands/organization/list.d.mts +1 -3
  50. package/dist/cli/commands/organization/transform.d.mts +1 -3
  51. package/dist/cli/commands/organization/tree.d.mts +0 -2
  52. package/dist/cli/commands/organization/update.d.mts +0 -2
  53. package/dist/cli/commands/remove.d.mts +1 -3
  54. package/dist/cli/commands/show.d.mts +0 -2
  55. package/dist/cli/commands/staticwebsite/deploy.d.mts +1 -3
  56. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +1 -3
  57. package/dist/cli/commands/tailordb/migrate/config.d.mts +1 -3
  58. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +0 -2
  59. package/dist/cli/commands/tailordb/migrate/generate.d.mts +1 -3
  60. package/dist/cli/commands/tailordb/migrate/rename-detection.d.mts +1 -3
  61. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +1 -3
  62. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +1 -3
  63. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +1 -3
  64. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +1 -3
  65. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +0 -2
  66. package/dist/cli/commands/tailordb/migrate/types.d.mts +1 -3
  67. package/dist/cli/commands/tailordb/truncate.d.mts +1 -3
  68. package/dist/cli/commands/workflow/executions.d.mts +0 -2
  69. package/dist/cli/commands/workflow/get.d.mts +0 -2
  70. package/dist/cli/commands/workflow/list.d.mts +1 -3
  71. package/dist/cli/commands/workflow/resume.d.mts +1 -3
  72. package/dist/cli/commands/workflow/start.d.mts +0 -2
  73. package/dist/cli/commands/workflow/status.d.mts +1 -3
  74. package/dist/cli/commands/workflow/transform.d.mts +1 -3
  75. package/dist/cli/commands/workflow/wait.d.mts +1 -3
  76. package/dist/cli/commands/workflow/waiter.d.mts +1 -3
  77. package/dist/cli/commands/workspace/app/health.d.mts +0 -2
  78. package/dist/cli/commands/workspace/app/list.d.mts +0 -2
  79. package/dist/cli/commands/workspace/app/transform.d.mts +1 -3
  80. package/dist/cli/commands/workspace/create.d.mts +0 -2
  81. package/dist/cli/commands/workspace/delete.d.mts +0 -2
  82. package/dist/cli/commands/workspace/expiry.d.mts +1 -3
  83. package/dist/cli/commands/workspace/get.d.mts +0 -2
  84. package/dist/cli/commands/workspace/list.d.mts +1 -3
  85. package/dist/cli/commands/workspace/restore.d.mts +0 -2
  86. package/dist/cli/commands/workspace/transform.d.mts +1 -3
  87. package/dist/cli/commands/workspace/user/invite.d.mts +0 -2
  88. package/dist/cli/commands/workspace/user/list.d.mts +0 -2
  89. package/dist/cli/commands/workspace/user/remove.d.mts +0 -2
  90. package/dist/cli/commands/workspace/user/transform.d.mts +1 -3
  91. package/dist/cli/commands/workspace/user/update.d.mts +0 -2
  92. package/dist/cli/lib.d.mts +1 -1
  93. package/dist/cli/lib.mjs +1 -1
  94. package/dist/cli/lib.mjs.map +1 -1
  95. package/dist/cli/main.d.mts +1 -3
  96. package/dist/cli/main.mjs +55 -51
  97. package/dist/cli/main.mjs.map +1 -1
  98. package/dist/cli/query/index.d.mts +0 -2
  99. package/dist/cli/services/application.d.mts +5 -4
  100. package/dist/cli/services/executor/service.d.mts +2 -2
  101. package/dist/cli/services/function-bundle.d.mts +7 -0
  102. package/dist/cli/services/http-adapter/bundler.d.mts +7 -1
  103. package/dist/cli/services/resolver/service.d.mts +2 -2
  104. package/dist/cli/services/workflow/bundler.d.mts +2 -3
  105. package/dist/cli/shared/args.d.mts +0 -2
  106. package/dist/cli/shared/beta.d.mts +1 -3
  107. package/dist/cli/shared/client.d.mts +4 -3
  108. package/dist/cli/shared/command.d.mts +2 -4
  109. package/dist/cli/shared/config-loader.d.mts +2 -4
  110. package/dist/cli/shared/config.d.mts +1 -3
  111. package/dist/cli/shared/context.d.mts +0 -2
  112. package/dist/cli/shared/error-diagnostics.d.mts +1 -3
  113. package/dist/cli/shared/error-json.d.mts +1 -3
  114. package/dist/cli/shared/function-execution.d.mts +1 -3
  115. package/dist/cli/shared/github-actions.d.mts +1 -3
  116. package/dist/cli/shared/logger.d.mts +7 -4
  117. package/dist/cli/shared/platform-bundle-plugin.d.mts +1 -0
  118. package/dist/cli/shared/prompt.d.mts +1 -3
  119. package/dist/cli/shared/readonly-guard.d.mts +0 -2
  120. package/dist/cli/shared/script-executor.d.mts +1 -3
  121. package/dist/cli/shared/seed-chunker.d.mts +1 -3
  122. package/dist/cli/shared/seed-context.d.mts +0 -2
  123. package/dist/cli/shared/sourcemap-sources.d.mts +1 -0
  124. package/dist/cli/shared/tailordb-namespaces.d.mts +1 -3
  125. package/dist/cli/shared/type-generator.d.mts +0 -2
  126. package/dist/cli/shared/workspace-name.d.mts +1 -3
  127. package/dist/completion/zsh-worker.zsh +2 -2
  128. package/dist/configure/config/index.d.mts +2 -4
  129. package/dist/configure/config/types.d.mts +27 -4
  130. package/dist/configure/index.d.mts +7 -9
  131. package/dist/configure/index.mjs +1 -1
  132. package/dist/configure/services/aigateway/index.d.mts +0 -2
  133. package/dist/configure/services/aigateway/types.d.mts +0 -2
  134. package/dist/configure/services/auth/index.d.mts +0 -2
  135. package/dist/configure/services/auth/types.d.mts +0 -2
  136. package/dist/configure/services/executor/executor.d.mts +0 -2
  137. package/dist/configure/services/executor/operation.d.mts +0 -2
  138. package/dist/configure/services/executor/trigger/event.d.mts +0 -2
  139. package/dist/configure/services/executor/trigger/index.d.mts +0 -2
  140. package/dist/configure/services/executor/trigger/schedule.d.mts +0 -2
  141. package/dist/configure/services/executor/trigger/webhook.d.mts +1 -3
  142. package/dist/configure/services/http-adapter/http-adapter.d.mts +0 -2
  143. package/dist/configure/services/idp/index.d.mts +0 -2
  144. package/dist/configure/services/idp/permission.d.mts +0 -2
  145. package/dist/configure/services/idp/types.d.mts +0 -2
  146. package/dist/configure/services/index.d.mts +5 -5
  147. package/dist/configure/services/resolver/index.d.mts +1 -1
  148. package/dist/configure/services/resolver/permission.d.mts +0 -2
  149. package/dist/configure/services/resolver/resolver.d.mts +1 -3
  150. package/dist/configure/services/resolver/types.d.mts +1 -3
  151. package/dist/configure/services/secrets/index.d.mts +0 -2
  152. package/dist/configure/services/secrets/types.d.mts +0 -2
  153. package/dist/configure/services/staticwebsite/index.d.mts +0 -2
  154. package/dist/configure/services/staticwebsite/types.d.mts +0 -2
  155. package/dist/configure/services/tailordb/permission.d.mts +0 -2
  156. package/dist/configure/services/tailordb/schema.d.mts +0 -2
  157. package/dist/configure/services/tailordb/types.d.mts +0 -2
  158. package/dist/configure/services/workflow/execution-policy.d.mts +0 -2
  159. package/dist/configure/services/workflow/execution-policy.types.d.mts +0 -2
  160. package/dist/configure/services/workflow/job.d.mts +0 -2
  161. package/dist/configure/services/workflow/wait-point.d.mts +0 -2
  162. package/dist/configure/services/workflow/workflow.d.mts +0 -2
  163. package/dist/configure/types/aigateway-name.d.mts +1 -3
  164. package/dist/configure/types/auth-namespace-name.d.mts +1 -3
  165. package/dist/configure/types/connection-name.d.mts +1 -3
  166. package/dist/configure/types/field.d.mts +1 -3
  167. package/dist/configure/types/field.types.d.mts +0 -2
  168. package/dist/configure/types/idp-name.d.mts +1 -3
  169. package/dist/configure/types/permission-operand.types.d.mts +0 -2
  170. package/dist/configure/types/secret-vault-name.d.mts +1 -3
  171. package/dist/configure/types/type.d.mts +0 -2
  172. package/dist/{crashreport-BCIy33Cz.mjs → crashreport-DGU6lwiX.mjs} +2 -2
  173. package/dist/{crashreport-BCIy33Cz.mjs.map → crashreport-DGU6lwiX.mjs.map} +1 -1
  174. package/dist/crashreport-WsYAWARW.mjs +1 -0
  175. package/dist/{logger-RgtbhJ83.mjs → errors-BXmGBX-7.mjs} +6 -3
  176. package/dist/errors-BXmGBX-7.mjs.map +1 -0
  177. package/dist/field-parse-BQhUAbpM.mjs +2 -0
  178. package/dist/{field-parse-C41e3UAF.mjs.map → field-parse-BQhUAbpM.mjs.map} +1 -1
  179. package/dist/guards-CiFVxoXR.mjs +2 -0
  180. package/dist/guards-CiFVxoXR.mjs.map +1 -0
  181. package/dist/kysely/index.d.mts +0 -2
  182. package/dist/manager-B813m43t.mjs +2 -0
  183. package/dist/manager-B813m43t.mjs.map +1 -0
  184. package/dist/parser/service/idp/types.d.mts +1 -3
  185. package/dist/parser/service/tailordb/type-source.d.mts +1 -3
  186. package/dist/parser/service/tailordb/types.d.mts +0 -2
  187. package/dist/plugin/builtin/enum-constants/index.d.mts +0 -2
  188. package/dist/plugin/builtin/file-utils/index.d.mts +0 -2
  189. package/dist/plugin/builtin/kysely-type/index.d.mts +0 -2
  190. package/dist/plugin/builtin/seed/index.d.mts +0 -2
  191. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +1 -3
  192. package/dist/plugin/get-generated-table.d.mts +1 -3
  193. package/dist/plugin/index.mjs +1 -1
  194. package/dist/plugin/types.d.mts +0 -2
  195. package/dist/plugin/with-context.d.mts +1 -3
  196. package/dist/register-ts-hook-CtWJL3EO.mjs +1054 -0
  197. package/dist/register-ts-hook-CtWJL3EO.mjs.map +1 -0
  198. package/dist/runtime/aigateway.d.mts +1 -3
  199. package/dist/runtime/authconnection.d.mts +1 -3
  200. package/dist/runtime/context.d.mts +0 -2
  201. package/dist/runtime/date.d.mts +0 -2
  202. package/dist/runtime/field-parse.d.mts +0 -2
  203. package/dist/runtime/file.d.mts +0 -2
  204. package/dist/runtime/globals.d.mts +0 -2
  205. package/dist/runtime/iconv.d.mts +1 -3
  206. package/dist/runtime/idp.d.mts +1 -3
  207. package/dist/runtime/index.d.mts +1 -3
  208. package/dist/runtime/index.mjs +1 -1
  209. package/dist/runtime/logger.d.mts +1 -3
  210. package/dist/runtime/secretmanager.d.mts +1 -3
  211. package/dist/runtime/temporal.d.mts +0 -2
  212. package/dist/runtime/types.d.mts +0 -2
  213. package/dist/runtime/workflow.d.mts +0 -2
  214. package/dist/{schema-B6hJQWp6.mjs → schema-BU1aIQ63.mjs} +2 -2
  215. package/dist/{schema-B6hJQWp6.mjs.map → schema-BU1aIQ63.mjs.map} +1 -1
  216. package/dist/secret-file-BxZ-J_Nz.mjs +2 -0
  217. package/dist/secret-file-BxZ-J_Nz.mjs.map +1 -0
  218. package/dist/seed/idp-user-password.d.mts +0 -2
  219. package/dist/seed/index.d.mts +0 -2
  220. package/dist/service-CaGmqg0r.mjs +2 -0
  221. package/dist/{service-9rwi_I4d.mjs.map → service-CaGmqg0r.mjs.map} +1 -1
  222. package/dist/service-DEq_hdht.mjs +1 -0
  223. package/dist/{service-9SBPNpK8.mjs → service-eeXdVrDK.mjs} +4 -4
  224. package/dist/service-eeXdVrDK.mjs.map +1 -0
  225. package/dist/shared/src/color.d.mts +1 -3
  226. package/dist/tailor-proto/src/tailor/v1/aigateway_pb.d.mts +1 -3
  227. package/dist/tailor-proto/src/tailor/v1/aigateway_resource_pb.d.mts +1 -3
  228. package/dist/tailor-proto/src/tailor/v1/application_pb.d.mts +1 -3
  229. package/dist/tailor-proto/src/tailor/v1/application_resource_pb.d.mts +1 -3
  230. package/dist/tailor-proto/src/tailor/v1/auth_pb.d.mts +1 -3
  231. package/dist/tailor-proto/src/tailor/v1/auth_resource_pb.d.mts +1 -3
  232. package/dist/tailor-proto/src/tailor/v1/events_pb.d.mts +1 -3
  233. package/dist/tailor-proto/src/tailor/v1/events_resource_pb.d.mts +1 -3
  234. package/dist/tailor-proto/src/tailor/v1/executor_pb.d.mts +1 -3
  235. package/dist/tailor-proto/src/tailor/v1/executor_resource_pb.d.mts +1 -3
  236. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +1 -3
  237. package/dist/tailor-proto/src/tailor/v1/function_registry_pb.d.mts +1 -3
  238. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +1 -3
  239. package/dist/tailor-proto/src/tailor/v1/http_adapter_resource_pb.d.mts +1 -3
  240. package/dist/tailor-proto/src/tailor/v1/idp_pb.d.mts +1 -3
  241. package/dist/tailor-proto/src/tailor/v1/idp_resource_pb.d.mts +1 -3
  242. package/dist/tailor-proto/src/tailor/v1/metadata_pb.d.mts +1 -3
  243. package/dist/tailor-proto/src/tailor/v1/metadata_resource_pb.d.mts +1 -3
  244. package/dist/tailor-proto/src/tailor/v1/meter_pb.d.mts +1 -3
  245. package/dist/tailor-proto/src/tailor/v1/pipeline_pb.d.mts +1 -3
  246. package/dist/tailor-proto/src/tailor/v1/pipeline_resource_pb.d.mts +1 -3
  247. package/dist/tailor-proto/src/tailor/v1/resource_pb.d.mts +1 -3
  248. package/dist/tailor-proto/src/tailor/v1/secret_manager_pb.d.mts +1 -3
  249. package/dist/tailor-proto/src/tailor/v1/secret_manager_resource_pb.d.mts +1 -3
  250. package/dist/tailor-proto/src/tailor/v1/security_pb.d.mts +1 -3
  251. package/dist/tailor-proto/src/tailor/v1/security_resource_pb.d.mts +1 -3
  252. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +1 -3
  253. package/dist/tailor-proto/src/tailor/v1/stateflow_pb.d.mts +1 -3
  254. package/dist/tailor-proto/src/tailor/v1/stateflow_resource_pb.d.mts +1 -3
  255. package/dist/tailor-proto/src/tailor/v1/staticwebsite_pb.d.mts +1 -3
  256. package/dist/tailor-proto/src/tailor/v1/staticwebsite_resource_pb.d.mts +1 -3
  257. package/dist/tailor-proto/src/tailor/v1/tailordb_pb.d.mts +1 -3
  258. package/dist/tailor-proto/src/tailor/v1/tailordb_resource_pb.d.mts +1 -3
  259. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_pb.d.mts +1 -3
  260. package/dist/tailor-proto/src/tailor/v1/telemetryrouter_resource_pb.d.mts +1 -3
  261. package/dist/tailor-proto/src/tailor/v1/workflow_pb.d.mts +1 -3
  262. package/dist/tailor-proto/src/tailor/v1/workflow_resource_pb.d.mts +1 -3
  263. package/dist/tailor-proto/src/tailor/v1/workspace_pb.d.mts +1 -3
  264. package/dist/tailor-proto/src/tailor/v1/workspace_resource_pb.d.mts +1 -3
  265. package/dist/types/aigateway.generated.d.mts +1 -3
  266. package/dist/types/app-config.generated.d.mts +1 -3
  267. package/dist/types/auth-connection.generated.d.mts +1 -3
  268. package/dist/types/auth.generated.d.mts +1 -3
  269. package/dist/types/executor.generated.d.mts +1 -3
  270. package/dist/types/field.generated.d.mts +1 -3
  271. package/dist/types/helpers.d.mts +1 -3
  272. package/dist/types/http-adapter.generated.d.mts +1 -3
  273. package/dist/types/idp.generated.d.mts +1 -3
  274. package/dist/types/resolver.generated.d.mts +1 -3
  275. package/dist/types/secrets.generated.d.mts +1 -3
  276. package/dist/types/staticwebsite.generated.d.mts +1 -3
  277. package/dist/types/tailordb.generated.d.mts +1 -3
  278. package/dist/types/workflow.generated.d.mts +1 -3
  279. package/dist/utils/test/index.d.mts +1 -3
  280. package/dist/utils/test/index.mjs +1 -1
  281. package/dist/vitest/date-representation.d.mts +1 -3
  282. package/dist/vitest/environment.d.mts +0 -2
  283. package/dist/vitest/index.d.mts +0 -2
  284. package/dist/vitest/migration-steps.d.mts +1 -3
  285. package/dist/vitest/mock-kysely.d.mts +0 -2
  286. package/dist/vitest/mocks/aigateway.d.mts +0 -2
  287. package/dist/vitest/mocks/authconnection.d.mts +0 -2
  288. package/dist/vitest/mocks/file.d.mts +0 -2
  289. package/dist/vitest/mocks/iconv.d.mts +0 -2
  290. package/dist/vitest/mocks/idp.d.mts +0 -2
  291. package/dist/vitest/mocks/logger.d.mts +0 -2
  292. package/dist/vitest/mocks/secretmanager.d.mts +0 -2
  293. package/dist/vitest/mocks/tailordb-pglite.d.mts +0 -2
  294. package/dist/vitest/mocks/tailordb.d.mts +0 -2
  295. package/dist/vitest/mocks/workflow.d.mts +0 -2
  296. package/dist/vitest/pglite-kysely.d.mts +0 -2
  297. package/dist/vitest/pglite-temporal.d.mts +1 -3
  298. package/dist/vitest/setup.d.mts +0 -2
  299. package/dist/vitest/workflow-local.d.mts +0 -2
  300. package/docs/cli/application.md +2 -1
  301. package/docs/cli/tailordb.md +1 -1
  302. package/docs/cli/user.md +5 -5
  303. package/docs/cli/workspace.md +1 -1
  304. package/docs/cli-reference.md +26 -25
  305. package/docs/configuration.md +13 -2
  306. package/docs/github-actions.md +33 -10
  307. package/docs/services/secret.md +6 -0
  308. package/docs/services/tailordb/index.md +19 -0
  309. package/docs/services/tailordb/migration.md +2 -2
  310. package/docs/testing.md +2 -2
  311. package/package.json +12 -12
  312. package/dist/application-B9_NHiUC.mjs +0 -207
  313. package/dist/application-B9_NHiUC.mjs.map +0 -1
  314. package/dist/crashreport-IN6H7GX3.mjs +0 -1
  315. package/dist/errors-BOF68LJ5.mjs +0 -5
  316. package/dist/errors-BOF68LJ5.mjs.map +0 -1
  317. package/dist/field-parse-C41e3UAF.mjs +0 -2
  318. package/dist/guards-yDXyKC9F.mjs +0 -2
  319. package/dist/guards-yDXyKC9F.mjs.map +0 -1
  320. package/dist/logger-RgtbhJ83.mjs.map +0 -1
  321. package/dist/manager-DTRhIupk.mjs +0 -2
  322. package/dist/manager-DTRhIupk.mjs.map +0 -1
  323. package/dist/register-ts-hook-Dp9reSRG.mjs +0 -1053
  324. package/dist/register-ts-hook-Dp9reSRG.mjs.map +0 -1
  325. package/dist/secret-file-C9wp_FCX.mjs +0 -2
  326. package/dist/secret-file-C9wp_FCX.mjs.map +0 -1
  327. package/dist/service-9SBPNpK8.mjs.map +0 -1
  328. package/dist/service-9rwi_I4d.mjs +0 -2
  329. package/dist/service-Ca1WwyIt.mjs +0 -1
@@ -218,6 +218,25 @@ const user = db.table("User", {
218
218
  });
219
219
  ```
220
220
 
221
+ A relation can also be set on a field inside `db.object()`. The inner field gets the foreign key constraint only: no index, no unique constraint, and no forward or backward relationship, as with `type: "keyOnly"`.
222
+
223
+ ```typescript
224
+ const order = db.table("Order", {
225
+ items: db.object(
226
+ {
227
+ productId: db.uuid().relation({
228
+ type: "keyOnly",
229
+ toward: { table: product },
230
+ }),
231
+ quantity: db.int(),
232
+ },
233
+ { array: true },
234
+ ),
235
+ });
236
+ ```
237
+
238
+ A relation inside `db.object()` that points at its own table is not yet handled by `tailor seed apply` or by the data copy a table rename generates. Both write rows in batches, and the platform rejects a row whose parent is in the same or a later batch.
239
+
221
240
  Create relations against different fields using `toward.key`:
222
241
 
223
242
  ```typescript
@@ -96,7 +96,7 @@ A typical change cycle:
96
96
  DB types: ./migrations/0001/db.ts
97
97
  ```
98
98
 
99
- If `EDITOR` or `VISUAL` is set, `migrate.ts` opens automatically unless JSON output is enabled.
99
+ If `EDITOR` or `VISUAL` is set, `migrate.ts` opens automatically when the command runs in an interactive terminal outside CI without JSON output. `tailordb migration script` opens the file it scaffolds the same way.
100
100
 
101
101
  3. **Edit `migrate.ts`** to populate data for the new required field:
102
102
 
@@ -915,7 +915,7 @@ When your branch and main each generated the same number, merging or rebasing st
915
915
 
916
916
  - For non-interactive environments, pass `--yes` to `migration generate` and `--yes` to `apply`. `apply` runs migrations automatically when the `migrations/` directory is configured.
917
917
  - Run `tailor tailordb migration validate` in CI to catch uncommitted migrations, broken migration files, unreviewed generated normalization logic, and remote schema drift before deploying. It exits with a non-zero code when validation fails and supports `--json`. Add `--strict` to also require an explicit acknowledgment (a `migrate.ts` or a recorded `--no-script` reason) for every pending migration that can drop data, so destructive changes cannot merge unnoticed.
918
- - `tailor tailordb migration status` validates file-format compatibility across the full local history, compares its history ID with the deployed namespace, and shows applied and pending migrations for a human-readable comparison. Its exit code is non-zero on incompatible files, migration history mismatches, and remote read errors, so check the output.
918
+ - `tailor tailordb migration status` validates the layout and file-format compatibility of the full local history, compares its history ID with the deployed namespace, and shows applied and pending migrations for a human-readable comparison. Its exit code is non-zero on invalid or incompatible files, migration history mismatches, and remote read errors, so check the output.
919
919
  - Avoid running migrations in parallel against the same workspace — there is no locking. Serialize deploys per environment.
920
920
 
921
921
  ### Resetting a deployed project
package/docs/testing.md CHANGED
@@ -209,12 +209,12 @@ test("upserts against real rows", async () => {
209
209
  });
210
210
  ```
211
211
 
212
- The generated columns follow the Kysely types, not TailorDB's storage: `text` for string and enum fields, `timestamptz` for datetime, `date` and `time` for date and time, `numeric` for decimal, rounded to the configured scale and read back with exactly that many fractional digits, `jsonb` for nested objects (and arrays of them), Postgres arrays for other array fields. `id` is a generated `uuid` primary key, `.unique()` fields and unique `.indexes()` are enforced, so `ON CONFLICT` upserts behave, and `.default()` values become column defaults (`"now"` becomes the current time). `.serial()` fields are assigned by the database from the configured `start`, `maxValue`, and format. Relations are enforced as the platform does: a row that points at a parent that does not exist is rejected with an error containing `violates foreign key constraint`, so create parent rows before their children. This includes relations on array fields. A relation declared on a field inside a nested object is not enforced, as on the platform.
212
+ The generated columns follow the Kysely types, not TailorDB's storage: `text` for string and enum fields, `timestamptz` for datetime, `date` and `time` for date and time, `numeric` for decimal, rounded to the configured scale and read back with exactly that many fractional digits, `jsonb` for nested objects (and arrays of them), Postgres arrays for other array fields. `id` is a generated `uuid` primary key, `.unique()` fields and unique `.indexes()` are enforced, so `ON CONFLICT` upserts behave, and `.default()` values become column defaults (`"now"` becomes the current time). `.serial()` fields are assigned by the database from the configured `start`, `maxValue`, and format. Relations are enforced as the platform does: a row that points at a parent that does not exist is rejected with an error containing `violates foreign key constraint`, so create parent rows before their children. This includes relations on array fields and on fields inside nested objects.
213
213
 
214
214
  What the script cannot reproduce:
215
215
 
216
216
  - Hooks, validations, and permissions do not run. A required field whose value only its own field-level create hook supplies is created nullable, so inserts that omit it succeed; give it a `.default()` if the test reads it back. A field filled by a table-level hook stays `NOT NULL`, as its Kysely type still requires it on insert.
217
- - Relations on array fields, and relations from a field whose type differs from the field it points at (such as a `string` field related to `id`), are checked only when a row is written. Deleting a parent that such a row still points at is rejected by the platform but not by PGlite, and changing the parent's `id` is not checked either, so a test must not expect PGlite to reject them.
217
+ - Relations on array fields and on fields inside nested objects, and relations from a field whose type differs from the field it points at (such as a `string` field related to `id`), are checked only when a row is written. Deleting a parent that such a row still points at is rejected by the platform but not by PGlite, and changing the parent's `id` is not checked either, so a test must not expect PGlite to reject them.
218
218
  - Serial formats are reproduced for a single `%d`, `%x`, or `%X` specifier with an optional zero-padded width; an octal `%o` format fails generation with an error naming the field.
219
219
  - `gapless` is not reproduced: the numbers come from a sequence, so an insert that fails still uses up its number.
220
220
  - A date or datetime inside a nested object reads back as a string from `jsonb`, not a `Date`, or a `Temporal.PlainDate` or `Temporal.Instant` under `kyselyTypePlugin({ temporal: true })`, although the platform returns those types.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "2.33.0",
3
+ "version": "2.34.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -170,15 +170,15 @@
170
170
  "@opentelemetry/resources": "2.12.0",
171
171
  "@opentelemetry/sdk-trace": "2.12.0",
172
172
  "@opentelemetry/semantic-conventions": "1.43.0",
173
- "@oxc-project/types": "0.154.0",
174
- "@politty/zod": "0.5.2",
173
+ "@oxc-project/types": "0.155.0",
174
+ "@politty/zod": "0.6.1",
175
175
  "@secretlint/core": "13.0.7",
176
176
  "@secretlint/secretlint-rule-preset-recommend": "13.0.7",
177
177
  "@standard-schema/spec": "1.1.0",
178
178
  "@tailor-platform/function-kysely-tailordb": "0.1.3",
179
179
  "@toiroakr/read-multiline": "0.4.3",
180
180
  "@urql/core": "6.0.3",
181
- "amaro": "1.2.1",
181
+ "amaro": "1.2.2",
182
182
  "confbox": "0.3.1",
183
183
  "date-fns": "4.4.0",
184
184
  "es-toolkit": "1.52.0",
@@ -192,12 +192,12 @@
192
192
  "lines-db": "0.18.0",
193
193
  "mime-types": "3.0.2",
194
194
  "open": "11.0.4",
195
- "oxc-parser": "0.154.0",
195
+ "oxc-parser": "0.155.0",
196
196
  "p-limit": "7.3.3",
197
197
  "pathe": "2.0.3",
198
198
  "pgsql-ast-parser": "12.0.2",
199
199
  "pkg-types": "2.4.0",
200
- "rolldown": "1.2.14",
200
+ "rolldown": "1.2.15",
201
201
  "semver": "7.8.5",
202
202
  "sql-highlight": "6.1.0",
203
203
  "std-env": "4.3.0",
@@ -209,18 +209,18 @@
209
209
  "zod": "4.6.7"
210
210
  },
211
211
  "devDependencies": {
212
- "@ark/attest": "0.57.0",
213
- "@electric-sql/pglite": "0.5.10",
212
+ "@ark/attest": "0.58.0",
213
+ "@electric-sql/pglite": "0.5.11",
214
214
  "@tailor-platform/shared": "^0.0.0",
215
215
  "@tailor-platform/tailor-proto": "^0.0.1",
216
216
  "@types/mime-types": "3.0.1",
217
217
  "@types/node": "24.19.2",
218
218
  "@types/semver": "7.8.0",
219
219
  "@vitest/coverage-v8": "5.0.5",
220
- "eslint-plugin-zod": "5.2.0",
221
- "oxfmt": "0.73.0",
222
- "oxlint": "1.88.0",
223
- "oxlint-tsgolint": "7.0.2004",
220
+ "eslint-plugin-zod": "5.2.1",
221
+ "oxfmt": "0.74.0",
222
+ "oxlint": "1.89.0",
223
+ "oxlint-tsgolint": "7.0.2005",
224
224
  "sonda": "0.14.0",
225
225
  "tsdown": "0.23.1",
226
226
  "tsrs": "0.16.0-ts7.1.0-dev.20260929",