@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.
- package/CHANGELOG.md +132 -0
- package/dist/{application-DaJbleMi.mjs → application-Bz80INH4.mjs} +1 -1
- package/dist/application-CeqD1OK-.mjs +207 -0
- package/dist/application-CeqD1OK-.mjs.map +1 -0
- package/dist/cli/commands/deploy/deploy.d.mts +7 -1
- package/dist/cli/commands/deploy/tailordb/migration-validation.d.mts +3 -0
- package/dist/cli/commands/executor/jobs.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/bundler.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/config.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/diff-calculator.d.mts +10 -0
- package/dist/cli/commands/tailordb/migrate/generate.d.mts +28 -2
- package/dist/cli/commands/tailordb/migrate/hints.d.mts +1 -0
- package/dist/cli/commands/tailordb/migrate/remote-state.d.mts +3 -0
- package/dist/cli/commands/tailordb/migrate/schema-checks.d.mts +3 -1
- package/dist/cli/commands/tailordb/migrate/snapshot-comparison.d.mts +4 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-files.d.mts +44 -6
- package/dist/cli/commands/tailordb/migrate/snapshot-local.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-migrations.d.mts +2 -0
- package/dist/cli/commands/tailordb/migrate/snapshot-types.d.mts +8 -0
- package/dist/cli/commands/tailordb/migrate/types.d.mts +2 -0
- package/dist/cli/commands/workspace/create.d.mts +1 -1
- package/dist/cli/lib.d.mts +3 -3
- package/dist/cli/lib.mjs +1 -1
- package/dist/cli/lib.mjs.map +1 -1
- package/dist/cli/main.mjs +65 -58
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/shared/args.d.mts +14 -5
- package/dist/cli/shared/client.d.mts +40 -3
- package/dist/cli/shared/error-json.d.mts +12 -26
- package/dist/cli/shared/function-execution.d.mts +2 -0
- package/dist/cli/shared/prompt.d.mts +9 -4
- package/dist/client-CHXix4LD.mjs +1 -0
- package/dist/client-DOQv-BP8.mjs +2 -0
- package/dist/client-DOQv-BP8.mjs.map +1 -0
- package/dist/completion/zsh-worker.zsh +151 -79
- package/dist/configure/config/index.d.mts +2 -0
- package/dist/configure/config/types.d.mts +2 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/executor/operation.d.mts +5 -4
- package/dist/configure/services/http-adapter/http-adapter.d.mts +1 -1
- package/dist/configure/services/index.d.mts +0 -1
- package/dist/configure/services/tailordb/schema.d.mts +1 -0
- package/dist/configure/services/tailordb/types.d.mts +12 -0
- package/dist/context-DSi5kfqr.mjs +23 -0
- package/dist/context-DSi5kfqr.mjs.map +1 -0
- package/dist/context-OOASEQLA.mjs +1 -0
- package/dist/{crashreport-DGU6lwiX.mjs → crashreport-CQTAlnbA.mjs} +4 -4
- package/dist/{crashreport-DGU6lwiX.mjs.map → crashreport-CQTAlnbA.mjs.map} +1 -1
- package/dist/crashreport-GRnWyDnF.mjs +1 -0
- package/dist/date-representation-Cr7W7Pn2.mjs.map +1 -1
- package/dist/{errors-BXmGBX-7.mjs → errors-9OOL3xOM.mjs} +6 -5
- package/dist/errors-9OOL3xOM.mjs.map +1 -0
- package/dist/field_behavior_pb-B196sUx6.mjs +2 -0
- package/dist/field_behavior_pb-B196sUx6.mjs.map +1 -0
- package/dist/{kysely-type-B0ri1-Xs.mjs → kysely-type-DhAZqdQg.mjs} +14 -10
- package/dist/kysely-type-DhAZqdQg.mjs.map +1 -0
- package/dist/notification_resource_pb-BZ0hCA01.mjs +1 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs +2 -0
- package/dist/notification_resource_pb-Dwzah7gO.mjs.map +1 -0
- package/dist/plugin/builtin/kysely-type/index.mjs +1 -1
- package/dist/plugin/builtin/seed/seed-type-processor.d.mts +4 -3
- package/dist/plugin/get-generated-table.d.mts +4 -0
- package/dist/plugin/index.mjs.map +1 -1
- package/dist/plugin/types.d.mts +55 -3
- package/dist/plugin/with-context.d.mts +16 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs +1094 -0
- package/dist/register-ts-hook-CXYYYgCl.mjs.map +1 -0
- package/dist/repl-editor-Bposemei.mjs +2 -0
- package/dist/repl-editor-Bposemei.mjs.map +1 -0
- package/dist/resource_pb-elY668ZB.mjs +2 -0
- package/dist/resource_pb-elY668ZB.mjs.map +1 -0
- package/dist/schema-BU1aIQ63.mjs.map +1 -1
- package/dist/{secret-file-BxZ-J_Nz.mjs → secret-file-CSXzcg4c.mjs} +2 -2
- package/dist/{secret-file-BxZ-J_Nz.mjs.map → secret-file-CSXzcg4c.mjs.map} +1 -1
- package/dist/{service-CaGmqg0r.mjs → service-B2vx6CGM.mjs} +2 -2
- package/dist/{service-CaGmqg0r.mjs.map → service-B2vx6CGM.mjs.map} +1 -1
- package/dist/service-DB-RHn25.mjs +9 -0
- package/dist/service-DB-RHn25.mjs.map +1 -0
- package/dist/service-DsAWXbVX.mjs +1 -0
- package/dist/service_pb-Bethc2NW.mjs +1 -0
- package/dist/service_pb-CfpSriCy.mjs +2 -0
- package/dist/service_pb-CfpSriCy.mjs.map +1 -0
- package/dist/tailor-proto/src/tailor/v1/function_pb.d.mts +3 -3
- package/dist/tailor-proto/src/tailor/v1/function_resource_pb.d.mts +92 -0
- package/dist/tailor-proto/src/tailor/v1/notification_pb.d.mts +176 -0
- package/dist/tailor-proto/src/tailor/v1/notification_resource_pb.d.mts +172 -0
- package/dist/tailor-proto/src/tailor/v1/service_pb.d.mts +78 -0
- package/dist/types/app-config.generated.d.mts +1 -1
- package/dist/types/auth-connection.generated.d.mts +2 -2
- package/dist/types/auth.generated.d.mts +13 -13
- package/dist/types/executor.generated.d.mts +25 -25
- package/dist/types/field.generated.d.mts +2 -2
- package/dist/types/http-adapter.generated.d.mts +4 -4
- package/dist/types/idp.generated.d.mts +272 -272
- package/dist/types/resolver.generated.d.mts +10 -10
- package/dist/types/tailordb.generated.d.mts +84 -80
- package/dist/types/workflow.generated.d.mts +2 -2
- package/dist/validation-errors-DqCeUW4L.mjs +3 -0
- package/dist/validation-errors-DqCeUW4L.mjs.map +1 -0
- package/{LICENSE → dist/vendor/graphql/LICENSE} +6 -6
- package/dist/vendor/graphql/language/KindTypeMap.d.mts +3 -0
- package/dist/vendor/graphql/language/ast.d.mts +784 -0
- package/dist/vendor/graphql/language/kinds_.d.mts +203 -0
- package/dist/vendor/graphql/language/source.d.mts +46 -0
- package/dist/vendor/graphql/language/tokenKind.d.mts +35 -0
- package/dist/vitest/date-representation.d.mts +2 -0
- package/dist/vitest/environment.d.mts +1 -0
- package/dist/vitest/environment.mjs.map +1 -1
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/migration-steps.d.mts +13 -2
- package/dist/vitest/mock-kysely.d.mts +12 -2
- package/dist/vitest/mocks/aigateway.d.mts +7 -1
- package/dist/vitest/mocks/authconnection.d.mts +7 -1
- package/dist/vitest/mocks/file.d.mts +8 -2
- package/dist/vitest/mocks/iconv.d.mts +7 -1
- package/dist/vitest/mocks/idp.d.mts +7 -1
- package/dist/vitest/mocks/logger.d.mts +7 -1
- package/dist/vitest/mocks/secretmanager.d.mts +7 -1
- package/dist/vitest/mocks/tailordb-pglite.d.mts +12 -2
- package/dist/vitest/mocks/tailordb.d.mts +22 -4
- package/dist/vitest/mocks/workflow.d.mts +2 -1
- package/dist/vitest/pglite-kysely.d.mts +18 -2
- package/dist/vitest/pglite-temporal.d.mts +5 -1
- package/dist/vitest/workflow-local.d.mts +7 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs +2 -0
- package/dist/workspace_resource_pb-Cow7mrJY.mjs.map +1 -0
- package/docs/cli/application.md +63 -29
- package/docs/cli/executor.md +2 -0
- package/docs/cli/function.md +3 -1
- package/docs/cli/notification.md +128 -0
- package/docs/cli/tailordb.md +45 -68
- package/docs/cli/workflow.md +2 -0
- package/docs/cli/workspace.md +20 -18
- package/docs/cli-reference.md +231 -50
- package/docs/configuration.md +2 -2
- package/docs/data-clone.md +1 -1
- package/docs/github-actions.md +266 -41
- package/docs/plugin/custom.md +4 -4
- package/docs/runtime.md +1 -1
- package/docs/services/auth.md +2 -0
- package/docs/services/idp.md +2 -0
- package/docs/services/tailordb/index.md +13 -4
- package/docs/services/tailordb/migration.md +109 -71
- package/docs/services/workflow.md +1 -1
- package/docs/testing.md +9 -10
- package/package.json +23 -19
- package/dist/application-BbORWCj-.mjs +0 -207
- package/dist/application-BbORWCj-.mjs.map +0 -1
- package/dist/configure/services/http-adapter/index.d.mts +0 -2
- package/dist/crashreport-WsYAWARW.mjs +0 -1
- package/dist/errors-BXmGBX-7.mjs.map +0 -1
- package/dist/kysely-type-B0ri1-Xs.mjs.map +0 -1
- package/dist/register-ts-hook-iAcG1dfz.mjs +0 -1057
- package/dist/register-ts-hook-iAcG1dfz.mjs.map +0 -1
- package/dist/repl-editor-DkrCZmmg.mjs +0 -2
- package/dist/repl-editor-DkrCZmmg.mjs.map +0 -1
- package/dist/service-DTrVVaDJ.mjs +0 -1
- package/dist/service-hIarp2Gl.mjs +0 -8
- package/dist/service-hIarp2Gl.mjs.map +0 -1
- package/dist/service_pb-6EkMfdOb.mjs +0 -2
- package/dist/service_pb-6EkMfdOb.mjs.map +0 -1
- package/dist/service_pb-CsJKokDl.mjs +0 -1
- package/dist/workspace_resource_pb-C4CkoYww.mjs +0 -2
- 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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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: "
|
|
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?: "
|
|
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
|
};
|