@zapier/zapier-sdk 0.59.0 → 0.61.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 +24 -0
- package/README.md +239 -1
- package/dist/experimental.cjs +329 -10
- package/dist/experimental.d.mts +142 -2
- package/dist/experimental.d.ts +140 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +15 -0
- package/dist/experimental.mjs +329 -11
- package/dist/{index-eliz1Uq3.d.mts → index-iKbnOz6r.d.mts} +15 -1
- package/dist/{index-eliz1Uq3.d.ts → index-iKbnOz6r.d.ts} +15 -1
- package/dist/index.cjs +23 -9
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +23 -10
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts +45 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +19 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts +16 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/createWorkflow/schemas.js +25 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts +39 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +27 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +6 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +6 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts +40 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +20 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts +11 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/schemas.js +12 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts +40 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +20 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts +11 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/enableWorkflow/schemas.js +12 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts +54 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflow/index.js +21 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts +35 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflow/schemas.js +45 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts +50 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflows/index.js +29 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts +40 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflows/schemas.js +54 -0
- package/dist/plugins/codeSubstrate/shared.d.ts +16 -0
- package/dist/plugins/codeSubstrate/shared.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/shared.js +15 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts +47 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +27 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts +18 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/updateWorkflow/schemas.js +30 -0
- package/dist/plugins/deleteClientCredentials/index.d.ts.map +1 -1
- package/dist/plugins/deleteClientCredentials/index.js +1 -4
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +4 -0
- package/dist/resolvers/clientId.d.ts.map +1 -1
- package/dist/resolvers/clientId.js +2 -4
- package/dist/resolvers/index.d.ts +1 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -0
- package/dist/resolvers/workflowId.d.ts +4 -0
- package/dist/resolvers/workflowId.d.ts.map +1 -0
- package/dist/resolvers/workflowId.js +14 -0
- package/package.json +1 -1
package/dist/experimental.cjs
CHANGED
|
@@ -30,6 +30,10 @@ var categoryDefinitions = {
|
|
|
30
30
|
},
|
|
31
31
|
table: { title: "Table" },
|
|
32
32
|
trigger: { title: "Trigger" },
|
|
33
|
+
"code-workflow": {
|
|
34
|
+
title: "Code Workflow",
|
|
35
|
+
titlePlural: "Code Workflows"
|
|
36
|
+
},
|
|
33
37
|
http: { title: "HTTP Request" },
|
|
34
38
|
utility: { title: "Utility", titlePlural: "Utilities" },
|
|
35
39
|
other: { title: "Other" }
|
|
@@ -2885,7 +2889,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2885
2889
|
}
|
|
2886
2890
|
|
|
2887
2891
|
// src/sdk-version.ts
|
|
2888
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2892
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.61.0" : void 0) || "unknown";
|
|
2889
2893
|
|
|
2890
2894
|
// src/utils/open-url.ts
|
|
2891
2895
|
var nodePrefix = "node:";
|
|
@@ -4204,10 +4208,7 @@ var clientCredentialsNameResolver = {
|
|
|
4204
4208
|
// src/resolvers/clientId.ts
|
|
4205
4209
|
var clientIdResolver = {
|
|
4206
4210
|
type: "dynamic",
|
|
4207
|
-
fetch: async (sdk) => {
|
|
4208
|
-
const result = await sdk.listClientCredentials({ maxItems: 100 });
|
|
4209
|
-
return result.data;
|
|
4210
|
-
},
|
|
4211
|
+
fetch: async (sdk) => toIterable(sdk.listClientCredentials({})),
|
|
4211
4212
|
prompt: (credentials) => ({
|
|
4212
4213
|
type: "list",
|
|
4213
4214
|
name: "clientId",
|
|
@@ -4270,6 +4271,21 @@ var triggerInboxResolver = {
|
|
|
4270
4271
|
})
|
|
4271
4272
|
};
|
|
4272
4273
|
|
|
4274
|
+
// src/resolvers/workflowId.ts
|
|
4275
|
+
var workflowIdResolver = {
|
|
4276
|
+
type: "dynamic",
|
|
4277
|
+
fetch: async (sdk) => toIterable(sdk.listWorkflows()),
|
|
4278
|
+
prompt: (workflows) => ({
|
|
4279
|
+
type: "list",
|
|
4280
|
+
name: "workflow",
|
|
4281
|
+
message: "Select a workflow:",
|
|
4282
|
+
choices: workflows.map((workflow) => ({
|
|
4283
|
+
name: workflow.enabled ? workflow.name : `${workflow.name} (disabled)`,
|
|
4284
|
+
value: workflow.id
|
|
4285
|
+
}))
|
|
4286
|
+
})
|
|
4287
|
+
};
|
|
4288
|
+
|
|
4273
4289
|
// src/resolvers/triggerMessages.ts
|
|
4274
4290
|
var triggerMessagesResolver = {
|
|
4275
4291
|
type: "dynamic",
|
|
@@ -6132,10 +6148,7 @@ var deleteClientCredentialsPlugin = definePlugin(
|
|
|
6132
6148
|
{
|
|
6133
6149
|
authRequired: true,
|
|
6134
6150
|
requiredScopes: ["credentials"],
|
|
6135
|
-
resource: {
|
|
6136
|
-
type: "client-credential",
|
|
6137
|
-
id: options.clientId
|
|
6138
|
-
}
|
|
6151
|
+
resource: { type: "client-credential", id: options.clientId }
|
|
6139
6152
|
}
|
|
6140
6153
|
);
|
|
6141
6154
|
return { success: true };
|
|
@@ -10507,6 +10520,311 @@ var getTriggerInputFieldsSchemaPlugin = definePlugin(
|
|
|
10507
10520
|
})
|
|
10508
10521
|
);
|
|
10509
10522
|
|
|
10523
|
+
// src/plugins/codeSubstrate/shared.ts
|
|
10524
|
+
var codeSubstrateDefaults = {
|
|
10525
|
+
categories: ["code-workflow"],
|
|
10526
|
+
experimental: true
|
|
10527
|
+
};
|
|
10528
|
+
var WorkflowItemSchema = zod.z.object({
|
|
10529
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10530
|
+
name: zod.z.string().describe("Workflow name"),
|
|
10531
|
+
description: zod.z.string().nullable().describe("Optional workflow description (null if unset)"),
|
|
10532
|
+
trigger_url: zod.z.string().describe(
|
|
10533
|
+
"Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
|
|
10534
|
+
),
|
|
10535
|
+
enabled: zod.z.boolean().describe("Whether the workflow currently accepts triggers"),
|
|
10536
|
+
current_version_id: zod.z.string().nullable().describe(
|
|
10537
|
+
"ID of the workflow version that runs handle. Null until a version is published."
|
|
10538
|
+
),
|
|
10539
|
+
created_at: zod.z.string().describe("When the workflow was created (ISO-8601)"),
|
|
10540
|
+
updated_at: zod.z.string().describe("When the workflow was last modified (ISO-8601)")
|
|
10541
|
+
});
|
|
10542
|
+
var ListWorkflowsOptionsSchema = zod.z.object({
|
|
10543
|
+
pageSize: zod.z.number().int().min(1).optional().describe(
|
|
10544
|
+
"Number of workflows per page (server-side pagination forthcoming; ignored until then)"
|
|
10545
|
+
),
|
|
10546
|
+
maxItems: zod.z.number().int().min(1).optional().describe("Maximum total workflows to return across all pages"),
|
|
10547
|
+
cursor: zod.z.string().optional().describe(
|
|
10548
|
+
"Cursor to start from for pagination (server-side pagination forthcoming; ignored until then)"
|
|
10549
|
+
)
|
|
10550
|
+
}).describe("List all active durable workflows for the authenticated account");
|
|
10551
|
+
var ListWorkflowsApiResponseSchema = zod.z.object({
|
|
10552
|
+
workflows: zod.z.array(WorkflowItemSchema),
|
|
10553
|
+
next_cursor: zod.z.string().nullable().optional()
|
|
10554
|
+
});
|
|
10555
|
+
|
|
10556
|
+
// src/plugins/codeSubstrate/listWorkflows/index.ts
|
|
10557
|
+
var listWorkflowsPlugin = definePlugin(
|
|
10558
|
+
(sdk) => createPaginatedPluginMethod(sdk, {
|
|
10559
|
+
...codeSubstrateDefaults,
|
|
10560
|
+
name: "listWorkflows",
|
|
10561
|
+
type: "list",
|
|
10562
|
+
itemType: "Workflow",
|
|
10563
|
+
inputSchema: ListWorkflowsOptionsSchema,
|
|
10564
|
+
outputSchema: WorkflowItemSchema,
|
|
10565
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
10566
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10567
|
+
const searchParams = {};
|
|
10568
|
+
if (options.pageSize !== void 0) {
|
|
10569
|
+
searchParams.limit = options.pageSize.toString();
|
|
10570
|
+
}
|
|
10571
|
+
if (options.cursor) {
|
|
10572
|
+
searchParams.cursor = options.cursor;
|
|
10573
|
+
}
|
|
10574
|
+
const raw = await sdk2.context.api.get(
|
|
10575
|
+
"/durableworkflowzaps/api/v0/workflows",
|
|
10576
|
+
{ searchParams, authRequired: true }
|
|
10577
|
+
);
|
|
10578
|
+
const response = ListWorkflowsApiResponseSchema.parse(raw);
|
|
10579
|
+
return {
|
|
10580
|
+
data: response.workflows,
|
|
10581
|
+
next: response.next_cursor ?? null
|
|
10582
|
+
};
|
|
10583
|
+
},
|
|
10584
|
+
extractCursor: (response) => response.next ?? void 0
|
|
10585
|
+
})
|
|
10586
|
+
);
|
|
10587
|
+
var WorkflowVersionSchema = zod.z.object({
|
|
10588
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
10589
|
+
workflow_id: zod.z.string().describe("Parent workflow ID"),
|
|
10590
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).describe("Source files keyed by filename \u2192 contents"),
|
|
10591
|
+
zapier_durable_version: zod.z.string().describe(
|
|
10592
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
10593
|
+
),
|
|
10594
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
10595
|
+
// Backend column is NOT NULL (see durableworkflowzaps prisma schema:
|
|
10596
|
+
// workflow_versions.created_by_user_id), so this is always emitted.
|
|
10597
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
10598
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
10599
|
+
});
|
|
10600
|
+
var GetWorkflowOptionsSchema = zod.z.object({
|
|
10601
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID")
|
|
10602
|
+
}).describe(
|
|
10603
|
+
"Get a durable workflow with its current version details and trigger claim status"
|
|
10604
|
+
);
|
|
10605
|
+
var GetWorkflowResponseSchema = zod.z.object({
|
|
10606
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10607
|
+
name: zod.z.string().describe("Workflow name"),
|
|
10608
|
+
description: zod.z.string().nullable().describe("Optional workflow description (null if unset)"),
|
|
10609
|
+
trigger_url: zod.z.string().describe(
|
|
10610
|
+
"Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
|
|
10611
|
+
),
|
|
10612
|
+
enabled: zod.z.boolean().describe("Whether the workflow currently accepts triggers"),
|
|
10613
|
+
current_version: WorkflowVersionSchema.optional().describe(
|
|
10614
|
+
"The currently published version, if any. Absent for workflows with no version published yet."
|
|
10615
|
+
),
|
|
10616
|
+
created_at: zod.z.string().describe("When the workflow was created (ISO-8601)"),
|
|
10617
|
+
updated_at: zod.z.string().describe("When the workflow was last modified (ISO-8601)")
|
|
10618
|
+
});
|
|
10619
|
+
|
|
10620
|
+
// src/plugins/codeSubstrate/getWorkflow/index.ts
|
|
10621
|
+
var getWorkflowPlugin = definePlugin(
|
|
10622
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10623
|
+
...codeSubstrateDefaults,
|
|
10624
|
+
name: "getWorkflow",
|
|
10625
|
+
type: "item",
|
|
10626
|
+
itemType: "Workflow",
|
|
10627
|
+
inputSchema: GetWorkflowOptionsSchema,
|
|
10628
|
+
outputSchema: GetWorkflowResponseSchema,
|
|
10629
|
+
resolvers: { workflow: workflowIdResolver },
|
|
10630
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10631
|
+
const raw = await sdk2.context.api.get(
|
|
10632
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
|
|
10633
|
+
{
|
|
10634
|
+
authRequired: true,
|
|
10635
|
+
resource: { type: "workflow", id: options.workflow }
|
|
10636
|
+
}
|
|
10637
|
+
);
|
|
10638
|
+
const data = GetWorkflowResponseSchema.parse(raw);
|
|
10639
|
+
return { data };
|
|
10640
|
+
}
|
|
10641
|
+
})
|
|
10642
|
+
);
|
|
10643
|
+
var CreateWorkflowOptionsSchema = zod.z.object({
|
|
10644
|
+
name: zod.z.string().min(1).describe("Workflow name"),
|
|
10645
|
+
description: zod.z.string().optional().describe("Optional description for the workflow")
|
|
10646
|
+
}).describe(
|
|
10647
|
+
"Create a durable workflow container. Starts disabled with no version; publish a version to add code."
|
|
10648
|
+
);
|
|
10649
|
+
var CreateWorkflowResponseSchema = zod.z.object({
|
|
10650
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10651
|
+
name: zod.z.string().describe("Workflow name"),
|
|
10652
|
+
description: zod.z.string().nullable().describe("Workflow description (null if unset)"),
|
|
10653
|
+
trigger_url: zod.z.string().describe(
|
|
10654
|
+
"Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
|
|
10655
|
+
),
|
|
10656
|
+
enabled: zod.z.boolean().describe(
|
|
10657
|
+
"Whether the workflow currently accepts triggers. Always false on a new workflow until enabled."
|
|
10658
|
+
),
|
|
10659
|
+
created_at: zod.z.string().describe("When the workflow was created (ISO-8601)")
|
|
10660
|
+
});
|
|
10661
|
+
|
|
10662
|
+
// src/plugins/codeSubstrate/createWorkflow/index.ts
|
|
10663
|
+
var createWorkflowPlugin = definePlugin(
|
|
10664
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10665
|
+
...codeSubstrateDefaults,
|
|
10666
|
+
name: "createWorkflow",
|
|
10667
|
+
type: "create",
|
|
10668
|
+
itemType: "Workflow",
|
|
10669
|
+
inputSchema: CreateWorkflowOptionsSchema,
|
|
10670
|
+
outputSchema: CreateWorkflowResponseSchema,
|
|
10671
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10672
|
+
const body = { name: options.name };
|
|
10673
|
+
if (options.description !== void 0) {
|
|
10674
|
+
body.description = options.description;
|
|
10675
|
+
}
|
|
10676
|
+
const data = await sdk2.context.api.post(
|
|
10677
|
+
"/durableworkflowzaps/api/v0/workflows",
|
|
10678
|
+
body,
|
|
10679
|
+
{ authRequired: true }
|
|
10680
|
+
);
|
|
10681
|
+
return { data };
|
|
10682
|
+
}
|
|
10683
|
+
})
|
|
10684
|
+
);
|
|
10685
|
+
var UpdateWorkflowOptionsSchema = zod.z.object({
|
|
10686
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
10687
|
+
name: zod.z.string().min(1).optional().describe("New name for the workflow"),
|
|
10688
|
+
description: zod.z.string().nullish().describe("New description for the workflow (pass null to clear)")
|
|
10689
|
+
}).refine((data) => data.name !== void 0 || data.description !== void 0, {
|
|
10690
|
+
message: "Provide name or description (at least one is required)"
|
|
10691
|
+
}).describe("Update a durable workflow's name and/or description");
|
|
10692
|
+
var UpdateWorkflowResponseSchema = zod.z.object({
|
|
10693
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10694
|
+
name: zod.z.string().describe("Workflow name (post-update)"),
|
|
10695
|
+
description: zod.z.string().nullable().describe("Workflow description, post-update (null if unset)"),
|
|
10696
|
+
trigger_url: zod.z.string().describe(
|
|
10697
|
+
"Public webhook URL that fires this workflow when POSTed to. Embeds a secret trigger token in the path \u2014 treat as sensitive."
|
|
10698
|
+
),
|
|
10699
|
+
enabled: zod.z.boolean().describe("Whether the workflow currently accepts triggers"),
|
|
10700
|
+
created_at: zod.z.string().describe("When the workflow was created (ISO-8601)"),
|
|
10701
|
+
updated_at: zod.z.string().describe("When this update was applied (ISO-8601)")
|
|
10702
|
+
});
|
|
10703
|
+
|
|
10704
|
+
// src/plugins/codeSubstrate/updateWorkflow/index.ts
|
|
10705
|
+
var updateWorkflowPlugin = definePlugin(
|
|
10706
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10707
|
+
...codeSubstrateDefaults,
|
|
10708
|
+
name: "updateWorkflow",
|
|
10709
|
+
type: "update",
|
|
10710
|
+
itemType: "Workflow",
|
|
10711
|
+
inputSchema: UpdateWorkflowOptionsSchema,
|
|
10712
|
+
outputSchema: UpdateWorkflowResponseSchema,
|
|
10713
|
+
resolvers: { workflow: workflowIdResolver },
|
|
10714
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10715
|
+
const body = {};
|
|
10716
|
+
if (options.name !== void 0) {
|
|
10717
|
+
body.name = options.name;
|
|
10718
|
+
}
|
|
10719
|
+
if (options.description !== void 0) {
|
|
10720
|
+
body.description = options.description;
|
|
10721
|
+
}
|
|
10722
|
+
const data = await sdk2.context.api.patch(
|
|
10723
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
|
|
10724
|
+
body,
|
|
10725
|
+
{
|
|
10726
|
+
authRequired: true,
|
|
10727
|
+
resource: { type: "workflow", id: options.workflow }
|
|
10728
|
+
}
|
|
10729
|
+
);
|
|
10730
|
+
return { data };
|
|
10731
|
+
}
|
|
10732
|
+
})
|
|
10733
|
+
);
|
|
10734
|
+
var EnableWorkflowOptionsSchema = zod.z.object({
|
|
10735
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID")
|
|
10736
|
+
}).describe("Enable a durable workflow so it accepts triggers");
|
|
10737
|
+
var EnableWorkflowResponseSchema = zod.z.object({
|
|
10738
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10739
|
+
enabled: zod.z.boolean().describe("Workflow's enabled state after the operation (always true)")
|
|
10740
|
+
});
|
|
10741
|
+
|
|
10742
|
+
// src/plugins/codeSubstrate/enableWorkflow/index.ts
|
|
10743
|
+
var enableWorkflowPlugin = definePlugin(
|
|
10744
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10745
|
+
...codeSubstrateDefaults,
|
|
10746
|
+
name: "enableWorkflow",
|
|
10747
|
+
type: "update",
|
|
10748
|
+
itemType: "Workflow",
|
|
10749
|
+
inputSchema: EnableWorkflowOptionsSchema,
|
|
10750
|
+
outputSchema: EnableWorkflowResponseSchema,
|
|
10751
|
+
resolvers: { workflow: workflowIdResolver },
|
|
10752
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10753
|
+
const data = await sdk2.context.api.post(
|
|
10754
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
|
|
10755
|
+
void 0,
|
|
10756
|
+
{
|
|
10757
|
+
authRequired: true,
|
|
10758
|
+
resource: { type: "workflow", id: options.workflow }
|
|
10759
|
+
}
|
|
10760
|
+
);
|
|
10761
|
+
return { data };
|
|
10762
|
+
}
|
|
10763
|
+
})
|
|
10764
|
+
);
|
|
10765
|
+
var DisableWorkflowOptionsSchema = zod.z.object({
|
|
10766
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID")
|
|
10767
|
+
}).describe("Disable a durable workflow so it stops accepting triggers");
|
|
10768
|
+
var DisableWorkflowResponseSchema = zod.z.object({
|
|
10769
|
+
id: zod.z.string().describe("Workflow ID (UUID)"),
|
|
10770
|
+
enabled: zod.z.boolean().describe(
|
|
10771
|
+
"Workflow's enabled state after the operation. Typically false; mirrors the row's true state in case a concurrent enable raced with this call."
|
|
10772
|
+
)
|
|
10773
|
+
});
|
|
10774
|
+
|
|
10775
|
+
// src/plugins/codeSubstrate/disableWorkflow/index.ts
|
|
10776
|
+
var disableWorkflowPlugin = definePlugin(
|
|
10777
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10778
|
+
...codeSubstrateDefaults,
|
|
10779
|
+
name: "disableWorkflow",
|
|
10780
|
+
type: "update",
|
|
10781
|
+
itemType: "Workflow",
|
|
10782
|
+
inputSchema: DisableWorkflowOptionsSchema,
|
|
10783
|
+
outputSchema: DisableWorkflowResponseSchema,
|
|
10784
|
+
resolvers: { workflow: workflowIdResolver },
|
|
10785
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10786
|
+
const data = await sdk2.context.api.post(
|
|
10787
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
|
|
10788
|
+
void 0,
|
|
10789
|
+
{
|
|
10790
|
+
authRequired: true,
|
|
10791
|
+
resource: { type: "workflow", id: options.workflow }
|
|
10792
|
+
}
|
|
10793
|
+
);
|
|
10794
|
+
return { data };
|
|
10795
|
+
}
|
|
10796
|
+
})
|
|
10797
|
+
);
|
|
10798
|
+
var DeleteWorkflowOptionsSchema = zod.z.object({
|
|
10799
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID")
|
|
10800
|
+
}).describe(
|
|
10801
|
+
"Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
|
|
10802
|
+
);
|
|
10803
|
+
|
|
10804
|
+
// src/plugins/codeSubstrate/deleteWorkflow/index.ts
|
|
10805
|
+
var deleteWorkflowPlugin = definePlugin(
|
|
10806
|
+
(sdk) => createPluginMethod(sdk, {
|
|
10807
|
+
...codeSubstrateDefaults,
|
|
10808
|
+
name: "deleteWorkflow",
|
|
10809
|
+
type: "delete",
|
|
10810
|
+
itemType: "Workflow",
|
|
10811
|
+
confirm: "delete",
|
|
10812
|
+
inputSchema: DeleteWorkflowOptionsSchema,
|
|
10813
|
+
resolvers: { workflow: workflowIdResolver },
|
|
10814
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
10815
|
+
await sdk2.context.api.delete(
|
|
10816
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
|
|
10817
|
+
void 0,
|
|
10818
|
+
{
|
|
10819
|
+
authRequired: true,
|
|
10820
|
+
resource: { type: "workflow", id: options.workflow }
|
|
10821
|
+
}
|
|
10822
|
+
);
|
|
10823
|
+
return { data: { id: options.workflow } };
|
|
10824
|
+
}
|
|
10825
|
+
})
|
|
10826
|
+
);
|
|
10827
|
+
|
|
10510
10828
|
// src/utils/batch-utils.ts
|
|
10511
10829
|
var DEFAULT_CONCURRENCY = 10;
|
|
10512
10830
|
var BATCH_START_DELAY_MS = 25;
|
|
@@ -10665,7 +10983,7 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
10665
10983
|
|
|
10666
10984
|
// src/experimental.ts
|
|
10667
10985
|
function createZapierSdk2(options = {}) {
|
|
10668
|
-
return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listActionInputFieldsPlugin).addPlugin(getActionInputFieldsSchemaPlugin).addPlugin(listActionInputFieldChoicesPlugin).addPlugin(listInputFieldsDeprecatedPlugin).addPlugin(getInputFieldsSchemaDeprecatedPlugin).addPlugin(listInputFieldChoicesDeprecatedPlugin).addPlugin(runActionPlugin).addPlugin(listConnectionsPlugin).addPlugin(getConnectionPlugin).addPlugin(findFirstConnectionPlugin).addPlugin(findUniqueConnectionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(listClientCredentialsPlugin).addPlugin(createClientCredentialsPlugin).addPlugin(deleteClientCredentialsPlugin).addPlugin(fetchPlugin).addPlugin(requestPlugin).addPlugin(createTriggerInboxPlugin).addPlugin(ensureTriggerInboxPlugin).addPlugin(listTriggerInboxesPlugin).addPlugin(getTriggerInboxPlugin).addPlugin(updateTriggerInboxPlugin).addPlugin(deleteTriggerInboxPlugin).addPlugin(pauseTriggerInboxPlugin).addPlugin(resumeTriggerInboxPlugin).addPlugin(listTriggerInboxMessagesPlugin).addPlugin(leaseTriggerInboxMessagesPlugin).addPlugin(ackTriggerInboxMessagesPlugin).addPlugin(releaseTriggerInboxMessagesPlugin).addPlugin(drainTriggerInboxPlugin).addPlugin(watchTriggerInboxPlugin).addPlugin(listTriggersPlugin).addPlugin(listTriggerInputFieldsPlugin).addPlugin(listTriggerInputFieldChoicesPlugin).addPlugin(getTriggerInputFieldsSchemaPlugin).addPlugin(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
10986
|
+
return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listActionInputFieldsPlugin).addPlugin(getActionInputFieldsSchemaPlugin).addPlugin(listActionInputFieldChoicesPlugin).addPlugin(listInputFieldsDeprecatedPlugin).addPlugin(getInputFieldsSchemaDeprecatedPlugin).addPlugin(listInputFieldChoicesDeprecatedPlugin).addPlugin(runActionPlugin).addPlugin(listConnectionsPlugin).addPlugin(getConnectionPlugin).addPlugin(findFirstConnectionPlugin).addPlugin(findUniqueConnectionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(listClientCredentialsPlugin).addPlugin(createClientCredentialsPlugin).addPlugin(deleteClientCredentialsPlugin).addPlugin(fetchPlugin).addPlugin(requestPlugin).addPlugin(createTriggerInboxPlugin).addPlugin(ensureTriggerInboxPlugin).addPlugin(listTriggerInboxesPlugin).addPlugin(getTriggerInboxPlugin).addPlugin(updateTriggerInboxPlugin).addPlugin(deleteTriggerInboxPlugin).addPlugin(pauseTriggerInboxPlugin).addPlugin(resumeTriggerInboxPlugin).addPlugin(listTriggerInboxMessagesPlugin).addPlugin(leaseTriggerInboxMessagesPlugin).addPlugin(ackTriggerInboxMessagesPlugin).addPlugin(releaseTriggerInboxMessagesPlugin).addPlugin(drainTriggerInboxPlugin).addPlugin(watchTriggerInboxPlugin).addPlugin(listTriggersPlugin).addPlugin(listTriggerInputFieldsPlugin).addPlugin(listTriggerInputFieldChoicesPlugin).addPlugin(getTriggerInputFieldsSchemaPlugin).addPlugin(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(listWorkflowsPlugin).addPlugin(getWorkflowPlugin).addPlugin(createWorkflowPlugin).addPlugin(updateWorkflowPlugin).addPlugin(enableWorkflowPlugin).addPlugin(disableWorkflowPlugin).addPlugin(deleteWorkflowPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
10669
10987
|
}
|
|
10670
10988
|
|
|
10671
10989
|
exports.ActionKeyPropertySchema = ActionKeyPropertySchema;
|
|
@@ -10857,3 +11175,4 @@ exports.toTitleCase = toTitleCase;
|
|
|
10857
11175
|
exports.triggerInboxResolver = triggerInboxResolver;
|
|
10858
11176
|
exports.triggerMessagesResolver = triggerMessagesResolver;
|
|
10859
11177
|
exports.updateTableRecordsPlugin = updateTableRecordsPlugin;
|
|
11178
|
+
exports.workflowIdResolver = workflowIdResolver;
|
package/dist/experimental.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseSdkOptions, W as WithAddPlugin, P as PluginMeta, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, M as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, b as AddActionEntryOptions, c as AddActionEntryResult, d as ActionEntry, f as findManifestEntry, r as readManifestFromFile, C as CapabilitiesContext, e as PaginatedSdkResult, F as FieldsetItem, g as PositionalMetadata, h as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, i as DynamicResolver, j as WatchTriggerInboxOptions, k as ActionProxy, l as ZapierSdkApps } from './index-
|
|
2
|
-
export { u as Action, bZ as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aB as ActionItem, bc as ActionKeyProperty, aM as ActionKeyPropertySchema, bd as ActionProperty, aN as ActionPropertySchema, as as ActionResolverItem, bo as ActionTimeoutMsProperty, aY as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bb as ActionTypeProperty, aL as ActionTypePropertySchema, bB as ApiError,
|
|
1
|
+
import { B as BaseSdkOptions, W as WithAddPlugin, P as PluginMeta, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, M as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, b as AddActionEntryOptions, c as AddActionEntryResult, d as ActionEntry, f as findManifestEntry, r as readManifestFromFile, C as CapabilitiesContext, e as PaginatedSdkResult, F as FieldsetItem, g as PositionalMetadata, h as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, i as DynamicResolver, j as WatchTriggerInboxOptions, k as ActionProxy, l as ZapierSdkApps } from './index-iKbnOz6r.mjs';
|
|
2
|
+
export { u as Action, bZ as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aB as ActionItem, bc as ActionKeyProperty, aM as ActionKeyPropertySchema, bd as ActionProperty, aN as ActionPropertySchema, as as ActionResolverItem, bo as ActionTimeoutMsProperty, aY as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bb as ActionTypeProperty, aL as ActionTypePropertySchema, bB as ApiError, dj as ApiEvent, cH as ApiPluginOptions, cJ as ApiPluginProvides, v as App, b_ as AppFactoryInput, az as AppItem, b9 as AppKeyProperty, aJ as AppKeyPropertySchema, ba as AppProperty, aK as AppPropertySchema, et as ApplicationLifecycleEventData, bS as ApprovalStatus, bY as AppsPluginProvides, bt as AppsProperty, b1 as AppsPropertySchema, a0 as ArrayResolver, di as AuthEvent, bh as AuthenticationIdProperty, aQ as AuthenticationIdPropertySchema, eB as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cu as CONTEXT_CACHE_MAX_SIZE, ct as CONTEXT_CACHE_TTL_MS, x as Choice, dq as ClientCredentialsObject, dB as ClientCredentialsObjectSchema, K as Connection, dJ as ConnectionEntry, dI as ConnectionEntrySchema, bf as ConnectionIdProperty, aP as ConnectionIdPropertySchema, aA as ConnectionItem, bg as ConnectionProperty, aR as ConnectionPropertySchema, dL as ConnectionsMap, dK as ConnectionsMapSchema, dN as ConnectionsPluginProvides, bv as ConnectionsProperty, b3 as ConnectionsPropertySchema, O as ConnectionsResponse, cg as CreateClientCredentialsPluginProvides, eb as CreateTableFieldsPluginProvides, e5 as CreateTablePluginProvides, ej as CreateTableRecordsPluginProvides, dm as Credentials, dG as CredentialsFunction, dF as CredentialsFunctionSchema, dp as CredentialsObject, dD as CredentialsObjectSchema, dH as CredentialsSchema, dS as DEFAULT_ACTION_TIMEOUT_MS, d_ as DEFAULT_APPROVAL_TIMEOUT_MS, cD as DEFAULT_CONFIG_PATH, d$ as DEFAULT_MAX_APPROVAL_RETRIES, dR as DEFAULT_PAGE_SIZE, bm as DebugProperty, aW as DebugPropertySchema, ci as DeleteClientCredentialsPluginProvides, ed as DeleteTableFieldsPluginProvides, e7 as DeleteTablePluginProvides, el as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, a3 as DynamicListResolver, a4 as DynamicSearchResolver, eu as EnhancedErrorEventData, bC as ErrorOptions, dl as EventCallback, es as EventContext, ep as EventEmissionConfig, er as EventEmissionProvides, c0 as FetchPluginProvides, w as Field, bs as FieldsProperty, b0 as FieldsPropertySchema, a5 as FieldsResolver, s as FindFirstAuthenticationPluginProvides, cq as FindFirstConnectionPluginProvides, t as FindUniqueAuthenticationPluginProvides, cs as FindUniqueConnectionPluginProvides, Y as FormatMetadata, X as FormattedItem, ak as FunctionDeprecation, aG as FunctionOptions, aj as FunctionRegistryEntry, ca as GetActionInputFieldsSchemaPluginProvides, cm as GetActionPluginProvides, ck as GetAppPluginProvides, G as GetAuthenticationPluginProvides, co as GetConnectionPluginProvides, cG as GetProfilePluginProvides, e3 as GetTablePluginProvides, ef as GetTableRecordPluginProvides, aD as InfoFieldItem, aC as InputFieldItem, be as InputFieldProperty, aO as InputFieldPropertySchema, bi as InputsProperty, aS as InputsPropertySchema, bA as LeaseLimitProperty, b8 as LeaseLimitPropertySchema, by as LeaseProperty, b6 as LeasePropertySchema, bz as LeaseSecondsProperty, b7 as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bj as LimitProperty, aT as LimitPropertySchema, c8 as ListActionInputFieldChoicesPluginProvides, c6 as ListActionInputFieldsPluginProvides, c4 as ListActionsPluginProvides, c2 as ListAppsPluginProvides, q as ListAuthenticationsPluginProvides, ce as ListClientCredentialsPluginProvides, cc as ListConnectionsPluginProvides, e9 as ListTableFieldsPluginProvides, eh as ListTableRecordsPluginProvides, e1 as ListTablesPluginProvides, dk as LoadingEvent, dV as MAX_CONCURRENCY_LIMIT, dQ as MAX_PAGE_LIMIT, cE as ManifestEntry, cz as ManifestPluginOptions, cC as ManifestPluginProvides, eC as MethodCalledEvent, ev as MethodCalledEventData, N as Need, I as NeedsRequest, J as NeedsResponse, bk as OffsetProperty, aU as OffsetPropertySchema, _ as OutputFormatter, bl as OutputProperty, aV as OutputPropertySchema, aI as PaginatedSdkFunction, bn as ParamsProperty, aX as ParamsPropertySchema, dr as PkceCredentialsObject, dC as PkceCredentialsObjectSchema, am as Plugin, an as PluginProvides, aw as PollOptions, bQ as RateLimitInfo, bq as RecordProperty, a_ as RecordPropertySchema, br as RecordsProperty, a$ as RecordsPropertySchema, af as RelayFetchSchema, ae as RelayRequestSchema, av as RequestOptions, cy as RequestPluginProvides, d5 as ResolveAuthTokenOptions, dw as ResolveCredentialsOptions, dn as ResolvedCredentials, dE as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aE as RootFieldItem, cw as RunActionPluginProvides, dh as SdkEvent, aH as SdkPage, a2 as StaticResolver, bp as TableProperty, aZ as TablePropertySchema, bu as TablesProperty, b2 as TablesPropertySchema, bx as TriggerInboxNameProperty, b5 as TriggerInboxNamePropertySchema, bw as TriggerInboxProperty, b4 as TriggerInboxPropertySchema, T as TriggerMessageStatus, en as UpdateTableRecordsPluginProvides, Q as UserProfile, aF as UserProfileItem, dO as ZAPIER_BASE_URL, dX as ZAPIER_MAX_CONCURRENT_REQUESTS, dT as ZAPIER_MAX_NETWORK_RETRIES, dU as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, m as ZapierAbortDrainSignal, bO as ZapierActionError, bE as ZapierApiError, bF as ZapierAppNotFoundError, bT as ZapierApprovalError, bI as ZapierAuthenticationError, bM as ZapierBundleError, dd as ZapierCache, de as ZapierCacheEntry, df as ZapierCacheSetOptions, bL as ZapierConfigurationError, bP as ZapierConflictError, bD as ZapierError, bJ as ZapierNotFoundError, bR as ZapierRateLimitError, bU as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bK as ZapierResourceNotFoundError, bW as ZapierSignal, bN as ZapierTimeoutError, bH as ZapierUnknownError, bG as ZapierValidationError, cM as actionKeyResolver, cL as actionTypeResolver, cI as apiPlugin, cK as appKeyResolver, bX as appsPlugin, cO as authenticationIdGenericResolver, cN as authenticationIdResolver, a9 as batch, ew as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, ey as buildErrorEvent, ex as buildErrorEventWithContext, eA as buildMethodCalledEvent, eo as cleanupEventListeners, d6 as clearTokenCache, cS as clientCredentialsNameResolver, cT as clientIdResolver, ar as composePlugins, cO as connectionIdGenericResolver, cN as connectionIdResolver, dM as connectionsPlugin, ez as createBaseEvent, cf as createClientCredentialsPlugin, V as createFunction, dg as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, ea as createTableFieldsPlugin, e4 as createTablePlugin, ei as createTableRecordsPlugin, ax as createZapierApi, ag as createZapierSdkWithoutRegistry, ao as definePlugin, ch as deleteClientCredentialsPlugin, ec as deleteTableFieldsPlugin, e6 as deleteTablePlugin, ek as deleteTableRecordsPlugin, eq as eventEmissionPlugin, b$ as fetchPlugin, cp as findFirstConnectionPlugin, cr as findUniqueConnectionPlugin, bV as formatErrorMessage, eD as generateEventId, c9 as getActionInputFieldsSchemaPlugin, cl as getActionPlugin, cj as getAppPlugin, dz as getBaseUrlFromCredentials, eJ as getCiPlatform, dA as getClientIdFromCredentials, cn as getConnectionPlugin, eL as getCpuTime, eE as getCurrentTimestamp, eK as getMemoryUsage, ay as getOrCreateApiClient, eG as getOsInfo, eH as getPlatformVersions, cA as getPreferredManifestEntryKey, cF as getProfilePlugin, eF as getReleaseId, e2 as getTablePlugin, ee as getTableRecordPlugin, da as getTokenFromCliLogin, dY as getZapierApprovalMode, dZ as getZapierDefaultApprovalMode, dP as getZapierSdkService, d8 as injectCliLogin, cR as inputFieldKeyResolver, cQ as inputsAllOptionalResolver, cP as inputsResolver, d7 as invalidateCachedToken, dc as invalidateCredentialsToken, eI as isCi, d9 as isCliLoginAvailable, ds as isClientCredentials, dv as isCredentialsFunction, du as isCredentialsObject, dt as isPkceCredentials, S as isPositional, c7 as listActionInputFieldChoicesPlugin, c5 as listActionInputFieldsPlugin, c3 as listActionsPlugin, c1 as listAppsPlugin, cd as listClientCredentialsPlugin, cb as listConnectionsPlugin, e8 as listTableFieldsPlugin, eg as listTableRecordsPlugin, e0 as listTablesPlugin, ac as logDeprecation, cB as manifestPlugin, dW as parseConcurrencyEnvVar, au as registryPlugin, cx as requestPlugin, ad as resetDeprecationWarnings, db as resolveAuthToken, dy as resolveCredentials, dx as resolveCredentialsFromEnv, cv as runActionPlugin, a6 as runWithTelemetryContext, c_ as tableFieldIdsResolver, d0 as tableFieldsResolver, d3 as tableFiltersResolver, cU as tableIdResolver, c$ as tableNameResolver, cY as tableRecordIdResolver, cZ as tableRecordIdsResolver, d1 as tableRecordsResolver, d4 as tableSortResolver, d2 as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, cV as triggerInboxResolver, cX as triggerMessagesResolver, em as updateTableRecordsPlugin, cW as workflowIdResolver } from './index-iKbnOz6r.mjs';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
4
|
import * as zod from 'zod';
|
|
5
5
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
|
@@ -2277,6 +2277,146 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<{
|
|
|
2277
2277
|
updateTableRecords: PluginMeta;
|
|
2278
2278
|
};
|
|
2279
2279
|
};
|
|
2280
|
+
} & {
|
|
2281
|
+
listWorkflows: (options?: ({
|
|
2282
|
+
pageSize?: number | undefined;
|
|
2283
|
+
maxItems?: number | undefined;
|
|
2284
|
+
cursor?: string | undefined;
|
|
2285
|
+
} & {
|
|
2286
|
+
cursor?: string;
|
|
2287
|
+
pageSize?: number;
|
|
2288
|
+
maxItems?: number;
|
|
2289
|
+
}) | undefined) => PaginatedSdkResult<{
|
|
2290
|
+
id: string;
|
|
2291
|
+
name: string;
|
|
2292
|
+
description: string | null;
|
|
2293
|
+
trigger_url: string;
|
|
2294
|
+
enabled: boolean;
|
|
2295
|
+
current_version_id: string | null;
|
|
2296
|
+
created_at: string;
|
|
2297
|
+
updated_at: string;
|
|
2298
|
+
}>;
|
|
2299
|
+
} & {
|
|
2300
|
+
context: {
|
|
2301
|
+
meta: {
|
|
2302
|
+
listWorkflows: PluginMeta;
|
|
2303
|
+
};
|
|
2304
|
+
};
|
|
2305
|
+
} & {
|
|
2306
|
+
getWorkflow: (options?: {
|
|
2307
|
+
workflow: string;
|
|
2308
|
+
} | undefined) => Promise<{
|
|
2309
|
+
data: {
|
|
2310
|
+
id: string;
|
|
2311
|
+
name: string;
|
|
2312
|
+
description: string | null;
|
|
2313
|
+
trigger_url: string;
|
|
2314
|
+
enabled: boolean;
|
|
2315
|
+
created_at: string;
|
|
2316
|
+
updated_at: string;
|
|
2317
|
+
current_version?: {
|
|
2318
|
+
id: string;
|
|
2319
|
+
workflow_id: string;
|
|
2320
|
+
source_files: Record<string, string>;
|
|
2321
|
+
zapier_durable_version: string;
|
|
2322
|
+
dependencies: Record<string, string> | null;
|
|
2323
|
+
created_by_user_id: string;
|
|
2324
|
+
created_at: string;
|
|
2325
|
+
} | undefined;
|
|
2326
|
+
};
|
|
2327
|
+
}>;
|
|
2328
|
+
} & {
|
|
2329
|
+
context: {
|
|
2330
|
+
meta: {
|
|
2331
|
+
getWorkflow: PluginMeta;
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
} & {
|
|
2335
|
+
createWorkflow: (options?: {
|
|
2336
|
+
name: string;
|
|
2337
|
+
description?: string | undefined;
|
|
2338
|
+
} | undefined) => Promise<{
|
|
2339
|
+
data: {
|
|
2340
|
+
id: string;
|
|
2341
|
+
name: string;
|
|
2342
|
+
description: string | null;
|
|
2343
|
+
trigger_url: string;
|
|
2344
|
+
enabled: boolean;
|
|
2345
|
+
created_at: string;
|
|
2346
|
+
};
|
|
2347
|
+
}>;
|
|
2348
|
+
} & {
|
|
2349
|
+
context: {
|
|
2350
|
+
meta: {
|
|
2351
|
+
createWorkflow: PluginMeta;
|
|
2352
|
+
};
|
|
2353
|
+
};
|
|
2354
|
+
} & {
|
|
2355
|
+
updateWorkflow: (options?: {
|
|
2356
|
+
workflow: string;
|
|
2357
|
+
name?: string | undefined;
|
|
2358
|
+
description?: string | null | undefined;
|
|
2359
|
+
} | undefined) => Promise<{
|
|
2360
|
+
data: {
|
|
2361
|
+
id: string;
|
|
2362
|
+
name: string;
|
|
2363
|
+
description: string | null;
|
|
2364
|
+
trigger_url: string;
|
|
2365
|
+
enabled: boolean;
|
|
2366
|
+
created_at: string;
|
|
2367
|
+
updated_at: string;
|
|
2368
|
+
};
|
|
2369
|
+
}>;
|
|
2370
|
+
} & {
|
|
2371
|
+
context: {
|
|
2372
|
+
meta: {
|
|
2373
|
+
updateWorkflow: PluginMeta;
|
|
2374
|
+
};
|
|
2375
|
+
};
|
|
2376
|
+
} & {
|
|
2377
|
+
enableWorkflow: (options?: {
|
|
2378
|
+
workflow: string;
|
|
2379
|
+
} | undefined) => Promise<{
|
|
2380
|
+
data: {
|
|
2381
|
+
id: string;
|
|
2382
|
+
enabled: boolean;
|
|
2383
|
+
};
|
|
2384
|
+
}>;
|
|
2385
|
+
} & {
|
|
2386
|
+
context: {
|
|
2387
|
+
meta: {
|
|
2388
|
+
enableWorkflow: PluginMeta;
|
|
2389
|
+
};
|
|
2390
|
+
};
|
|
2391
|
+
} & {
|
|
2392
|
+
disableWorkflow: (options?: {
|
|
2393
|
+
workflow: string;
|
|
2394
|
+
} | undefined) => Promise<{
|
|
2395
|
+
data: {
|
|
2396
|
+
id: string;
|
|
2397
|
+
enabled: boolean;
|
|
2398
|
+
};
|
|
2399
|
+
}>;
|
|
2400
|
+
} & {
|
|
2401
|
+
context: {
|
|
2402
|
+
meta: {
|
|
2403
|
+
disableWorkflow: PluginMeta;
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2406
|
+
} & {
|
|
2407
|
+
deleteWorkflow: (options?: {
|
|
2408
|
+
workflow: string;
|
|
2409
|
+
} | undefined) => Promise<{
|
|
2410
|
+
data: {
|
|
2411
|
+
id: string;
|
|
2412
|
+
};
|
|
2413
|
+
}>;
|
|
2414
|
+
} & {
|
|
2415
|
+
context: {
|
|
2416
|
+
meta: {
|
|
2417
|
+
deleteWorkflow: PluginMeta;
|
|
2418
|
+
};
|
|
2419
|
+
};
|
|
2280
2420
|
} & {
|
|
2281
2421
|
apps: ActionProxy & ZapierSdkApps;
|
|
2282
2422
|
context: {
|