@zapier/zapier-sdk 0.115.0 → 0.115.1
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 +6 -0
- package/dist/beta.cjs +279 -279
- package/dist/beta.mjs +2 -2
- package/dist/{chunk-24GCCCDH.cjs → chunk-DNSSO7AI.cjs} +4 -4
- package/dist/{chunk-LO3VMFOP.cjs → chunk-GQI5FACN.cjs} +1 -1
- package/dist/{chunk-Q7ECOKIG.mjs → chunk-NOHDNPVD.mjs} +1 -1
- package/dist/{chunk-NVVSKZ3Y.mjs → chunk-RWJJBIN6.mjs} +1 -1
- package/dist/experimental.cjs +430 -408
- package/dist/experimental.d.mts +125 -18
- package/dist/experimental.d.ts +125 -18
- package/dist/experimental.mjs +49 -29
- package/dist/index.cjs +277 -277
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/experimental.d.mts
CHANGED
|
@@ -8,11 +8,8 @@ export { AggregatePlugin, CoreApiError as ApiError, ArrayResolver, BoundFormatte
|
|
|
8
8
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
|
9
9
|
import '@zapier/policy-context';
|
|
10
10
|
|
|
11
|
-
declare const INTERNAL_CREATE_WORKFLOW_FIELDS: readonly ["creationHarness", "creationAccessMethod"];
|
|
12
11
|
declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
13
|
-
|
|
14
|
-
description: z.ZodOptional<z.ZodString>;
|
|
15
|
-
private: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
is_private: z.ZodOptional<z.ZodBoolean>;
|
|
16
13
|
creationHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
14
|
creationAccessMethod: z.ZodOptional<z.ZodEnum<{
|
|
18
15
|
unknown: "unknown";
|
|
@@ -22,7 +19,9 @@ declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
|
22
19
|
zapier_mcp: "zapier_mcp";
|
|
23
20
|
editor: "editor";
|
|
24
21
|
}>>;
|
|
25
|
-
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
26
25
|
}, z.core.$strip>;
|
|
27
26
|
type CreateWorkflowOptions = z.infer<typeof CreateWorkflowOptionsSchema>;
|
|
28
27
|
declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
@@ -43,6 +42,104 @@ declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
|
43
42
|
}, z.core.$strip>;
|
|
44
43
|
type CreateWorkflowResponse = z.infer<typeof CreateWorkflowResponseSchema>;
|
|
45
44
|
|
|
45
|
+
declare const ImportWorkflowOptionsSchema: z.ZodObject<{
|
|
46
|
+
creationHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
creationAccessMethod: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
unknown: "unknown";
|
|
49
|
+
api: "api";
|
|
50
|
+
sdk_cli: "sdk_cli";
|
|
51
|
+
sdk_mcp: "sdk_mcp";
|
|
52
|
+
zapier_mcp: "zapier_mcp";
|
|
53
|
+
editor: "editor";
|
|
54
|
+
}>>;
|
|
55
|
+
zap: z.ZodString;
|
|
56
|
+
name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
type ImportWorkflowOptions = z.infer<typeof ImportWorkflowOptionsSchema>;
|
|
60
|
+
declare const ImportWorkflowResponseSchema: z.ZodObject<{
|
|
61
|
+
workflow: z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
trigger_url: z.ZodString;
|
|
66
|
+
editor_url: z.ZodString;
|
|
67
|
+
enabled: z.ZodBoolean;
|
|
68
|
+
disabled_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
69
|
+
trigger_claim_failed: "trigger_claim_failed";
|
|
70
|
+
}>>>;
|
|
71
|
+
is_private: z.ZodBoolean;
|
|
72
|
+
source_zap_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
created_by_user_id: z.ZodString;
|
|
74
|
+
updated_by_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
current_version_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
triggers: z.ZodArray<z.ZodObject<{
|
|
77
|
+
selected_api: z.ZodString;
|
|
78
|
+
action: z.ZodString;
|
|
79
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
81
|
+
status: z.ZodEnum<{
|
|
82
|
+
active: "active";
|
|
83
|
+
failed: "failed";
|
|
84
|
+
pending: "pending";
|
|
85
|
+
unclaimed: "unclaimed";
|
|
86
|
+
releasing: "releasing";
|
|
87
|
+
released: "released";
|
|
88
|
+
}>;
|
|
89
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
91
|
+
webhook_url: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
created_at: z.ZodString;
|
|
95
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
draft: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
workflow_id: z.ZodString;
|
|
100
|
+
slug: z.ZodString;
|
|
101
|
+
base_version_id: z.ZodNullable<z.ZodString>;
|
|
102
|
+
source_files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
103
|
+
zapier_durable_version: z.ZodString;
|
|
104
|
+
dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
|
+
draft_revision: z.ZodNumber;
|
|
106
|
+
status: z.ZodEnum<{
|
|
107
|
+
open: "open";
|
|
108
|
+
discarded: "discarded";
|
|
109
|
+
}>;
|
|
110
|
+
created_by_user_id: z.ZodString;
|
|
111
|
+
last_edited_by_user_id: z.ZodNullable<z.ZodString>;
|
|
112
|
+
last_edited_at: z.ZodNullable<z.ZodString>;
|
|
113
|
+
discarded_at: z.ZodNullable<z.ZodString>;
|
|
114
|
+
created_at: z.ZodString;
|
|
115
|
+
updated_at: z.ZodString;
|
|
116
|
+
trigger: z.ZodNullable<z.ZodObject<{
|
|
117
|
+
selected_api: z.ZodString;
|
|
118
|
+
action: z.ZodString;
|
|
119
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
123
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
126
|
+
implementation_name: z.ZodString;
|
|
127
|
+
version: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
131
|
+
line: z.ZodNumber;
|
|
132
|
+
column: z.ZodNumber;
|
|
133
|
+
node_kind: z.ZodString;
|
|
134
|
+
step_name: z.ZodOptional<z.ZodString>;
|
|
135
|
+
message: z.ZodString;
|
|
136
|
+
blocking: z.ZodBoolean;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
type ImportWorkflowResponse = z.infer<typeof ImportWorkflowResponseSchema>;
|
|
140
|
+
|
|
141
|
+
declare const INTERNAL_CREATE_WORKFLOW_FIELDS: readonly ["creationHarness", "creationAccessMethod"];
|
|
142
|
+
|
|
46
143
|
/**
|
|
47
144
|
* A blocking draft as listed by the 409's `meta.open_drafts` — the element
|
|
48
145
|
* type of `ZapierConflictError.meta.open_drafts` on the open-draft publish
|
|
@@ -7732,11 +7829,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7732
7829
|
} & {
|
|
7733
7830
|
createWorkflow: _zapier_kitcore.MethodPlugin<"createWorkflow", {
|
|
7734
7831
|
name: string;
|
|
7735
|
-
|
|
7736
|
-
private?: boolean | undefined;
|
|
7832
|
+
is_private?: boolean | undefined;
|
|
7737
7833
|
creationHarness?: string | null | undefined;
|
|
7738
7834
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7739
|
-
|
|
7835
|
+
description?: string | undefined;
|
|
7836
|
+
private?: boolean | undefined;
|
|
7740
7837
|
} & {
|
|
7741
7838
|
skipOutputDataValidation?: boolean;
|
|
7742
7839
|
}, Promise<{
|
|
@@ -7766,11 +7863,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7766
7863
|
private?: boolean | undefined;
|
|
7767
7864
|
}> & _zapier_kitcore.LeafSummary<"", "createWorkflow", readonly [_zapier_kitcore.PropertyPlugin<"api", ApiClient> & _zapier_kitcore.DeclarationSummary<"zapier/api", ApiClient> & _zapier_kitcore.StandInId<"zapier/api">], (input: {
|
|
7768
7865
|
name: string;
|
|
7769
|
-
|
|
7770
|
-
private?: boolean | undefined;
|
|
7866
|
+
is_private?: boolean | undefined;
|
|
7771
7867
|
creationHarness?: string | null | undefined;
|
|
7772
7868
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7773
|
-
|
|
7869
|
+
description?: string | undefined;
|
|
7870
|
+
private?: boolean | undefined;
|
|
7774
7871
|
} & {
|
|
7775
7872
|
skipOutputDataValidation?: boolean;
|
|
7776
7873
|
}) => Promise<{
|
|
@@ -7795,6 +7892,8 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7795
7892
|
} & {
|
|
7796
7893
|
importWorkflow: _zapier_kitcore.MethodPlugin<"importWorkflow", {
|
|
7797
7894
|
zap: string;
|
|
7895
|
+
creationHarness?: string | null | undefined;
|
|
7896
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7798
7897
|
name?: string | undefined;
|
|
7799
7898
|
private?: boolean | undefined;
|
|
7800
7899
|
} & {
|
|
@@ -7870,10 +7969,14 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7870
7969
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
7871
7970
|
}>, readonly [], {
|
|
7872
7971
|
name?: string | undefined;
|
|
7972
|
+
creationHarness?: string | null | undefined;
|
|
7973
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7873
7974
|
private?: boolean | undefined;
|
|
7874
7975
|
zap: string;
|
|
7875
7976
|
}> & _zapier_kitcore.LeafSummary<"", "importWorkflow", readonly [_zapier_kitcore.PropertyPlugin<"api", ApiClient> & _zapier_kitcore.DeclarationSummary<"zapier/api", ApiClient> & _zapier_kitcore.StandInId<"zapier/api">], (input: {
|
|
7876
7977
|
zap: string;
|
|
7978
|
+
creationHarness?: string | null | undefined;
|
|
7979
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7877
7980
|
name?: string | undefined;
|
|
7878
7981
|
private?: boolean | undefined;
|
|
7879
7982
|
} & {
|
|
@@ -12187,11 +12290,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
12187
12290
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
12188
12291
|
}>> | _zapier_kitcore.ContractEntry<"createWorkflow", (input: {
|
|
12189
12292
|
name: string;
|
|
12190
|
-
|
|
12191
|
-
private?: boolean | undefined;
|
|
12293
|
+
is_private?: boolean | undefined;
|
|
12192
12294
|
creationHarness?: string | null | undefined;
|
|
12193
12295
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
12194
|
-
|
|
12296
|
+
description?: string | undefined;
|
|
12297
|
+
private?: boolean | undefined;
|
|
12195
12298
|
} & {
|
|
12196
12299
|
skipOutputDataValidation?: boolean;
|
|
12197
12300
|
}) => Promise<{
|
|
@@ -12214,6 +12317,8 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
12214
12317
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
12215
12318
|
}>> | _zapier_kitcore.ContractEntry<"importWorkflow", (input: {
|
|
12216
12319
|
zap: string;
|
|
12320
|
+
creationHarness?: string | null | undefined;
|
|
12321
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
12217
12322
|
name?: string | undefined;
|
|
12218
12323
|
private?: boolean | undefined;
|
|
12219
12324
|
} & {
|
|
@@ -15105,11 +15210,11 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
15105
15210
|
}>;
|
|
15106
15211
|
createWorkflow: (input: {
|
|
15107
15212
|
name: string;
|
|
15108
|
-
|
|
15109
|
-
private?: boolean | undefined;
|
|
15213
|
+
is_private?: boolean | undefined;
|
|
15110
15214
|
creationHarness?: string | null | undefined;
|
|
15111
15215
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
15112
|
-
|
|
15216
|
+
description?: string | undefined;
|
|
15217
|
+
private?: boolean | undefined;
|
|
15113
15218
|
} & {
|
|
15114
15219
|
skipOutputDataValidation?: boolean;
|
|
15115
15220
|
}) => Promise<{
|
|
@@ -15133,6 +15238,8 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
15133
15238
|
}>;
|
|
15134
15239
|
importWorkflow: (input: {
|
|
15135
15240
|
zap: string;
|
|
15241
|
+
creationHarness?: string | null | undefined;
|
|
15242
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
15136
15243
|
name?: string | undefined;
|
|
15137
15244
|
private?: boolean | undefined;
|
|
15138
15245
|
} & {
|
|
@@ -16289,4 +16396,4 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
16289
16396
|
interface ZapierSdk extends ReturnType<typeof createZapierSdk> {
|
|
16290
16397
|
}
|
|
16291
16398
|
|
|
16292
|
-
export { ApiClient, BaseEvent, ConnectionsProvider, type CreateWorkflowOptions, CreateWorkflowOptionsSchema, type CreateWorkflowResponse, CreateWorkflowResponseSchema, DrainTriggerInboxOptions, EventCallback, EventEmissionConfig, EventTransport, FieldsetItem, INTERNAL_CREATE_WORKFLOW_FIELDS, Manifest, ManifestProvider, type OpenDraftRef, ResolveCredentialsFn, WatchTriggerInboxOptions, ZapierCache, ZapierFetchInitOptions, type ZapierSdk, ZapierSdkApps, type ZapierSdkOptions, createZapierSdk, zapierExperimentalSdkPlugin };
|
|
16399
|
+
export { ApiClient, BaseEvent, ConnectionsProvider, type CreateWorkflowOptions, CreateWorkflowOptionsSchema, type CreateWorkflowResponse, CreateWorkflowResponseSchema, DrainTriggerInboxOptions, EventCallback, EventEmissionConfig, EventTransport, FieldsetItem, INTERNAL_CREATE_WORKFLOW_FIELDS, type ImportWorkflowOptions, ImportWorkflowOptionsSchema, type ImportWorkflowResponse, ImportWorkflowResponseSchema, Manifest, ManifestProvider, type OpenDraftRef, ResolveCredentialsFn, WatchTriggerInboxOptions, ZapierCache, ZapierFetchInitOptions, type ZapierSdk, ZapierSdkApps, type ZapierSdkOptions, createZapierSdk, zapierExperimentalSdkPlugin };
|
package/dist/experimental.d.ts
CHANGED
|
@@ -8,11 +8,8 @@ export { AggregatePlugin, CoreApiError as ApiError, ArrayResolver, BoundFormatte
|
|
|
8
8
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
|
9
9
|
import '@zapier/policy-context';
|
|
10
10
|
|
|
11
|
-
declare const INTERNAL_CREATE_WORKFLOW_FIELDS: readonly ["creationHarness", "creationAccessMethod"];
|
|
12
11
|
declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
13
|
-
|
|
14
|
-
description: z.ZodOptional<z.ZodString>;
|
|
15
|
-
private: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
is_private: z.ZodOptional<z.ZodBoolean>;
|
|
16
13
|
creationHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
17
14
|
creationAccessMethod: z.ZodOptional<z.ZodEnum<{
|
|
18
15
|
unknown: "unknown";
|
|
@@ -22,7 +19,9 @@ declare const CreateWorkflowOptionsSchema: z.ZodObject<{
|
|
|
22
19
|
zapier_mcp: "zapier_mcp";
|
|
23
20
|
editor: "editor";
|
|
24
21
|
}>>;
|
|
25
|
-
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
description: z.ZodOptional<z.ZodString>;
|
|
24
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
26
25
|
}, z.core.$strip>;
|
|
27
26
|
type CreateWorkflowOptions = z.infer<typeof CreateWorkflowOptionsSchema>;
|
|
28
27
|
declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
@@ -43,6 +42,104 @@ declare const CreateWorkflowResponseSchema: z.ZodObject<{
|
|
|
43
42
|
}, z.core.$strip>;
|
|
44
43
|
type CreateWorkflowResponse = z.infer<typeof CreateWorkflowResponseSchema>;
|
|
45
44
|
|
|
45
|
+
declare const ImportWorkflowOptionsSchema: z.ZodObject<{
|
|
46
|
+
creationHarness: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
47
|
+
creationAccessMethod: z.ZodOptional<z.ZodEnum<{
|
|
48
|
+
unknown: "unknown";
|
|
49
|
+
api: "api";
|
|
50
|
+
sdk_cli: "sdk_cli";
|
|
51
|
+
sdk_mcp: "sdk_mcp";
|
|
52
|
+
zapier_mcp: "zapier_mcp";
|
|
53
|
+
editor: "editor";
|
|
54
|
+
}>>;
|
|
55
|
+
zap: z.ZodString;
|
|
56
|
+
name: z.ZodOptional<z.ZodString>;
|
|
57
|
+
private: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, z.core.$strip>;
|
|
59
|
+
type ImportWorkflowOptions = z.infer<typeof ImportWorkflowOptionsSchema>;
|
|
60
|
+
declare const ImportWorkflowResponseSchema: z.ZodObject<{
|
|
61
|
+
workflow: z.ZodObject<{
|
|
62
|
+
id: z.ZodString;
|
|
63
|
+
name: z.ZodString;
|
|
64
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
65
|
+
trigger_url: z.ZodString;
|
|
66
|
+
editor_url: z.ZodString;
|
|
67
|
+
enabled: z.ZodBoolean;
|
|
68
|
+
disabled_reason: z.ZodOptional<z.ZodNullable<z.ZodEnum<{
|
|
69
|
+
trigger_claim_failed: "trigger_claim_failed";
|
|
70
|
+
}>>>;
|
|
71
|
+
is_private: z.ZodBoolean;
|
|
72
|
+
source_zap_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
73
|
+
created_by_user_id: z.ZodString;
|
|
74
|
+
updated_by_user_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
current_version_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
76
|
+
triggers: z.ZodArray<z.ZodObject<{
|
|
77
|
+
selected_api: z.ZodString;
|
|
78
|
+
action: z.ZodString;
|
|
79
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
80
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
81
|
+
status: z.ZodEnum<{
|
|
82
|
+
active: "active";
|
|
83
|
+
failed: "failed";
|
|
84
|
+
pending: "pending";
|
|
85
|
+
unclaimed: "unclaimed";
|
|
86
|
+
releasing: "releasing";
|
|
87
|
+
released: "released";
|
|
88
|
+
}>;
|
|
89
|
+
error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
91
|
+
webhook_url: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>>>;
|
|
93
|
+
}, z.core.$strip>>;
|
|
94
|
+
created_at: z.ZodString;
|
|
95
|
+
updated_at: z.ZodOptional<z.ZodString>;
|
|
96
|
+
}, z.core.$strip>;
|
|
97
|
+
draft: z.ZodObject<{
|
|
98
|
+
id: z.ZodString;
|
|
99
|
+
workflow_id: z.ZodString;
|
|
100
|
+
slug: z.ZodString;
|
|
101
|
+
base_version_id: z.ZodNullable<z.ZodString>;
|
|
102
|
+
source_files: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
103
|
+
zapier_durable_version: z.ZodString;
|
|
104
|
+
dependencies: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
105
|
+
draft_revision: z.ZodNumber;
|
|
106
|
+
status: z.ZodEnum<{
|
|
107
|
+
open: "open";
|
|
108
|
+
discarded: "discarded";
|
|
109
|
+
}>;
|
|
110
|
+
created_by_user_id: z.ZodString;
|
|
111
|
+
last_edited_by_user_id: z.ZodNullable<z.ZodString>;
|
|
112
|
+
last_edited_at: z.ZodNullable<z.ZodString>;
|
|
113
|
+
discarded_at: z.ZodNullable<z.ZodString>;
|
|
114
|
+
created_at: z.ZodString;
|
|
115
|
+
updated_at: z.ZodString;
|
|
116
|
+
trigger: z.ZodNullable<z.ZodObject<{
|
|
117
|
+
selected_api: z.ZodString;
|
|
118
|
+
action: z.ZodString;
|
|
119
|
+
authentication_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
120
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
connections: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
123
|
+
connection_id: z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodString]>;
|
|
124
|
+
}, z.core.$strip>>>;
|
|
125
|
+
app_versions: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
126
|
+
implementation_name: z.ZodString;
|
|
127
|
+
version: z.ZodOptional<z.ZodString>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
131
|
+
line: z.ZodNumber;
|
|
132
|
+
column: z.ZodNumber;
|
|
133
|
+
node_kind: z.ZodString;
|
|
134
|
+
step_name: z.ZodOptional<z.ZodString>;
|
|
135
|
+
message: z.ZodString;
|
|
136
|
+
blocking: z.ZodBoolean;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
type ImportWorkflowResponse = z.infer<typeof ImportWorkflowResponseSchema>;
|
|
140
|
+
|
|
141
|
+
declare const INTERNAL_CREATE_WORKFLOW_FIELDS: readonly ["creationHarness", "creationAccessMethod"];
|
|
142
|
+
|
|
46
143
|
/**
|
|
47
144
|
* A blocking draft as listed by the 409's `meta.open_drafts` — the element
|
|
48
145
|
* type of `ZapierConflictError.meta.open_drafts` on the open-draft publish
|
|
@@ -7732,11 +7829,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7732
7829
|
} & {
|
|
7733
7830
|
createWorkflow: _zapier_kitcore.MethodPlugin<"createWorkflow", {
|
|
7734
7831
|
name: string;
|
|
7735
|
-
|
|
7736
|
-
private?: boolean | undefined;
|
|
7832
|
+
is_private?: boolean | undefined;
|
|
7737
7833
|
creationHarness?: string | null | undefined;
|
|
7738
7834
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7739
|
-
|
|
7835
|
+
description?: string | undefined;
|
|
7836
|
+
private?: boolean | undefined;
|
|
7740
7837
|
} & {
|
|
7741
7838
|
skipOutputDataValidation?: boolean;
|
|
7742
7839
|
}, Promise<{
|
|
@@ -7766,11 +7863,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7766
7863
|
private?: boolean | undefined;
|
|
7767
7864
|
}> & _zapier_kitcore.LeafSummary<"", "createWorkflow", readonly [_zapier_kitcore.PropertyPlugin<"api", ApiClient> & _zapier_kitcore.DeclarationSummary<"zapier/api", ApiClient> & _zapier_kitcore.StandInId<"zapier/api">], (input: {
|
|
7768
7865
|
name: string;
|
|
7769
|
-
|
|
7770
|
-
private?: boolean | undefined;
|
|
7866
|
+
is_private?: boolean | undefined;
|
|
7771
7867
|
creationHarness?: string | null | undefined;
|
|
7772
7868
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7773
|
-
|
|
7869
|
+
description?: string | undefined;
|
|
7870
|
+
private?: boolean | undefined;
|
|
7774
7871
|
} & {
|
|
7775
7872
|
skipOutputDataValidation?: boolean;
|
|
7776
7873
|
}) => Promise<{
|
|
@@ -7795,6 +7892,8 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7795
7892
|
} & {
|
|
7796
7893
|
importWorkflow: _zapier_kitcore.MethodPlugin<"importWorkflow", {
|
|
7797
7894
|
zap: string;
|
|
7895
|
+
creationHarness?: string | null | undefined;
|
|
7896
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7798
7897
|
name?: string | undefined;
|
|
7799
7898
|
private?: boolean | undefined;
|
|
7800
7899
|
} & {
|
|
@@ -7870,10 +7969,14 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
7870
7969
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
7871
7970
|
}>, readonly [], {
|
|
7872
7971
|
name?: string | undefined;
|
|
7972
|
+
creationHarness?: string | null | undefined;
|
|
7973
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7873
7974
|
private?: boolean | undefined;
|
|
7874
7975
|
zap: string;
|
|
7875
7976
|
}> & _zapier_kitcore.LeafSummary<"", "importWorkflow", readonly [_zapier_kitcore.PropertyPlugin<"api", ApiClient> & _zapier_kitcore.DeclarationSummary<"zapier/api", ApiClient> & _zapier_kitcore.StandInId<"zapier/api">], (input: {
|
|
7876
7977
|
zap: string;
|
|
7978
|
+
creationHarness?: string | null | undefined;
|
|
7979
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
7877
7980
|
name?: string | undefined;
|
|
7878
7981
|
private?: boolean | undefined;
|
|
7879
7982
|
} & {
|
|
@@ -12187,11 +12290,11 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
12187
12290
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
12188
12291
|
}>> | _zapier_kitcore.ContractEntry<"createWorkflow", (input: {
|
|
12189
12292
|
name: string;
|
|
12190
|
-
|
|
12191
|
-
private?: boolean | undefined;
|
|
12293
|
+
is_private?: boolean | undefined;
|
|
12192
12294
|
creationHarness?: string | null | undefined;
|
|
12193
12295
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
12194
|
-
|
|
12296
|
+
description?: string | undefined;
|
|
12297
|
+
private?: boolean | undefined;
|
|
12195
12298
|
} & {
|
|
12196
12299
|
skipOutputDataValidation?: boolean;
|
|
12197
12300
|
}) => Promise<{
|
|
@@ -12214,6 +12317,8 @@ declare const zapierExperimentalSdkPlugin: _zapier_kitcore.AggregatePlugin<"expe
|
|
|
12214
12317
|
meta?: _zapier_kitcore.ResponseMeta;
|
|
12215
12318
|
}>> | _zapier_kitcore.ContractEntry<"importWorkflow", (input: {
|
|
12216
12319
|
zap: string;
|
|
12320
|
+
creationHarness?: string | null | undefined;
|
|
12321
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
12217
12322
|
name?: string | undefined;
|
|
12218
12323
|
private?: boolean | undefined;
|
|
12219
12324
|
} & {
|
|
@@ -15105,11 +15210,11 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
15105
15210
|
}>;
|
|
15106
15211
|
createWorkflow: (input: {
|
|
15107
15212
|
name: string;
|
|
15108
|
-
|
|
15109
|
-
private?: boolean | undefined;
|
|
15213
|
+
is_private?: boolean | undefined;
|
|
15110
15214
|
creationHarness?: string | null | undefined;
|
|
15111
15215
|
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
15112
|
-
|
|
15216
|
+
description?: string | undefined;
|
|
15217
|
+
private?: boolean | undefined;
|
|
15113
15218
|
} & {
|
|
15114
15219
|
skipOutputDataValidation?: boolean;
|
|
15115
15220
|
}) => Promise<{
|
|
@@ -15133,6 +15238,8 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
15133
15238
|
}>;
|
|
15134
15239
|
importWorkflow: (input: {
|
|
15135
15240
|
zap: string;
|
|
15241
|
+
creationHarness?: string | null | undefined;
|
|
15242
|
+
creationAccessMethod?: "unknown" | "api" | "sdk_cli" | "sdk_mcp" | "zapier_mcp" | "editor" | undefined;
|
|
15136
15243
|
name?: string | undefined;
|
|
15137
15244
|
private?: boolean | undefined;
|
|
15138
15245
|
} & {
|
|
@@ -16289,4 +16396,4 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
16289
16396
|
interface ZapierSdk extends ReturnType<typeof createZapierSdk> {
|
|
16290
16397
|
}
|
|
16291
16398
|
|
|
16292
|
-
export { ApiClient, BaseEvent, ConnectionsProvider, type CreateWorkflowOptions, CreateWorkflowOptionsSchema, type CreateWorkflowResponse, CreateWorkflowResponseSchema, DrainTriggerInboxOptions, EventCallback, EventEmissionConfig, EventTransport, FieldsetItem, INTERNAL_CREATE_WORKFLOW_FIELDS, Manifest, ManifestProvider, type OpenDraftRef, ResolveCredentialsFn, WatchTriggerInboxOptions, ZapierCache, ZapierFetchInitOptions, type ZapierSdk, ZapierSdkApps, type ZapierSdkOptions, createZapierSdk, zapierExperimentalSdkPlugin };
|
|
16399
|
+
export { ApiClient, BaseEvent, ConnectionsProvider, type CreateWorkflowOptions, CreateWorkflowOptionsSchema, type CreateWorkflowResponse, CreateWorkflowResponseSchema, DrainTriggerInboxOptions, EventCallback, EventEmissionConfig, EventTransport, FieldsetItem, INTERNAL_CREATE_WORKFLOW_FIELDS, type ImportWorkflowOptions, ImportWorkflowOptionsSchema, type ImportWorkflowResponse, ImportWorkflowResponseSchema, Manifest, ManifestProvider, type OpenDraftRef, ResolveCredentialsFn, WatchTriggerInboxOptions, ZapierCache, ZapierFetchInitOptions, type ZapierSdk, ZapierSdkApps, type ZapierSdkOptions, createZapierSdk, zapierExperimentalSdkPlugin };
|
package/dist/experimental.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { zapierBetaSdkPlugin } from './chunk-
|
|
2
|
-
import { DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver,
|
|
3
|
-
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, STABILITY_DEFINITIONS, STABILITY_LEVELS, STABILITY_TITLES, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, applyStabilityLabel, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createMemoryCache, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, descriptionFor, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistry, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-
|
|
1
|
+
import { zapierBetaSdkPlugin } from './chunk-NOHDNPVD.mjs';
|
|
2
|
+
import { DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, extractErrorDetail, ZapierApiError, durableRunIdResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowRunIdResolver, SDK_VERSION, ZapierValidationError, ZapierConfigurationError, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-RWJJBIN6.mjs';
|
|
3
|
+
export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, STABILITY_DEFINITIONS, STABILITY_LEVELS, STABILITY_TITLES, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, applyStabilityLabel, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createMemoryCache, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, descriptionFor, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistry, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-RWJJBIN6.mjs';
|
|
4
4
|
import './chunk-Y6FXYEAI.mjs';
|
|
5
5
|
import { defineMethod, openEnum, defineResolver, defineFormatter, definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
|
|
6
6
|
import { z } from 'zod';
|
|
@@ -12,6 +12,17 @@ var codeSubstrateDefaults = {
|
|
|
12
12
|
var CODE_SUBSTRATE_ANALYZER_API = "/code-substrate-analyzer";
|
|
13
13
|
var CODE_SUBSTRATE_RUNNER_API = "/code-substrate-runner/api/v0";
|
|
14
14
|
var CODE_SUBSTRATE_WORKFLOWS_API = "/code-substrate-workflows/api/v0";
|
|
15
|
+
function toWorkflowCreationClient({
|
|
16
|
+
creationHarness,
|
|
17
|
+
creationAccessMethod
|
|
18
|
+
}) {
|
|
19
|
+
if (creationAccessMethod === void 0) return void 0;
|
|
20
|
+
return {
|
|
21
|
+
...creationHarness === void 0 ? {} : { harness: creationHarness },
|
|
22
|
+
access_method: creationAccessMethod,
|
|
23
|
+
sdk_version: SDK_VERSION
|
|
24
|
+
};
|
|
25
|
+
}
|
|
15
26
|
var JsonPayloadSchema = z.preprocess((val) => {
|
|
16
27
|
if (typeof val === "string") {
|
|
17
28
|
const trimmed = val.trim();
|
|
@@ -143,6 +154,28 @@ var WorkflowCreationClientSchema = z.object({
|
|
|
143
154
|
),
|
|
144
155
|
sdk_version: z.string().max(WORKFLOW_CREATION_CLIENT_SDK_VERSION_MAX_LENGTH).nullable().optional().describe("SDK version used to create this workflow")
|
|
145
156
|
}).describe("Client identity recorded when this workflow was created");
|
|
157
|
+
var INTERNAL_CREATE_WORKFLOW_FIELDS = [
|
|
158
|
+
"creationHarness",
|
|
159
|
+
"creationAccessMethod"
|
|
160
|
+
];
|
|
161
|
+
var WorkflowCreationClientInputSchema = z.object({
|
|
162
|
+
creationHarness: WorkflowCreationClientSchema.shape.harness.describe(
|
|
163
|
+
"Optional client harness that created this workflow; null means the client did not report a harness"
|
|
164
|
+
).meta({ internal: true }),
|
|
165
|
+
creationAccessMethod: WorkflowCreationAccessMethodSchema.optional().describe(
|
|
166
|
+
WorkflowCreationAccessMethodSchema.description ?? "Client access method that created this workflow"
|
|
167
|
+
).meta({ internal: true })
|
|
168
|
+
});
|
|
169
|
+
function hasAccessMethodForHarness({
|
|
170
|
+
creationHarness,
|
|
171
|
+
creationAccessMethod
|
|
172
|
+
}) {
|
|
173
|
+
return creationHarness === void 0 || creationAccessMethod !== void 0;
|
|
174
|
+
}
|
|
175
|
+
var HARNESS_WITHOUT_ACCESS_METHOD_ISSUE = {
|
|
176
|
+
message: "creationAccessMethod is required when creationHarness is provided",
|
|
177
|
+
path: ["creationAccessMethod"]
|
|
178
|
+
};
|
|
146
179
|
var WorkflowVersionTriggerConfigSchema = z.object({
|
|
147
180
|
selected_api: z.string().describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
|
|
148
181
|
action: z.string().describe("Trigger action key (e.g. 'new_row')"),
|
|
@@ -385,33 +418,18 @@ var getWorkflowPlugin = defineMethod({
|
|
|
385
418
|
return { data: GetWorkflowResponseSchema.parse(raw) };
|
|
386
419
|
}
|
|
387
420
|
});
|
|
388
|
-
var INTERNAL_CREATE_WORKFLOW_FIELDS = [
|
|
389
|
-
"creationHarness",
|
|
390
|
-
"creationAccessMethod"
|
|
391
|
-
];
|
|
392
421
|
var CreateWorkflowOptionsSchema = z.object({
|
|
393
422
|
name: z.string().min(1).describe("Workflow name"),
|
|
394
423
|
description: z.string().optional().describe("Optional description for the workflow"),
|
|
395
424
|
private: z.boolean().optional().describe(
|
|
396
425
|
"If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."
|
|
397
426
|
),
|
|
398
|
-
|
|
399
|
-
"Optional client harness that created this workflow; null means the client did not report a harness"
|
|
400
|
-
).meta({ internal: true }),
|
|
401
|
-
creationAccessMethod: WorkflowCreationAccessMethodSchema.optional().describe(
|
|
402
|
-
WorkflowCreationAccessMethodSchema.description ?? "Client access method that created this workflow"
|
|
403
|
-
).meta({ internal: true }),
|
|
427
|
+
...WorkflowCreationClientInputSchema.shape,
|
|
404
428
|
/** @deprecated Use `private` instead. */
|
|
405
429
|
is_private: z.boolean().optional().describe(
|
|
406
430
|
"If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."
|
|
407
431
|
).meta({ deprecated: true })
|
|
408
|
-
}).refine(
|
|
409
|
-
({ creationHarness, creationAccessMethod }) => creationHarness === void 0 || creationAccessMethod !== void 0,
|
|
410
|
-
{
|
|
411
|
-
message: "creationAccessMethod is required when creationHarness is provided",
|
|
412
|
-
path: ["creationAccessMethod"]
|
|
413
|
-
}
|
|
414
|
-
).describe(
|
|
432
|
+
}).refine(hasAccessMethodForHarness, HARNESS_WITHOUT_ACCESS_METHOD_ISSUE).describe(
|
|
415
433
|
"Create a durable workflow container. Starts disabled with no version; publish a version to add code."
|
|
416
434
|
);
|
|
417
435
|
var CreateWorkflowResponseSchema = z.object({
|
|
@@ -452,12 +470,9 @@ var createWorkflowPlugin = defineMethod({
|
|
|
452
470
|
if (isPrivate !== void 0) {
|
|
453
471
|
body.is_private = isPrivate;
|
|
454
472
|
}
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
access_method: input.creationAccessMethod,
|
|
459
|
-
sdk_version: SDK_VERSION
|
|
460
|
-
};
|
|
473
|
+
const creationClient = toWorkflowCreationClient(input);
|
|
474
|
+
if (creationClient !== void 0) {
|
|
475
|
+
body.creation_client = creationClient;
|
|
461
476
|
}
|
|
462
477
|
const raw = await api.post(
|
|
463
478
|
`${CODE_SUBSTRATE_WORKFLOWS_API}/workflows`,
|
|
@@ -478,8 +493,9 @@ var ImportWorkflowOptionsSchema = z.object({
|
|
|
478
493
|
),
|
|
479
494
|
private: z.boolean().optional().describe(
|
|
480
495
|
"Restrict the created workflow to the creating user. Defaults to false, which makes it account-visible."
|
|
481
|
-
)
|
|
482
|
-
|
|
496
|
+
),
|
|
497
|
+
...WorkflowCreationClientInputSchema.shape
|
|
498
|
+
}).refine(hasAccessMethodForHarness, HARNESS_WITHOUT_ACCESS_METHOD_ISSUE).describe(
|
|
483
499
|
"Convert an existing Zap into a durable workflow. Transforms the Zap's latest published version (falling back to its draft only when the Zap has never been published) and puts the resulting source in an open draft. The workflow is created disabled with no published version, so publish the draft to make it live. The original Zap is untouched and keeps running."
|
|
484
500
|
);
|
|
485
501
|
var TranslationIssueSchema = z.object({
|
|
@@ -552,6 +568,10 @@ var importWorkflowPlugin = defineMethod({
|
|
|
552
568
|
if (input.private !== void 0) {
|
|
553
569
|
body.is_private = input.private;
|
|
554
570
|
}
|
|
571
|
+
const creationClient = toWorkflowCreationClient(input);
|
|
572
|
+
if (creationClient !== void 0) {
|
|
573
|
+
body.creation_client = creationClient;
|
|
574
|
+
}
|
|
555
575
|
const raw = await api.post(
|
|
556
576
|
`${CODE_SUBSTRATE_WORKFLOWS_API}/workflows/import`,
|
|
557
577
|
body,
|
|
@@ -3392,4 +3412,4 @@ function createZapierSdk(options = {}) {
|
|
|
3392
3412
|
});
|
|
3393
3413
|
}
|
|
3394
3414
|
|
|
3395
|
-
export { CreateWorkflowOptionsSchema, CreateWorkflowResponseSchema, INTERNAL_CREATE_WORKFLOW_FIELDS, createZapierSdk, zapierExperimentalSdkPlugin };
|
|
3415
|
+
export { CreateWorkflowOptionsSchema, CreateWorkflowResponseSchema, INTERNAL_CREATE_WORKFLOW_FIELDS, ImportWorkflowOptionsSchema, ImportWorkflowResponseSchema, createZapierSdk, zapierExperimentalSdkPlugin };
|