@tailor-platform/sdk 2.36.0 → 2.38.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 (164) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/dist/{application-DaJbleMi.mjs → application-Bz80INH4.mjs} +1 -1
  3. package/dist/application-CeqD1OK-.mjs +207 -0
  4. package/dist/application-CeqD1OK-.mjs.map +1 -0
  5. package/dist/cli/commands/deploy/deploy.d.mts +7 -1
  6. package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +3 -0
  7. package/dist/cli/commands/executor/jobs.d.mts +3 -0
  8. package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
  9. package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
  10. package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
  11. package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
  12. package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
  13. package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
  14. package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
  15. package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
  16. package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
  17. package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
  18. package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
  19. package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
  20. package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
  21. package/dist/cli/commands/workspace/create.d.mts +1 -1
  22. package/dist/cli/lib.d.mts +3 -3
  23. package/dist/cli/lib.mjs +1 -1
  24. package/dist/cli/lib.mjs.map +1 -1
  25. package/dist/cli/main.mjs +65 -58
  26. package/dist/cli/main.mjs.map +1 -1
  27. package/dist/cli/shared/args.d.mts +14 -5
  28. package/dist/cli/shared/client.d.mts +40 -3
  29. package/dist/cli/shared/error-json.d.mts +12 -26
  30. package/dist/cli/shared/function-execution.d.mts +2 -0
  31. package/dist/cli/shared/prompt.d.mts +9 -4
  32. package/dist/client-CHXix4LD.mjs +1 -0
  33. package/dist/client-DOQv-BP8.mjs +2 -0
  34. package/dist/client-DOQv-BP8.mjs.map +1 -0
  35. package/dist/completion/zsh-worker.zsh +151 -79
  36. package/dist/configure/config/index.d.mts +2 -0
  37. package/dist/configure/config/types.d.mts +2 -0
  38. package/dist/configure/index.mjs.map +1 -1
  39. package/dist/configure/services/executor/operation.d.mts +5 -4
  40. package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
  41. package/dist/configure/services/index.d.mts +0 -1
  42. package/dist/configure/services/tailordb/schema.d.mts +1 -0
  43. package/dist/configure/services/tailordb/types.d.mts +12 -0
  44. package/dist/context-DSi5kfqr.mjs +23 -0
  45. package/dist/context-DSi5kfqr.mjs.map +1 -0
  46. package/dist/context-OOASEQLA.mjs +1 -0
  47. package/dist/{crashreport-DGU6lwiX.mjs → crashreport-CQTAlnbA.mjs} +4 -4
  48. package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
  49. package/dist/crashreport-GRnWyDnF.mjs +1 -0
  50. package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
  51. package/dist/{errors-BXmGBX-7.mjs → errors-9OOL3xOM.mjs} +6 -5
  52. package/dist/errors-9OOL3xOM.mjs.map +1 -0
  53. package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
  54. package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
  55. package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
  56. package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
  57. package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
  58. package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
  59. package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
  60. package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
  61. package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
  62. package/dist/plugin/get-generated-table.d.mts +4 -0
  63. package/dist/plugin/index.mjs.map +1 -1
  64. package/dist/plugin/types.d.mts +55 -3
  65. package/dist/plugin/with-context.d.mts +16 -0
  66. package/dist/register-ts-hook-CXYYYgCl.mjs +1094 -0
  67. package/dist/register-ts-hook-CXYYYgCl.mjs.map +1 -0
  68. package/dist/repl-editor-Bposemei.mjs +2 -0
  69. package/dist/repl-editor-Bposemei.mjs.map +1 -0
  70. package/dist/resource_pb-elY668ZB.mjs +2 -0
  71. package/dist/resource_pb-elY668ZB.mjs.map +1 -0
  72. package/dist/schema-BU1aIQ63.mjs.map +1 -1
  73. package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-CSXzcg4c.mjs} +2 -2
  74. package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
  75. package/dist/{service-CaGmqg0r.mjs → service-B2vx6CGM.mjs} +2 -2
  76. package/dist/{service-CaGmqg0r.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
  77. package/dist/service-DB-RHn25.mjs +9 -0
  78. package/dist/service-DB-RHn25.mjs.map +1 -0
  79. package/dist/service-DsAWXbVX.mjs +1 -0
  80. package/dist/service_pb-Bethc2NW.mjs +1 -0
  81. package/dist/service_pb-CfpSriCy.mjs +2 -0
  82. package/dist/service_pb-CfpSriCy.mjs.map +1 -0
  83. package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
  84. package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
  85. package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
  86. package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
  87. package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
  88. package/dist/types/app-config.generated.d.mts +1 -1
  89. package/dist/types/auth-connection.generated.d.mts +2 -2
  90. package/dist/types/auth.generated.d.mts +13 -13
  91. package/dist/types/executor.generated.d.mts +25 -25
  92. package/dist/types/field.generated.d.mts +2 -2
  93. package/dist/types/http-adapter.generated.d.mts +4 -4
  94. package/dist/types/idp.generated.d.mts +272 -272
  95. package/dist/types/resolver.generated.d.mts +10 -10
  96. package/dist/types/tailordb.generated.d.mts +84 -80
  97. package/dist/types/workflow.generated.d.mts +2 -2
  98. package/dist/validation-errors-DqCeUW4L.mjs +3 -0
  99. package/dist/validation-errors-DqCeUW4L.mjs.map +1 -0
  100. package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
  101. package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
  102. package/dist/vendor/graphql/language/ast.d.mts +784 -0
  103. package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
  104. package/dist/vendor/graphql/language/source.d.mts +46 -0
  105. package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
  106. package/dist/vitest/date-representation.d.mts +2 -0
  107. package/dist/vitest/environment.d.mts +1 -0
  108. package/dist/vitest/environment.mjs.map +1 -1
  109. package/dist/vitest/index.mjs.map +1 -1
  110. package/dist/vitest/migration-steps.d.mts +13 -2
  111. package/dist/vitest/mock-kysely.d.mts +12 -2
  112. package/dist/vitest/mocks/aigateway.d.mts +7 -1
  113. package/dist/vitest/mocks/authconnection.d.mts +7 -1
  114. package/dist/vitest/mocks/file.d.mts +8 -2
  115. package/dist/vitest/mocks/iconv.d.mts +7 -1
  116. package/dist/vitest/mocks/idp.d.mts +7 -1
  117. package/dist/vitest/mocks/logger.d.mts +7 -1
  118. package/dist/vitest/mocks/secretmanager.d.mts +7 -1
  119. package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
  120. package/dist/vitest/mocks/tailordb.d.mts +22 -4
  121. package/dist/vitest/mocks/workflow.d.mts +2 -1
  122. package/dist/vitest/pglite-kysely.d.mts +18 -2
  123. package/dist/vitest/pglite-temporal.d.mts +5 -1
  124. package/dist/vitest/workflow-local.d.mts +7 -0
  125. package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
  126. package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
  127. package/docs/cli/application.md +63 -29
  128. package/docs/cli/executor.md +2 -0
  129. package/docs/cli/function.md +3 -1
  130. package/docs/cli/notification.md +128 -0
  131. package/docs/cli/tailordb.md +45 -68
  132. package/docs/cli/workflow.md +2 -0
  133. package/docs/cli/workspace.md +20 -18
  134. package/docs/cli-reference.md +231 -50
  135. package/docs/configuration.md +2 -2
  136. package/docs/data-clone.md +1 -1
  137. package/docs/github-actions.md +266 -41
  138. package/docs/plugin/custom.md +4 -4
  139. package/docs/runtime.md +1 -1
  140. package/docs/services/auth.md +2 -0
  141. package/docs/services/idp.md +2 -0
  142. package/docs/services/tailordb/index.md +13 -4
  143. package/docs/services/tailordb/migration.md +109 -71
  144. package/docs/services/workflow.md +1 -1
  145. package/docs/testing.md +9 -10
  146. package/package.json +23 -19
  147. package/dist/application-BbORWCj-.mjs +0 -207
  148. package/dist/application-BbORWCj-.mjs.map +0 -1
  149. package/dist/configure/services/http-adapter/index.d.mts +0 -2
  150. package/dist/crashreport-WsYAWARW.mjs +0 -1
  151. package/dist/errors-BXmGBX-7.mjs.map +0 -1
  152. package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
  153. package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
  154. package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
  155. package/dist/repl-editor-DkrCZmmg.mjs +0 -2
  156. package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
  157. package/dist/service-DTrVVaDJ.mjs +0 -1
  158. package/dist/service-hIarp2Gl.mjs +0 -8
  159. package/dist/service-hIarp2Gl.mjs.map +0 -1
  160. package/dist/service_pb-6EkMfdOb.mjs +0 -2
  161. package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
  162. package/dist/service_pb-CsJKokDl.mjs +0 -1
  163. package/dist/workspace_resource_pb-C4CkoYww.mjs +0 -2
  164. package/dist/workspace_resource_pb-C4CkoYww.mjs.map +0 -1
@@ -3,7 +3,7 @@ export type TailorDBTrigger = {
3
3
  /** TailorDB record event trigger */
4
4
  kind: "tailordb";
5
5
  /** TailorDB event types to trigger on */
6
- events: ("tailordb.type_record.created" | "tailordb.type_record.updated" | "tailordb.type_record.deleted")[];
6
+ events: ("tailordb.type_record.created" | "tailordb.type_record.deleted" | "tailordb.type_record.updated")[];
7
7
  /** TailorDB table name to watch for events */
8
8
  tableName: string;
9
9
  /** Condition function to filter events */
@@ -45,7 +45,7 @@ export type IdpUserTrigger = {
45
45
  /** IdP user event trigger */
46
46
  kind: "idpUser";
47
47
  /** IdP user event types to trigger on */
48
- events: ("idp.user.created" | "idp.user.updated" | "idp.user.deleted")[];
48
+ events: ("idp.user.created" | "idp.user.deleted" | "idp.user.updated")[];
49
49
  /** IdP namespace name to subscribe to. If omitted, the project's only IdP is used; throws when multiple IdPs exist. */
50
50
  idp?: string | undefined;
51
51
  };
@@ -59,7 +59,7 @@ export type WorkflowExecutionTrigger = {
59
59
  /** Workflow execution event trigger */
60
60
  kind: "workflowExecution";
61
61
  /** Workflow execution event types to trigger on */
62
- events: ("workflow.workflow_execution.started" | "workflow.workflow_execution.completed" | "workflow.workflow_execution.retried" | "workflow.workflow_execution.resumed" | "workflow.workflow_execution.wait_started" | "workflow.workflow_execution.wait_resolved")[];
62
+ events: ("workflow.workflow_execution.completed" | "workflow.workflow_execution.resumed" | "workflow.workflow_execution.retried" | "workflow.workflow_execution.started" | "workflow.workflow_execution.wait_resolved" | "workflow.workflow_execution.wait_started")[];
63
63
  /** Workflow name to subscribe to. */
64
64
  workflowName: string;
65
65
  /** Condition function to filter events */
@@ -69,7 +69,7 @@ export type WorkflowJobExecutionTrigger = {
69
69
  /** Workflow job execution event trigger */
70
70
  kind: "workflowJobExecution";
71
71
  /** Workflow job execution event types to trigger on */
72
- events: ("workflow.workflow_execution.job_execution.started" | "workflow.workflow_execution.job_execution.completed" | "workflow.workflow_execution.job_execution.wait_started" | "workflow.workflow_execution.job_execution.wait_resolved")[];
72
+ events: ("workflow.workflow_execution.job_execution.completed" | "workflow.workflow_execution.job_execution.started" | "workflow.workflow_execution.job_execution.wait_resolved" | "workflow.workflow_execution.job_execution.wait_started")[];
73
73
  /** Workflow name to subscribe to. */
74
74
  workflowName: string;
75
75
  /** Condition function to filter events */
@@ -91,9 +91,9 @@ export type FunctionOperation = {
91
91
  };
92
92
  export type GqlOperationInput = {
93
93
  kind: "graphql";
94
- query: unknown;
95
94
  /** Target application name for the GraphQL query */
96
95
  appName?: string | undefined;
96
+ query: unknown;
97
97
  /** Function to compute GraphQL variables */
98
98
  variables?: Function | undefined;
99
99
  /** Invoker for the GraphQL execution */
@@ -106,9 +106,9 @@ export type GqlOperationInput = {
106
106
  };
107
107
  export type GqlOperation = {
108
108
  kind: "graphql";
109
- query: string;
110
109
  /** Target application name for the GraphQL query */
111
110
  appName?: string | undefined;
111
+ query: string;
112
112
  /** Function to compute GraphQL variables */
113
113
  variables?: Function | undefined;
114
114
  /** Invoker for the GraphQL execution */
@@ -141,13 +141,7 @@ export type WorkflowInput = string | number | boolean | JsonValue[] | {
141
141
  */
142
142
  export type WorkflowOperationArgs = WorkflowInput | Function;
143
143
  export type WorkflowOperationInput = {
144
- workflow: {
145
- [x: string]: unknown;
146
- name: string;
147
- };
148
144
  kind: "workflow";
149
- /** Name of the workflow to execute */
150
- workflowName?: string | undefined;
151
145
  /** Arguments to pass to the workflow */
152
146
  args?: WorkflowOperationArgs;
153
147
  /** Invoker for the workflow execution */
@@ -157,11 +151,14 @@ export type WorkflowOperationInput = {
157
151
  /** Machine user name for authentication */
158
152
  machineUserName: string;
159
153
  } | undefined;
160
- } | {
154
+ workflow: {
155
+ [x: string]: unknown;
156
+ name: string;
157
+ };
161
158
  /** Name of the workflow to execute */
162
- workflowName: string;
159
+ workflowName?: string | undefined;
160
+ } | {
163
161
  kind: "workflow";
164
- workflow?: undefined;
165
162
  /** Arguments to pass to the workflow */
166
163
  args?: WorkflowOperationArgs;
167
164
  /** Invoker for the workflow execution */
@@ -171,10 +168,11 @@ export type WorkflowOperationInput = {
171
168
  /** Machine user name for authentication */
172
169
  machineUserName: string;
173
170
  } | undefined;
174
- };
175
- export type WorkflowOperation = {
176
171
  /** Name of the workflow to execute */
177
172
  workflowName: string;
173
+ workflow?: undefined;
174
+ };
175
+ export type WorkflowOperation = {
178
176
  kind: "workflow";
179
177
  /** Arguments to pass to the workflow */
180
178
  args?: WorkflowOperationArgs;
@@ -185,11 +183,10 @@ export type WorkflowOperation = {
185
183
  /** Machine user name for authentication */
186
184
  machineUserName: string;
187
185
  } | undefined;
188
- } | {
189
186
  /** Name of the workflow to execute */
190
187
  workflowName: string;
188
+ } | {
191
189
  kind: "workflow";
192
- workflow?: undefined;
193
190
  /** Arguments to pass to the workflow */
194
191
  args?: WorkflowOperationArgs;
195
192
  /** Invoker for the workflow execution */
@@ -199,30 +196,33 @@ export type WorkflowOperation = {
199
196
  /** Machine user name for authentication */
200
197
  machineUserName: string;
201
198
  } | undefined;
199
+ /** Name of the workflow to execute */
200
+ workflowName: string;
201
+ workflow?: undefined;
202
202
  };
203
203
  export type OperationInput = FunctionOperation | GqlOperationInput | WebhookOperation | WorkflowOperationInput;
204
204
  export type Operation = FunctionOperation | GqlOperation | WebhookOperation | WorkflowOperation;
205
205
  export type ExecutorInput = {
206
206
  /** Executor name */
207
207
  name: string;
208
- /** Event trigger configuration */
209
- trigger: TriggerInput;
210
- /** Operation to execute when triggered */
211
- operation: OperationInput;
212
208
  /** Executor description */
213
209
  description?: string | undefined;
214
210
  /** Whether the executor is disabled */
215
211
  disabled?: boolean | undefined;
212
+ /** Event trigger configuration */
213
+ trigger: TriggerInput;
214
+ /** Operation to execute when triggered */
215
+ operation: OperationInput;
216
216
  };
217
217
  export type Executor = {
218
218
  /** Executor name */
219
219
  name: string;
220
+ /** Executor description */
221
+ description?: string | undefined;
220
222
  /** Whether the executor is disabled */
221
223
  disabled: boolean;
222
224
  /** Event trigger configuration */
223
225
  trigger: Trigger;
224
226
  /** Operation to execute when triggered */
225
227
  operation: Operation;
226
- /** Executor description */
227
- description?: string | undefined;
228
228
  };
@@ -1,10 +1,10 @@
1
1
  export type TailorField = {
2
2
  /** Field data type */
3
- type: "string" | "boolean" | "uuid" | "integer" | "float" | "decimal" | "enum" | "date" | "datetime" | "time" | "nested";
3
+ type: "boolean" | "date" | "datetime" | "decimal" | "enum" | "float" | "integer" | "nested" | "string" | "time" | "uuid";
4
4
  /** Field metadata configuration */
5
5
  metadata: {
6
6
  /** Date value representation; "default" follows defaultDateRepresentation */
7
- as?: "string" | "date" | "temporal" | "default" | undefined;
7
+ as?: "date" | "default" | "string" | "temporal" | undefined;
8
8
  /** Whether the field is required */
9
9
  required?: boolean | undefined;
10
10
  /** Whether the field is an array */
@@ -3,6 +3,10 @@ export type HttpAdapterConfigInput = {
3
3
  name: string;
4
4
  /** Path pattern with segment wildcards (trailing or single-segment) */
5
5
  pathPattern: string;
6
+ /** Whether the adapter is active */
7
+ enabled?: boolean | undefined;
8
+ /** Matching priority; the lowest value wins when multiple adapters match */
9
+ priority?: number | undefined;
6
10
  /** Per-method functions that transform HTTP requests to GraphQL requests */
7
11
  input: {
8
12
  /** Handler for GET requests */
@@ -16,10 +20,6 @@ export type HttpAdapterConfigInput = {
16
20
  /** Handler for DELETE requests */
17
21
  delete?: Function | undefined;
18
22
  };
19
- /** Whether the adapter is active */
20
- enabled?: boolean | undefined;
21
- /** Matching priority; the lowest value wins when multiple adapters match */
22
- priority?: number | undefined;
23
23
  /** Function that transforms GraphQL response to HTTP response */
24
24
  output?: Function | undefined;
25
25
  };