@zapier/zapier-sdk 0.64.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 +6 -0
- package/README.md +129 -0
- package/dist/experimental.cjs +198 -2
- package/dist/experimental.d.mts +76 -2
- package/dist/experimental.d.ts +74 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +6 -0
- package/dist/experimental.mjs +198 -3
- package/dist/{index-Bfvj0KLi.d.mts → index-JhNxS_mq.d.mts} +25 -1
- package/dist/{index-Bfvj0KLi.d.ts → index-JhNxS_mq.d.ts} +25 -1
- package/dist/index.cjs +22 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +22 -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/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/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/workflowRunId.d.ts +6 -0
- package/dist/resolvers/workflowRunId.d.ts.map +1 -0
- package/dist/resolvers/workflowRunId.js +20 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.65.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9138968: Add the workflow-run experimental code-substrate plugins: `listWorkflowRuns`, `getWorkflowRun`, and `getTriggerRun`. All three live behind `@zapier/zapier-sdk/experimental` only — the stable subpath does not surface them. `listWorkflowRuns` is paginated against the backend's cursor + limit contract; `getWorkflowRun` looks up a run by id; `getTriggerRun` walks from a trigger id to its associated run, useful immediately after firing a trigger when the caller has the trigger id but not yet the run id. All ID inputs are UUID-validated at the schema boundary. Handlers pass the API response through verbatim — schemas stay as `outputSchema` for docs and types, but consumers see any richer fields the server adds without an SDK release. Adds `workflowRunIdResolver` — a dependent resolver scoped to the parent workflow — so CLI commands taking a run id present an interactive picker via `sdk.listWorkflowRuns({ workflow })`. `getTriggerRun` does not register a picker for `trigger`; users typically have the trigger id from a recent fire and pass it directly.
|
|
8
|
+
|
|
3
9
|
## 0.64.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -33,9 +33,12 @@
|
|
|
33
33
|
- [`disableWorkflow`](#disableworkflow--experimental)
|
|
34
34
|
- [`enableWorkflow`](#enableworkflow--experimental)
|
|
35
35
|
- [`getDurableRun`](#getdurablerun--experimental)
|
|
36
|
+
- [`getTriggerRun`](#gettriggerrun--experimental)
|
|
36
37
|
- [`getWorkflow`](#getworkflow--experimental)
|
|
38
|
+
- [`getWorkflowRun`](#getworkflowrun--experimental)
|
|
37
39
|
- [`getWorkflowVersion`](#getworkflowversion--experimental)
|
|
38
40
|
- [`listDurableRuns`](#listdurableruns--experimental)
|
|
41
|
+
- [`listWorkflowRuns`](#listworkflowruns--experimental)
|
|
39
42
|
- [`listWorkflowVersions`](#listworkflowversions--experimental)
|
|
40
43
|
- [`listWorkflows`](#listworkflows--experimental)
|
|
41
44
|
- [`publishWorkflowVersion`](#publishworkflowversion--experimental)
|
|
@@ -1261,6 +1264,40 @@ const { data: durableRun } = await zapier.getDurableRun({
|
|
|
1261
1264
|
});
|
|
1262
1265
|
```
|
|
1263
1266
|
|
|
1267
|
+
#### `getTriggerRun` 🧪 _experimental_
|
|
1268
|
+
|
|
1269
|
+
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.
|
|
1270
|
+
|
|
1271
|
+
**Parameters:**
|
|
1272
|
+
|
|
1273
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1274
|
+
| ------------- | -------- | -------- | ------- | --------------- | ------------------- |
|
|
1275
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1276
|
+
| ↳ `trigger` | `string` | ✅ | — | — | Workflow trigger ID |
|
|
1277
|
+
|
|
1278
|
+
**Returns:** `Promise<WorkflowRunItem>`
|
|
1279
|
+
|
|
1280
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1281
|
+
| ------------------------- | -------- | -------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
1282
|
+
| `data` | `object` | ✅ | — | |
|
|
1283
|
+
| ↳ `id` | `string` | ✅ | — | Workflow run ID (UUID) |
|
|
1284
|
+
| ↳ `durable_run_id` | `string` | ✅ | — | Linked sdkdurableapi run ID. Null until the durable run is created. |
|
|
1285
|
+
| ↳ `workflow_version_id` | `string` | ✅ | — | Workflow version the run is bound to |
|
|
1286
|
+
| ↳ `status` | `string` | ✅ | `initialized`, `started`, `finished`, `failed`, `cancelled` | Workflow run lifecycle status. `finished` / `failed` / `cancelled` are terminal. |
|
|
1287
|
+
| ↳ `input` | `string` | ✅ | — | Input passed to the run |
|
|
1288
|
+
| ↳ `output` | `string` | ✅ | — | Return value, present when status is `finished` |
|
|
1289
|
+
| ↳ `error` | `string` | ✅ | — | Error payload when status is `failed` (null otherwise) |
|
|
1290
|
+
| ↳ `created_at` | `string` | ✅ | — | When the run was created (ISO-8601) |
|
|
1291
|
+
| ↳ `updated_at` | `string` | ✅ | — | When the run was last updated (ISO-8601) |
|
|
1292
|
+
|
|
1293
|
+
**Example:**
|
|
1294
|
+
|
|
1295
|
+
```typescript
|
|
1296
|
+
const { data: workflowRun } = await zapier.getTriggerRun({
|
|
1297
|
+
trigger: "example-trigger",
|
|
1298
|
+
});
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1264
1301
|
#### `getWorkflow` 🧪 _experimental_
|
|
1265
1302
|
|
|
1266
1303
|
Get a durable workflow with its current version details and trigger claim status
|
|
@@ -1301,6 +1338,42 @@ const { data: workflow } = await zapier.getWorkflow({
|
|
|
1301
1338
|
});
|
|
1302
1339
|
```
|
|
1303
1340
|
|
|
1341
|
+
#### `getWorkflowRun` 🧪 _experimental_
|
|
1342
|
+
|
|
1343
|
+
Get the current state of a workflow run (a triggered execution of a deployed workflow)
|
|
1344
|
+
|
|
1345
|
+
**Parameters:**
|
|
1346
|
+
|
|
1347
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1348
|
+
| -------------- | -------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------- |
|
|
1349
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1350
|
+
| ↳ `workflow` | `string` | ❌ | — | — | Parent workflow ID — used only to scope the CLI run-id picker; ignored by the API call. |
|
|
1351
|
+
| ↳ `run` | `string` | ✅ | — | — | Workflow run ID |
|
|
1352
|
+
|
|
1353
|
+
**Returns:** `Promise<WorkflowRunItem>`
|
|
1354
|
+
|
|
1355
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1356
|
+
| ------------------------- | -------- | -------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
1357
|
+
| `data` | `object` | ✅ | — | |
|
|
1358
|
+
| ↳ `id` | `string` | ✅ | — | Workflow run ID (UUID) |
|
|
1359
|
+
| ↳ `trigger_id` | `string` | ✅ | — | ID of the trigger that fired this run, if any |
|
|
1360
|
+
| ↳ `durable_run_id` | `string` | ✅ | — | Linked sdkdurableapi run ID. Null until the durable run is created. |
|
|
1361
|
+
| ↳ `workflow_version_id` | `string` | ✅ | — | Workflow version the run is bound to |
|
|
1362
|
+
| ↳ `status` | `string` | ✅ | `initialized`, `started`, `finished`, `failed`, `cancelled` | Workflow run lifecycle status. `finished` / `failed` / `cancelled` are terminal. |
|
|
1363
|
+
| ↳ `input` | `string` | ✅ | — | Input passed to the run |
|
|
1364
|
+
| ↳ `output` | `string` | ✅ | — | Return value, present when status is `finished` |
|
|
1365
|
+
| ↳ `error` | `string` | ✅ | — | Error payload when status is `failed` (null otherwise) |
|
|
1366
|
+
| ↳ `created_at` | `string` | ✅ | — | When the run was created (ISO-8601) |
|
|
1367
|
+
| ↳ `updated_at` | `string` | ✅ | — | When the run was last updated (ISO-8601) |
|
|
1368
|
+
|
|
1369
|
+
**Example:**
|
|
1370
|
+
|
|
1371
|
+
```typescript
|
|
1372
|
+
const { data: workflowRun } = await zapier.getWorkflowRun({
|
|
1373
|
+
run: "example-run",
|
|
1374
|
+
});
|
|
1375
|
+
```
|
|
1376
|
+
|
|
1304
1377
|
#### `getWorkflowVersion` 🧪 _experimental_
|
|
1305
1378
|
|
|
1306
1379
|
Get full details of a workflow version including source files
|
|
@@ -1381,6 +1454,62 @@ for await (const durableRun of zapier.listDurableRuns().items()) {
|
|
|
1381
1454
|
}
|
|
1382
1455
|
```
|
|
1383
1456
|
|
|
1457
|
+
#### `listWorkflowRuns` 🧪 _experimental_
|
|
1458
|
+
|
|
1459
|
+
List workflow runs (triggered executions) for a specific deployed workflow, newest first
|
|
1460
|
+
|
|
1461
|
+
**Parameters:**
|
|
1462
|
+
|
|
1463
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1464
|
+
| -------------- | -------- | -------- | ------- | --------------- | --------------------------------------------- |
|
|
1465
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1466
|
+
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
|
|
1467
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of runs per page (max 100) |
|
|
1468
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Pagination cursor |
|
|
1469
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total runs to return across all pages |
|
|
1470
|
+
|
|
1471
|
+
**Returns:** `Promise<PaginatedResult<WorkflowRunItem>>`
|
|
1472
|
+
|
|
1473
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1474
|
+
| ------------------------- | ---------- | -------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
1475
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1476
|
+
| ↳ `id` | `string` | ✅ | — | Workflow run ID (UUID) |
|
|
1477
|
+
| ↳ `trigger_id` | `string` | ✅ | — | ID of the trigger that fired this run, if any. Null for runs created without a trigger. |
|
|
1478
|
+
| ↳ `durable_run_id` | `string` | ✅ | — | Linked sdkdurableapi run ID. Null until the durable run is created. |
|
|
1479
|
+
| ↳ `workflow_version_id` | `string` | ✅ | — | Workflow version the run is bound to. Null in rare edge cases. |
|
|
1480
|
+
| ↳ `status` | `string` | ✅ | `initialized`, `started`, `finished`, `failed`, `cancelled` | Workflow run lifecycle status. `finished` / `failed` / `cancelled` are terminal. |
|
|
1481
|
+
| ↳ `input` | `string` | ✅ | — | Input passed to the run |
|
|
1482
|
+
| ↳ `output` | `string` | ✅ | — | Return value, present when status is `finished` |
|
|
1483
|
+
| ↳ `error` | `string` | ✅ | — | Error payload when status is `failed` (null otherwise) |
|
|
1484
|
+
| ↳ `created_at` | `string` | ✅ | — | When the run was created (ISO-8601) |
|
|
1485
|
+
| ↳ `updated_at` | `string` | ✅ | — | When the run was last updated (ISO-8601) |
|
|
1486
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1487
|
+
|
|
1488
|
+
**Example:**
|
|
1489
|
+
|
|
1490
|
+
```typescript
|
|
1491
|
+
// Get first page and a cursor for the second page
|
|
1492
|
+
const { data: workflowRuns, nextCursor } = await zapier.listWorkflowRuns({
|
|
1493
|
+
workflow: "example-workflow",
|
|
1494
|
+
});
|
|
1495
|
+
|
|
1496
|
+
// Or iterate over all pages
|
|
1497
|
+
for await (const page of zapier.listWorkflowRuns({
|
|
1498
|
+
workflow: "example-workflow",
|
|
1499
|
+
})) {
|
|
1500
|
+
// Do something with each page
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
// Or iterate over individual items across all pages
|
|
1504
|
+
for await (const workflowRun of zapier
|
|
1505
|
+
.listWorkflowRuns({
|
|
1506
|
+
workflow: "example-workflow",
|
|
1507
|
+
})
|
|
1508
|
+
.items()) {
|
|
1509
|
+
// Do something with each workflowRun
|
|
1510
|
+
}
|
|
1511
|
+
```
|
|
1512
|
+
|
|
1384
1513
|
#### `listWorkflowVersions` 🧪 _experimental_
|
|
1385
1514
|
|
|
1386
1515
|
List published versions for a workflow, newest first
|
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:";
|
|
@@ -4321,6 +4321,26 @@ var workflowVersionIdResolver = {
|
|
|
4321
4321
|
})
|
|
4322
4322
|
};
|
|
4323
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
|
+
|
|
4324
4344
|
// src/resolvers/triggerMessages.ts
|
|
4325
4345
|
var triggerMessagesResolver = {
|
|
4326
4346
|
type: "dynamic",
|
|
@@ -11326,6 +11346,181 @@ var getWorkflowVersionPlugin = definePlugin(
|
|
|
11326
11346
|
}
|
|
11327
11347
|
})
|
|
11328
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
|
+
);
|
|
11329
11524
|
|
|
11330
11525
|
// src/utils/batch-utils.ts
|
|
11331
11526
|
var DEFAULT_CONCURRENCY = 10;
|
|
@@ -11485,7 +11680,7 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
11485
11680
|
|
|
11486
11681
|
// src/experimental.ts
|
|
11487
11682
|
function createZapierSdk2(options = {}) {
|
|
11488
|
-
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(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);
|
|
11489
11684
|
}
|
|
11490
11685
|
|
|
11491
11686
|
exports.ActionKeyPropertySchema = ActionKeyPropertySchema;
|
|
@@ -11679,4 +11874,5 @@ exports.triggerInboxResolver = triggerInboxResolver;
|
|
|
11679
11874
|
exports.triggerMessagesResolver = triggerMessagesResolver;
|
|
11680
11875
|
exports.updateTableRecordsPlugin = updateTableRecordsPlugin;
|
|
11681
11876
|
exports.workflowIdResolver = workflowIdResolver;
|
|
11877
|
+
exports.workflowRunIdResolver = workflowRunIdResolver;
|
|
11682
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';
|
|
@@ -2623,6 +2623,80 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<{
|
|
|
2623
2623
|
getWorkflowVersion: PluginMeta;
|
|
2624
2624
|
};
|
|
2625
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
|
+
};
|
|
2626
2700
|
} & {
|
|
2627
2701
|
apps: ActionProxy & ZapierSdkApps;
|
|
2628
2702
|
context: {
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2638,6 +2638,80 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("./i
|
|
|
2638
2638
|
getWorkflowVersion: PluginMeta;
|
|
2639
2639
|
};
|
|
2640
2640
|
};
|
|
2641
|
+
} & {
|
|
2642
|
+
listWorkflowRuns: (options?: ({
|
|
2643
|
+
workflow: string;
|
|
2644
|
+
pageSize?: number | undefined;
|
|
2645
|
+
cursor?: string | undefined;
|
|
2646
|
+
maxItems?: number | undefined;
|
|
2647
|
+
} & {
|
|
2648
|
+
cursor?: string;
|
|
2649
|
+
pageSize?: number;
|
|
2650
|
+
maxItems?: number;
|
|
2651
|
+
}) | undefined) => import("./index").PaginatedSdkResult<{
|
|
2652
|
+
id: string;
|
|
2653
|
+
trigger_id: string | null;
|
|
2654
|
+
durable_run_id: string | null;
|
|
2655
|
+
workflow_version_id: string | null;
|
|
2656
|
+
status: string;
|
|
2657
|
+
input: unknown;
|
|
2658
|
+
output: unknown;
|
|
2659
|
+
error: unknown;
|
|
2660
|
+
created_at: string;
|
|
2661
|
+
updated_at: string;
|
|
2662
|
+
}>;
|
|
2663
|
+
} & {
|
|
2664
|
+
context: {
|
|
2665
|
+
meta: {
|
|
2666
|
+
listWorkflowRuns: PluginMeta;
|
|
2667
|
+
};
|
|
2668
|
+
};
|
|
2669
|
+
} & {
|
|
2670
|
+
getWorkflowRun: (options?: {
|
|
2671
|
+
run: string;
|
|
2672
|
+
workflow?: string | undefined;
|
|
2673
|
+
} | undefined) => Promise<{
|
|
2674
|
+
data: {
|
|
2675
|
+
id: string;
|
|
2676
|
+
trigger_id: string | null;
|
|
2677
|
+
durable_run_id: string | null;
|
|
2678
|
+
workflow_version_id: string | null;
|
|
2679
|
+
status: string;
|
|
2680
|
+
input: unknown;
|
|
2681
|
+
output: unknown;
|
|
2682
|
+
error: unknown;
|
|
2683
|
+
created_at: string;
|
|
2684
|
+
updated_at: string;
|
|
2685
|
+
};
|
|
2686
|
+
}>;
|
|
2687
|
+
} & {
|
|
2688
|
+
context: {
|
|
2689
|
+
meta: {
|
|
2690
|
+
getWorkflowRun: PluginMeta;
|
|
2691
|
+
};
|
|
2692
|
+
};
|
|
2693
|
+
} & {
|
|
2694
|
+
getTriggerRun: (options?: {
|
|
2695
|
+
trigger: string;
|
|
2696
|
+
} | undefined) => Promise<{
|
|
2697
|
+
data: {
|
|
2698
|
+
id: string;
|
|
2699
|
+
durable_run_id: string | null;
|
|
2700
|
+
workflow_version_id: string | null;
|
|
2701
|
+
status: string;
|
|
2702
|
+
input: unknown;
|
|
2703
|
+
output: unknown;
|
|
2704
|
+
error: unknown;
|
|
2705
|
+
created_at: string;
|
|
2706
|
+
updated_at: string;
|
|
2707
|
+
};
|
|
2708
|
+
}>;
|
|
2709
|
+
} & {
|
|
2710
|
+
context: {
|
|
2711
|
+
meta: {
|
|
2712
|
+
getTriggerRun: PluginMeta;
|
|
2713
|
+
};
|
|
2714
|
+
};
|
|
2641
2715
|
} & {
|
|
2642
2716
|
apps: import("./plugins/apps/schemas").ActionProxy & import("./index").ZapierSdkApps;
|
|
2643
2717
|
context: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"experimental.d.ts","sourceRoot":"","sources":["../src/experimental.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAyFjD,cAAc,SAAS,CAAC;AAExB,MAAM,WAAW,gBAAiB,SAAQ,cAAc;CAAG;AAE3D,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAkH66G,CAAC;;;;sBAAiX,CAAC;qBAAyB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GATv3H;AAED,MAAM,MAAM,SAAS,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC;AAM3D,YAAY,EAAE,UAAU,EAAE,CAAC"}
|