@zapier/zapier-sdk 0.100.0 → 0.101.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 +6 -0
- package/README.md +76 -0
- package/dist/{chunk-7MVYZYCM.cjs → chunk-EOGYMKVF.cjs} +1 -1
- package/dist/{chunk-BSSVO2VM.mjs → chunk-R6U6HNVF.mjs} +1 -1
- package/dist/experimental.cjs +493 -387
- package/dist/experimental.d.mts +158 -3
- package/dist/experimental.d.ts +158 -3
- package/dist/experimental.mjs +108 -2
- package/dist/index.cjs +277 -277
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/experimental.d.mts
CHANGED
|
@@ -4254,6 +4254,86 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4254
4254
|
is_private?: boolean | undefined;
|
|
4255
4255
|
private?: boolean | undefined;
|
|
4256
4256
|
}> & LeafSummary<"", "createWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4257
|
+
} & {
|
|
4258
|
+
importWorkflow: MethodPlugin<"importWorkflow", {
|
|
4259
|
+
zap: string;
|
|
4260
|
+
name?: string | undefined;
|
|
4261
|
+
private?: boolean | undefined;
|
|
4262
|
+
} & {
|
|
4263
|
+
skipOutputDataValidation?: boolean;
|
|
4264
|
+
}, Promise<{
|
|
4265
|
+
data: {
|
|
4266
|
+
workflow: {
|
|
4267
|
+
id: string;
|
|
4268
|
+
name: string;
|
|
4269
|
+
trigger_url: string;
|
|
4270
|
+
enabled: boolean;
|
|
4271
|
+
is_private: boolean;
|
|
4272
|
+
created_by_user_id: string;
|
|
4273
|
+
triggers: {
|
|
4274
|
+
selected_api: string;
|
|
4275
|
+
action: string;
|
|
4276
|
+
status: "active" | "unclaimed" | "pending" | "releasing" | "released" | "failed";
|
|
4277
|
+
authentication_id?: string | null | undefined;
|
|
4278
|
+
params?: Record<string, unknown> | undefined;
|
|
4279
|
+
error?: string | null | undefined;
|
|
4280
|
+
details?: {
|
|
4281
|
+
webhook_url?: string | undefined;
|
|
4282
|
+
} | null | undefined;
|
|
4283
|
+
}[];
|
|
4284
|
+
created_at: string;
|
|
4285
|
+
description?: string | null | undefined;
|
|
4286
|
+
disabled_reason?: "trigger_claim_failed" | null | undefined;
|
|
4287
|
+
source_zap_id?: string | null | undefined;
|
|
4288
|
+
updated_by_user_id?: string | null | undefined;
|
|
4289
|
+
current_version_id?: string | null | undefined;
|
|
4290
|
+
updated_at?: string | undefined;
|
|
4291
|
+
};
|
|
4292
|
+
draft: {
|
|
4293
|
+
id: string;
|
|
4294
|
+
workflow_id: string;
|
|
4295
|
+
slug: string;
|
|
4296
|
+
base_version_id: string | null;
|
|
4297
|
+
source_files: Record<string, string>;
|
|
4298
|
+
zapier_durable_version: string;
|
|
4299
|
+
dependencies: Record<string, string> | null;
|
|
4300
|
+
draft_revision: number;
|
|
4301
|
+
status: "open" | "discarded";
|
|
4302
|
+
created_by_user_id: string;
|
|
4303
|
+
last_edited_by_user_id: string | null;
|
|
4304
|
+
last_edited_at: string | null;
|
|
4305
|
+
discarded_at: string | null;
|
|
4306
|
+
created_at: string;
|
|
4307
|
+
updated_at: string;
|
|
4308
|
+
trigger: {
|
|
4309
|
+
selected_api: string;
|
|
4310
|
+
action: string;
|
|
4311
|
+
authentication_id?: string | null | undefined;
|
|
4312
|
+
params?: Record<string, unknown> | undefined;
|
|
4313
|
+
} | null;
|
|
4314
|
+
connections: Record<string, {
|
|
4315
|
+
connection_id: string | number;
|
|
4316
|
+
}> | null;
|
|
4317
|
+
app_versions: Record<string, {
|
|
4318
|
+
implementation_name: string;
|
|
4319
|
+
version?: string | undefined;
|
|
4320
|
+
}> | null;
|
|
4321
|
+
};
|
|
4322
|
+
issues: {
|
|
4323
|
+
line: number;
|
|
4324
|
+
column: number;
|
|
4325
|
+
node_kind: string;
|
|
4326
|
+
message: string;
|
|
4327
|
+
blocking: boolean;
|
|
4328
|
+
step_name?: string | undefined;
|
|
4329
|
+
}[];
|
|
4330
|
+
};
|
|
4331
|
+
meta?: ResponseMeta;
|
|
4332
|
+
}>, readonly [], {
|
|
4333
|
+
name?: string | undefined;
|
|
4334
|
+
private?: boolean | undefined;
|
|
4335
|
+
zap: string;
|
|
4336
|
+
}> & LeafSummary<"", "importWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4257
4337
|
} & {
|
|
4258
4338
|
updateWorkflow: MethodPlugin<"updateWorkflow", {
|
|
4259
4339
|
workflow: string;
|
|
@@ -4707,6 +4787,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4707
4787
|
authentication_id?: string | null | undefined;
|
|
4708
4788
|
params?: Record<string, unknown> | undefined;
|
|
4709
4789
|
} | null | undefined;
|
|
4790
|
+
draft: string;
|
|
4710
4791
|
sourceFiles: Record<string, string>;
|
|
4711
4792
|
zapierDurableVersion?: string | undefined;
|
|
4712
4793
|
appVersions?: Record<string, {
|
|
@@ -4715,7 +4796,6 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4715
4796
|
version?: string | undefined;
|
|
4716
4797
|
}> | null | undefined;
|
|
4717
4798
|
manual?: boolean | undefined;
|
|
4718
|
-
draft: string;
|
|
4719
4799
|
draftRevision?: number | undefined;
|
|
4720
4800
|
}> & LeafSummary<"", "updateWorkflowDraft", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4721
4801
|
} & {
|
|
@@ -4828,8 +4908,8 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4828
4908
|
}>, readonly [], {
|
|
4829
4909
|
enabled?: boolean | undefined;
|
|
4830
4910
|
workflow: string;
|
|
4831
|
-
manual?: boolean | undefined;
|
|
4832
4911
|
draft: string;
|
|
4912
|
+
manual?: boolean | undefined;
|
|
4833
4913
|
draftRevision?: number | undefined;
|
|
4834
4914
|
}> & LeafSummary<"", "publishWorkflowDraft", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4835
4915
|
} & {
|
|
@@ -5270,7 +5350,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5270
5350
|
children?: unknown[] | undefined;
|
|
5271
5351
|
} | undefined;
|
|
5272
5352
|
}> & LeafSummary<"", "createForm", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5273
|
-
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5353
|
+
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "importWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5274
5354
|
declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
5275
5355
|
getRegistry: (input?: {
|
|
5276
5356
|
package?: string | undefined;
|
|
@@ -7048,6 +7128,81 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
7048
7128
|
};
|
|
7049
7129
|
meta?: ResponseMeta;
|
|
7050
7130
|
}>;
|
|
7131
|
+
importWorkflow: (input: {
|
|
7132
|
+
zap: string;
|
|
7133
|
+
name?: string | undefined;
|
|
7134
|
+
private?: boolean | undefined;
|
|
7135
|
+
} & {
|
|
7136
|
+
skipOutputDataValidation?: boolean;
|
|
7137
|
+
}) => Promise<{
|
|
7138
|
+
data: {
|
|
7139
|
+
workflow: {
|
|
7140
|
+
id: string;
|
|
7141
|
+
name: string;
|
|
7142
|
+
trigger_url: string;
|
|
7143
|
+
enabled: boolean;
|
|
7144
|
+
is_private: boolean;
|
|
7145
|
+
created_by_user_id: string;
|
|
7146
|
+
triggers: {
|
|
7147
|
+
selected_api: string;
|
|
7148
|
+
action: string;
|
|
7149
|
+
status: "active" | "unclaimed" | "pending" | "releasing" | "released" | "failed";
|
|
7150
|
+
authentication_id?: string | null | undefined;
|
|
7151
|
+
params?: Record<string, unknown> | undefined;
|
|
7152
|
+
error?: string | null | undefined;
|
|
7153
|
+
details?: {
|
|
7154
|
+
webhook_url?: string | undefined;
|
|
7155
|
+
} | null | undefined;
|
|
7156
|
+
}[];
|
|
7157
|
+
created_at: string;
|
|
7158
|
+
description?: string | null | undefined;
|
|
7159
|
+
disabled_reason?: "trigger_claim_failed" | null | undefined;
|
|
7160
|
+
source_zap_id?: string | null | undefined;
|
|
7161
|
+
updated_by_user_id?: string | null | undefined;
|
|
7162
|
+
current_version_id?: string | null | undefined;
|
|
7163
|
+
updated_at?: string | undefined;
|
|
7164
|
+
};
|
|
7165
|
+
draft: {
|
|
7166
|
+
id: string;
|
|
7167
|
+
workflow_id: string;
|
|
7168
|
+
slug: string;
|
|
7169
|
+
base_version_id: string | null;
|
|
7170
|
+
source_files: Record<string, string>;
|
|
7171
|
+
zapier_durable_version: string;
|
|
7172
|
+
dependencies: Record<string, string> | null;
|
|
7173
|
+
draft_revision: number;
|
|
7174
|
+
status: "open" | "discarded";
|
|
7175
|
+
created_by_user_id: string;
|
|
7176
|
+
last_edited_by_user_id: string | null;
|
|
7177
|
+
last_edited_at: string | null;
|
|
7178
|
+
discarded_at: string | null;
|
|
7179
|
+
created_at: string;
|
|
7180
|
+
updated_at: string;
|
|
7181
|
+
trigger: {
|
|
7182
|
+
selected_api: string;
|
|
7183
|
+
action: string;
|
|
7184
|
+
authentication_id?: string | null | undefined;
|
|
7185
|
+
params?: Record<string, unknown> | undefined;
|
|
7186
|
+
} | null;
|
|
7187
|
+
connections: Record<string, {
|
|
7188
|
+
connection_id: string | number;
|
|
7189
|
+
}> | null;
|
|
7190
|
+
app_versions: Record<string, {
|
|
7191
|
+
implementation_name: string;
|
|
7192
|
+
version?: string | undefined;
|
|
7193
|
+
}> | null;
|
|
7194
|
+
};
|
|
7195
|
+
issues: {
|
|
7196
|
+
line: number;
|
|
7197
|
+
column: number;
|
|
7198
|
+
node_kind: string;
|
|
7199
|
+
message: string;
|
|
7200
|
+
blocking: boolean;
|
|
7201
|
+
step_name?: string | undefined;
|
|
7202
|
+
}[];
|
|
7203
|
+
};
|
|
7204
|
+
meta?: ResponseMeta;
|
|
7205
|
+
}>;
|
|
7051
7206
|
updateWorkflow: (input: {
|
|
7052
7207
|
workflow: string;
|
|
7053
7208
|
name?: string | undefined;
|
package/dist/experimental.d.ts
CHANGED
|
@@ -4254,6 +4254,86 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4254
4254
|
is_private?: boolean | undefined;
|
|
4255
4255
|
private?: boolean | undefined;
|
|
4256
4256
|
}> & LeafSummary<"", "createWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4257
|
+
} & {
|
|
4258
|
+
importWorkflow: MethodPlugin<"importWorkflow", {
|
|
4259
|
+
zap: string;
|
|
4260
|
+
name?: string | undefined;
|
|
4261
|
+
private?: boolean | undefined;
|
|
4262
|
+
} & {
|
|
4263
|
+
skipOutputDataValidation?: boolean;
|
|
4264
|
+
}, Promise<{
|
|
4265
|
+
data: {
|
|
4266
|
+
workflow: {
|
|
4267
|
+
id: string;
|
|
4268
|
+
name: string;
|
|
4269
|
+
trigger_url: string;
|
|
4270
|
+
enabled: boolean;
|
|
4271
|
+
is_private: boolean;
|
|
4272
|
+
created_by_user_id: string;
|
|
4273
|
+
triggers: {
|
|
4274
|
+
selected_api: string;
|
|
4275
|
+
action: string;
|
|
4276
|
+
status: "active" | "unclaimed" | "pending" | "releasing" | "released" | "failed";
|
|
4277
|
+
authentication_id?: string | null | undefined;
|
|
4278
|
+
params?: Record<string, unknown> | undefined;
|
|
4279
|
+
error?: string | null | undefined;
|
|
4280
|
+
details?: {
|
|
4281
|
+
webhook_url?: string | undefined;
|
|
4282
|
+
} | null | undefined;
|
|
4283
|
+
}[];
|
|
4284
|
+
created_at: string;
|
|
4285
|
+
description?: string | null | undefined;
|
|
4286
|
+
disabled_reason?: "trigger_claim_failed" | null | undefined;
|
|
4287
|
+
source_zap_id?: string | null | undefined;
|
|
4288
|
+
updated_by_user_id?: string | null | undefined;
|
|
4289
|
+
current_version_id?: string | null | undefined;
|
|
4290
|
+
updated_at?: string | undefined;
|
|
4291
|
+
};
|
|
4292
|
+
draft: {
|
|
4293
|
+
id: string;
|
|
4294
|
+
workflow_id: string;
|
|
4295
|
+
slug: string;
|
|
4296
|
+
base_version_id: string | null;
|
|
4297
|
+
source_files: Record<string, string>;
|
|
4298
|
+
zapier_durable_version: string;
|
|
4299
|
+
dependencies: Record<string, string> | null;
|
|
4300
|
+
draft_revision: number;
|
|
4301
|
+
status: "open" | "discarded";
|
|
4302
|
+
created_by_user_id: string;
|
|
4303
|
+
last_edited_by_user_id: string | null;
|
|
4304
|
+
last_edited_at: string | null;
|
|
4305
|
+
discarded_at: string | null;
|
|
4306
|
+
created_at: string;
|
|
4307
|
+
updated_at: string;
|
|
4308
|
+
trigger: {
|
|
4309
|
+
selected_api: string;
|
|
4310
|
+
action: string;
|
|
4311
|
+
authentication_id?: string | null | undefined;
|
|
4312
|
+
params?: Record<string, unknown> | undefined;
|
|
4313
|
+
} | null;
|
|
4314
|
+
connections: Record<string, {
|
|
4315
|
+
connection_id: string | number;
|
|
4316
|
+
}> | null;
|
|
4317
|
+
app_versions: Record<string, {
|
|
4318
|
+
implementation_name: string;
|
|
4319
|
+
version?: string | undefined;
|
|
4320
|
+
}> | null;
|
|
4321
|
+
};
|
|
4322
|
+
issues: {
|
|
4323
|
+
line: number;
|
|
4324
|
+
column: number;
|
|
4325
|
+
node_kind: string;
|
|
4326
|
+
message: string;
|
|
4327
|
+
blocking: boolean;
|
|
4328
|
+
step_name?: string | undefined;
|
|
4329
|
+
}[];
|
|
4330
|
+
};
|
|
4331
|
+
meta?: ResponseMeta;
|
|
4332
|
+
}>, readonly [], {
|
|
4333
|
+
name?: string | undefined;
|
|
4334
|
+
private?: boolean | undefined;
|
|
4335
|
+
zap: string;
|
|
4336
|
+
}> & LeafSummary<"", "importWorkflow", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4257
4337
|
} & {
|
|
4258
4338
|
updateWorkflow: MethodPlugin<"updateWorkflow", {
|
|
4259
4339
|
workflow: string;
|
|
@@ -4707,6 +4787,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4707
4787
|
authentication_id?: string | null | undefined;
|
|
4708
4788
|
params?: Record<string, unknown> | undefined;
|
|
4709
4789
|
} | null | undefined;
|
|
4790
|
+
draft: string;
|
|
4710
4791
|
sourceFiles: Record<string, string>;
|
|
4711
4792
|
zapierDurableVersion?: string | undefined;
|
|
4712
4793
|
appVersions?: Record<string, {
|
|
@@ -4715,7 +4796,6 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4715
4796
|
version?: string | undefined;
|
|
4716
4797
|
}> | null | undefined;
|
|
4717
4798
|
manual?: boolean | undefined;
|
|
4718
|
-
draft: string;
|
|
4719
4799
|
draftRevision?: number | undefined;
|
|
4720
4800
|
}> & LeafSummary<"", "updateWorkflowDraft", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4721
4801
|
} & {
|
|
@@ -4828,8 +4908,8 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
4828
4908
|
}>, readonly [], {
|
|
4829
4909
|
enabled?: boolean | undefined;
|
|
4830
4910
|
workflow: string;
|
|
4831
|
-
manual?: boolean | undefined;
|
|
4832
4911
|
draft: string;
|
|
4912
|
+
manual?: boolean | undefined;
|
|
4833
4913
|
draftRevision?: number | undefined;
|
|
4834
4914
|
}> & LeafSummary<"", "publishWorkflowDraft", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
4835
4915
|
} & {
|
|
@@ -5270,7 +5350,7 @@ declare const zapierExperimentalSdkPlugin: AggregatePlugin<"experimental-sdk", {
|
|
|
5270
5350
|
children?: unknown[] | undefined;
|
|
5271
5351
|
} | undefined;
|
|
5272
5352
|
}> & LeafSummary<"", "createForm", readonly [PropertyPlugin<"api", ApiClient> & PluginSummary<"zapier/api", never> & StandInId<"zapier/api">]>;
|
|
5273
|
-
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5353
|
+
}> & PluginSummary<never, "fetch" | "zapier/api" | "zapier/manifest" | "zapier/eventEmission" | "zapier/resolveCredentials" | "zapier/connections" | "zapier/capabilities" | "getProfile" | "listApps" | "apps" | "getApp" | "listActions" | "getAction" | "listConnections" | "getConnection" | "findFirstConnection" | "findUniqueConnection" | "listAuthentications" | "getAuthentication" | "findFirstAuthentication" | "findUniqueAuthentication" | "listClientCredentials" | "createClientCredentials" | "deleteClientCredentials" | "getConnectionStartUrl" | "waitForNewConnection" | "createConnection" | "listActionInputFields" | "getActionInputFieldsSchema" | "listActionInputFieldChoices" | "listInputFields" | "getInputFieldsSchema" | "listInputFieldChoices" | "createActionRun" | "getActionRun" | "runAction" | "request" | "listTriggerInboxes" | "createTriggerInbox" | "ensureTriggerInbox" | "getTriggerInbox" | "updateTriggerInbox" | "deleteTriggerInbox" | "pauseTriggerInbox" | "resumeTriggerInbox" | "listTriggerInboxMessages" | "leaseTriggerInboxMessages" | "ackTriggerInboxMessages" | "releaseTriggerInboxMessages" | "drainTriggerInbox" | "watchTriggerInbox" | "listTriggers" | "listTriggerInputFields" | "listTriggerInputFieldChoices" | "getTriggerInputFieldsSchema" | "listTables" | "listTablesInternal" | "getTable" | "deleteTable" | "createTable" | "listTableFields" | "createTableFields" | "deleteTableFields" | "listTableRecords" | "getTableRecord" | "createTableRecords" | "deleteTableRecords" | "updateTableRecords" | "kitcore/getRegistry" | "listWorkflows" | "getWorkflow" | "createWorkflow" | "importWorkflow" | "updateWorkflow" | "enableWorkflow" | "disableWorkflow" | "deleteWorkflow" | "listWorkflowVersions" | "getWorkflowVersion" | "publishWorkflowVersion" | "listWorkflowDrafts" | "getWorkflowDraft" | "createWorkflowDraft" | "updateWorkflowDraft" | "discardWorkflowDraft" | "publishWorkflowDraft" | "listWorkflowRuns" | "getWorkflowRun" | "listDurableRuns" | "getDurableRun" | "runDurable" | "cancelDurableRun" | "triggerWorkflow" | "getTriggerRun" | "validateWorkflow" | "createForm" | "zapier/sdk" | "zapier/experimental-sdk">;
|
|
5274
5354
|
declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
5275
5355
|
getRegistry: (input?: {
|
|
5276
5356
|
package?: string | undefined;
|
|
@@ -7048,6 +7128,81 @@ declare function createZapierSdk(options?: ZapierSdkOptions): {
|
|
|
7048
7128
|
};
|
|
7049
7129
|
meta?: ResponseMeta;
|
|
7050
7130
|
}>;
|
|
7131
|
+
importWorkflow: (input: {
|
|
7132
|
+
zap: string;
|
|
7133
|
+
name?: string | undefined;
|
|
7134
|
+
private?: boolean | undefined;
|
|
7135
|
+
} & {
|
|
7136
|
+
skipOutputDataValidation?: boolean;
|
|
7137
|
+
}) => Promise<{
|
|
7138
|
+
data: {
|
|
7139
|
+
workflow: {
|
|
7140
|
+
id: string;
|
|
7141
|
+
name: string;
|
|
7142
|
+
trigger_url: string;
|
|
7143
|
+
enabled: boolean;
|
|
7144
|
+
is_private: boolean;
|
|
7145
|
+
created_by_user_id: string;
|
|
7146
|
+
triggers: {
|
|
7147
|
+
selected_api: string;
|
|
7148
|
+
action: string;
|
|
7149
|
+
status: "active" | "unclaimed" | "pending" | "releasing" | "released" | "failed";
|
|
7150
|
+
authentication_id?: string | null | undefined;
|
|
7151
|
+
params?: Record<string, unknown> | undefined;
|
|
7152
|
+
error?: string | null | undefined;
|
|
7153
|
+
details?: {
|
|
7154
|
+
webhook_url?: string | undefined;
|
|
7155
|
+
} | null | undefined;
|
|
7156
|
+
}[];
|
|
7157
|
+
created_at: string;
|
|
7158
|
+
description?: string | null | undefined;
|
|
7159
|
+
disabled_reason?: "trigger_claim_failed" | null | undefined;
|
|
7160
|
+
source_zap_id?: string | null | undefined;
|
|
7161
|
+
updated_by_user_id?: string | null | undefined;
|
|
7162
|
+
current_version_id?: string | null | undefined;
|
|
7163
|
+
updated_at?: string | undefined;
|
|
7164
|
+
};
|
|
7165
|
+
draft: {
|
|
7166
|
+
id: string;
|
|
7167
|
+
workflow_id: string;
|
|
7168
|
+
slug: string;
|
|
7169
|
+
base_version_id: string | null;
|
|
7170
|
+
source_files: Record<string, string>;
|
|
7171
|
+
zapier_durable_version: string;
|
|
7172
|
+
dependencies: Record<string, string> | null;
|
|
7173
|
+
draft_revision: number;
|
|
7174
|
+
status: "open" | "discarded";
|
|
7175
|
+
created_by_user_id: string;
|
|
7176
|
+
last_edited_by_user_id: string | null;
|
|
7177
|
+
last_edited_at: string | null;
|
|
7178
|
+
discarded_at: string | null;
|
|
7179
|
+
created_at: string;
|
|
7180
|
+
updated_at: string;
|
|
7181
|
+
trigger: {
|
|
7182
|
+
selected_api: string;
|
|
7183
|
+
action: string;
|
|
7184
|
+
authentication_id?: string | null | undefined;
|
|
7185
|
+
params?: Record<string, unknown> | undefined;
|
|
7186
|
+
} | null;
|
|
7187
|
+
connections: Record<string, {
|
|
7188
|
+
connection_id: string | number;
|
|
7189
|
+
}> | null;
|
|
7190
|
+
app_versions: Record<string, {
|
|
7191
|
+
implementation_name: string;
|
|
7192
|
+
version?: string | undefined;
|
|
7193
|
+
}> | null;
|
|
7194
|
+
};
|
|
7195
|
+
issues: {
|
|
7196
|
+
line: number;
|
|
7197
|
+
column: number;
|
|
7198
|
+
node_kind: string;
|
|
7199
|
+
message: string;
|
|
7200
|
+
blocking: boolean;
|
|
7201
|
+
step_name?: string | undefined;
|
|
7202
|
+
}[];
|
|
7203
|
+
};
|
|
7204
|
+
meta?: ResponseMeta;
|
|
7205
|
+
}>;
|
|
7051
7206
|
updateWorkflow: (input: {
|
|
7052
7207
|
workflow: string;
|
|
7053
7208
|
name?: string | undefined;
|
package/dist/experimental.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineMethod, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, openEnum, durableRunIdResolver, defineResolver, ZapierConflictError,
|
|
2
|
-
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, 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, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, 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, registryPlugin, 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, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-
|
|
1
|
+
import { defineMethod, DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, extractErrorDetail, ZapierApiError, openEnum, durableRunIdResolver, defineResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowRunIdResolver, definePlugin, zapierSdkPlugin, ZapierValidationError, ZapierConfigurationError, createSdk, zapierCoreOptions, CORE_OPTIONS_ID, SDK_OPTIONS_ID } from './chunk-R6U6HNVF.mjs';
|
|
2
|
+
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, 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, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createCorePlugin, createFunction, createMemoryCache, createPaginatedFunction, createPaginatedPluginMethod, createPluginMethod, createPluginStack, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineLegacyMerge, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, fromFunctionPlugin, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, 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, registryPlugin, 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, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-R6U6HNVF.mjs';
|
|
3
3
|
import './chunk-Y6FXYEAI.mjs';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
@@ -425,6 +425,111 @@ var createWorkflowPlugin = defineMethod({
|
|
|
425
425
|
return { data: CreateWorkflowResponseSchema.parse(raw) };
|
|
426
426
|
}
|
|
427
427
|
});
|
|
428
|
+
var ImportWorkflowOptionsSchema = z.object({
|
|
429
|
+
zap: z.string().min(1).max(128).describe(
|
|
430
|
+
"ID of the Zap to import. Must be owned by the requesting user. Recorded on the created workflow as source_zap_id."
|
|
431
|
+
),
|
|
432
|
+
name: z.string().optional().describe(
|
|
433
|
+
`Name for the created workflow. Defaults to a kebab-cased form of the Zap's title, or "imported-workflow" when the Zap has no title.`
|
|
434
|
+
),
|
|
435
|
+
private: z.boolean().optional().describe(
|
|
436
|
+
"Restrict the created workflow to the creating user. Defaults to false, which makes it account-visible."
|
|
437
|
+
)
|
|
438
|
+
}).describe(
|
|
439
|
+
"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."
|
|
440
|
+
);
|
|
441
|
+
var TranslationIssueSchema = z.object({
|
|
442
|
+
line: z.number().int().describe(
|
|
443
|
+
"1-based line in the generated source the issue relates to, or 0 when not line-specific."
|
|
444
|
+
),
|
|
445
|
+
column: z.number().int().describe("1-based column, or 0 when not column-specific."),
|
|
446
|
+
node_kind: z.string().describe(
|
|
447
|
+
'Category of the issue, used to group and message them, e.g. "invalid-connection-id", "DelayStep", "app-version-conflict".'
|
|
448
|
+
),
|
|
449
|
+
step_name: z.string().optional().describe("ZDL step id or name the issue originated from, when known."),
|
|
450
|
+
message: z.string().describe("Human-readable description of the issue."),
|
|
451
|
+
blocking: z.boolean().describe(
|
|
452
|
+
"Whether the issue must be resolved before the draft can be published. Computed server-side, so callers do not re-derive it. A blocking issue does not prevent the draft being created."
|
|
453
|
+
)
|
|
454
|
+
});
|
|
455
|
+
var ImportedWorkflowSchema = z.object({
|
|
456
|
+
id: z.string().describe("Workflow ID (UUID)"),
|
|
457
|
+
name: z.string().describe("Workflow name"),
|
|
458
|
+
description: z.string().nullable().optional().describe("Optional workflow description (null if unset)"),
|
|
459
|
+
trigger_url: WorkflowTriggerUrlSchema,
|
|
460
|
+
enabled: z.boolean().describe(
|
|
461
|
+
"Whether the workflow accepts triggers. An import always lands disabled."
|
|
462
|
+
),
|
|
463
|
+
disabled_reason: WorkflowDisabledReasonSchema.nullable().optional().describe("Why the workflow is off, when system-disabled."),
|
|
464
|
+
is_private: z.boolean().describe(
|
|
465
|
+
"Whether the workflow is private to the creating user. False means account-visible."
|
|
466
|
+
),
|
|
467
|
+
source_zap_id: z.string().nullable().optional().describe("The Zap this workflow was imported from."),
|
|
468
|
+
created_by_user_id: z.string(),
|
|
469
|
+
updated_by_user_id: z.string().nullable().optional(),
|
|
470
|
+
current_version_id: z.string().nullable().optional().describe("Null on a fresh import, which has no published version yet."),
|
|
471
|
+
triggers: z.array(WorkflowTriggerSchema).describe("Empty on a fresh import, which has no published version yet."),
|
|
472
|
+
created_at: z.string(),
|
|
473
|
+
updated_at: z.string().optional()
|
|
474
|
+
});
|
|
475
|
+
var ImportWorkflowResponseSchema = z.object({
|
|
476
|
+
workflow: ImportedWorkflowSchema.describe(
|
|
477
|
+
"The created workflow. Disabled, with no published version, and source_zap_id set to the imported Zap."
|
|
478
|
+
),
|
|
479
|
+
draft: WorkflowDraftSchema.describe(
|
|
480
|
+
"The open draft holding the transformed source."
|
|
481
|
+
),
|
|
482
|
+
issues: z.array(TranslationIssueSchema).describe(
|
|
483
|
+
"Blocking and non-blocking translation issues from the transform, passed through unchanged. Blocking issues do not prevent draft creation; they must be resolved before the draft will publish."
|
|
484
|
+
)
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// src/plugins/codeSubstrate/importWorkflow/index.ts
|
|
488
|
+
var importWorkflowPlugin = defineMethod({
|
|
489
|
+
...codeSubstrateDefaults,
|
|
490
|
+
name: "importWorkflow",
|
|
491
|
+
imports: [apiPluginRef],
|
|
492
|
+
type: "create",
|
|
493
|
+
itemType: "Workflow",
|
|
494
|
+
// The response is the composite `{ workflow, draft, issues }`, not the bare
|
|
495
|
+
// `WorkflowItem` the docs generator derives from itemType.
|
|
496
|
+
returnType: "ImportWorkflowResponse",
|
|
497
|
+
inputSchema: ImportWorkflowOptionsSchema,
|
|
498
|
+
outputSchema: ImportWorkflowResponseSchema,
|
|
499
|
+
skipOutputValidation: true,
|
|
500
|
+
output: "item",
|
|
501
|
+
run: async ({ imports, input }) => {
|
|
502
|
+
const api = imports.api;
|
|
503
|
+
const body = { zap_id: input.zap };
|
|
504
|
+
if (input.name !== void 0) {
|
|
505
|
+
body.name = input.name;
|
|
506
|
+
}
|
|
507
|
+
if (input.private !== void 0) {
|
|
508
|
+
body.is_private = input.private;
|
|
509
|
+
}
|
|
510
|
+
const raw = await api.post(
|
|
511
|
+
`${CODE_SUBSTRATE_WORKFLOWS_API}/workflows/import`,
|
|
512
|
+
body,
|
|
513
|
+
{
|
|
514
|
+
authRequired: true,
|
|
515
|
+
// Import is owner-gated upstream: the endpoint refuses a Zap the
|
|
516
|
+
// requesting user does not own. A bare 403 tells the caller nothing
|
|
517
|
+
// about which gate they hit or what to do, so name both.
|
|
518
|
+
customErrorHandler: ({ status, data }) => {
|
|
519
|
+
if (status === 403) {
|
|
520
|
+
const detail = extractErrorDetail(data);
|
|
521
|
+
return new ZapierApiError(
|
|
522
|
+
`${detail ?? "Zap import forbidden"} \u2014 only Zaps owned by the requesting user can be imported. Check the Zap ID belongs to this user, or ask its owner to run the import. Retrying will not help.`,
|
|
523
|
+
{ statusCode: status }
|
|
524
|
+
);
|
|
525
|
+
}
|
|
526
|
+
return void 0;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
);
|
|
530
|
+
return { data: ImportWorkflowResponseSchema.parse(raw) };
|
|
531
|
+
}
|
|
532
|
+
});
|
|
428
533
|
var UpdateWorkflowOptionsSchema = z.object({
|
|
429
534
|
workflow: z.string().uuid().describe("Durable workflow ID"),
|
|
430
535
|
name: z.string().min(1).optional().describe("New name for the workflow"),
|
|
@@ -2278,6 +2383,7 @@ var zapierExperimentalSdkPlugin = definePlugin({
|
|
|
2278
2383
|
listWorkflowsPlugin,
|
|
2279
2384
|
getWorkflowPlugin,
|
|
2280
2385
|
createWorkflowPlugin,
|
|
2386
|
+
importWorkflowPlugin,
|
|
2281
2387
|
updateWorkflowPlugin,
|
|
2282
2388
|
enableWorkflowPlugin,
|
|
2283
2389
|
disableWorkflowPlugin,
|