@zapier/zapier-sdk 0.70.3 → 0.71.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 +35 -0
- package/README.md +248 -95
- package/dist/api/approval-review-stream.d.ts +25 -0
- package/dist/api/approval-review-stream.d.ts.map +1 -0
- package/dist/api/approval-review-stream.js +104 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +215 -27
- package/dist/api/types.d.ts +13 -3
- package/dist/api/types.d.ts.map +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +6 -0
- package/dist/experimental.cjs +702 -67
- package/dist/experimental.d.mts +242 -2
- package/dist/experimental.d.ts +240 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +10 -0
- package/dist/experimental.mjs +702 -68
- package/dist/{index-rIzBEINC.d.mts → index-B43uST61.d.mts} +248 -10
- package/dist/{index-rIzBEINC.d.ts → index-B43uST61.d.ts} +248 -10
- package/dist/index.cjs +592 -32
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +592 -33
- package/dist/plugins/api/index.d.ts.map +1 -1
- package/dist/plugins/api/index.js +2 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +5 -5
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +1 -1
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +31 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +42 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +20 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +35 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +13 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +10 -0
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +3 -3
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +3 -3
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +22 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +26 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +10 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +32 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +11 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +22 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +14 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +11 -44
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts +6 -0
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/runDurable/index.js +3 -0
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts +12 -0
- package/dist/plugins/codeSubstrate/runDurable/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/runDurable/schemas.js +33 -0
- package/dist/plugins/codeSubstrate/shared-schemas.d.ts +37 -0
- package/dist/plugins/codeSubstrate/shared-schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/shared-schemas.js +69 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts +9 -0
- package/dist/plugins/codeSubstrate/triggerWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +11 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +2 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +7 -0
- package/dist/plugins/createConnection/index.d.ts +189 -0
- package/dist/plugins/createConnection/index.d.ts.map +1 -0
- package/dist/plugins/createConnection/index.js +71 -0
- package/dist/plugins/createConnection/schemas.d.ts +21 -0
- package/dist/plugins/createConnection/schemas.d.ts.map +1 -0
- package/dist/plugins/createConnection/schemas.js +38 -0
- package/dist/plugins/getConnectionStartUrl/index.d.ts +206 -0
- package/dist/plugins/getConnectionStartUrl/index.d.ts.map +1 -0
- package/dist/plugins/getConnectionStartUrl/index.js +39 -0
- package/dist/plugins/getConnectionStartUrl/schemas.d.ts +15 -0
- package/dist/plugins/getConnectionStartUrl/schemas.d.ts.map +1 -0
- package/dist/plugins/getConnectionStartUrl/schemas.js +23 -0
- package/dist/plugins/waitForNewConnection/index.d.ts +209 -0
- package/dist/plugins/waitForNewConnection/index.d.ts.map +1 -0
- package/dist/plugins/waitForNewConnection/index.js +75 -0
- package/dist/plugins/waitForNewConnection/schemas.d.ts +17 -0
- package/dist/plugins/waitForNewConnection/schemas.d.ts.map +1 -0
- package/dist/plugins/waitForNewConnection/schemas.js +39 -0
- package/dist/sdk.d.ts +126 -0
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +8 -0
- package/dist/types/errors.d.ts +13 -4
- package/dist/types/errors.d.ts.map +1 -1
- package/dist/types/errors.js +2 -0
- package/dist/types/sdk.d.ts +1 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +5 -1
- package/dist/utils/open-url.d.ts.map +1 -1
- package/dist/utils/open-url.js +7 -0
- package/dist/utils/should-open-browser.d.ts +24 -0
- package/dist/utils/should-open-browser.d.ts.map +1 -0
- package/dist/utils/should-open-browser.js +55 -0
- package/package.json +1 -1
|
@@ -6,6 +6,19 @@ export declare const WorkflowVersionListItemSchema: z.ZodObject<{
|
|
|
6
6
|
dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7
7
|
created_by_user_id: z.ZodString;
|
|
8
8
|
created_at: z.ZodString;
|
|
9
|
+
trigger: z.ZodNullable<z.ZodObject<{
|
|
10
|
+
selected_api: z.ZodString;
|
|
11
|
+
action: z.ZodString;
|
|
12
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
16
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
17
|
+
}, z.core.$strip>>>;
|
|
18
|
+
app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
19
|
+
implementation_name: z.ZodString;
|
|
20
|
+
version: z.ZodOptional<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
9
22
|
}, z.core.$strip>;
|
|
10
23
|
export type WorkflowVersionListItem = z.infer<typeof WorkflowVersionListItemSchema>;
|
|
11
24
|
export declare const ListWorkflowVersionsOptionsSchema: z.ZodObject<{
|
|
@@ -23,6 +36,19 @@ export declare const ListWorkflowVersionsApiResponseSchema: z.ZodObject<{
|
|
|
23
36
|
dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
24
37
|
created_by_user_id: z.ZodString;
|
|
25
38
|
created_at: z.ZodString;
|
|
39
|
+
trigger: z.ZodNullable<z.ZodObject<{
|
|
40
|
+
selected_api: z.ZodString;
|
|
41
|
+
action: z.ZodString;
|
|
42
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
43
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
44
|
+
}, z.core.$strip>>;
|
|
45
|
+
connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
46
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
47
|
+
}, z.core.$strip>>>;
|
|
48
|
+
app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
49
|
+
implementation_name: z.ZodString;
|
|
50
|
+
version: z.ZodOptional<z.ZodString>;
|
|
51
|
+
}, z.core.$strip>>>;
|
|
26
52
|
}, z.core.$strip>>;
|
|
27
53
|
meta: z.ZodObject<{
|
|
28
54
|
limit: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflowVersions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflowVersions/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;iBA2BxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;iBAkBqB,CAAC;AAEpE,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAC/C,OAAO,iCAAiC,CACzC,CAAC;AAEF,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAYhD,CAAC;AAEH,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,qCAAqC,CAC7C,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { AppVersionBindingSchema, ConnectionBindingSchema, WorkflowVersionTriggerConfigSchema, } from "../shared-schemas";
|
|
2
3
|
export const WorkflowVersionListItemSchema = z.object({
|
|
3
4
|
id: z.string().describe("Workflow version ID (UUID)"),
|
|
4
5
|
workflow_id: z.string().describe("Parent workflow ID (UUID)"),
|
|
@@ -13,6 +14,15 @@ export const WorkflowVersionListItemSchema = z.object({
|
|
|
13
14
|
.string()
|
|
14
15
|
.describe("ID of the user who published this version"),
|
|
15
16
|
created_at: z.string().describe("When the version was published (ISO-8601)"),
|
|
17
|
+
trigger: WorkflowVersionTriggerConfigSchema.nullable().describe("Trigger configuration persisted on this version, or null for webhook-only workflows."),
|
|
18
|
+
connections: z
|
|
19
|
+
.record(z.string(), ConnectionBindingSchema)
|
|
20
|
+
.nullable()
|
|
21
|
+
.describe("Connection aliases bound on this version (or null)."),
|
|
22
|
+
app_versions: z
|
|
23
|
+
.record(z.string(), AppVersionBindingSchema)
|
|
24
|
+
.nullable()
|
|
25
|
+
.describe("App-version pins bound on this version (or null)."),
|
|
16
26
|
});
|
|
17
27
|
export const ListWorkflowVersionsOptionsSchema = z
|
|
18
28
|
.object({
|
|
@@ -35,7 +35,16 @@ export declare const listWorkflowsPlugin: (sdk: {
|
|
|
35
35
|
description: string | null;
|
|
36
36
|
trigger_url: string;
|
|
37
37
|
enabled: boolean;
|
|
38
|
+
is_private: boolean;
|
|
39
|
+
created_by_user_id: string | null;
|
|
38
40
|
current_version_id: string | null;
|
|
41
|
+
triggers: {
|
|
42
|
+
selected_api: string;
|
|
43
|
+
action: string;
|
|
44
|
+
status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
|
|
45
|
+
authentication_id?: string | null | undefined;
|
|
46
|
+
params?: Record<string, unknown> | undefined;
|
|
47
|
+
}[];
|
|
39
48
|
created_at: string;
|
|
40
49
|
updated_at: string;
|
|
41
50
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflows/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflows/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B/B,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAClD,OAAO,mBAAmB,CAC3B,CAAC"}
|
|
@@ -5,7 +5,23 @@ export declare const WorkflowItemSchema: z.ZodObject<{
|
|
|
5
5
|
description: z.ZodNullable<z.ZodString>;
|
|
6
6
|
trigger_url: z.ZodString;
|
|
7
7
|
enabled: z.ZodBoolean;
|
|
8
|
+
is_private: z.ZodBoolean;
|
|
9
|
+
created_by_user_id: z.ZodNullable<z.ZodString>;
|
|
8
10
|
current_version_id: z.ZodNullable<z.ZodString>;
|
|
11
|
+
triggers: z.ZodArray<z.ZodObject<{
|
|
12
|
+
selected_api: z.ZodString;
|
|
13
|
+
action: z.ZodString;
|
|
14
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
15
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
|
+
status: z.ZodEnum<{
|
|
17
|
+
failed: "failed";
|
|
18
|
+
pending: "pending";
|
|
19
|
+
active: "active";
|
|
20
|
+
unclaimed: "unclaimed";
|
|
21
|
+
releasing: "releasing";
|
|
22
|
+
released: "released";
|
|
23
|
+
}>;
|
|
24
|
+
}, z.core.$strip>>;
|
|
9
25
|
created_at: z.ZodString;
|
|
10
26
|
updated_at: z.ZodString;
|
|
11
27
|
}, z.core.$strip>;
|
|
@@ -30,7 +46,23 @@ export declare const ListWorkflowsApiResponseSchema: z.ZodObject<{
|
|
|
30
46
|
description: z.ZodNullable<z.ZodString>;
|
|
31
47
|
trigger_url: z.ZodString;
|
|
32
48
|
enabled: z.ZodBoolean;
|
|
49
|
+
is_private: z.ZodBoolean;
|
|
50
|
+
created_by_user_id: z.ZodNullable<z.ZodString>;
|
|
33
51
|
current_version_id: z.ZodNullable<z.ZodString>;
|
|
52
|
+
triggers: z.ZodArray<z.ZodObject<{
|
|
53
|
+
selected_api: z.ZodString;
|
|
54
|
+
action: z.ZodString;
|
|
55
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
56
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
57
|
+
status: z.ZodEnum<{
|
|
58
|
+
failed: "failed";
|
|
59
|
+
pending: "pending";
|
|
60
|
+
active: "active";
|
|
61
|
+
unclaimed: "unclaimed";
|
|
62
|
+
releasing: "releasing";
|
|
63
|
+
released: "released";
|
|
64
|
+
}>;
|
|
65
|
+
}, z.core.$strip>>;
|
|
34
66
|
created_at: z.ZodString;
|
|
35
67
|
updated_at: z.ZodString;
|
|
36
68
|
}, z.core.$strip>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflows/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/listWorkflows/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,0BAA0B;;;;iBAuBuC,CAAC;AAE/E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAGzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { WorkflowTriggerSchema } from "../shared-schemas";
|
|
2
3
|
export const WorkflowItemSchema = z.object({
|
|
3
4
|
id: z.string().describe("Workflow ID (UUID)"),
|
|
4
5
|
name: z.string().describe("Workflow name"),
|
|
@@ -12,10 +13,20 @@ export const WorkflowItemSchema = z.object({
|
|
|
12
13
|
enabled: z
|
|
13
14
|
.boolean()
|
|
14
15
|
.describe("Whether the workflow currently accepts triggers"),
|
|
16
|
+
is_private: z
|
|
17
|
+
.boolean()
|
|
18
|
+
.describe("Whether the workflow is private to the creating user. False means account-visible."),
|
|
19
|
+
created_by_user_id: z
|
|
20
|
+
.string()
|
|
21
|
+
.nullable()
|
|
22
|
+
.describe("User ID of the workflow creator (null in legacy data)"),
|
|
15
23
|
current_version_id: z
|
|
16
24
|
.string()
|
|
17
25
|
.nullable()
|
|
18
26
|
.describe("ID of the workflow version that runs handle. Null until a version is published."),
|
|
27
|
+
triggers: z
|
|
28
|
+
.array(WorkflowTriggerSchema)
|
|
29
|
+
.describe("Trigger configurations from the current version, with live claim status. Empty array when the workflow has no triggers."),
|
|
19
30
|
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
20
31
|
updated_at: z
|
|
21
32
|
.string()
|
|
@@ -31,7 +31,16 @@ export declare const publishWorkflowVersionPlugin: (sdk: {
|
|
|
31
31
|
description: string | null;
|
|
32
32
|
trigger_url: string;
|
|
33
33
|
enabled: boolean;
|
|
34
|
+
is_private: boolean;
|
|
35
|
+
created_by_user_id: string | null;
|
|
34
36
|
current_version_id: string | null;
|
|
37
|
+
triggers: {
|
|
38
|
+
selected_api: string;
|
|
39
|
+
action: string;
|
|
40
|
+
status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
|
|
41
|
+
authentication_id?: string | null | undefined;
|
|
42
|
+
params?: Record<string, unknown> | undefined;
|
|
43
|
+
}[];
|
|
35
44
|
created_at: string;
|
|
36
45
|
updated_at: string;
|
|
37
46
|
}>;
|
|
@@ -74,6 +83,19 @@ export declare const publishWorkflowVersionPlugin: (sdk: {
|
|
|
74
83
|
dependencies: Record<string, string> | null;
|
|
75
84
|
created_by_user_id: string;
|
|
76
85
|
created_at: string;
|
|
86
|
+
trigger: {
|
|
87
|
+
selected_api: string;
|
|
88
|
+
action: string;
|
|
89
|
+
authentication_id?: string | null | undefined;
|
|
90
|
+
params?: Record<string, unknown> | undefined;
|
|
91
|
+
} | null;
|
|
92
|
+
connections: Record<string, {
|
|
93
|
+
connection_id: string | number;
|
|
94
|
+
}> | null;
|
|
95
|
+
app_versions: Record<string, {
|
|
96
|
+
implementation_name: string;
|
|
97
|
+
version?: string | undefined;
|
|
98
|
+
}> | null;
|
|
77
99
|
};
|
|
78
100
|
}>;
|
|
79
101
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDxC,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,UAAU,CAC3D,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -6,7 +6,7 @@ export declare const PublishWorkflowVersionOptionsSchema: z.ZodObject<{
|
|
|
6
6
|
zapier_durable_version: z.ZodOptional<z.ZodString>;
|
|
7
7
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
8
8
|
connections: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
9
|
-
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>;
|
|
9
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
10
10
|
}, z.core.$strip>>>>;
|
|
11
11
|
app_versions: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
12
12
|
implementation_name: z.ZodString;
|
|
@@ -28,6 +28,19 @@ export declare const PublishWorkflowVersionResponseSchema: z.ZodObject<{
|
|
|
28
28
|
dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
29
29
|
created_by_user_id: z.ZodString;
|
|
30
30
|
created_at: z.ZodString;
|
|
31
|
+
trigger: z.ZodNullable<z.ZodObject<{
|
|
32
|
+
selected_api: z.ZodString;
|
|
33
|
+
action: z.ZodString;
|
|
34
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
35
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
36
|
+
}, z.core.$strip>>;
|
|
37
|
+
connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
38
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
39
|
+
}, z.core.$strip>>>;
|
|
40
|
+
app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
41
|
+
implementation_name: z.ZodString;
|
|
42
|
+
version: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
31
44
|
}, z.core.$strip>;
|
|
32
45
|
export type PublishWorkflowVersionResponse = z.infer<typeof PublishWorkflowVersionResponseSchema>;
|
|
33
46
|
//# sourceMappingURL=schemas.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/publishWorkflowVersion/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;iBA2C7C,CAAC;AAEJ,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;iBA8B/C,CAAC;AAEH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC"}
|
|
@@ -1,47 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
// positive integer (legacy) or UUID string (newer). Matches the regex
|
|
4
|
-
// on durableworkflowzaps's CreateWorkflowVersionRequest schema.
|
|
5
|
-
const CONNECTION_ID_PATTERN = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
6
|
-
const ConnectionBindingSchema = z
|
|
7
|
-
.object({
|
|
8
|
-
connection_id: z
|
|
9
|
-
.union([
|
|
10
|
-
z.number().int().positive(),
|
|
11
|
-
z
|
|
12
|
-
.string()
|
|
13
|
-
.regex(CONNECTION_ID_PATTERN, "connection_id must be a positive integer string or UUID"),
|
|
14
|
-
])
|
|
15
|
-
.describe("Zapier connection ID. Positive integer (legacy) or UUID string (newer)."),
|
|
16
|
-
})
|
|
17
|
-
.describe("Connection binding: maps a single alias to a concrete connection.");
|
|
18
|
-
const AppVersionBindingSchema = z
|
|
19
|
-
.object({
|
|
20
|
-
implementation_name: z
|
|
21
|
-
.string()
|
|
22
|
-
.describe("App implementation identifier (e.g. 'SlackCLIAPI')"),
|
|
23
|
-
version: z
|
|
24
|
-
.string()
|
|
25
|
-
.optional()
|
|
26
|
-
.describe("App implementation version (e.g. '1.27.1')"),
|
|
27
|
-
})
|
|
28
|
-
.describe("App-version binding: maps a single alias to an app version.");
|
|
29
|
-
const TriggerConfigSchema = z
|
|
30
|
-
.object({
|
|
31
|
-
selected_api: z
|
|
32
|
-
.string()
|
|
33
|
-
.describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
34
|
-
action: z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
35
|
-
authentication_id: z
|
|
36
|
-
.string()
|
|
37
|
-
.nullish()
|
|
38
|
-
.describe("Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier)."),
|
|
39
|
-
params: z
|
|
40
|
-
.record(z.string(), z.unknown())
|
|
41
|
-
.optional()
|
|
42
|
-
.describe("Trigger parameters as a JSON object"),
|
|
43
|
-
})
|
|
44
|
-
.describe("Zapier trigger configuration. When set, the workflow subscribes to trigger events.");
|
|
2
|
+
import { AppVersionBindingSchema, ConnectionBindingSchema, WorkflowVersionTriggerConfigSchema, } from "../shared-schemas";
|
|
45
3
|
export const PublishWorkflowVersionOptionsSchema = z
|
|
46
4
|
.object({
|
|
47
5
|
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
@@ -71,7 +29,7 @@ export const PublishWorkflowVersionOptionsSchema = z
|
|
|
71
29
|
.record(z.string(), AppVersionBindingSchema)
|
|
72
30
|
.nullish()
|
|
73
31
|
.describe("Map of app keys to pinned app implementation/version used by the workflow. Pass `null` to clear an existing binding."),
|
|
74
|
-
trigger:
|
|
32
|
+
trigger: WorkflowVersionTriggerConfigSchema.optional().describe("Trigger configuration. When provided, the workflow subscribes to a Zapier trigger; omit for webhook-only workflows."),
|
|
75
33
|
})
|
|
76
34
|
.describe("Publish a new version of a durable workflow. Enables the workflow by default.");
|
|
77
35
|
export const PublishWorkflowVersionResponseSchema = z.object({
|
|
@@ -91,4 +49,13 @@ export const PublishWorkflowVersionResponseSchema = z.object({
|
|
|
91
49
|
.string()
|
|
92
50
|
.describe("ID of the user who published this version"),
|
|
93
51
|
created_at: z.string().describe("When the version was published (ISO-8601)"),
|
|
52
|
+
trigger: WorkflowVersionTriggerConfigSchema.nullable().describe("Trigger configuration persisted on this version, or null for webhook-only workflows."),
|
|
53
|
+
connections: z
|
|
54
|
+
.record(z.string(), ConnectionBindingSchema)
|
|
55
|
+
.nullable()
|
|
56
|
+
.describe("Connection aliases bound on this version (or null)."),
|
|
57
|
+
app_versions: z
|
|
58
|
+
.record(z.string(), AppVersionBindingSchema)
|
|
59
|
+
.nullable()
|
|
60
|
+
.describe("App-version pins bound on this version (or null)."),
|
|
94
61
|
});
|
|
@@ -34,6 +34,12 @@ export declare const runDurablePlugin: (sdk: {
|
|
|
34
34
|
version?: string | undefined;
|
|
35
35
|
}> | undefined;
|
|
36
36
|
private?: boolean | undefined;
|
|
37
|
+
notifications?: {
|
|
38
|
+
url: string;
|
|
39
|
+
events: ("error" | "started" | "cancelled" | "completed" | "progress")[];
|
|
40
|
+
type?: "webhook" | undefined;
|
|
41
|
+
max_retries?: number | undefined;
|
|
42
|
+
}[] | undefined;
|
|
37
43
|
} | undefined) => Promise<{
|
|
38
44
|
data: {
|
|
39
45
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/index.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4C5B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -30,6 +30,9 @@ export const runDurablePlugin = definePlugin((sdk) => createPluginMethod(sdk, {
|
|
|
30
30
|
if (options.private !== undefined) {
|
|
31
31
|
body.is_private = options.private;
|
|
32
32
|
}
|
|
33
|
+
if (options.notifications !== undefined) {
|
|
34
|
+
body.notifications = options.notifications;
|
|
35
|
+
}
|
|
33
36
|
const raw = await sdk.context.api.post("/sdkdurableapi/api/v0/runs", body, { authRequired: true });
|
|
34
37
|
const data = RunDurableResponseSchema.parse(raw);
|
|
35
38
|
return { data };
|
|
@@ -12,6 +12,18 @@ export declare const RunDurableOptionsSchema: z.ZodObject<{
|
|
|
12
12
|
version: z.ZodOptional<z.ZodString>;
|
|
13
13
|
}, z.core.$strip>>>;
|
|
14
14
|
private: z.ZodOptional<z.ZodBoolean>;
|
|
15
|
+
notifications: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
16
|
+
type: z.ZodOptional<z.ZodLiteral<"webhook">>;
|
|
17
|
+
url: z.ZodString;
|
|
18
|
+
max_retries: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
events: z.ZodArray<z.ZodEnum<{
|
|
20
|
+
error: "error";
|
|
21
|
+
started: "started";
|
|
22
|
+
cancelled: "cancelled";
|
|
23
|
+
completed: "completed";
|
|
24
|
+
progress: "progress";
|
|
25
|
+
}>>;
|
|
26
|
+
}, z.core.$strip>>>;
|
|
15
27
|
}, z.core.$strip>;
|
|
16
28
|
export type RunDurableOptions = z.infer<typeof RunDurableOptionsSchema>;
|
|
17
29
|
export declare const RunDurableResponseSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/runDurable/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA8DxB,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;iBA4CjC,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,wBAAwB;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
// Local schemas (not imported from ../shared-schemas): runDurable enforces
|
|
3
|
+
// `.min(1)` on implementation_name at the input boundary. The shared schema
|
|
4
|
+
// is response-side and intentionally looser.
|
|
2
5
|
const ConnectionMapEntrySchema = z.object({
|
|
3
6
|
connection_id: z
|
|
4
7
|
.union([
|
|
@@ -18,6 +21,32 @@ const AppVersionMapEntrySchema = z.object({
|
|
|
18
21
|
.optional()
|
|
19
22
|
.describe("Pinned app version (e.g. `1.27.1`). Latest if omitted."),
|
|
20
23
|
});
|
|
24
|
+
const RunNotificationEventSchema = z
|
|
25
|
+
.enum(["started", "progress", "completed", "error", "cancelled"])
|
|
26
|
+
.describe("Run lifecycle event this notification subscribes to");
|
|
27
|
+
const RunNotificationSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
type: z
|
|
30
|
+
.literal("webhook")
|
|
31
|
+
.optional()
|
|
32
|
+
.describe("Notification transport. Webhook is the only supported type."),
|
|
33
|
+
url: z
|
|
34
|
+
.string()
|
|
35
|
+
.url()
|
|
36
|
+
.describe("URL to POST event notifications to. Payload is `{run_id, event}`."),
|
|
37
|
+
max_retries: z
|
|
38
|
+
.number()
|
|
39
|
+
.int()
|
|
40
|
+
.min(0)
|
|
41
|
+
.max(10)
|
|
42
|
+
.optional()
|
|
43
|
+
.describe("Max delivery attempts with exponential backoff. Defaults to 3 server-side."),
|
|
44
|
+
events: z
|
|
45
|
+
.array(RunNotificationEventSchema)
|
|
46
|
+
.min(1)
|
|
47
|
+
.describe("One or more lifecycle events to subscribe this URL to."),
|
|
48
|
+
})
|
|
49
|
+
.describe("Webhook subscriber for run lifecycle events. Server POSTs `{run_id, event}` on each subscribed transition.");
|
|
21
50
|
export const RunDurableOptionsSchema = z
|
|
22
51
|
.object({
|
|
23
52
|
source_files: z
|
|
@@ -47,6 +76,10 @@ export const RunDurableOptionsSchema = z
|
|
|
47
76
|
.boolean()
|
|
48
77
|
.optional()
|
|
49
78
|
.describe("Only the creating user can see the run (default false)"),
|
|
79
|
+
notifications: z
|
|
80
|
+
.array(RunNotificationSchema)
|
|
81
|
+
.optional()
|
|
82
|
+
.describe("Webhook subscribers for run lifecycle events. Each entry specifies a URL and the events it subscribes to."),
|
|
50
83
|
})
|
|
51
84
|
.describe("Run a workflow source file as a run-once durable run on sdkdurableapi (no deployed workflow required). Returns the run ID immediately; poll via getDurableRun for terminal status.");
|
|
52
85
|
export const RunDurableResponseSchema = z.object({
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ConnectionBindingSchema: z.ZodObject<{
|
|
3
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const AppVersionBindingSchema: z.ZodObject<{
|
|
6
|
+
implementation_name: z.ZodString;
|
|
7
|
+
version: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
export declare const WorkflowVersionTriggerConfigSchema: z.ZodObject<{
|
|
10
|
+
selected_api: z.ZodString;
|
|
11
|
+
action: z.ZodString;
|
|
12
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
export declare const WorkflowTriggerStatusSchema: z.ZodEnum<{
|
|
16
|
+
failed: "failed";
|
|
17
|
+
pending: "pending";
|
|
18
|
+
active: "active";
|
|
19
|
+
unclaimed: "unclaimed";
|
|
20
|
+
releasing: "releasing";
|
|
21
|
+
released: "released";
|
|
22
|
+
}>;
|
|
23
|
+
export declare const WorkflowTriggerSchema: z.ZodObject<{
|
|
24
|
+
selected_api: z.ZodString;
|
|
25
|
+
action: z.ZodString;
|
|
26
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
27
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
28
|
+
status: z.ZodEnum<{
|
|
29
|
+
failed: "failed";
|
|
30
|
+
pending: "pending";
|
|
31
|
+
active: "active";
|
|
32
|
+
unclaimed: "unclaimed";
|
|
33
|
+
releasing: "releasing";
|
|
34
|
+
released: "released";
|
|
35
|
+
}>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
//# sourceMappingURL=shared-schemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/codeSubstrate/shared-schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,uBAAuB;;iBAcjC,CAAC;AAEJ,eAAO,MAAM,uBAAuB;;;iBAUsC,CAAC;AAK3E,eAAO,MAAM,kCAAkC;;;;;iBAiBsB,CAAC;AAItE,eAAO,MAAM,2BAA2B;;;;;;;EAOtC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;iBAsB/B,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const ConnectionBindingSchema = z
|
|
3
|
+
.object({
|
|
4
|
+
connection_id: z
|
|
5
|
+
.union([
|
|
6
|
+
z.number().int().positive(),
|
|
7
|
+
z.string().regex(/^[1-9][0-9]*$/, "must be a positive integer string"),
|
|
8
|
+
z.string().uuid("must be a UUID"),
|
|
9
|
+
])
|
|
10
|
+
.describe("Zapier connection ID. Positive integer (legacy) or UUID string (newer)."),
|
|
11
|
+
})
|
|
12
|
+
.describe("Connection binding: maps a single alias to a concrete connection.");
|
|
13
|
+
export const AppVersionBindingSchema = z
|
|
14
|
+
.object({
|
|
15
|
+
implementation_name: z
|
|
16
|
+
.string()
|
|
17
|
+
.describe("App implementation identifier (e.g. 'SlackCLIAPI')"),
|
|
18
|
+
version: z
|
|
19
|
+
.string()
|
|
20
|
+
.optional()
|
|
21
|
+
.describe("App implementation version (e.g. '1.27.1')"),
|
|
22
|
+
})
|
|
23
|
+
.describe("App-version binding: maps a single alias to an app version.");
|
|
24
|
+
// Workflow-version trigger config. Same shape on the request and response
|
|
25
|
+
// sides (CreateWorkflowVersionRequest.trigger and
|
|
26
|
+
// WorkflowVersion.trigger / WorkflowVersionSummary.trigger).
|
|
27
|
+
export const WorkflowVersionTriggerConfigSchema = z
|
|
28
|
+
.object({
|
|
29
|
+
selected_api: z
|
|
30
|
+
.string()
|
|
31
|
+
.describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
32
|
+
action: z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
33
|
+
authentication_id: z
|
|
34
|
+
.string()
|
|
35
|
+
.nullish()
|
|
36
|
+
.describe("Connection ID for the trigger source. Omit or pass null for no-auth triggers (e.g. Schedule by Zapier)."),
|
|
37
|
+
params: z
|
|
38
|
+
.record(z.string(), z.unknown())
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("Trigger parameters as a JSON object"),
|
|
41
|
+
})
|
|
42
|
+
.describe("Trigger configuration persisted on a workflow version.");
|
|
43
|
+
// Workflow.triggers[] entries. Carries everything the version trigger
|
|
44
|
+
// does plus a live claim-status enum.
|
|
45
|
+
export const WorkflowTriggerStatusSchema = z.enum([
|
|
46
|
+
"unclaimed",
|
|
47
|
+
"pending",
|
|
48
|
+
"active",
|
|
49
|
+
"releasing",
|
|
50
|
+
"released",
|
|
51
|
+
"failed",
|
|
52
|
+
]);
|
|
53
|
+
export const WorkflowTriggerSchema = z
|
|
54
|
+
.object({
|
|
55
|
+
selected_api: z
|
|
56
|
+
.string()
|
|
57
|
+
.describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
58
|
+
action: z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
59
|
+
authentication_id: z
|
|
60
|
+
.string()
|
|
61
|
+
.nullish()
|
|
62
|
+
.describe("Connection ID for the trigger source. Null for no-auth triggers."),
|
|
63
|
+
params: z
|
|
64
|
+
.record(z.string(), z.unknown())
|
|
65
|
+
.optional()
|
|
66
|
+
.describe("Trigger parameters as a JSON object"),
|
|
67
|
+
status: WorkflowTriggerStatusSchema.describe("Live trigger claim status — whether the trigger is currently subscribed to its source."),
|
|
68
|
+
})
|
|
69
|
+
.describe("Trigger from a workflow's current version, combined with the live claim status.");
|
|
@@ -31,7 +31,16 @@ export declare const triggerWorkflowPlugin: (sdk: {
|
|
|
31
31
|
description: string | null;
|
|
32
32
|
trigger_url: string;
|
|
33
33
|
enabled: boolean;
|
|
34
|
+
is_private: boolean;
|
|
35
|
+
created_by_user_id: string | null;
|
|
34
36
|
current_version_id: string | null;
|
|
37
|
+
triggers: {
|
|
38
|
+
selected_api: string;
|
|
39
|
+
action: string;
|
|
40
|
+
status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
|
|
41
|
+
authentication_id?: string | null | undefined;
|
|
42
|
+
params?: Record<string, unknown> | undefined;
|
|
43
|
+
}[];
|
|
35
44
|
created_at: string;
|
|
36
45
|
updated_at: string;
|
|
37
46
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/triggerWorkflow/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAKjB;QAAE,OAAO,EAAE;YAAE,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;SAAE,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;CA4DhE,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CACpD,OAAO,qBAAqB,CAC7B,CAAC"}
|
|
@@ -31,7 +31,16 @@ export declare const updateWorkflowPlugin: (sdk: {
|
|
|
31
31
|
description: string | null;
|
|
32
32
|
trigger_url: string;
|
|
33
33
|
enabled: boolean;
|
|
34
|
+
is_private: boolean;
|
|
35
|
+
created_by_user_id: string | null;
|
|
34
36
|
current_version_id: string | null;
|
|
37
|
+
triggers: {
|
|
38
|
+
selected_api: string;
|
|
39
|
+
action: string;
|
|
40
|
+
status: "failed" | "pending" | "active" | "unclaimed" | "releasing" | "released";
|
|
41
|
+
authentication_id?: string | null | undefined;
|
|
42
|
+
params?: Record<string, unknown> | undefined;
|
|
43
|
+
}[];
|
|
35
44
|
created_at: string;
|
|
36
45
|
updated_at: string;
|
|
37
46
|
}>;
|
|
@@ -57,6 +66,8 @@ export declare const updateWorkflowPlugin: (sdk: {
|
|
|
57
66
|
description: string | null;
|
|
58
67
|
trigger_url: string;
|
|
59
68
|
enabled: boolean;
|
|
69
|
+
is_private: boolean;
|
|
70
|
+
created_by_user_id: string | null;
|
|
60
71
|
created_at: string;
|
|
61
72
|
updated_at: string;
|
|
62
73
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,UAAU,CACnD,OAAO,oBAAoB,CAC5B,CAAC"}
|
|
@@ -11,6 +11,8 @@ export declare const UpdateWorkflowResponseSchema: z.ZodObject<{
|
|
|
11
11
|
description: z.ZodNullable<z.ZodString>;
|
|
12
12
|
trigger_url: z.ZodString;
|
|
13
13
|
enabled: z.ZodBoolean;
|
|
14
|
+
is_private: z.ZodBoolean;
|
|
15
|
+
created_by_user_id: z.ZodNullable<z.ZodString>;
|
|
14
16
|
created_at: z.ZodString;
|
|
15
17
|
updated_at: z.ZodString;
|
|
16
18
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;;iBAY0B,CAAC;AAEnE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/codeSubstrate/updateWorkflow/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,2BAA2B;;;;iBAY0B,CAAC;AAEnE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B;;;;;;;;;;iBA0BvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC"}
|
|
@@ -25,6 +25,13 @@ export const UpdateWorkflowResponseSchema = z.object({
|
|
|
25
25
|
enabled: z
|
|
26
26
|
.boolean()
|
|
27
27
|
.describe("Whether the workflow currently accepts triggers"),
|
|
28
|
+
is_private: z
|
|
29
|
+
.boolean()
|
|
30
|
+
.describe("Whether the workflow is private to the creating user. False means account-visible."),
|
|
31
|
+
created_by_user_id: z
|
|
32
|
+
.string()
|
|
33
|
+
.nullable()
|
|
34
|
+
.describe("User ID of the workflow creator (null in legacy data)"),
|
|
28
35
|
created_at: z.string().describe("When the workflow was created (ISO-8601)"),
|
|
29
36
|
updated_at: z.string().describe("When this update was applied (ISO-8601)"),
|
|
30
37
|
});
|