@zapier/zapier-sdk 0.70.0 → 0.70.1
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 +11 -0
- package/dist/experimental.cjs +36 -17
- package/dist/experimental.d.mts +12 -12
- package/dist/experimental.d.ts +10 -10
- package/dist/experimental.mjs +36 -17
- package/dist/{index-C0bQ5snd.d.mts → index-DjLMJ3w8.d.mts} +3 -3
- package/dist/{index-C0bQ5snd.d.ts → index-DjLMJ3w8.d.ts} +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/cancelDurableRun/index.js +2 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/createWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts +4 -0
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/deleteWorkflow/schemas.js +7 -0
- package/dist/plugins/codeSubstrate/disableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/disableWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/enableWorkflow/index.js +2 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts +5 -5
- package/dist/plugins/codeSubstrate/getDurableRun/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/index.js +2 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts +24 -24
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/getDurableRun/schemas.js +4 -9
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/index.js +6 -2
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts +6 -6
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/listDurableRuns/schemas.js +2 -3
- package/dist/plugins/codeSubstrate/runDurable/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/runDurable/index.js +3 -2
- package/dist/plugins/codeSubstrate/updateWorkflow/index.d.ts.map +1 -1
- package/dist/plugins/codeSubstrate/updateWorkflow/index.js +2 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.70.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- eb30657: Restore Schema.parse() on code-substrate workflow and durable-run response handlers. Opens RunStatus, ExecutionStatus, OperationType, and OperationStatus enums so future server-side values do not break parsing. Reinstates DeleteWorkflowResponseSchema and wires outputSchema on cancelDurableRun and deleteWorkflow.
|
|
8
|
+
|
|
3
9
|
## 0.70.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1116,6 +1116,12 @@ Cancel a run-once durable run in initialized or started status. Returns 409 if t
|
|
|
1116
1116
|
|
|
1117
1117
|
**Returns:** `Promise<DurableRunItem>`
|
|
1118
1118
|
|
|
1119
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1120
|
+
| ------------ | -------- | -------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1121
|
+
| `data` | `object` | ✅ | — | |
|
|
1122
|
+
| ↳ `id` | `string` | ✅ | — | Run ID that was targeted |
|
|
1123
|
+
| ↳ `status` | `string` | ✅ | `cancelled` | Always `cancelled` on a successful call. Synthesized client-side — the backend returns 204; callers needing the run's full state should follow up with getDurableRun. |
|
|
1124
|
+
|
|
1119
1125
|
**Example:**
|
|
1120
1126
|
|
|
1121
1127
|
```typescript
|
|
@@ -1172,6 +1178,11 @@ Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't
|
|
|
1172
1178
|
|
|
1173
1179
|
**Returns:** `Promise<{ success: boolean }>`
|
|
1174
1180
|
|
|
1181
|
+
| Name | Type | Required | Possible Values | Description |
|
|
1182
|
+
| -------- | -------- | -------- | --------------- | ------------------------------------------ |
|
|
1183
|
+
| `data` | `object` | ✅ | — | |
|
|
1184
|
+
| ↳ `id` | `string` | ✅ | — | Workflow ID that was targeted for deletion |
|
|
1185
|
+
|
|
1175
1186
|
**Example:**
|
|
1176
1187
|
|
|
1177
1188
|
```typescript
|
package/dist/experimental.cjs
CHANGED
|
@@ -1016,6 +1016,9 @@ function isPositional(schema) {
|
|
|
1016
1016
|
}
|
|
1017
1017
|
return false;
|
|
1018
1018
|
}
|
|
1019
|
+
function openEnum(values, description) {
|
|
1020
|
+
return zod.z.union([zod.z.enum(values), zod.z.string()]).describe(description);
|
|
1021
|
+
}
|
|
1019
1022
|
|
|
1020
1023
|
// src/utils/logging.ts
|
|
1021
1024
|
var { logDeprecation: logDeprecation2, resetDeprecationWarnings: resetDeprecationWarnings2 } = createDeprecationLogger("zapier-sdk");
|
|
@@ -3185,7 +3188,7 @@ function createSseParserStream() {
|
|
|
3185
3188
|
}
|
|
3186
3189
|
|
|
3187
3190
|
// src/sdk-version.ts
|
|
3188
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
3191
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.1" : void 0) || "unknown";
|
|
3189
3192
|
|
|
3190
3193
|
// src/utils/open-url.ts
|
|
3191
3194
|
var nodePrefix = "node:";
|
|
@@ -11301,11 +11304,12 @@ var createWorkflowPlugin = definePlugin(
|
|
|
11301
11304
|
if (options.is_private !== void 0) {
|
|
11302
11305
|
body.is_private = options.is_private;
|
|
11303
11306
|
}
|
|
11304
|
-
const
|
|
11307
|
+
const raw = await sdk2.context.api.post(
|
|
11305
11308
|
"/durableworkflowzaps/api/v0/workflows",
|
|
11306
11309
|
body,
|
|
11307
11310
|
{ authRequired: true }
|
|
11308
11311
|
);
|
|
11312
|
+
const data = CreateWorkflowResponseSchema.parse(raw);
|
|
11309
11313
|
return { data };
|
|
11310
11314
|
}
|
|
11311
11315
|
})
|
|
@@ -11347,7 +11351,7 @@ var updateWorkflowPlugin = definePlugin(
|
|
|
11347
11351
|
if (options.description !== void 0) {
|
|
11348
11352
|
body.description = options.description;
|
|
11349
11353
|
}
|
|
11350
|
-
const
|
|
11354
|
+
const raw = await sdk2.context.api.patch(
|
|
11351
11355
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
|
|
11352
11356
|
body,
|
|
11353
11357
|
{
|
|
@@ -11355,6 +11359,7 @@ var updateWorkflowPlugin = definePlugin(
|
|
|
11355
11359
|
resource: { type: "workflow", id: options.workflow }
|
|
11356
11360
|
}
|
|
11357
11361
|
);
|
|
11362
|
+
const data = UpdateWorkflowResponseSchema.parse(raw);
|
|
11358
11363
|
return { data };
|
|
11359
11364
|
}
|
|
11360
11365
|
})
|
|
@@ -11378,7 +11383,7 @@ var enableWorkflowPlugin = definePlugin(
|
|
|
11378
11383
|
outputSchema: EnableWorkflowResponseSchema,
|
|
11379
11384
|
resolvers: { workflow: workflowIdResolver },
|
|
11380
11385
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11381
|
-
const
|
|
11386
|
+
const raw = await sdk2.context.api.post(
|
|
11382
11387
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
|
|
11383
11388
|
void 0,
|
|
11384
11389
|
{
|
|
@@ -11386,6 +11391,7 @@ var enableWorkflowPlugin = definePlugin(
|
|
|
11386
11391
|
resource: { type: "workflow", id: options.workflow }
|
|
11387
11392
|
}
|
|
11388
11393
|
);
|
|
11394
|
+
const data = EnableWorkflowResponseSchema.parse(raw);
|
|
11389
11395
|
return { data };
|
|
11390
11396
|
}
|
|
11391
11397
|
})
|
|
@@ -11411,7 +11417,7 @@ var disableWorkflowPlugin = definePlugin(
|
|
|
11411
11417
|
outputSchema: DisableWorkflowResponseSchema,
|
|
11412
11418
|
resolvers: { workflow: workflowIdResolver },
|
|
11413
11419
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11414
|
-
const
|
|
11420
|
+
const raw = await sdk2.context.api.post(
|
|
11415
11421
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
|
|
11416
11422
|
void 0,
|
|
11417
11423
|
{
|
|
@@ -11419,6 +11425,7 @@ var disableWorkflowPlugin = definePlugin(
|
|
|
11419
11425
|
resource: { type: "workflow", id: options.workflow }
|
|
11420
11426
|
}
|
|
11421
11427
|
);
|
|
11428
|
+
const data = DisableWorkflowResponseSchema.parse(raw);
|
|
11422
11429
|
return { data };
|
|
11423
11430
|
}
|
|
11424
11431
|
})
|
|
@@ -11428,6 +11435,9 @@ var DeleteWorkflowOptionsSchema = zod.z.object({
|
|
|
11428
11435
|
}).describe(
|
|
11429
11436
|
"Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
|
|
11430
11437
|
);
|
|
11438
|
+
var DeleteWorkflowResponseSchema = zod.z.object({
|
|
11439
|
+
id: zod.z.string().describe("Workflow ID that was targeted for deletion")
|
|
11440
|
+
});
|
|
11431
11441
|
|
|
11432
11442
|
// src/plugins/codeSubstrate/deleteWorkflow/index.ts
|
|
11433
11443
|
var deleteWorkflowPlugin = definePlugin(
|
|
@@ -11438,6 +11448,7 @@ var deleteWorkflowPlugin = definePlugin(
|
|
|
11438
11448
|
itemType: "Workflow",
|
|
11439
11449
|
confirm: "delete",
|
|
11440
11450
|
inputSchema: DeleteWorkflowOptionsSchema,
|
|
11451
|
+
outputSchema: DeleteWorkflowResponseSchema,
|
|
11441
11452
|
resolvers: { workflow: workflowIdResolver },
|
|
11442
11453
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11443
11454
|
await sdk2.context.api.delete(
|
|
@@ -11452,7 +11463,8 @@ var deleteWorkflowPlugin = definePlugin(
|
|
|
11452
11463
|
}
|
|
11453
11464
|
})
|
|
11454
11465
|
);
|
|
11455
|
-
var RunStatusSchema =
|
|
11466
|
+
var RunStatusSchema = openEnum(
|
|
11467
|
+
["initialized", "started", "finished", "failed", "cancelled"],
|
|
11456
11468
|
"Run lifecycle status. `finished` / `failed` / `cancelled` are terminal."
|
|
11457
11469
|
);
|
|
11458
11470
|
var RunErrorSchema = zod.z.object({
|
|
@@ -11485,7 +11497,7 @@ var ListDurableRunsOptionsSchema = zod.z.object({
|
|
|
11485
11497
|
}).describe(
|
|
11486
11498
|
"List run-once durable runs for the authenticated account, newest first"
|
|
11487
11499
|
);
|
|
11488
|
-
zod.z.object({
|
|
11500
|
+
var ListDurableRunsApiResponseSchema = zod.z.object({
|
|
11489
11501
|
results: zod.z.array(RunItemSchema),
|
|
11490
11502
|
meta: zod.z.object({
|
|
11491
11503
|
limit: zod.z.number(),
|
|
@@ -11515,10 +11527,11 @@ var listDurableRunsPlugin = definePlugin(
|
|
|
11515
11527
|
if (options.cursor) {
|
|
11516
11528
|
searchParams.cursor = options.cursor;
|
|
11517
11529
|
}
|
|
11518
|
-
const
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
);
|
|
11530
|
+
const raw = await sdk2.context.api.get("/sdkdurableapi/api/v0/runs", {
|
|
11531
|
+
searchParams,
|
|
11532
|
+
authRequired: true
|
|
11533
|
+
});
|
|
11534
|
+
const response = ListDurableRunsApiResponseSchema.parse(raw);
|
|
11522
11535
|
return {
|
|
11523
11536
|
data: response.results,
|
|
11524
11537
|
nextCursor: response.meta.next_cursor ?? void 0
|
|
@@ -11526,10 +11539,12 @@ var listDurableRunsPlugin = definePlugin(
|
|
|
11526
11539
|
}
|
|
11527
11540
|
})
|
|
11528
11541
|
);
|
|
11529
|
-
var OperationTypeSchema =
|
|
11542
|
+
var OperationTypeSchema = openEnum(
|
|
11543
|
+
["step", "wait", "callback"],
|
|
11530
11544
|
"Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback."
|
|
11531
11545
|
);
|
|
11532
|
-
var OperationStatusSchema =
|
|
11546
|
+
var OperationStatusSchema = openEnum(
|
|
11547
|
+
["pending", "completed", "failed", "exhausted"],
|
|
11533
11548
|
"Operation lifecycle status. `exhausted` means retries were exceeded."
|
|
11534
11549
|
);
|
|
11535
11550
|
var OperationSchema = zod.z.object({
|
|
@@ -11557,7 +11572,8 @@ var OperationSchema = zod.z.object({
|
|
|
11557
11572
|
completed_at: zod.z.string().optional().describe("When the operation reached a terminal state (ISO-8601)"),
|
|
11558
11573
|
created_at: zod.z.string().describe("When the operation was created (ISO-8601)")
|
|
11559
11574
|
});
|
|
11560
|
-
var ExecutionStatusSchema =
|
|
11575
|
+
var ExecutionStatusSchema = openEnum(
|
|
11576
|
+
["running", "waiting", "completed", "failed"],
|
|
11561
11577
|
"Execution lifecycle status. `waiting` means blocked on a wait or callback operation."
|
|
11562
11578
|
);
|
|
11563
11579
|
var ExecutionSummarySchema = zod.z.object({
|
|
@@ -11621,13 +11637,14 @@ var getDurableRunPlugin = definePlugin(
|
|
|
11621
11637
|
outputSchema: GetDurableRunResponseSchema,
|
|
11622
11638
|
resolvers: { run: durableRunIdResolver },
|
|
11623
11639
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11624
|
-
const
|
|
11640
|
+
const raw = await sdk2.context.api.get(
|
|
11625
11641
|
`/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`,
|
|
11626
11642
|
{
|
|
11627
11643
|
authRequired: true,
|
|
11628
11644
|
resource: { type: "run", id: options.run }
|
|
11629
11645
|
}
|
|
11630
11646
|
);
|
|
11647
|
+
const data = GetDurableRunResponseSchema.parse(raw);
|
|
11631
11648
|
return { data };
|
|
11632
11649
|
}
|
|
11633
11650
|
})
|
|
@@ -11706,11 +11723,12 @@ var runDurablePlugin = definePlugin(
|
|
|
11706
11723
|
if (options.private !== void 0) {
|
|
11707
11724
|
body.is_private = options.private;
|
|
11708
11725
|
}
|
|
11709
|
-
const
|
|
11726
|
+
const raw = await sdk2.context.api.post(
|
|
11710
11727
|
"/sdkdurableapi/api/v0/runs",
|
|
11711
11728
|
body,
|
|
11712
11729
|
{ authRequired: true }
|
|
11713
11730
|
);
|
|
11731
|
+
const data = RunDurableResponseSchema.parse(raw);
|
|
11714
11732
|
return { data };
|
|
11715
11733
|
}
|
|
11716
11734
|
})
|
|
@@ -11720,7 +11738,7 @@ var CancelDurableRunOptionsSchema = zod.z.object({
|
|
|
11720
11738
|
}).describe(
|
|
11721
11739
|
"Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal."
|
|
11722
11740
|
);
|
|
11723
|
-
zod.z.object({
|
|
11741
|
+
var CancelDurableRunResponseSchema = zod.z.object({
|
|
11724
11742
|
id: zod.z.string().describe("Run ID that was targeted"),
|
|
11725
11743
|
status: zod.z.literal("cancelled").describe(
|
|
11726
11744
|
"Always `cancelled` on a successful call. Synthesized client-side \u2014 the backend returns 204; callers needing the run's full state should follow up with getDurableRun."
|
|
@@ -11735,6 +11753,7 @@ var cancelDurableRunPlugin = definePlugin(
|
|
|
11735
11753
|
type: "update",
|
|
11736
11754
|
itemType: "DurableRun",
|
|
11737
11755
|
inputSchema: CancelDurableRunOptionsSchema,
|
|
11756
|
+
outputSchema: CancelDurableRunResponseSchema,
|
|
11738
11757
|
resolvers: { run: durableRunIdResolver },
|
|
11739
11758
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11740
11759
|
await sdk2.context.api.post(
|
package/dist/experimental.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseSdkOptions, P as PluginStack, a as PluginMeta, M as MethodHooks, C as CoreOptions, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, b as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, d as AddActionEntryOptions, e as AddActionEntryResult, f as ActionEntry, g as findManifestEntry, r as readManifestFromFile, h as CapabilitiesContext, i as PaginatedSdkResult, F as FieldsetItem, j as PositionalMetadata, O as OutputFormatter, k as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, l as DynamicResolver, W as WatchTriggerInboxOptions, m as ActionProxy, n as ZapierSdkApps, o as WithAddPlugin } from './index-
|
|
2
|
-
export { x as Action, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, a8 as DynamicListResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, az as PluginProvides, aI as PollOptions, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-
|
|
1
|
+
import { B as BaseSdkOptions, P as PluginStack, a as PluginMeta, M as MethodHooks, C as CoreOptions, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, b as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, d as AddActionEntryOptions, e as AddActionEntryResult, f as ActionEntry, g as findManifestEntry, r as readManifestFromFile, h as CapabilitiesContext, i as PaginatedSdkResult, F as FieldsetItem, j as PositionalMetadata, O as OutputFormatter, k as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, l as DynamicResolver, W as WatchTriggerInboxOptions, m as ActionProxy, n as ZapierSdkApps, o as WithAddPlugin } from './index-DjLMJ3w8.mjs';
|
|
2
|
+
export { x as Action, cc as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, aQ as ActionItem, bq as ActionKeyProperty, a_ as ActionKeyPropertySchema, br as ActionProperty, a$ as ActionPropertySchema, aE as ActionResolverItem, bC as ActionTimeoutMsProperty, ba as ActionTimeoutMsPropertySchema, aF as ActionTypeItem, bp as ActionTypeProperty, aZ as ActionTypePropertySchema, c8 as ApiError, dC as ApiEvent, cW as ApiPluginOptions, cY as ApiPluginProvides, y as App, cd as AppFactoryInput, aO as AppItem, bn as AppKeyProperty, aX as AppKeyPropertySchema, bo as AppProperty, aY as AppPropertySchema, eL as ApplicationLifecycleEventData, c4 as ApprovalStatus, cb as AppsPluginProvides, bH as AppsProperty, bf as AppsPropertySchema, a5 as ArrayResolver, dB as AuthEvent, bv as AuthenticationIdProperty, b2 as AuthenticationIdPropertySchema, eT as BaseEvent, as as BaseSdkOptionsSchema, ag as BatchOptions, cJ as CONTEXT_CACHE_MAX_SIZE, cI as CONTEXT_CACHE_TTL_MS, aw as CORE_ERROR_SYMBOL, H as Choice, dI as ClientCredentialsObject, dT as ClientCredentialsObjectSchema, V as Connection, d$ as ConnectionEntry, d_ as ConnectionEntrySchema, bt as ConnectionIdProperty, b1 as ConnectionIdPropertySchema, aP as ConnectionItem, bu as ConnectionProperty, b3 as ConnectionPropertySchema, e1 as ConnectionsMap, e0 as ConnectionsMapSchema, e3 as ConnectionsPluginProvides, bJ as ConnectionsProperty, bh as ConnectionsPropertySchema, X as ConnectionsResponse, ax as CoreErrorCode, cv as CreateClientCredentialsPluginProvides, et as CreateTableFieldsPluginProvides, en as CreateTablePluginProvides, eB as CreateTableRecordsPluginProvides, dF as Credentials, dY as CredentialsFunction, dX as CredentialsFunctionSchema, dH as CredentialsObject, dV as CredentialsObjectSchema, dZ as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MS, eg as DEFAULT_APPROVAL_TIMEOUT_MS, cS as DEFAULT_CONFIG_PATH, eh as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, bA as DebugProperty, b8 as DebugPropertySchema, cx as DeleteClientCredentialsPluginProvides, ev as DeleteTableFieldsPluginProvides, ep as DeleteTablePluginProvides, eD as DeleteTableRecordsPluginProvides, s as DrainTriggerInboxCallback, t as DrainTriggerInboxErrorObserver, a8 as DynamicListResolver, a9 as DynamicSearchResolver, eM as EnhancedErrorEventData, bP as ErrorOptions, dE as EventCallback, eK as EventContext, eH as EventEmissionConfig, eJ as EventEmissionProvides, cf as FetchPluginProvides, z as Field, bG as FieldsProperty, be as FieldsPropertySchema, aa as FieldsResolver, v as FindFirstAuthenticationPluginProvides, cF as FindFirstConnectionPluginProvides, w as FindUniqueAuthenticationPluginProvides, cH as FindUniqueConnectionPluginProvides, a3 as FormattedItem, ar as FunctionDeprecation, aq as FunctionRegistryEntry, cp as GetActionInputFieldsSchemaPluginProvides, cB as GetActionPluginProvides, cz as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cD as GetConnectionPluginProvides, cV as GetProfilePluginProvides, el as GetTablePluginProvides, ex as GetTableRecordPluginProvides, aS as InfoFieldItem, aR as InputFieldItem, bs as InputFieldProperty, b0 as InputFieldPropertySchema, bw as InputsProperty, b4 as InputsPropertySchema, aN as JsonSseMessage, bO as LeaseLimitProperty, bm as LeaseLimitPropertySchema, bM as LeaseProperty, bk as LeasePropertySchema, bN as LeaseSecondsProperty, bl as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bx as LimitProperty, b5 as LimitPropertySchema, cn as ListActionInputFieldChoicesPluginProvides, cl as ListActionInputFieldsPluginProvides, cj as ListActionsPluginProvides, ch as ListAppsPluginProvides, u as ListAuthenticationsPluginProvides, ct as ListClientCredentialsPluginProvides, cr as ListConnectionsPluginProvides, er as ListTableFieldsPluginProvides, ez as ListTableRecordsPluginProvides, ej as ListTablesPluginProvides, dD as LoadingEvent, eb as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cT as ManifestEntry, cO as ManifestPluginOptions, cR as ManifestPluginProvides, eU as MethodCalledEvent, eN as MethodCalledEventData, N as Need, Q as NeedsRequest, S as NeedsResponse, by as OffsetProperty, b6 as OffsetPropertySchema, bz as OutputProperty, b7 as OutputPropertySchema, aW as PaginatedSdkFunction, bB as ParamsProperty, b9 as ParamsPropertySchema, dJ as PkceCredentialsObject, dU as PkceCredentialsObjectSchema, ay as Plugin, az as PluginProvides, aI as PollOptions, c2 as RateLimitInfo, bE as RecordProperty, bc as RecordPropertySchema, bF as RecordsProperty, bd as RecordsPropertySchema, al as RelayFetchSchema, ak as RelayRequestSchema, aH as RequestOptions, cN as RequestPluginProvides, dn as ResolveAuthTokenOptions, dO as ResolveCredentialsOptions, dG as ResolvedCredentials, dW as ResolvedCredentialsSchema, a4 as Resolver, a6 as ResolverMetadata, aT as RootFieldItem, cL as RunActionPluginProvides, dA as SdkEvent, aV as SdkPage, aM as SseMessage, a7 as StaticResolver, bD as TableProperty, bb as TablePropertySchema, bI as TablesProperty, bg as TablesPropertySchema, bL as TriggerInboxNameProperty, bj as TriggerInboxNamePropertySchema, bK as TriggerInboxProperty, bi as TriggerInboxPropertySchema, T as TriggerMessageStatus, eF as UpdateTableRecordsPluginProvides, Y as UserProfile, aU as UserProfileItem, e4 as ZAPIER_BASE_URL, ed as ZAPIER_MAX_CONCURRENT_REQUESTS, e9 as ZAPIER_MAX_NETWORK_RETRIES, ea as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, p as ZapierAbortDrainSignal, c0 as ZapierActionError, bV as ZapierApiError, bW as ZapierAppNotFoundError, c5 as ZapierApprovalError, bT as ZapierAuthenticationError, b_ as ZapierBundleError, dw as ZapierCache, dx as ZapierCacheEntry, dy as ZapierCacheSetOptions, bZ as ZapierConfigurationError, c1 as ZapierConflictError, bQ as ZapierError, bX as ZapierNotFoundError, c3 as ZapierRateLimitError, c6 as ZapierRelayError, q as ZapierReleaseTriggerMessageSignal, bY as ZapierResourceNotFoundError, c9 as ZapierSignal, b$ as ZapierTimeoutError, bS as ZapierUnknownError, bR as ZapierValidationError, c$ as actionKeyResolver, c_ as actionTypeResolver, a2 as addPlugin, cX as apiPlugin, cZ as appKeyResolver, ca as appsPlugin, d1 as authenticationIdGenericResolver, d0 as authenticationIdResolver, af as batch, eO as buildApplicationLifecycleEvent, ah as buildCapabilityMessage, eQ as buildErrorEvent, eP as buildErrorEventWithContext, eS as buildMethodCalledEvent, eG as cleanupEventListeners, dp as clearTokenCache, d5 as clientCredentialsNameResolver, d6 as clientIdResolver, aD as composePlugins, d1 as connectionIdGenericResolver, d0 as connectionIdResolver, e2 as connectionsPlugin, eR as createBaseEvent, cu as createClientCredentialsPlugin, a1 as createCorePlugin, $ as createFunction, dz as createMemoryCache, ao as createOptionsPlugin, aC as createPaginatedPluginMethod, aB as createPluginMethod, a0 as createPluginStack, an as createSdk, es as createTableFieldsPlugin, em as createTablePlugin, eA as createTableRecordsPlugin, aJ as createZapierApi, ap as createZapierCoreStack, am as createZapierSdkWithoutRegistry, aA as definePlugin, cw as deleteClientCredentialsPlugin, eu as deleteTableFieldsPlugin, eo as deleteTablePlugin, eC as deleteTableRecordsPlugin, da as durableRunIdResolver, eI as eventEmissionPlugin, ce as fetchPlugin, cE as findFirstConnectionPlugin, cG as findUniqueConnectionPlugin, c7 as formatErrorMessage, eV as generateEventId, co as getActionInputFieldsSchemaPlugin, cA as getActionPlugin, cy as getAppPlugin, dR as getBaseUrlFromCredentials, e$ as getCiPlatform, dS as getClientIdFromCredentials, cC as getConnectionPlugin, av as getCoreErrorCause, au as getCoreErrorCode, f1 as getCpuTime, eW as getCurrentTimestamp, f0 as getMemoryUsage, aK as getOrCreateApiClient, eY as getOsInfo, eZ as getPlatformVersions, cP as getPreferredManifestEntryKey, cU as getProfilePlugin, eX as getReleaseId, ek as getTablePlugin, ew as getTableRecordPlugin, dt as getTokenFromCliLogin, ee as getZapierApprovalMode, ef as getZapierDefaultApprovalMode, e5 as getZapierSdkService, dr as injectCliLogin, d4 as inputFieldKeyResolver, d3 as inputsAllOptionalResolver, d2 as inputsResolver, dq as invalidateCachedToken, dv as invalidateCredentialsToken, e_ as isCi, ds as isCliLoginAvailable, dK as isClientCredentials, at as isCoreError, dN as isCredentialsFunction, dM as isCredentialsObject, aL as isPermanentHttpError, dL as isPkceCredentials, _ as isPositional, cm as listActionInputFieldChoicesPlugin, ck as listActionInputFieldsPlugin, ci as listActionsPlugin, cg as listAppsPlugin, cs as listClientCredentialsPlugin, cq as listConnectionsPlugin, eq as listTableFieldsPlugin, ey as listTableRecordsPlugin, ei as listTablesPlugin, ai as logDeprecation, cQ as manifestPlugin, ec as parseConcurrencyEnvVar, aG as registryPlugin, cM as requestPlugin, aj as resetDeprecationWarnings, du as resolveAuthToken, dQ as resolveCredentials, dP as resolveCredentialsFromEnv, cK as runActionPlugin, ab as runInMethodScope, ac as runWithTelemetryContext, dg as tableFieldIdsResolver, di as tableFieldsResolver, dl as tableFiltersResolver, d7 as tableIdResolver, dh as tableNameResolver, de as tableRecordIdResolver, df as tableRecordIdsResolver, dj as tableRecordsResolver, dm as tableSortResolver, dk as tableUpdateRecordsResolver, ad as toSnakeCase, ae as toTitleCase, d8 as triggerInboxResolver, dd as triggerMessagesResolver, eE as updateTableRecordsPlugin, d9 as workflowIdResolver, dc as workflowRunIdResolver, db as workflowVersionIdResolver, bU as zapierAdaptError } from './index-DjLMJ3w8.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';
|
|
@@ -2676,7 +2676,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2676
2676
|
maxItems?: number;
|
|
2677
2677
|
}) | undefined) => PaginatedSdkResult<{
|
|
2678
2678
|
id: string;
|
|
2679
|
-
status:
|
|
2679
|
+
status: string;
|
|
2680
2680
|
input: unknown;
|
|
2681
2681
|
output: unknown;
|
|
2682
2682
|
error: {
|
|
@@ -2701,7 +2701,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2701
2701
|
} | undefined) => Promise<{
|
|
2702
2702
|
data: {
|
|
2703
2703
|
id: string;
|
|
2704
|
-
status:
|
|
2704
|
+
status: string;
|
|
2705
2705
|
input: unknown;
|
|
2706
2706
|
output: unknown;
|
|
2707
2707
|
error: {
|
|
@@ -2712,7 +2712,7 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2712
2712
|
execution: {
|
|
2713
2713
|
id: string;
|
|
2714
2714
|
name: string;
|
|
2715
|
-
status:
|
|
2715
|
+
status: string;
|
|
2716
2716
|
input: unknown;
|
|
2717
2717
|
created_at: string;
|
|
2718
2718
|
output?: unknown;
|
|
@@ -2732,8 +2732,8 @@ declare function createZapierSdkStack(options?: ZapierSdkOptions): PluginStack<o
|
|
|
2732
2732
|
id: string;
|
|
2733
2733
|
execution_id: string;
|
|
2734
2734
|
name: string;
|
|
2735
|
-
type:
|
|
2736
|
-
status:
|
|
2735
|
+
type: string;
|
|
2736
|
+
status: string;
|
|
2737
2737
|
retry_count: number;
|
|
2738
2738
|
created_at: string;
|
|
2739
2739
|
result?: unknown;
|
|
@@ -5681,7 +5681,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5681
5681
|
maxItems?: number;
|
|
5682
5682
|
}) | undefined) => PaginatedSdkResult<{
|
|
5683
5683
|
id: string;
|
|
5684
|
-
status:
|
|
5684
|
+
status: string;
|
|
5685
5685
|
input: unknown;
|
|
5686
5686
|
output: unknown;
|
|
5687
5687
|
error: {
|
|
@@ -5706,7 +5706,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5706
5706
|
} | undefined) => Promise<{
|
|
5707
5707
|
data: {
|
|
5708
5708
|
id: string;
|
|
5709
|
-
status:
|
|
5709
|
+
status: string;
|
|
5710
5710
|
input: unknown;
|
|
5711
5711
|
output: unknown;
|
|
5712
5712
|
error: {
|
|
@@ -5717,7 +5717,7 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5717
5717
|
execution: {
|
|
5718
5718
|
id: string;
|
|
5719
5719
|
name: string;
|
|
5720
|
-
status:
|
|
5720
|
+
status: string;
|
|
5721
5721
|
input: unknown;
|
|
5722
5722
|
created_at: string;
|
|
5723
5723
|
output?: unknown;
|
|
@@ -5737,8 +5737,8 @@ declare function createZapierSdk(options?: ZapierSdkOptions): WithAddPlugin<obje
|
|
|
5737
5737
|
id: string;
|
|
5738
5738
|
execution_id: string;
|
|
5739
5739
|
name: string;
|
|
5740
|
-
type:
|
|
5741
|
-
status:
|
|
5740
|
+
type: string;
|
|
5741
|
+
status: string;
|
|
5742
5742
|
retry_count: number;
|
|
5743
5743
|
created_at: string;
|
|
5744
5744
|
result?: unknown;
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2691,7 +2691,7 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2691
2691
|
maxItems?: number;
|
|
2692
2692
|
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
2693
2693
|
id: string;
|
|
2694
|
-
status:
|
|
2694
|
+
status: string;
|
|
2695
2695
|
input: unknown;
|
|
2696
2696
|
output: unknown;
|
|
2697
2697
|
error: {
|
|
@@ -2716,7 +2716,7 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2716
2716
|
} | undefined) => Promise<{
|
|
2717
2717
|
data: {
|
|
2718
2718
|
id: string;
|
|
2719
|
-
status:
|
|
2719
|
+
status: string;
|
|
2720
2720
|
input: unknown;
|
|
2721
2721
|
output: unknown;
|
|
2722
2722
|
error: {
|
|
@@ -2727,7 +2727,7 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2727
2727
|
execution: {
|
|
2728
2728
|
id: string;
|
|
2729
2729
|
name: string;
|
|
2730
|
-
status:
|
|
2730
|
+
status: string;
|
|
2731
2731
|
input: unknown;
|
|
2732
2732
|
created_at: string;
|
|
2733
2733
|
output?: unknown;
|
|
@@ -2747,8 +2747,8 @@ export declare function createZapierSdkStack(options?: ZapierSdkOptions): import
|
|
|
2747
2747
|
id: string;
|
|
2748
2748
|
execution_id: string;
|
|
2749
2749
|
name: string;
|
|
2750
|
-
type:
|
|
2751
|
-
status:
|
|
2750
|
+
type: string;
|
|
2751
|
+
status: string;
|
|
2752
2752
|
retry_count: number;
|
|
2753
2753
|
created_at: string;
|
|
2754
2754
|
result?: unknown;
|
|
@@ -5696,7 +5696,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5696
5696
|
maxItems?: number;
|
|
5697
5697
|
}) | undefined) => import("kitcore").PaginatedSdkResult<{
|
|
5698
5698
|
id: string;
|
|
5699
|
-
status:
|
|
5699
|
+
status: string;
|
|
5700
5700
|
input: unknown;
|
|
5701
5701
|
output: unknown;
|
|
5702
5702
|
error: {
|
|
@@ -5721,7 +5721,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5721
5721
|
} | undefined) => Promise<{
|
|
5722
5722
|
data: {
|
|
5723
5723
|
id: string;
|
|
5724
|
-
status:
|
|
5724
|
+
status: string;
|
|
5725
5725
|
input: unknown;
|
|
5726
5726
|
output: unknown;
|
|
5727
5727
|
error: {
|
|
@@ -5732,7 +5732,7 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5732
5732
|
execution: {
|
|
5733
5733
|
id: string;
|
|
5734
5734
|
name: string;
|
|
5735
|
-
status:
|
|
5735
|
+
status: string;
|
|
5736
5736
|
input: unknown;
|
|
5737
5737
|
created_at: string;
|
|
5738
5738
|
output?: unknown;
|
|
@@ -5752,8 +5752,8 @@ export declare function createZapierSdk(options?: ZapierSdkOptions): import("kit
|
|
|
5752
5752
|
id: string;
|
|
5753
5753
|
execution_id: string;
|
|
5754
5754
|
name: string;
|
|
5755
|
-
type:
|
|
5756
|
-
status:
|
|
5755
|
+
type: string;
|
|
5756
|
+
status: string;
|
|
5757
5757
|
retry_count: number;
|
|
5758
5758
|
created_at: string;
|
|
5759
5759
|
result?: unknown;
|
package/dist/experimental.mjs
CHANGED
|
@@ -1014,6 +1014,9 @@ function isPositional(schema) {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
return false;
|
|
1016
1016
|
}
|
|
1017
|
+
function openEnum(values, description) {
|
|
1018
|
+
return z.union([z.enum(values), z.string()]).describe(description);
|
|
1019
|
+
}
|
|
1017
1020
|
|
|
1018
1021
|
// src/utils/logging.ts
|
|
1019
1022
|
var { logDeprecation: logDeprecation2, resetDeprecationWarnings: resetDeprecationWarnings2 } = createDeprecationLogger("zapier-sdk");
|
|
@@ -3183,7 +3186,7 @@ function createSseParserStream() {
|
|
|
3183
3186
|
}
|
|
3184
3187
|
|
|
3185
3188
|
// src/sdk-version.ts
|
|
3186
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.
|
|
3189
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.70.1" : void 0) || "unknown";
|
|
3187
3190
|
|
|
3188
3191
|
// src/utils/open-url.ts
|
|
3189
3192
|
var nodePrefix = "node:";
|
|
@@ -11299,11 +11302,12 @@ var createWorkflowPlugin = definePlugin(
|
|
|
11299
11302
|
if (options.is_private !== void 0) {
|
|
11300
11303
|
body.is_private = options.is_private;
|
|
11301
11304
|
}
|
|
11302
|
-
const
|
|
11305
|
+
const raw = await sdk2.context.api.post(
|
|
11303
11306
|
"/durableworkflowzaps/api/v0/workflows",
|
|
11304
11307
|
body,
|
|
11305
11308
|
{ authRequired: true }
|
|
11306
11309
|
);
|
|
11310
|
+
const data = CreateWorkflowResponseSchema.parse(raw);
|
|
11307
11311
|
return { data };
|
|
11308
11312
|
}
|
|
11309
11313
|
})
|
|
@@ -11345,7 +11349,7 @@ var updateWorkflowPlugin = definePlugin(
|
|
|
11345
11349
|
if (options.description !== void 0) {
|
|
11346
11350
|
body.description = options.description;
|
|
11347
11351
|
}
|
|
11348
|
-
const
|
|
11352
|
+
const raw = await sdk2.context.api.patch(
|
|
11349
11353
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}`,
|
|
11350
11354
|
body,
|
|
11351
11355
|
{
|
|
@@ -11353,6 +11357,7 @@ var updateWorkflowPlugin = definePlugin(
|
|
|
11353
11357
|
resource: { type: "workflow", id: options.workflow }
|
|
11354
11358
|
}
|
|
11355
11359
|
);
|
|
11360
|
+
const data = UpdateWorkflowResponseSchema.parse(raw);
|
|
11356
11361
|
return { data };
|
|
11357
11362
|
}
|
|
11358
11363
|
})
|
|
@@ -11376,7 +11381,7 @@ var enableWorkflowPlugin = definePlugin(
|
|
|
11376
11381
|
outputSchema: EnableWorkflowResponseSchema,
|
|
11377
11382
|
resolvers: { workflow: workflowIdResolver },
|
|
11378
11383
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11379
|
-
const
|
|
11384
|
+
const raw = await sdk2.context.api.post(
|
|
11380
11385
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/enable`,
|
|
11381
11386
|
void 0,
|
|
11382
11387
|
{
|
|
@@ -11384,6 +11389,7 @@ var enableWorkflowPlugin = definePlugin(
|
|
|
11384
11389
|
resource: { type: "workflow", id: options.workflow }
|
|
11385
11390
|
}
|
|
11386
11391
|
);
|
|
11392
|
+
const data = EnableWorkflowResponseSchema.parse(raw);
|
|
11387
11393
|
return { data };
|
|
11388
11394
|
}
|
|
11389
11395
|
})
|
|
@@ -11409,7 +11415,7 @@ var disableWorkflowPlugin = definePlugin(
|
|
|
11409
11415
|
outputSchema: DisableWorkflowResponseSchema,
|
|
11410
11416
|
resolvers: { workflow: workflowIdResolver },
|
|
11411
11417
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11412
|
-
const
|
|
11418
|
+
const raw = await sdk2.context.api.post(
|
|
11413
11419
|
`/durableworkflowzaps/api/v0/workflows/${encodeURIComponent(options.workflow)}/disable`,
|
|
11414
11420
|
void 0,
|
|
11415
11421
|
{
|
|
@@ -11417,6 +11423,7 @@ var disableWorkflowPlugin = definePlugin(
|
|
|
11417
11423
|
resource: { type: "workflow", id: options.workflow }
|
|
11418
11424
|
}
|
|
11419
11425
|
);
|
|
11426
|
+
const data = DisableWorkflowResponseSchema.parse(raw);
|
|
11420
11427
|
return { data };
|
|
11421
11428
|
}
|
|
11422
11429
|
})
|
|
@@ -11426,6 +11433,9 @@ var DeleteWorkflowOptionsSchema = z.object({
|
|
|
11426
11433
|
}).describe(
|
|
11427
11434
|
"Delete a durable workflow. Throws `ZapierNotFoundError` if the workflow doesn't exist; callers wanting idempotency should catch that themselves."
|
|
11428
11435
|
);
|
|
11436
|
+
var DeleteWorkflowResponseSchema = z.object({
|
|
11437
|
+
id: z.string().describe("Workflow ID that was targeted for deletion")
|
|
11438
|
+
});
|
|
11429
11439
|
|
|
11430
11440
|
// src/plugins/codeSubstrate/deleteWorkflow/index.ts
|
|
11431
11441
|
var deleteWorkflowPlugin = definePlugin(
|
|
@@ -11436,6 +11446,7 @@ var deleteWorkflowPlugin = definePlugin(
|
|
|
11436
11446
|
itemType: "Workflow",
|
|
11437
11447
|
confirm: "delete",
|
|
11438
11448
|
inputSchema: DeleteWorkflowOptionsSchema,
|
|
11449
|
+
outputSchema: DeleteWorkflowResponseSchema,
|
|
11439
11450
|
resolvers: { workflow: workflowIdResolver },
|
|
11440
11451
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11441
11452
|
await sdk2.context.api.delete(
|
|
@@ -11450,7 +11461,8 @@ var deleteWorkflowPlugin = definePlugin(
|
|
|
11450
11461
|
}
|
|
11451
11462
|
})
|
|
11452
11463
|
);
|
|
11453
|
-
var RunStatusSchema =
|
|
11464
|
+
var RunStatusSchema = openEnum(
|
|
11465
|
+
["initialized", "started", "finished", "failed", "cancelled"],
|
|
11454
11466
|
"Run lifecycle status. `finished` / `failed` / `cancelled` are terminal."
|
|
11455
11467
|
);
|
|
11456
11468
|
var RunErrorSchema = z.object({
|
|
@@ -11483,7 +11495,7 @@ var ListDurableRunsOptionsSchema = z.object({
|
|
|
11483
11495
|
}).describe(
|
|
11484
11496
|
"List run-once durable runs for the authenticated account, newest first"
|
|
11485
11497
|
);
|
|
11486
|
-
z.object({
|
|
11498
|
+
var ListDurableRunsApiResponseSchema = z.object({
|
|
11487
11499
|
results: z.array(RunItemSchema),
|
|
11488
11500
|
meta: z.object({
|
|
11489
11501
|
limit: z.number(),
|
|
@@ -11513,10 +11525,11 @@ var listDurableRunsPlugin = definePlugin(
|
|
|
11513
11525
|
if (options.cursor) {
|
|
11514
11526
|
searchParams.cursor = options.cursor;
|
|
11515
11527
|
}
|
|
11516
|
-
const
|
|
11517
|
-
|
|
11518
|
-
|
|
11519
|
-
);
|
|
11528
|
+
const raw = await sdk2.context.api.get("/sdkdurableapi/api/v0/runs", {
|
|
11529
|
+
searchParams,
|
|
11530
|
+
authRequired: true
|
|
11531
|
+
});
|
|
11532
|
+
const response = ListDurableRunsApiResponseSchema.parse(raw);
|
|
11520
11533
|
return {
|
|
11521
11534
|
data: response.results,
|
|
11522
11535
|
nextCursor: response.meta.next_cursor ?? void 0
|
|
@@ -11524,10 +11537,12 @@ var listDurableRunsPlugin = definePlugin(
|
|
|
11524
11537
|
}
|
|
11525
11538
|
})
|
|
11526
11539
|
);
|
|
11527
|
-
var OperationTypeSchema =
|
|
11540
|
+
var OperationTypeSchema = openEnum(
|
|
11541
|
+
["step", "wait", "callback"],
|
|
11528
11542
|
"Operation kind: `step` is a journaled function call; `wait` is a time-based suspension; `callback` is a wait on an external callback."
|
|
11529
11543
|
);
|
|
11530
|
-
var OperationStatusSchema =
|
|
11544
|
+
var OperationStatusSchema = openEnum(
|
|
11545
|
+
["pending", "completed", "failed", "exhausted"],
|
|
11531
11546
|
"Operation lifecycle status. `exhausted` means retries were exceeded."
|
|
11532
11547
|
);
|
|
11533
11548
|
var OperationSchema = z.object({
|
|
@@ -11555,7 +11570,8 @@ var OperationSchema = z.object({
|
|
|
11555
11570
|
completed_at: z.string().optional().describe("When the operation reached a terminal state (ISO-8601)"),
|
|
11556
11571
|
created_at: z.string().describe("When the operation was created (ISO-8601)")
|
|
11557
11572
|
});
|
|
11558
|
-
var ExecutionStatusSchema =
|
|
11573
|
+
var ExecutionStatusSchema = openEnum(
|
|
11574
|
+
["running", "waiting", "completed", "failed"],
|
|
11559
11575
|
"Execution lifecycle status. `waiting` means blocked on a wait or callback operation."
|
|
11560
11576
|
);
|
|
11561
11577
|
var ExecutionSummarySchema = z.object({
|
|
@@ -11619,13 +11635,14 @@ var getDurableRunPlugin = definePlugin(
|
|
|
11619
11635
|
outputSchema: GetDurableRunResponseSchema,
|
|
11620
11636
|
resolvers: { run: durableRunIdResolver },
|
|
11621
11637
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11622
|
-
const
|
|
11638
|
+
const raw = await sdk2.context.api.get(
|
|
11623
11639
|
`/sdkdurableapi/api/v0/runs/${encodeURIComponent(options.run)}`,
|
|
11624
11640
|
{
|
|
11625
11641
|
authRequired: true,
|
|
11626
11642
|
resource: { type: "run", id: options.run }
|
|
11627
11643
|
}
|
|
11628
11644
|
);
|
|
11645
|
+
const data = GetDurableRunResponseSchema.parse(raw);
|
|
11629
11646
|
return { data };
|
|
11630
11647
|
}
|
|
11631
11648
|
})
|
|
@@ -11704,11 +11721,12 @@ var runDurablePlugin = definePlugin(
|
|
|
11704
11721
|
if (options.private !== void 0) {
|
|
11705
11722
|
body.is_private = options.private;
|
|
11706
11723
|
}
|
|
11707
|
-
const
|
|
11724
|
+
const raw = await sdk2.context.api.post(
|
|
11708
11725
|
"/sdkdurableapi/api/v0/runs",
|
|
11709
11726
|
body,
|
|
11710
11727
|
{ authRequired: true }
|
|
11711
11728
|
);
|
|
11729
|
+
const data = RunDurableResponseSchema.parse(raw);
|
|
11712
11730
|
return { data };
|
|
11713
11731
|
}
|
|
11714
11732
|
})
|
|
@@ -11718,7 +11736,7 @@ var CancelDurableRunOptionsSchema = z.object({
|
|
|
11718
11736
|
}).describe(
|
|
11719
11737
|
"Cancel a run-once durable run in initialized or started status. Returns 409 if the run is already terminal."
|
|
11720
11738
|
);
|
|
11721
|
-
z.object({
|
|
11739
|
+
var CancelDurableRunResponseSchema = z.object({
|
|
11722
11740
|
id: z.string().describe("Run ID that was targeted"),
|
|
11723
11741
|
status: z.literal("cancelled").describe(
|
|
11724
11742
|
"Always `cancelled` on a successful call. Synthesized client-side \u2014 the backend returns 204; callers needing the run's full state should follow up with getDurableRun."
|
|
@@ -11733,6 +11751,7 @@ var cancelDurableRunPlugin = definePlugin(
|
|
|
11733
11751
|
type: "update",
|
|
11734
11752
|
itemType: "DurableRun",
|
|
11735
11753
|
inputSchema: CancelDurableRunOptionsSchema,
|
|
11754
|
+
outputSchema: CancelDurableRunResponseSchema,
|
|
11736
11755
|
resolvers: { run: durableRunIdResolver },
|
|
11737
11756
|
handler: async ({ sdk: sdk2, options }) => {
|
|
11738
11757
|
await sdk2.context.api.post(
|