@zapier/zapier-sdk 0.63.0 → 0.64.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 +127 -0
- package/dist/experimental.cjs +191 -2
- package/dist/experimental.d.mts +71 -2
- package/dist/experimental.d.ts +69 -0
- package/dist/experimental.d.ts.map +1 -1
- package/dist/experimental.js +6 -0
- package/dist/experimental.mjs +191 -3
- package/dist/{index-3fBEDEsp.d.mts → index-Bfvj0KLi.d.mts} +15 -1
- package/dist/{index-3fBEDEsp.d.ts → index-Bfvj0KLi.d.ts} +15 -1
- package/dist/index.cjs +22 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +22 -2
- 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/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 +1 -0
- package/dist/resolvers/index.d.ts.map +1 -1
- package/dist/resolvers/index.js +1 -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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.64.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 913aa6b: Add the workflow-version experimental code-substrate plugins: `publishWorkflowVersion`, `listWorkflowVersions`, and `getWorkflowVersion`. All three are registered only in `@zapier/zapier-sdk/experimental`; the stable subpath does not expose them. `listWorkflowVersions` is paginated (cursor + pageSize); `publishWorkflowVersion` POSTs `source_files` (filename → contents) plus optional `dependencies`, `zapier_durable_version`, and `enabled` (defaults to true) to publish a new version; `getWorkflowVersion` returns the full version state including source files. Handlers pass API responses through verbatim (no client-side `.parse()` re-emission) so callers see any richer fields the server adds later without an SDK release. Adds `workflowVersionIdResolver` — a dependent resolver scoped to a parent workflow, mirrored on `tableRecordIdResolver`'s shape — so commands that take a version id present an interactive picker via `sdk.listWorkflowVersions({ workflow })` in the CLI. All ID inputs are UUID-validated at the boundary so non-UUID strings fail with a clear schema error instead of an opaque 500 from the backend's `::uuid` cast.
|
|
8
|
+
|
|
3
9
|
## 0.63.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -34,8 +34,11 @@
|
|
|
34
34
|
- [`enableWorkflow`](#enableworkflow--experimental)
|
|
35
35
|
- [`getDurableRun`](#getdurablerun--experimental)
|
|
36
36
|
- [`getWorkflow`](#getworkflow--experimental)
|
|
37
|
+
- [`getWorkflowVersion`](#getworkflowversion--experimental)
|
|
37
38
|
- [`listDurableRuns`](#listdurableruns--experimental)
|
|
39
|
+
- [`listWorkflowVersions`](#listworkflowversions--experimental)
|
|
38
40
|
- [`listWorkflows`](#listworkflows--experimental)
|
|
41
|
+
- [`publishWorkflowVersion`](#publishworkflowversion--experimental)
|
|
39
42
|
- [`runDurable`](#rundurable--experimental)
|
|
40
43
|
- [`updateWorkflow`](#updateworkflow--experimental)
|
|
41
44
|
- [Connections](#connections)
|
|
@@ -1298,6 +1301,40 @@ const { data: workflow } = await zapier.getWorkflow({
|
|
|
1298
1301
|
});
|
|
1299
1302
|
```
|
|
1300
1303
|
|
|
1304
|
+
#### `getWorkflowVersion` 🧪 _experimental_
|
|
1305
|
+
|
|
1306
|
+
Get full details of a workflow version including source files
|
|
1307
|
+
|
|
1308
|
+
**Parameters:**
|
|
1309
|
+
|
|
1310
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1311
|
+
| -------------- | -------- | -------- | ------- | --------------- | ------------------- |
|
|
1312
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1313
|
+
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
|
|
1314
|
+
| ↳ `version` | `string` | ✅ | — | — | Workflow version ID |
|
|
1315
|
+
|
|
1316
|
+
**Returns:** `Promise<WorkflowVersionItem>`
|
|
1317
|
+
|
|
1318
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1319
|
+
| ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------- |
|
|
1320
|
+
| `data` | `object` | ✅ | — | |
|
|
1321
|
+
| ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
|
|
1322
|
+
| ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
|
|
1323
|
+
| ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
|
|
1324
|
+
| ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
|
|
1325
|
+
| ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
|
|
1326
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
|
|
1327
|
+
| ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
|
|
1328
|
+
|
|
1329
|
+
**Example:**
|
|
1330
|
+
|
|
1331
|
+
```typescript
|
|
1332
|
+
const { data: workflowVersion } = await zapier.getWorkflowVersion({
|
|
1333
|
+
workflow: "example-workflow",
|
|
1334
|
+
version: "example-version",
|
|
1335
|
+
});
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1301
1338
|
#### `listDurableRuns` 🧪 _experimental_
|
|
1302
1339
|
|
|
1303
1340
|
List run-once durable runs for the authenticated account, newest first
|
|
@@ -1344,6 +1381,59 @@ for await (const durableRun of zapier.listDurableRuns().items()) {
|
|
|
1344
1381
|
}
|
|
1345
1382
|
```
|
|
1346
1383
|
|
|
1384
|
+
#### `listWorkflowVersions` 🧪 _experimental_
|
|
1385
|
+
|
|
1386
|
+
List published versions for a workflow, newest first
|
|
1387
|
+
|
|
1388
|
+
**Parameters:**
|
|
1389
|
+
|
|
1390
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1391
|
+
| -------------- | -------- | -------- | ------- | --------------- | ------------------------------------------------- |
|
|
1392
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1393
|
+
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
|
|
1394
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of versions per page (max 100) |
|
|
1395
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Pagination cursor |
|
|
1396
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total versions to return across all pages |
|
|
1397
|
+
|
|
1398
|
+
**Returns:** `Promise<PaginatedResult<WorkflowVersionItem>>`
|
|
1399
|
+
|
|
1400
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1401
|
+
| ---------------------------- | ---------- | -------- | --------------- | ------------------------------------------------------------------- |
|
|
1402
|
+
| `data[]` | `object[]` | ✅ | — | |
|
|
1403
|
+
| ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
|
|
1404
|
+
| ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
|
|
1405
|
+
| ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
|
|
1406
|
+
| ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
|
|
1407
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
|
|
1408
|
+
| ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
|
|
1409
|
+
| `nextCursor` | `string` | ❌ | — | Cursor for the next page; omitted when there are no more pages |
|
|
1410
|
+
|
|
1411
|
+
**Example:**
|
|
1412
|
+
|
|
1413
|
+
```typescript
|
|
1414
|
+
// Get first page and a cursor for the second page
|
|
1415
|
+
const { data: workflowVersions, nextCursor } =
|
|
1416
|
+
await zapier.listWorkflowVersions({
|
|
1417
|
+
workflow: "example-workflow",
|
|
1418
|
+
});
|
|
1419
|
+
|
|
1420
|
+
// Or iterate over all pages
|
|
1421
|
+
for await (const page of zapier.listWorkflowVersions({
|
|
1422
|
+
workflow: "example-workflow",
|
|
1423
|
+
})) {
|
|
1424
|
+
// Do something with each page
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
// Or iterate over individual items across all pages
|
|
1428
|
+
for await (const workflowVersion of zapier
|
|
1429
|
+
.listWorkflowVersions({
|
|
1430
|
+
workflow: "example-workflow",
|
|
1431
|
+
})
|
|
1432
|
+
.items()) {
|
|
1433
|
+
// Do something with each workflowVersion
|
|
1434
|
+
}
|
|
1435
|
+
```
|
|
1436
|
+
|
|
1347
1437
|
#### `listWorkflows` 🧪 _experimental_
|
|
1348
1438
|
|
|
1349
1439
|
List all active durable workflows for the authenticated account
|
|
@@ -1389,6 +1479,43 @@ for await (const workflow of zapier.listWorkflows().items()) {
|
|
|
1389
1479
|
}
|
|
1390
1480
|
```
|
|
1391
1481
|
|
|
1482
|
+
#### `publishWorkflowVersion` 🧪 _experimental_
|
|
1483
|
+
|
|
1484
|
+
Publish a new version of a durable workflow. Enables the workflow by default.
|
|
1485
|
+
|
|
1486
|
+
**Parameters:**
|
|
1487
|
+
|
|
1488
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1489
|
+
| ---------------------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
1490
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1491
|
+
| ↳ `workflow` | `string` | ✅ | — | — | Durable workflow ID |
|
|
1492
|
+
| ↳ `source_files` | `object` | ✅ | — | — | Source files keyed by filename → contents |
|
|
1493
|
+
| ↳ `dependencies` | `object` | ❌ | — | — | Optional npm package dependencies |
|
|
1494
|
+
| ↳ `zapier_durable_version` | `string` | ❌ | — | — | Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted. |
|
|
1495
|
+
| ↳ `enabled` | `boolean` | ❌ | — | — | Enable the workflow after publishing. Defaults to true; pass false to publish without enabling. |
|
|
1496
|
+
|
|
1497
|
+
**Returns:** `Promise<WorkflowVersionItem>`
|
|
1498
|
+
|
|
1499
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1500
|
+
| ---------------------------- | -------- | -------- | --------------- | ------------------------------------------------------------------- |
|
|
1501
|
+
| `data` | `object` | ✅ | — | |
|
|
1502
|
+
| ↳ `id` | `string` | ✅ | — | Workflow version ID (UUID) |
|
|
1503
|
+
| ↳ `workflow_id` | `string` | ✅ | — | Parent workflow ID (UUID) |
|
|
1504
|
+
| ↳ `source_files` | `object` | ✅ | — | Source files keyed by filename → contents |
|
|
1505
|
+
| ↳ `zapier_durable_version` | `string` | ✅ | — | Pinned semver of @zapier/zapier-durable used by this version's runs |
|
|
1506
|
+
| ↳ `dependencies` | `object` | ✅ | — | Additional npm dependencies pinned for this version (or null) |
|
|
1507
|
+
| ↳ `created_by_user_id` | `string` | ✅ | — | ID of the user who published this version |
|
|
1508
|
+
| ↳ `created_at` | `string` | ✅ | — | When the version was published (ISO-8601) |
|
|
1509
|
+
|
|
1510
|
+
**Example:**
|
|
1511
|
+
|
|
1512
|
+
```typescript
|
|
1513
|
+
const result = await zapier.publishWorkflowVersion({
|
|
1514
|
+
workflow: "example-workflow",
|
|
1515
|
+
source_files: {},
|
|
1516
|
+
});
|
|
1517
|
+
```
|
|
1518
|
+
|
|
1392
1519
|
#### `runDurable` 🧪 _experimental_
|
|
1393
1520
|
|
|
1394
1521
|
Run a workflow source file as a run-once durable run on sdkdurableapi (no deployed workflow required). Returns the run ID immediately; poll via getDurableRun for terminal status.
|
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.64.0" : void 0) || "unknown";
|
|
2893
2893
|
|
|
2894
2894
|
// src/utils/open-url.ts
|
|
2895
2895
|
var nodePrefix = "node:";
|
|
@@ -4301,6 +4301,26 @@ 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
|
+
|
|
4304
4324
|
// src/resolvers/triggerMessages.ts
|
|
4305
4325
|
var triggerMessagesResolver = {
|
|
4306
4326
|
type: "dynamic",
|
|
@@ -11138,6 +11158,174 @@ var cancelDurableRunPlugin = definePlugin(
|
|
|
11138
11158
|
}
|
|
11139
11159
|
})
|
|
11140
11160
|
);
|
|
11161
|
+
var PublishWorkflowVersionOptionsSchema = zod.z.object({
|
|
11162
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11163
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).refine((files) => Object.keys(files).length > 0, {
|
|
11164
|
+
message: "source_files must contain at least one file"
|
|
11165
|
+
}).describe("Source files keyed by filename \u2192 contents"),
|
|
11166
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).optional().describe("Optional npm package dependencies"),
|
|
11167
|
+
zapier_durable_version: zod.z.string().optional().describe(
|
|
11168
|
+
'Exact semver of @zapier/zapier-durable to use (e.g. "1.2.3"). Defaults to server-configured version if omitted.'
|
|
11169
|
+
),
|
|
11170
|
+
enabled: zod.z.boolean().optional().describe(
|
|
11171
|
+
"Enable the workflow after publishing. Defaults to true; pass false to publish without enabling."
|
|
11172
|
+
)
|
|
11173
|
+
}).describe(
|
|
11174
|
+
"Publish a new version of a durable workflow. Enables the workflow by default."
|
|
11175
|
+
);
|
|
11176
|
+
var PublishWorkflowVersionResponseSchema = zod.z.object({
|
|
11177
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11178
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11179
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).describe("Source files keyed by filename \u2192 contents"),
|
|
11180
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11181
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11182
|
+
),
|
|
11183
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11184
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11185
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11186
|
+
});
|
|
11187
|
+
|
|
11188
|
+
// src/plugins/codeSubstrate/publishWorkflowVersion/index.ts
|
|
11189
|
+
var publishWorkflowVersionPlugin = definePlugin(
|
|
11190
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11191
|
+
...codeSubstrateDefaults,
|
|
11192
|
+
name: "publishWorkflowVersion",
|
|
11193
|
+
type: "create",
|
|
11194
|
+
itemType: "WorkflowVersion",
|
|
11195
|
+
inputSchema: PublishWorkflowVersionOptionsSchema,
|
|
11196
|
+
outputSchema: PublishWorkflowVersionResponseSchema,
|
|
11197
|
+
resolvers: { workflow: workflowIdResolver },
|
|
11198
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11199
|
+
const body = {
|
|
11200
|
+
source_files: options.source_files
|
|
11201
|
+
};
|
|
11202
|
+
if (options.dependencies !== void 0) {
|
|
11203
|
+
body.dependencies = options.dependencies;
|
|
11204
|
+
}
|
|
11205
|
+
if (options.zapier_durable_version !== void 0) {
|
|
11206
|
+
body.zapier_durable_version = options.zapier_durable_version;
|
|
11207
|
+
}
|
|
11208
|
+
if (options.enabled !== void 0) {
|
|
11209
|
+
body.enabled = options.enabled;
|
|
11210
|
+
}
|
|
11211
|
+
const raw = await sdk2.context.api.post(
|
|
11212
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`,
|
|
11213
|
+
body,
|
|
11214
|
+
{
|
|
11215
|
+
authRequired: true,
|
|
11216
|
+
resource: { type: "workflow", id: options.workflow }
|
|
11217
|
+
}
|
|
11218
|
+
);
|
|
11219
|
+
const data = PublishWorkflowVersionResponseSchema.parse(raw);
|
|
11220
|
+
return { data };
|
|
11221
|
+
}
|
|
11222
|
+
})
|
|
11223
|
+
);
|
|
11224
|
+
var WorkflowVersionListItemSchema = zod.z.object({
|
|
11225
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11226
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11227
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11228
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11229
|
+
),
|
|
11230
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11231
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11232
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11233
|
+
});
|
|
11234
|
+
var ListWorkflowVersionsOptionsSchema = zod.z.object({
|
|
11235
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11236
|
+
pageSize: zod.z.number().int().min(1).max(100).optional().describe("Number of versions per page (max 100)"),
|
|
11237
|
+
cursor: zod.z.string().optional().describe("Pagination cursor"),
|
|
11238
|
+
maxItems: zod.z.number().int().min(1).optional().describe("Maximum total versions to return across all pages")
|
|
11239
|
+
}).describe("List published versions for a workflow, newest first");
|
|
11240
|
+
var ListWorkflowVersionsApiResponseSchema = zod.z.object({
|
|
11241
|
+
results: zod.z.array(WorkflowVersionListItemSchema),
|
|
11242
|
+
meta: zod.z.object({
|
|
11243
|
+
limit: zod.z.number(),
|
|
11244
|
+
cursor: zod.z.string().nullable().optional(),
|
|
11245
|
+
next_cursor: zod.z.string().nullable().optional()
|
|
11246
|
+
}),
|
|
11247
|
+
links: zod.z.object({
|
|
11248
|
+
next: zod.z.string().nullable().optional()
|
|
11249
|
+
}).optional()
|
|
11250
|
+
});
|
|
11251
|
+
|
|
11252
|
+
// src/plugins/codeSubstrate/listWorkflowVersions/index.ts
|
|
11253
|
+
var listWorkflowVersionsPlugin = definePlugin(
|
|
11254
|
+
(sdk) => createPaginatedPluginMethod(sdk, {
|
|
11255
|
+
...codeSubstrateDefaults,
|
|
11256
|
+
name: "listWorkflowVersions",
|
|
11257
|
+
type: "list",
|
|
11258
|
+
itemType: "WorkflowVersion",
|
|
11259
|
+
inputSchema: ListWorkflowVersionsOptionsSchema,
|
|
11260
|
+
outputSchema: WorkflowVersionListItemSchema,
|
|
11261
|
+
defaultPageSize: DEFAULT_PAGE_SIZE,
|
|
11262
|
+
resolvers: { workflow: workflowIdResolver },
|
|
11263
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11264
|
+
const searchParams = {};
|
|
11265
|
+
if (options.pageSize !== void 0) {
|
|
11266
|
+
searchParams.limit = options.pageSize.toString();
|
|
11267
|
+
}
|
|
11268
|
+
if (options.cursor) {
|
|
11269
|
+
searchParams.cursor = options.cursor;
|
|
11270
|
+
}
|
|
11271
|
+
const raw = await sdk2.context.api.get(
|
|
11272
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions`,
|
|
11273
|
+
{
|
|
11274
|
+
searchParams,
|
|
11275
|
+
authRequired: true,
|
|
11276
|
+
resource: { type: "workflow", id: options.workflow }
|
|
11277
|
+
}
|
|
11278
|
+
);
|
|
11279
|
+
const response = ListWorkflowVersionsApiResponseSchema.parse(raw);
|
|
11280
|
+
return {
|
|
11281
|
+
data: response.results,
|
|
11282
|
+
nextCursor: response.meta.next_cursor ?? void 0
|
|
11283
|
+
};
|
|
11284
|
+
}
|
|
11285
|
+
})
|
|
11286
|
+
);
|
|
11287
|
+
var GetWorkflowVersionOptionsSchema = zod.z.object({
|
|
11288
|
+
workflow: zod.z.string().uuid().describe("Durable workflow ID"),
|
|
11289
|
+
version: zod.z.string().uuid().describe("Workflow version ID")
|
|
11290
|
+
}).describe("Get full details of a workflow version including source files");
|
|
11291
|
+
var GetWorkflowVersionResponseSchema = zod.z.object({
|
|
11292
|
+
id: zod.z.string().describe("Workflow version ID (UUID)"),
|
|
11293
|
+
workflow_id: zod.z.string().describe("Parent workflow ID (UUID)"),
|
|
11294
|
+
source_files: zod.z.record(zod.z.string(), zod.z.string()).describe("Source files keyed by filename \u2192 contents"),
|
|
11295
|
+
zapier_durable_version: zod.z.string().describe(
|
|
11296
|
+
"Pinned semver of @zapier/zapier-durable used by this version's runs"
|
|
11297
|
+
),
|
|
11298
|
+
dependencies: zod.z.record(zod.z.string(), zod.z.string()).nullable().describe("Additional npm dependencies pinned for this version (or null)"),
|
|
11299
|
+
created_by_user_id: zod.z.string().describe("ID of the user who published this version"),
|
|
11300
|
+
created_at: zod.z.string().describe("When the version was published (ISO-8601)")
|
|
11301
|
+
});
|
|
11302
|
+
|
|
11303
|
+
// src/plugins/codeSubstrate/getWorkflowVersion/index.ts
|
|
11304
|
+
var getWorkflowVersionPlugin = definePlugin(
|
|
11305
|
+
(sdk) => createPluginMethod(sdk, {
|
|
11306
|
+
...codeSubstrateDefaults,
|
|
11307
|
+
name: "getWorkflowVersion",
|
|
11308
|
+
type: "item",
|
|
11309
|
+
itemType: "WorkflowVersion",
|
|
11310
|
+
inputSchema: GetWorkflowVersionOptionsSchema,
|
|
11311
|
+
outputSchema: GetWorkflowVersionResponseSchema,
|
|
11312
|
+
resolvers: {
|
|
11313
|
+
workflow: workflowIdResolver,
|
|
11314
|
+
version: workflowVersionIdResolver
|
|
11315
|
+
},
|
|
11316
|
+
handler: async ({ sdk: sdk2, options }) => {
|
|
11317
|
+
const raw = await sdk2.context.api.get(
|
|
11318
|
+
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/versions/${encodeURIComponent(options.version)}`,
|
|
11319
|
+
{
|
|
11320
|
+
authRequired: true,
|
|
11321
|
+
resource: { type: "workflow-version", id: options.version }
|
|
11322
|
+
}
|
|
11323
|
+
);
|
|
11324
|
+
const data = GetWorkflowVersionResponseSchema.parse(raw);
|
|
11325
|
+
return { data };
|
|
11326
|
+
}
|
|
11327
|
+
})
|
|
11328
|
+
);
|
|
11141
11329
|
|
|
11142
11330
|
// src/utils/batch-utils.ts
|
|
11143
11331
|
var DEFAULT_CONCURRENCY = 10;
|
|
@@ -11297,7 +11485,7 @@ var registryPlugin = definePlugin((_sdk) => {
|
|
|
11297
11485
|
|
|
11298
11486
|
// src/experimental.ts
|
|
11299
11487
|
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);
|
|
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);
|
|
11301
11489
|
}
|
|
11302
11490
|
|
|
11303
11491
|
exports.ActionKeyPropertySchema = ActionKeyPropertySchema;
|
|
@@ -11491,3 +11679,4 @@ exports.triggerInboxResolver = triggerInboxResolver;
|
|
|
11491
11679
|
exports.triggerMessagesResolver = triggerMessagesResolver;
|
|
11492
11680
|
exports.updateTableRecordsPlugin = updateTableRecordsPlugin;
|
|
11493
11681
|
exports.workflowIdResolver = workflowIdResolver;
|
|
11682
|
+
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-Bfvj0KLi.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, dl 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, ev as ApplicationLifecycleEventData, bS as ApprovalStatus, bY as AppsPluginProvides, bt as AppsProperty, b1 as AppsPropertySchema, a0 as ArrayResolver, dk as AuthEvent, bh as AuthenticationIdProperty, aQ as AuthenticationIdPropertySchema, eD as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cu as CONTEXT_CACHE_MAX_SIZE, ct as CONTEXT_CACHE_TTL_MS, x as Choice, ds as ClientCredentialsObject, dD as ClientCredentialsObjectSchema, K as Connection, dL as ConnectionEntry, dK as ConnectionEntrySchema, bf as ConnectionIdProperty, aP as ConnectionIdPropertySchema, aA as ConnectionItem, bg as ConnectionProperty, aR as ConnectionPropertySchema, dN as ConnectionsMap, dM as ConnectionsMapSchema, dP as ConnectionsPluginProvides, bv as ConnectionsProperty, b3 as ConnectionsPropertySchema, O as ConnectionsResponse, cg as CreateClientCredentialsPluginProvides, ed as CreateTableFieldsPluginProvides, e7 as CreateTablePluginProvides, el as CreateTableRecordsPluginProvides, dp as Credentials, dI as CredentialsFunction, dH as CredentialsFunctionSchema, dr as CredentialsObject, dF as CredentialsObjectSchema, dJ as CredentialsSchema, dU as DEFAULT_ACTION_TIMEOUT_MS, e0 as DEFAULT_APPROVAL_TIMEOUT_MS, cD as DEFAULT_CONFIG_PATH, e1 as DEFAULT_MAX_APPROVAL_RETRIES, dT as DEFAULT_PAGE_SIZE, bm as DebugProperty, aW as DebugPropertySchema, ci as DeleteClientCredentialsPluginProvides, ef as DeleteTableFieldsPluginProvides, e9 as DeleteTablePluginProvides, en as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, a3 as DynamicListResolver, a4 as DynamicSearchResolver, ew as EnhancedErrorEventData, bC as ErrorOptions, dn as EventCallback, eu as EventContext, er as EventEmissionConfig, et 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, e5 as GetTablePluginProvides, eh 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, eb as ListTableFieldsPluginProvides, ej as ListTableRecordsPluginProvides, e3 as ListTablesPluginProvides, dm as LoadingEvent, dX as MAX_CONCURRENCY_LIMIT, dS as MAX_PAGE_LIMIT, cE as ManifestEntry, cz as ManifestPluginOptions, cC as ManifestPluginProvides, eE as MethodCalledEvent, ex 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, dt as PkceCredentialsObject, dE 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, d7 as ResolveAuthTokenOptions, dy as ResolveCredentialsOptions, dq as ResolvedCredentials, dG as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aE as RootFieldItem, cw as RunActionPluginProvides, dj 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, ep as UpdateTableRecordsPluginProvides, Q as UserProfile, aF as UserProfileItem, dQ as ZAPIER_BASE_URL, dZ as ZAPIER_MAX_CONCURRENT_REQUESTS, dV as ZAPIER_MAX_NETWORK_RETRIES, dW 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, df as ZapierCache, dg as ZapierCacheEntry, dh 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, ey as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, eA as buildErrorEvent, ez as buildErrorEventWithContext, eC as buildMethodCalledEvent, eq as cleanupEventListeners, d8 as clearTokenCache, cS as clientCredentialsNameResolver, cT as clientIdResolver, ar as composePlugins, cO as connectionIdGenericResolver, cN as connectionIdResolver, dO as connectionsPlugin, eB as createBaseEvent, cf as createClientCredentialsPlugin, V as createFunction, di as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, ec as createTableFieldsPlugin, e6 as createTablePlugin, ek as createTableRecordsPlugin, ax as createZapierApi, ag as createZapierSdkWithoutRegistry, ao as definePlugin, ch as deleteClientCredentialsPlugin, ee as deleteTableFieldsPlugin, e8 as deleteTablePlugin, em as deleteTableRecordsPlugin, cX as durableRunIdResolver, es as eventEmissionPlugin, b$ as fetchPlugin, cp as findFirstConnectionPlugin, cr as findUniqueConnectionPlugin, bV as formatErrorMessage, eF as generateEventId, c9 as getActionInputFieldsSchemaPlugin, cl as getActionPlugin, cj as getAppPlugin, dB as getBaseUrlFromCredentials, eL as getCiPlatform, dC as getClientIdFromCredentials, cn as getConnectionPlugin, eN as getCpuTime, eG as getCurrentTimestamp, eM as getMemoryUsage, ay as getOrCreateApiClient, eI as getOsInfo, eJ as getPlatformVersions, cA as getPreferredManifestEntryKey, cF as getProfilePlugin, eH as getReleaseId, e4 as getTablePlugin, eg as getTableRecordPlugin, dc as getTokenFromCliLogin, d_ as getZapierApprovalMode, d$ as getZapierDefaultApprovalMode, dR as getZapierSdkService, da as injectCliLogin, cR as inputFieldKeyResolver, cQ as inputsAllOptionalResolver, cP as inputsResolver, d9 as invalidateCachedToken, de as invalidateCredentialsToken, eK as isCi, db as isCliLoginAvailable, du as isClientCredentials, dx as isCredentialsFunction, dw as isCredentialsObject, dv as isPkceCredentials, S as isPositional, c7 as listActionInputFieldChoicesPlugin, c5 as listActionInputFieldsPlugin, c3 as listActionsPlugin, c1 as listAppsPlugin, cd as listClientCredentialsPlugin, cb as listConnectionsPlugin, ea as listTableFieldsPlugin, ei as listTableRecordsPlugin, e2 as listTablesPlugin, ac as logDeprecation, cB as manifestPlugin, dY as parseConcurrencyEnvVar, au as registryPlugin, cx as requestPlugin, ad as resetDeprecationWarnings, dd as resolveAuthToken, dA as resolveCredentials, dz as resolveCredentialsFromEnv, cv as runActionPlugin, a6 as runWithTelemetryContext, d0 as tableFieldIdsResolver, d2 as tableFieldsResolver, d5 as tableFiltersResolver, cU as tableIdResolver, d1 as tableNameResolver, c_ as tableRecordIdResolver, c$ as tableRecordIdsResolver, d3 as tableRecordsResolver, d6 as tableSortResolver, d4 as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, cV as triggerInboxResolver, cZ as triggerMessagesResolver, eo as updateTableRecordsPlugin, cW as workflowIdResolver, cY as workflowVersionIdResolver } from './index-Bfvj0KLi.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,75 @@ 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
|
+
};
|
|
2557
2626
|
} & {
|
|
2558
2627
|
apps: ActionProxy & ZapierSdkApps;
|
|
2559
2628
|
context: {
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2569,6 +2569,75 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("./i
|
|
|
2569
2569
|
cancelDurableRun: PluginMeta;
|
|
2570
2570
|
};
|
|
2571
2571
|
};
|
|
2572
|
+
} & {
|
|
2573
|
+
publishWorkflowVersion: (options?: {
|
|
2574
|
+
workflow: string;
|
|
2575
|
+
source_files: Record<string, string>;
|
|
2576
|
+
dependencies?: Record<string, string> | undefined;
|
|
2577
|
+
zapier_durable_version?: string | undefined;
|
|
2578
|
+
enabled?: boolean | undefined;
|
|
2579
|
+
} | undefined) => Promise<{
|
|
2580
|
+
data: {
|
|
2581
|
+
id: string;
|
|
2582
|
+
workflow_id: string;
|
|
2583
|
+
source_files: Record<string, string>;
|
|
2584
|
+
zapier_durable_version: string;
|
|
2585
|
+
dependencies: Record<string, string> | null;
|
|
2586
|
+
created_by_user_id: string;
|
|
2587
|
+
created_at: string;
|
|
2588
|
+
};
|
|
2589
|
+
}>;
|
|
2590
|
+
} & {
|
|
2591
|
+
context: {
|
|
2592
|
+
meta: {
|
|
2593
|
+
publishWorkflowVersion: PluginMeta;
|
|
2594
|
+
};
|
|
2595
|
+
};
|
|
2596
|
+
} & {
|
|
2597
|
+
listWorkflowVersions: (options?: ({
|
|
2598
|
+
workflow: string;
|
|
2599
|
+
pageSize?: number | undefined;
|
|
2600
|
+
cursor?: string | undefined;
|
|
2601
|
+
maxItems?: number | undefined;
|
|
2602
|
+
} & {
|
|
2603
|
+
cursor?: string;
|
|
2604
|
+
pageSize?: number;
|
|
2605
|
+
maxItems?: number;
|
|
2606
|
+
}) | undefined) => import("./index").PaginatedSdkResult<{
|
|
2607
|
+
id: string;
|
|
2608
|
+
workflow_id: string;
|
|
2609
|
+
zapier_durable_version: string;
|
|
2610
|
+
dependencies: Record<string, string> | null;
|
|
2611
|
+
created_by_user_id: string;
|
|
2612
|
+
created_at: string;
|
|
2613
|
+
}>;
|
|
2614
|
+
} & {
|
|
2615
|
+
context: {
|
|
2616
|
+
meta: {
|
|
2617
|
+
listWorkflowVersions: PluginMeta;
|
|
2618
|
+
};
|
|
2619
|
+
};
|
|
2620
|
+
} & {
|
|
2621
|
+
getWorkflowVersion: (options?: {
|
|
2622
|
+
workflow: string;
|
|
2623
|
+
version: string;
|
|
2624
|
+
} | undefined) => Promise<{
|
|
2625
|
+
data: {
|
|
2626
|
+
id: string;
|
|
2627
|
+
workflow_id: string;
|
|
2628
|
+
source_files: Record<string, string>;
|
|
2629
|
+
zapier_durable_version: string;
|
|
2630
|
+
dependencies: Record<string, string> | null;
|
|
2631
|
+
created_by_user_id: string;
|
|
2632
|
+
created_at: string;
|
|
2633
|
+
};
|
|
2634
|
+
}>;
|
|
2635
|
+
} & {
|
|
2636
|
+
context: {
|
|
2637
|
+
meta: {
|
|
2638
|
+
getWorkflowVersion: PluginMeta;
|
|
2639
|
+
};
|
|
2640
|
+
};
|
|
2572
2641
|
} & {
|
|
2573
2642
|
apps: import("./plugins/apps/schemas").ActionProxy & import("./index").ZapierSdkApps;
|
|
2574
2643
|
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,EA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AC;AAM3D,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/experimental.js
CHANGED
|
@@ -87,6 +87,9 @@ import { listDurableRunsPlugin } from "./plugins/codeSubstrate/listDurableRuns";
|
|
|
87
87
|
import { getDurableRunPlugin } from "./plugins/codeSubstrate/getDurableRun";
|
|
88
88
|
import { runDurablePlugin } from "./plugins/codeSubstrate/runDurable";
|
|
89
89
|
import { cancelDurableRunPlugin } from "./plugins/codeSubstrate/cancelDurableRun";
|
|
90
|
+
import { publishWorkflowVersionPlugin } from "./plugins/codeSubstrate/publishWorkflowVersion";
|
|
91
|
+
import { listWorkflowVersionsPlugin } from "./plugins/codeSubstrate/listWorkflowVersions";
|
|
92
|
+
import { getWorkflowVersionPlugin } from "./plugins/codeSubstrate/getWorkflowVersion";
|
|
90
93
|
// Re-export everything from the stable index so callers importing from
|
|
91
94
|
// the experimental subpath get the full API surface (types, helpers,
|
|
92
95
|
// errors) without having to import from two paths.
|
|
@@ -173,6 +176,9 @@ export function createZapierSdk(options = {}) {
|
|
|
173
176
|
.addPlugin(getDurableRunPlugin)
|
|
174
177
|
.addPlugin(runDurablePlugin)
|
|
175
178
|
.addPlugin(cancelDurableRunPlugin)
|
|
179
|
+
.addPlugin(publishWorkflowVersionPlugin)
|
|
180
|
+
.addPlugin(listWorkflowVersionsPlugin)
|
|
181
|
+
.addPlugin(getWorkflowVersionPlugin)
|
|
176
182
|
// Magic apps plugin
|
|
177
183
|
.addPlugin(appsPlugin)
|
|
178
184
|
// Profile
|