@zapier/zapier-sdk 0.63.0 → 0.65.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 +12 -0
- package/README.md +256 -0
- package/dist/experimental.cjs +387 -2
- package/dist/experimental.d.mts +145 -2
- package/dist/experimental.d.ts +143 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +12 -0
- package/dist/experimental.mjs +386 -3
- package/dist/{index-3fBEDEsp.d.mts → index-JhNxS_mq.d.mts} +39 -1
- package/dist/{index-3fBEDEsp.d.ts → index-JhNxS_mq.d.ts} +39 -1
- package/dist/index.cjs +43 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +42 -2
- package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts +47 -0
- package/dist/plugins/codeSubstrate/getTriggerRun/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getTriggerRun/index.js +23 -0
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts +24 -0
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getTriggerRun/schemas.js +30 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts +49 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/index.js +25 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts +26 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowRun/schemas.js +43 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts +46 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/index.js +25 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts +17 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/getWorkflowVersion/schemas.js +25 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts +53 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/index.js +34 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts +65 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowRuns/schemas.js +69 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts +49 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/index.js +34 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts +37 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/listWorkflowVersions/schemas.js +48 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts +49 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/index.js +33 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts +20 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.d.ts.map +1 -0
- package/dist/plugins/codeSubstrate/publishWorkflowVersion/schemas.js +42 -0
- package/dist/resolvers/index.d.ts +2 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +2 -0
- package/dist/resolvers/workflowRunId.d.ts +6 -0
- package/dist/resolvers/workflowRunId.d.ts.map +1 -0
- package/dist/resolvers/workflowRunId.js +20 -0
- package/dist/resolvers/workflowVersionId.d.ts +6 -0
- package/dist/resolvers/workflowVersionId.d.ts.map +1 -0
- package/dist/resolvers/workflowVersionId.js +20 -0
- package/package.json +1 -1
package/dist/experimental.cjs
CHANGED
|
@@ -2889,7 +2889,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2889
2889
|
}
|
|
2890
2890
|
|
|
2891
2891
|
// src/sdk-version.ts
|
|
2892
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2892
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.65.0" : void 0) || "unknown";
|
|
2893
2893
|
|
|
2894
2894
|
// src/utils/open-url.ts
|
|
2895
2895
|
var nodePrefix = "node:";
|
|
@@ -4301,6 +4301,46 @@ var durableRunIdResolver = {
|
|
|
4301
4301
|
})
|
|
4302
4302
|
};
|
|
4303
4303
|
|
|
4304
|
+
// src/resolvers/workflowVersionId.ts
|
|
4305
|
+
var workflowVersionIdResolver = {
|
|
4306
|
+
type: "dynamic",
|
|
4307
|
+
depends: ["workflow"],
|
|
4308
|
+
fetch: async (sdk, params) => toIterable(
|
|
4309
|
+
sdk.listWorkflowVersions({
|
|
4310
|
+
workflow: params.workflow
|
|
4311
|
+
})
|
|
4312
|
+
),
|
|
4313
|
+
prompt: (versions) => ({
|
|
4314
|
+
type: "list",
|
|
4315
|
+
name: "version",
|
|
4316
|
+
message: "Select a workflow version:",
|
|
4317
|
+
choices: versions.map((v) => ({
|
|
4318
|
+
name: `${v.id} \u2014 ${v.zapier_durable_version}`,
|
|
4319
|
+
value: v.id
|
|
4320
|
+
}))
|
|
4321
|
+
})
|
|
4322
|
+
};
|
|
4323
|
+
|
|
4324
|
+
// src/resolvers/workflowRunId.ts
|
|
4325
|
+
var workflowRunIdResolver = {
|
|
4326
|
+
type: "dynamic",
|
|
4327
|
+
depends: ["workflow"],
|
|
4328
|
+
fetch: async (sdk, params) => toIterable(
|
|
4329
|
+
sdk.listWorkflowRuns({
|
|
4330
|
+
workflow: params.workflow
|
|
4331
|
+
})
|
|
4332
|
+
),
|
|
4333
|
+
prompt: (runs) => ({
|
|
4334
|
+
type: "list",
|
|
4335
|
+
name: "run",
|
|
4336
|
+
message: "Select a workflow run:",
|
|
4337
|
+
choices: runs.map((r) => ({
|
|
4338
|
+
name: `${r.id} \u2014 ${r.status}`,
|
|
4339
|
+
value: r.id
|
|
4340
|
+
}))
|
|
4341
|
+
})
|
|
4342
|
+
};
|
|
4343
|
+
|
|
4304
4344
|
// src/resolvers/triggerMessages.ts
|
|
4305
4345
|
var triggerMessagesResolver = {
|
|
4306
4346
|
type: "dynamic",
|
|
@@ -11138,6 +11178,349 @@ var cancelDurableRunPlugin = definePlugin(
|
|
|
11138
11178
|
}
|
|
11139
11179
|
})
|
|
11140
11180
|
);
|
|
11181
|
+
var PublishWorkflowVersionOptionsSchema = zod.z.object({
|
|
11182
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11183
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).refine((files) => Object.keys(files).length > 0, {
|
|
11184
|
+
message: "source_files must contain at least one file"
|
|
11185
|
+
}).describe("Source files keyed by filename \u2192 contents"),
|
|
11186
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Optional npm package dependencies"),
|
|
11187
|
+
zapier_durable_version: zod.z.string().optional().describe(
|
|
11188
|
+
'Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted.'
|
|
11189
|
+
),
|
|
11190
|
+
enabled: zod.z.boolean().optional().describe(
|
|
11191
|
+
"Enable the workflow after publishing. Defaults to true; pass false to publish without enabling."
|
|
11192
|
+
)
|
|
11193
|
+
}).describe(
|
|
11194
|
+
"Publish a new version of a durable workflow. Enables the workflow by default."
|
|
11195
|
+
);
|
|
11196
|
+
var PublishWorkflowVersionResponseSchema = zod.z.object({
|
|
11197
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11198
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11199
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).describe("Source files keyed by filename \u2192 contents"),
|
|
11200
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11201
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11202
|
+
),
|
|
11203
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11204
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11205
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11206
|
+
});
|
|
11207
|
+
|
|
11208
|
+
// src/plugins/codeSubstrate/publishWorkflowVersion/index.ts
|
|
11209
|
+
var publishWorkflowVersionPlugin = definePlugin(
|
|
11210
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11211
|
+
...codeSubstrateDefaults,
|
|
11212
|
+
name: "publishWorkflowVersion",
|
|
11213
|
+
type: "create",
|
|
11214
|
+
itemType: "WorkflowVersion",
|
|
11215
|
+
inputSchema: PublishWorkflowVersionOptionsSchema,
|
|
11216
|
+
outputSchema: PublishWorkflowVersionResponseSchema,
|
|
11217
|
+
resolvers: { workflow: workflowIdResolver },
|
|
11218
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11219
|
+
const body = {
|
|
11220
|
+
source_files: options.source_files
|
|
11221
|
+
};
|
|
11222
|
+
if (options.dependencies !== void 0) {
|
|
11223
|
+
body.dependencies = options.dependencies;
|
|
11224
|
+
}
|
|
11225
|
+
if (options.zapier_durable_version !== void 0) {
|
|
11226
|
+
body.zapier_durable_version = options.zapier_durable_version;
|
|
11227
|
+
}
|
|
11228
|
+
if (options.enabled !== void 0) {
|
|
11229
|
+
body.enabled = options.enabled;
|
|
11230
|
+
}
|
|
11231
|
+
const raw = await sdk2.context.api.post(
|
|
11232
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`,
|
|
11233
|
+
body,
|
|
11234
|
+
{
|
|
11235
|
+
authRequired: true,
|
|
11236
|
+
resource: { type: "workflow", id: options.workflow }
|
|
11237
|
+
}
|
|
11238
|
+
);
|
|
11239
|
+
const data = PublishWorkflowVersionResponseSchema.parse(raw);
|
|
11240
|
+
return { data };
|
|
11241
|
+
}
|
|
11242
|
+
})
|
|
11243
|
+
);
|
|
11244
|
+
var WorkflowVersionListItemSchema = zod.z.object({
|
|
11245
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11246
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11247
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11248
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11249
|
+
),
|
|
11250
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11251
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11252
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11253
|
+
});
|
|
11254
|
+
var ListWorkflowVersionsOptionsSchema = zod.z.object({
|
|
11255
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11256
|
+
pageSize: zod.z.number().int().min(1).max(100).optional().describe("Number of versions per page (max 100)"),
|
|
11257
|
+
cursor: zod.z.string().optional().describe("Pagination cursor"),
|
|
11258
|
+
maxItems: zod.z.number().int().min(1).optional().describe("Maximum total versions to return across all pages")
|
|
11259
|
+
}).describe("List published versions for a workflow, newest first");
|
|
11260
|
+
var ListWorkflowVersionsApiResponseSchema = zod.z.object({
|
|
11261
|
+
results: zod.z.array(WorkflowVersionListItemSchema),
|
|
11262
|
+
meta: zod.z.object({
|
|
11263
|
+
limit: zod.z.number(),
|
|
11264
|
+
cursor: zod.z.string().nullable().optional(),
|
|
11265
|
+
next_cursor: zod.z.string().nullable().optional()
|
|
11266
|
+
}),
|
|
11267
|
+
links: zod.z.object({
|
|
11268
|
+
next: zod.z.string().nullable().optional()
|
|
11269
|
+
}).optional()
|
|
11270
|
+
});
|
|
11271
|
+
|
|
11272
|
+
// src/plugins/codeSubstrate/listWorkflowVersions/index.ts
|
|
11273
|
+
var listWorkflowVersionsPlugin = definePlugin(
|
|
11274
|
+
(sdk) => createPaginatedPluginMethod(sdk, {
|
|
11275
|
+
...codeSubstrateDefaults,
|
|
11276
|
+
name: "listWorkflowVersions",
|
|
11277
|
+
type: "list",
|
|
11278
|
+
itemType: "WorkflowVersion",
|
|
11279
|
+
inputSchema: ListWorkflowVersionsOptionsSchema,
|
|
11280
|
+
outputSchema: WorkflowVersionListItemSchema,
|
|
11281
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
11282
|
+
resolvers: { workflow: workflowIdResolver },
|
|
11283
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11284
|
+
const searchParams = {};
|
|
11285
|
+
if (options.pageSize !== void 0) {
|
|
11286
|
+
searchParams.limit = options.pageSize.toString();
|
|
11287
|
+
}
|
|
11288
|
+
if (options.cursor) {
|
|
11289
|
+
searchParams.cursor = options.cursor;
|
|
11290
|
+
}
|
|
11291
|
+
const raw = await sdk2.context.api.get(
|
|
11292
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`,
|
|
11293
|
+
{
|
|
11294
|
+
searchParams,
|
|
11295
|
+
authRequired: true,
|
|
11296
|
+
resource: { type: "workflow", id: options.workflow }
|
|
11297
|
+
}
|
|
11298
|
+
);
|
|
11299
|
+
const response = ListWorkflowVersionsApiResponseSchema.parse(raw);
|
|
11300
|
+
return {
|
|
11301
|
+
data: response.results,
|
|
11302
|
+
nextCursor: response.meta.next_cursor ?? void 0
|
|
11303
|
+
};
|
|
11304
|
+
}
|
|
11305
|
+
})
|
|
11306
|
+
);
|
|
11307
|
+
var GetWorkflowVersionOptionsSchema = zod.z.object({
|
|
11308
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11309
|
+
version: zod.z.string().uuid().describe("Workflow version ID")
|
|
11310
|
+
}).describe("Get full details of a workflow version including source files");
|
|
11311
|
+
var GetWorkflowVersionResponseSchema = zod.z.object({
|
|
11312
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11313
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11314
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).describe("Source files keyed by filename \u2192 contents"),
|
|
11315
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11316
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11317
|
+
),
|
|
11318
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11319
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11320
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11321
|
+
});
|
|
11322
|
+
|
|
11323
|
+
// src/plugins/codeSubstrate/getWorkflowVersion/index.ts
|
|
11324
|
+
var getWorkflowVersionPlugin = definePlugin(
|
|
11325
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11326
|
+
...codeSubstrateDefaults,
|
|
11327
|
+
name: "getWorkflowVersion",
|
|
11328
|
+
type: "item",
|
|
11329
|
+
itemType: "WorkflowVersion",
|
|
11330
|
+
inputSchema: GetWorkflowVersionOptionsSchema,
|
|
11331
|
+
outputSchema: GetWorkflowVersionResponseSchema,
|
|
11332
|
+
resolvers: {
|
|
11333
|
+
workflow: workflowIdResolver,
|
|
11334
|
+
version: workflowVersionIdResolver
|
|
11335
|
+
},
|
|
11336
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11337
|
+
const raw = await sdk2.context.api.get(
|
|
11338
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions/${encodeURIComponent(options.version)}`,
|
|
11339
|
+
{
|
|
11340
|
+
authRequired: true,
|
|
11341
|
+
resource: { type: "workflow-version", id: options.version }
|
|
11342
|
+
}
|
|
11343
|
+
);
|
|
11344
|
+
const data = GetWorkflowVersionResponseSchema.parse(raw);
|
|
11345
|
+
return { data };
|
|
11346
|
+
}
|
|
11347
|
+
})
|
|
11348
|
+
);
|
|
11349
|
+
var WorkflowRunStatusSchema = zod.z.union([
|
|
11350
|
+
zod.z.enum(["initialized", "started", "finished", "failed", "cancelled"]),
|
|
11351
|
+
zod.z.string()
|
|
11352
|
+
]).describe(
|
|
11353
|
+
"Workflow run lifecycle status. `finished` / `failed` / `cancelled` are terminal."
|
|
11354
|
+
);
|
|
11355
|
+
var WorkflowRunListItemSchema = zod.z.object({
|
|
11356
|
+
id: zod.z.string().describe("Workflow run ID (UUID)"),
|
|
11357
|
+
trigger_id: zod.z.string().nullable().describe(
|
|
11358
|
+
"ID of the trigger that fired this run, if any. Null for runs created without a trigger."
|
|
11359
|
+
),
|
|
11360
|
+
durable_run_id: zod.z.string().nullable().describe(
|
|
11361
|
+
"Linked sdkdurableapi run ID. Null until the durable run is created."
|
|
11362
|
+
),
|
|
11363
|
+
workflow_version_id: zod.z.string().nullable().describe("Workflow version the run is bound to. Null in rare edge cases."),
|
|
11364
|
+
status: WorkflowRunStatusSchema,
|
|
11365
|
+
input: zod.z.unknown().describe("Input passed to the run"),
|
|
11366
|
+
output: zod.z.unknown().nullable().describe("Return value, present when status is `finished`"),
|
|
11367
|
+
error: zod.z.unknown().nullable().describe("Error payload when status is `failed` (null otherwise)"),
|
|
11368
|
+
created_at: zod.z.string().describe("When the run was created (ISO-8601)"),
|
|
11369
|
+
updated_at: zod.z.string().describe("When the run was last updated (ISO-8601)")
|
|
11370
|
+
});
|
|
11371
|
+
var ListWorkflowRunsOptionsSchema = zod.z.object({
|
|
11372
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11373
|
+
pageSize: zod.z.number().int().min(1).max(100).optional().describe("Number of runs per page (max 100)"),
|
|
11374
|
+
cursor: zod.z.string().optional().describe("Pagination cursor"),
|
|
11375
|
+
maxItems: zod.z.number().int().min(1).optional().describe("Maximum total runs to return across all pages")
|
|
11376
|
+
}).describe(
|
|
11377
|
+
"List workflow runs (triggered executions) for a specific deployed workflow, newest first"
|
|
11378
|
+
);
|
|
11379
|
+
var ListWorkflowRunsApiResponseSchema = zod.z.object({
|
|
11380
|
+
results: zod.z.array(WorkflowRunListItemSchema),
|
|
11381
|
+
meta: zod.z.object({
|
|
11382
|
+
limit: zod.z.number(),
|
|
11383
|
+
cursor: zod.z.string().nullable().optional(),
|
|
11384
|
+
next_cursor: zod.z.string().nullable().optional()
|
|
11385
|
+
}),
|
|
11386
|
+
links: zod.z.object({
|
|
11387
|
+
next: zod.z.string().nullable().optional()
|
|
11388
|
+
}).optional()
|
|
11389
|
+
});
|
|
11390
|
+
|
|
11391
|
+
// src/plugins/codeSubstrate/listWorkflowRuns/index.ts
|
|
11392
|
+
var listWorkflowRunsPlugin = definePlugin(
|
|
11393
|
+
(sdk) => createPaginatedPluginMethod(sdk, {
|
|
11394
|
+
...codeSubstrateDefaults,
|
|
11395
|
+
name: "listWorkflowRuns",
|
|
11396
|
+
type: "list",
|
|
11397
|
+
itemType: "WorkflowRun",
|
|
11398
|
+
inputSchema: ListWorkflowRunsOptionsSchema,
|
|
11399
|
+
outputSchema: WorkflowRunListItemSchema,
|
|
11400
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
11401
|
+
resolvers: { workflow: workflowIdResolver },
|
|
11402
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11403
|
+
const searchParams = {};
|
|
11404
|
+
if (options.pageSize !== void 0) {
|
|
11405
|
+
searchParams.limit = options.pageSize.toString();
|
|
11406
|
+
}
|
|
11407
|
+
if (options.cursor) {
|
|
11408
|
+
searchParams.cursor = options.cursor;
|
|
11409
|
+
}
|
|
11410
|
+
const raw = await sdk2.context.api.get(
|
|
11411
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/runs`,
|
|
11412
|
+
{
|
|
11413
|
+
searchParams,
|
|
11414
|
+
authRequired: true,
|
|
11415
|
+
resource: { type: "workflow", id: options.workflow }
|
|
11416
|
+
}
|
|
11417
|
+
);
|
|
11418
|
+
const response = ListWorkflowRunsApiResponseSchema.parse(raw);
|
|
11419
|
+
return {
|
|
11420
|
+
data: response.results,
|
|
11421
|
+
nextCursor: response.meta.next_cursor ?? void 0
|
|
11422
|
+
};
|
|
11423
|
+
}
|
|
11424
|
+
})
|
|
11425
|
+
);
|
|
11426
|
+
var GetWorkflowRunOptionsSchema = zod.z.object({
|
|
11427
|
+
// Picker-only field — the API endpoint is /workflows/runs/:id and
|
|
11428
|
+
// does not take a workflow id, but the run-id picker is scoped to a
|
|
11429
|
+
// parent workflow so the user can browse runs without enumerating
|
|
11430
|
+
// every run across every workflow on the account.
|
|
11431
|
+
workflow: zod.z.string().uuid().optional().describe(
|
|
11432
|
+
"Parent workflow ID \u2014 used only to scope the CLI run-id picker; ignored by the API call."
|
|
11433
|
+
),
|
|
11434
|
+
run: zod.z.string().uuid().describe("Workflow run ID")
|
|
11435
|
+
}).describe(
|
|
11436
|
+
"Get the current state of a workflow run (a triggered execution of a deployed workflow)"
|
|
11437
|
+
);
|
|
11438
|
+
var GetWorkflowRunResponseSchema = zod.z.object({
|
|
11439
|
+
id: zod.z.string().describe("Workflow run ID (UUID)"),
|
|
11440
|
+
trigger_id: zod.z.string().nullable().describe("ID of the trigger that fired this run, if any"),
|
|
11441
|
+
durable_run_id: zod.z.string().nullable().describe(
|
|
11442
|
+
"Linked sdkdurableapi run ID. Null until the durable run is created."
|
|
11443
|
+
),
|
|
11444
|
+
workflow_version_id: zod.z.string().nullable().describe("Workflow version the run is bound to"),
|
|
11445
|
+
status: WorkflowRunStatusSchema,
|
|
11446
|
+
input: zod.z.unknown().describe("Input passed to the run"),
|
|
11447
|
+
output: zod.z.unknown().nullable().describe("Return value, present when status is `finished`"),
|
|
11448
|
+
error: zod.z.unknown().nullable().describe("Error payload when status is `failed` (null otherwise)"),
|
|
11449
|
+
created_at: zod.z.string().describe("When the run was created (ISO-8601)"),
|
|
11450
|
+
updated_at: zod.z.string().describe("When the run was last updated (ISO-8601)")
|
|
11451
|
+
});
|
|
11452
|
+
|
|
11453
|
+
// src/plugins/codeSubstrate/getWorkflowRun/index.ts
|
|
11454
|
+
var getWorkflowRunPlugin = definePlugin(
|
|
11455
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11456
|
+
...codeSubstrateDefaults,
|
|
11457
|
+
name: "getWorkflowRun",
|
|
11458
|
+
type: "item",
|
|
11459
|
+
itemType: "WorkflowRun",
|
|
11460
|
+
inputSchema: GetWorkflowRunOptionsSchema,
|
|
11461
|
+
outputSchema: GetWorkflowRunResponseSchema,
|
|
11462
|
+
resolvers: {
|
|
11463
|
+
workflow: workflowIdResolver,
|
|
11464
|
+
run: workflowRunIdResolver
|
|
11465
|
+
},
|
|
11466
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11467
|
+
const raw = await sdk2.context.api.get(
|
|
11468
|
+
`/durableworkflowzaps/api/v0/workflows/runs/${encodeURIComponent(options.run)}`,
|
|
11469
|
+
{
|
|
11470
|
+
authRequired: true,
|
|
11471
|
+
resource: { type: "workflow-run", id: options.run }
|
|
11472
|
+
}
|
|
11473
|
+
);
|
|
11474
|
+
const data = GetWorkflowRunResponseSchema.parse(raw);
|
|
11475
|
+
return { data };
|
|
11476
|
+
}
|
|
11477
|
+
})
|
|
11478
|
+
);
|
|
11479
|
+
var GetTriggerRunOptionsSchema = zod.z.object({
|
|
11480
|
+
trigger: zod.z.string().uuid().describe("Workflow trigger ID")
|
|
11481
|
+
}).describe(
|
|
11482
|
+
"Get the workflow run associated with a deployed workflow's trigger. Useful immediately after firing a trigger, when you have the trigger ID but not yet the run ID."
|
|
11483
|
+
);
|
|
11484
|
+
var GetTriggerRunResponseSchema = zod.z.object({
|
|
11485
|
+
id: zod.z.string().describe("Workflow run ID (UUID)"),
|
|
11486
|
+
durable_run_id: zod.z.string().nullable().describe(
|
|
11487
|
+
"Linked sdkdurableapi run ID. Null until the durable run is created."
|
|
11488
|
+
),
|
|
11489
|
+
workflow_version_id: zod.z.string().nullable().describe("Workflow version the run is bound to"),
|
|
11490
|
+
status: WorkflowRunStatusSchema,
|
|
11491
|
+
input: zod.z.unknown().describe("Input passed to the run"),
|
|
11492
|
+
output: zod.z.unknown().nullable().describe("Return value, present when status is `finished`"),
|
|
11493
|
+
error: zod.z.unknown().nullable().describe("Error payload when status is `failed` (null otherwise)"),
|
|
11494
|
+
created_at: zod.z.string().describe("When the run was created (ISO-8601)"),
|
|
11495
|
+
updated_at: zod.z.string().describe("When the run was last updated (ISO-8601)")
|
|
11496
|
+
});
|
|
11497
|
+
|
|
11498
|
+
// src/plugins/codeSubstrate/getTriggerRun/index.ts
|
|
11499
|
+
var getTriggerRunPlugin = definePlugin(
|
|
11500
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11501
|
+
...codeSubstrateDefaults,
|
|
11502
|
+
name: "getTriggerRun",
|
|
11503
|
+
type: "item",
|
|
11504
|
+
itemType: "WorkflowRun",
|
|
11505
|
+
inputSchema: GetTriggerRunOptionsSchema,
|
|
11506
|
+
outputSchema: GetTriggerRunResponseSchema,
|
|
11507
|
+
// No resolver for `trigger` — users typically have the trigger id
|
|
11508
|
+
// from a recent trigger fire and pass it directly. Authoring a
|
|
11509
|
+
// picker would require listing triggers across all workflows,
|
|
11510
|
+
// which has no clean entry point today.
|
|
11511
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11512
|
+
const raw = await sdk2.context.api.get(
|
|
11513
|
+
`/durableworkflowzaps/api/v0/workflows/triggers/${encodeURIComponent(options.trigger)}/run`,
|
|
11514
|
+
{
|
|
11515
|
+
authRequired: true,
|
|
11516
|
+
resource: { type: "workflow-trigger", id: options.trigger }
|
|
11517
|
+
}
|
|
11518
|
+
);
|
|
11519
|
+
const data = GetTriggerRunResponseSchema.parse(raw);
|
|
11520
|
+
return { data };
|
|
11521
|
+
}
|
|
11522
|
+
})
|
|
11523
|
+
);
|
|
11141
11524
|
|
|
11142
11525
|
// src/utils/batch-utils.ts
|
|
11143
11526
|
var DEFAULT_CONCURRENCY = 10;
|
|
@@ -11297,7 +11680,7 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
11297
11680
|
|
|
11298
11681
|
// src/experimental.ts
|
|
11299
11682
|
function createZapierSdk2(options = {}) {
|
|
11300
|
-
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(listDurableRunsPlugin).addPlugin(getDurableRunPlugin).addPlugin(runDurablePlugin).addPlugin(cancelDurableRunPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
11683
|
+
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(listDurableRunsPlugin).addPlugin(getDurableRunPlugin).addPlugin(runDurablePlugin).addPlugin(cancelDurableRunPlugin).addPlugin(publishWorkflowVersionPlugin).addPlugin(listWorkflowVersionsPlugin).addPlugin(getWorkflowVersionPlugin).addPlugin(listWorkflowRunsPlugin).addPlugin(getWorkflowRunPlugin).addPlugin(getTriggerRunPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
11301
11684
|
}
|
|
11302
11685
|
|
|
11303
11686
|
exports.ActionKeyPropertySchema = ActionKeyPropertySchema;
|
|
@@ -11491,3 +11874,5 @@ exports.triggerInboxResolver = triggerInboxResolver;
|
|
|
11491
11874
|
exports.triggerMessagesResolver = triggerMessagesResolver;
|
|
11492
11875
|
exports.updateTableRecordsPlugin = updateTableRecordsPlugin;
|
|
11493
11876
|
exports.workflowIdResolver = workflowIdResolver;
|
|
11877
|
+
exports.workflowRunIdResolver = workflowRunIdResolver;
|
|
11878
|
+
exports.workflowVersionIdResolver = workflowVersionIdResolver;
|
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-JhNxS_mq.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, dm 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, ew as ApplicationLifecycleEventData, bS as ApprovalStatus, bY as AppsPluginProvides, bt as AppsProperty, b1 as AppsPropertySchema, a0 as ArrayResolver, dl as AuthEvent, bh as AuthenticationIdProperty, aQ as AuthenticationIdPropertySchema, eE as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cu as CONTEXT_CACHE_MAX_SIZE, ct as CONTEXT_CACHE_TTL_MS, x as Choice, dt as ClientCredentialsObject, dE as ClientCredentialsObjectSchema, K as Connection, dM as ConnectionEntry, dL as ConnectionEntrySchema, bf as ConnectionIdProperty, aP as ConnectionIdPropertySchema, aA as ConnectionItem, bg as ConnectionProperty, aR as ConnectionPropertySchema, dO as ConnectionsMap, dN as ConnectionsMapSchema, dQ as ConnectionsPluginProvides, bv as ConnectionsProperty, b3 as ConnectionsPropertySchema, O as ConnectionsResponse, cg as CreateClientCredentialsPluginProvides, ee as CreateTableFieldsPluginProvides, e8 as CreateTablePluginProvides, em as CreateTableRecordsPluginProvides, dq as Credentials, dJ as CredentialsFunction, dI as CredentialsFunctionSchema, ds as CredentialsObject, dG as CredentialsObjectSchema, dK as CredentialsSchema, dV as DEFAULT_ACTION_TIMEOUT_MS, e1 as DEFAULT_APPROVAL_TIMEOUT_MS, cD as DEFAULT_CONFIG_PATH, e2 as DEFAULT_MAX_APPROVAL_RETRIES, dU as DEFAULT_PAGE_SIZE, bm as DebugProperty, aW as DebugPropertySchema, ci as DeleteClientCredentialsPluginProvides, eg as DeleteTableFieldsPluginProvides, ea as DeleteTablePluginProvides, eo as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, a3 as DynamicListResolver, a4 as DynamicSearchResolver, ex as EnhancedErrorEventData, bC as ErrorOptions, dp as EventCallback, ev as EventContext, es as EventEmissionConfig, eu 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, e6 as GetTablePluginProvides, ei 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, ec as ListTableFieldsPluginProvides, ek as ListTableRecordsPluginProvides, e4 as ListTablesPluginProvides, dn as LoadingEvent, dY as MAX_CONCURRENCY_LIMIT, dT as MAX_PAGE_LIMIT, cE as ManifestEntry, cz as ManifestPluginOptions, cC as ManifestPluginProvides, eF as MethodCalledEvent, ey 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, du as PkceCredentialsObject, dF 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, d8 as ResolveAuthTokenOptions, dz as ResolveCredentialsOptions, dr as ResolvedCredentials, dH as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aE as RootFieldItem, cw as RunActionPluginProvides, dk 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, eq as UpdateTableRecordsPluginProvides, Q as UserProfile, aF as UserProfileItem, dR as ZAPIER_BASE_URL, d_ as ZAPIER_MAX_CONCURRENT_REQUESTS, dW as ZAPIER_MAX_NETWORK_RETRIES, dX 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, dg as ZapierCache, dh as ZapierCacheEntry, di 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, ez as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, eB as buildErrorEvent, eA as buildErrorEventWithContext, eD as buildMethodCalledEvent, er as cleanupEventListeners, d9 as clearTokenCache, cS as clientCredentialsNameResolver, cT as clientIdResolver, ar as composePlugins, cO as connectionIdGenericResolver, cN as connectionIdResolver, dP as connectionsPlugin, eC as createBaseEvent, cf as createClientCredentialsPlugin, V as createFunction, dj as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, ed as createTableFieldsPlugin, e7 as createTablePlugin, el as createTableRecordsPlugin, ax as createZapierApi, ag as createZapierSdkWithoutRegistry, ao as definePlugin, ch as deleteClientCredentialsPlugin, ef as deleteTableFieldsPlugin, e9 as deleteTablePlugin, en as deleteTableRecordsPlugin, cX as durableRunIdResolver, et as eventEmissionPlugin, b$ as fetchPlugin, cp as findFirstConnectionPlugin, cr as findUniqueConnectionPlugin, bV as formatErrorMessage, eG as generateEventId, c9 as getActionInputFieldsSchemaPlugin, cl as getActionPlugin, cj as getAppPlugin, dC as getBaseUrlFromCredentials, eM as getCiPlatform, dD as getClientIdFromCredentials, cn as getConnectionPlugin, eO as getCpuTime, eH as getCurrentTimestamp, eN as getMemoryUsage, ay as getOrCreateApiClient, eJ as getOsInfo, eK as getPlatformVersions, cA as getPreferredManifestEntryKey, cF as getProfilePlugin, eI as getReleaseId, e5 as getTablePlugin, eh as getTableRecordPlugin, dd as getTokenFromCliLogin, d$ as getZapierApprovalMode, e0 as getZapierDefaultApprovalMode, dS as getZapierSdkService, db as injectCliLogin, cR as inputFieldKeyResolver, cQ as inputsAllOptionalResolver, cP as inputsResolver, da as invalidateCachedToken, df as invalidateCredentialsToken, eL as isCi, dc as isCliLoginAvailable, dv as isClientCredentials, dy as isCredentialsFunction, dx as isCredentialsObject, dw as isPkceCredentials, S as isPositional, c7 as listActionInputFieldChoicesPlugin, c5 as listActionInputFieldsPlugin, c3 as listActionsPlugin, c1 as listAppsPlugin, cd as listClientCredentialsPlugin, cb as listConnectionsPlugin, eb as listTableFieldsPlugin, ej as listTableRecordsPlugin, e3 as listTablesPlugin, ac as logDeprecation, cB as manifestPlugin, dZ as parseConcurrencyEnvVar, au as registryPlugin, cx as requestPlugin, ad as resetDeprecationWarnings, de as resolveAuthToken, dB as resolveCredentials, dA as resolveCredentialsFromEnv, cv as runActionPlugin, a6 as runWithTelemetryContext, d1 as tableFieldIdsResolver, d3 as tableFieldsResolver, d6 as tableFiltersResolver, cU as tableIdResolver, d2 as tableNameResolver, c$ as tableRecordIdResolver, d0 as tableRecordIdsResolver, d4 as tableRecordsResolver, d7 as tableSortResolver, d5 as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, cV as triggerInboxResolver, c_ as triggerMessagesResolver, ep as updateTableRecordsPlugin, cW as workflowIdResolver, cZ as workflowRunIdResolver, cY as workflowVersionIdResolver } from './index-JhNxS_mq.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';
|
|
@@ -2554,6 +2554,149 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<{
|
|
|
2554
2554
|
cancelDurableRun: PluginMeta;
|
|
2555
2555
|
};
|
|
2556
2556
|
};
|
|
2557
|
+
} & {
|
|
2558
|
+
publishWorkflowVersion: (options?: {
|
|
2559
|
+
workflow: string;
|
|
2560
|
+
source_files: Record<string, string>;
|
|
2561
|
+
dependencies?: Record<string, string> | undefined;
|
|
2562
|
+
zapier_durable_version?: string | undefined;
|
|
2563
|
+
enabled?: boolean | undefined;
|
|
2564
|
+
} | undefined) => Promise<{
|
|
2565
|
+
data: {
|
|
2566
|
+
id: string;
|
|
2567
|
+
workflow_id: string;
|
|
2568
|
+
source_files: Record<string, string>;
|
|
2569
|
+
zapier_durable_version: string;
|
|
2570
|
+
dependencies: Record<string, string> | null;
|
|
2571
|
+
created_by_user_id: string;
|
|
2572
|
+
created_at: string;
|
|
2573
|
+
};
|
|
2574
|
+
}>;
|
|
2575
|
+
} & {
|
|
2576
|
+
context: {
|
|
2577
|
+
meta: {
|
|
2578
|
+
publishWorkflowVersion: PluginMeta;
|
|
2579
|
+
};
|
|
2580
|
+
};
|
|
2581
|
+
} & {
|
|
2582
|
+
listWorkflowVersions: (options?: ({
|
|
2583
|
+
workflow: string;
|
|
2584
|
+
pageSize?: number | undefined;
|
|
2585
|
+
cursor?: string | undefined;
|
|
2586
|
+
maxItems?: number | undefined;
|
|
2587
|
+
} & {
|
|
2588
|
+
cursor?: string;
|
|
2589
|
+
pageSize?: number;
|
|
2590
|
+
maxItems?: number;
|
|
2591
|
+
}) | undefined) => PaginatedSdkResult<{
|
|
2592
|
+
id: string;
|
|
2593
|
+
workflow_id: string;
|
|
2594
|
+
zapier_durable_version: string;
|
|
2595
|
+
dependencies: Record<string, string> | null;
|
|
2596
|
+
created_by_user_id: string;
|
|
2597
|
+
created_at: string;
|
|
2598
|
+
}>;
|
|
2599
|
+
} & {
|
|
2600
|
+
context: {
|
|
2601
|
+
meta: {
|
|
2602
|
+
listWorkflowVersions: PluginMeta;
|
|
2603
|
+
};
|
|
2604
|
+
};
|
|
2605
|
+
} & {
|
|
2606
|
+
getWorkflowVersion: (options?: {
|
|
2607
|
+
workflow: string;
|
|
2608
|
+
version: string;
|
|
2609
|
+
} | undefined) => Promise<{
|
|
2610
|
+
data: {
|
|
2611
|
+
id: string;
|
|
2612
|
+
workflow_id: string;
|
|
2613
|
+
source_files: Record<string, string>;
|
|
2614
|
+
zapier_durable_version: string;
|
|
2615
|
+
dependencies: Record<string, string> | null;
|
|
2616
|
+
created_by_user_id: string;
|
|
2617
|
+
created_at: string;
|
|
2618
|
+
};
|
|
2619
|
+
}>;
|
|
2620
|
+
} & {
|
|
2621
|
+
context: {
|
|
2622
|
+
meta: {
|
|
2623
|
+
getWorkflowVersion: PluginMeta;
|
|
2624
|
+
};
|
|
2625
|
+
};
|
|
2626
|
+
} & {
|
|
2627
|
+
listWorkflowRuns: (options?: ({
|
|
2628
|
+
workflow: string;
|
|
2629
|
+
pageSize?: number | undefined;
|
|
2630
|
+
cursor?: string | undefined;
|
|
2631
|
+
maxItems?: number | undefined;
|
|
2632
|
+
} & {
|
|
2633
|
+
cursor?: string;
|
|
2634
|
+
pageSize?: number;
|
|
2635
|
+
maxItems?: number;
|
|
2636
|
+
}) | undefined) => PaginatedSdkResult<{
|
|
2637
|
+
id: string;
|
|
2638
|
+
trigger_id: string | null;
|
|
2639
|
+
durable_run_id: string | null;
|
|
2640
|
+
workflow_version_id: string | null;
|
|
2641
|
+
status: string;
|
|
2642
|
+
input: unknown;
|
|
2643
|
+
output: unknown;
|
|
2644
|
+
error: unknown;
|
|
2645
|
+
created_at: string;
|
|
2646
|
+
updated_at: string;
|
|
2647
|
+
}>;
|
|
2648
|
+
} & {
|
|
2649
|
+
context: {
|
|
2650
|
+
meta: {
|
|
2651
|
+
listWorkflowRuns: PluginMeta;
|
|
2652
|
+
};
|
|
2653
|
+
};
|
|
2654
|
+
} & {
|
|
2655
|
+
getWorkflowRun: (options?: {
|
|
2656
|
+
run: string;
|
|
2657
|
+
workflow?: string | undefined;
|
|
2658
|
+
} | undefined) => Promise<{
|
|
2659
|
+
data: {
|
|
2660
|
+
id: string;
|
|
2661
|
+
trigger_id: string | null;
|
|
2662
|
+
durable_run_id: string | null;
|
|
2663
|
+
workflow_version_id: string | null;
|
|
2664
|
+
status: string;
|
|
2665
|
+
input: unknown;
|
|
2666
|
+
output: unknown;
|
|
2667
|
+
error: unknown;
|
|
2668
|
+
created_at: string;
|
|
2669
|
+
updated_at: string;
|
|
2670
|
+
};
|
|
2671
|
+
}>;
|
|
2672
|
+
} & {
|
|
2673
|
+
context: {
|
|
2674
|
+
meta: {
|
|
2675
|
+
getWorkflowRun: PluginMeta;
|
|
2676
|
+
};
|
|
2677
|
+
};
|
|
2678
|
+
} & {
|
|
2679
|
+
getTriggerRun: (options?: {
|
|
2680
|
+
trigger: string;
|
|
2681
|
+
} | undefined) => Promise<{
|
|
2682
|
+
data: {
|
|
2683
|
+
id: string;
|
|
2684
|
+
durable_run_id: string | null;
|
|
2685
|
+
workflow_version_id: string | null;
|
|
2686
|
+
status: string;
|
|
2687
|
+
input: unknown;
|
|
2688
|
+
output: unknown;
|
|
2689
|
+
error: unknown;
|
|
2690
|
+
created_at: string;
|
|
2691
|
+
updated_at: string;
|
|
2692
|
+
};
|
|
2693
|
+
}>;
|
|
2694
|
+
} & {
|
|
2695
|
+
context: {
|
|
2696
|
+
meta: {
|
|
2697
|
+
getTriggerRun: PluginMeta;
|
|
2698
|
+
};
|
|
2699
|
+
};
|
|
2557
2700
|
} & {
|
|
2558
2701
|
apps: ActionProxy & ZapierSdkApps;
|
|
2559
2702
|
context: {
|