@zapier/zapier-sdk 0.114.5 → 0.115.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.
@@ -1,6 +1,6 @@
1
- import { zapierBetaSdkPlugin } from './chunk-M33SNIHR.mjs';
2
- import { DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, SDK_VERSION, extractErrorDetail, ZapierApiError, durableRunIdResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowRunIdResolver, ZapierValidationError, ZapierConfigurationError, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-GWDDPYFO.mjs';
3
- export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, STABILITY_DEFINITIONS, STABILITY_LEVELS, STABILITY_TITLES, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, applyStabilityLabel, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createMemoryCache, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, descriptionFor, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistry, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-GWDDPYFO.mjs';
1
+ import { zapierBetaSdkPlugin } from './chunk-NOHDNPVD.mjs';
2
+ import { DEFAULT_PAGE_SIZE, apiPluginRef, workflowIdResolver, extractErrorDetail, ZapierApiError, durableRunIdResolver, ZapierConflictError, workflowVersionIdResolver, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowRunIdResolver, SDK_VERSION, ZapierValidationError, ZapierConfigurationError, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-RWJJBIN6.mjs';
3
+ export { ACTION_RUNS_PATH, API_ID, ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMillisecondsPropertySchema, ActionTimeoutSecondsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthMechanism, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONNECTIONS_ID, CONTEXT, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MILLISECONDS, CORE_ERROR_SYMBOL, CORE_OPTIONS_ID, CORE_SIGNAL_SYMBOL, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CoreCancelledSignal, CoreDisposeError, CoreErrorCode, CoreSignal, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MILLISECONDS, DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DEPRECATION_NOTICE_EVENT, DebugPropertySchema, DrainTriggerInboxSchema, EVENT_EMISSION_ID, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MANIFEST_ID, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RESOLVE_CREDENTIALS_ID, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, SDK_OPTIONS_ID, STABILITY_DEFINITIONS, STABILITY_LEVELS, STABILITY_TITLES, TablePropertySchema, TablesPropertySchema, TriggerInboxKeyPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, WatchTriggerInboxSchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, addPlugin, apiPlugin, apiPluginRef, appKeyResolver, applyStabilityLabel, appsPlugin, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, cleanupEventListeners, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, connectionsPluginRef, createActionRunPlugin, createBaseEvent, createClientCredentialsPlugin, createController, createMemoryCache, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdkWithoutRegistry, declareMethod, declareOptionalProperty, declarePlugin, declareProperty, defineFormatter, defineMethod, defineMethodOverride, defineOverride, definePlugin, defineProperty, defineResolver, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, descriptionFor, disposeSdk, durableRunIdResolver, eventEmissionHookPlugin, eventEmissionPlugin, eventEmissionPluginRef, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, formatExtensionPluginFailure, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getActionRunPlugin, getAgent, getAppPlugin, getBaseUrlFromCredentials, getCallerContext, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getContext, getCoreErrorCause, getCoreErrorCode, getCpuTime, getCurrentTimestamp, getMemoryUsage, getNegatable, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getRegistry, getRegistryPlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getTtyContext, getZapierApprovalMode, getZapierCausationId, getZapierCorrelationId, getZapierDefaultApprovalMode, getZapierOpenAutoModeApprovalsInBrowser, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCoreCancelledSignal, isCoreError, isCoreSignal, isCredentialsFunction, isCredentialsObject, isPermanentHttpError, isPkceCredentials, isPositional, isZapierAbortDrainSignal, isZapierActionError, isZapierAppNotFoundError, isZapierApprovalError, isZapierAuthenticationError, isZapierBundleError, isZapierConflictError, isZapierError, isZapierNotFoundError, isZapierRateLimitError, isZapierReleaseTriggerMessageSignal, isZapierResourceNotFoundError, isZapierSignal, isZapierTimeoutError, isZapierValidationError, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, manifestPluginRef, omitExports, operationAnnotatorPlugin, parseConcurrencyEnvVar, readManifestFromFile, requestPlugin, resetDeprecationWarnings, resolveAuth, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, resolveCredentialsPlugin, resolveCredentialsPluginRef, resolvePlugin, runActionPlugin, runInMethodScope, runWithCallerContext, runWithTelemetryContext, sdkOptionsPluginRef, selectExports, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin, workflowDraftIdResolver, workflowDraftRevisionResolver, workflowIdResolver, workflowRunIdResolver, workflowVersionIdResolver, zapierAdaptError, zapierCoreOptions, zapierSdkPlugin } from './chunk-RWJJBIN6.mjs';
4
4
  import './chunk-Y6FXYEAI.mjs';
5
5
  import { defineMethod, openEnum, defineResolver, defineFormatter, definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
6
6
  import { z } from 'zod';
@@ -12,6 +12,17 @@ var codeSubstrateDefaults = {
12
12
  var CODE_SUBSTRATE_ANALYZER_API = "/code-substrate-analyzer";
13
13
  var CODE_SUBSTRATE_RUNNER_API = "/code-substrate-runner/api/v0";
14
14
  var CODE_SUBSTRATE_WORKFLOWS_API = "/code-substrate-workflows/api/v0";
15
+ function toWorkflowCreationClient({
16
+ creationHarness,
17
+ creationAccessMethod
18
+ }) {
19
+ if (creationAccessMethod === void 0) return void 0;
20
+ return {
21
+ ...creationHarness === void 0 ? {} : { harness: creationHarness },
22
+ access_method: creationAccessMethod,
23
+ sdk_version: SDK_VERSION
24
+ };
25
+ }
15
26
  var JsonPayloadSchema = z.preprocess((val) => {
16
27
  if (typeof val === "string") {
17
28
  const trimmed = val.trim();
@@ -143,6 +154,28 @@ var WorkflowCreationClientSchema = z.object({
143
154
  ),
144
155
  sdk_version: z.string().max(WORKFLOW_CREATION_CLIENT_SDK_VERSION_MAX_LENGTH).nullable().optional().describe("SDK version used to create this workflow")
145
156
  }).describe("Client identity recorded when this workflow was created");
157
+ var INTERNAL_CREATE_WORKFLOW_FIELDS = [
158
+ "creationHarness",
159
+ "creationAccessMethod"
160
+ ];
161
+ var WorkflowCreationClientInputSchema = z.object({
162
+ creationHarness: WorkflowCreationClientSchema.shape.harness.describe(
163
+ "Optional client harness that created this workflow; null means the client did not report a harness"
164
+ ).meta({ internal: true }),
165
+ creationAccessMethod: WorkflowCreationAccessMethodSchema.optional().describe(
166
+ WorkflowCreationAccessMethodSchema.description ?? "Client access method that created this workflow"
167
+ ).meta({ internal: true })
168
+ });
169
+ function hasAccessMethodForHarness({
170
+ creationHarness,
171
+ creationAccessMethod
172
+ }) {
173
+ return creationHarness === void 0 || creationAccessMethod !== void 0;
174
+ }
175
+ var HARNESS_WITHOUT_ACCESS_METHOD_ISSUE = {
176
+ message: "creationAccessMethod is required when creationHarness is provided",
177
+ path: ["creationAccessMethod"]
178
+ };
146
179
  var WorkflowVersionTriggerConfigSchema = z.object({
147
180
  selected_api: z.string().describe("Zapier app/API identifier (e.g. 'GoogleSheetsAPI')"),
148
181
  action: z.string().describe("Trigger action key (e.g. 'new_row')"),
@@ -385,33 +418,18 @@ var getWorkflowPlugin = defineMethod({
385
418
  return { data: GetWorkflowResponseSchema.parse(raw) };
386
419
  }
387
420
  });
388
- var INTERNAL_CREATE_WORKFLOW_FIELDS = [
389
- "creationHarness",
390
- "creationAccessMethod"
391
- ];
392
421
  var CreateWorkflowOptionsSchema = z.object({
393
422
  name: z.string().min(1).describe("Workflow name"),
394
423
  description: z.string().optional().describe("Optional description for the workflow"),
395
424
  private: z.boolean().optional().describe(
396
425
  "If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."
397
426
  ),
398
- creationHarness: WorkflowCreationClientSchema.shape.harness.describe(
399
- "Optional client harness that created this workflow; null means the client did not report a harness"
400
- ).meta({ internal: true }),
401
- creationAccessMethod: WorkflowCreationAccessMethodSchema.optional().describe(
402
- WorkflowCreationAccessMethodSchema.description ?? "Client access method that created this workflow"
403
- ).meta({ internal: true }),
427
+ ...WorkflowCreationClientInputSchema.shape,
404
428
  /** @deprecated Use `private` instead. */
405
429
  is_private: z.boolean().optional().describe(
406
430
  "If true, only the creating user can see or manage this workflow. Defaults to false (account-visible)."
407
431
  ).meta({ deprecated: true })
408
- }).refine(
409
- ({ creationHarness, creationAccessMethod }) => creationHarness === void 0 || creationAccessMethod !== void 0,
410
- {
411
- message: "creationAccessMethod is required when creationHarness is provided",
412
- path: ["creationAccessMethod"]
413
- }
414
- ).describe(
432
+ }).refine(hasAccessMethodForHarness, HARNESS_WITHOUT_ACCESS_METHOD_ISSUE).describe(
415
433
  "Create a durable workflow container. Starts disabled with no version; publish a version to add code."
416
434
  );
417
435
  var CreateWorkflowResponseSchema = z.object({
@@ -452,12 +470,9 @@ var createWorkflowPlugin = defineMethod({
452
470
  if (isPrivate !== void 0) {
453
471
  body.is_private = isPrivate;
454
472
  }
455
- if (input.creationAccessMethod !== void 0) {
456
- body.creation_client = {
457
- ...input.creationHarness === void 0 ? {} : { harness: input.creationHarness },
458
- access_method: input.creationAccessMethod,
459
- sdk_version: SDK_VERSION
460
- };
473
+ const creationClient = toWorkflowCreationClient(input);
474
+ if (creationClient !== void 0) {
475
+ body.creation_client = creationClient;
461
476
  }
462
477
  const raw = await api.post(
463
478
  `${CODE_SUBSTRATE_WORKFLOWS_API}/workflows`,
@@ -478,8 +493,9 @@ var ImportWorkflowOptionsSchema = z.object({
478
493
  ),
479
494
  private: z.boolean().optional().describe(
480
495
  "Restrict the created workflow to the creating user. Defaults to false, which makes it account-visible."
481
- )
482
- }).describe(
496
+ ),
497
+ ...WorkflowCreationClientInputSchema.shape
498
+ }).refine(hasAccessMethodForHarness, HARNESS_WITHOUT_ACCESS_METHOD_ISSUE).describe(
483
499
  "Convert an existing Zap into a durable workflow. Transforms the Zap's latest published version (falling back to its draft only when the Zap has never been published) and puts the resulting source in an open draft. The workflow is created disabled with no published version, so publish the draft to make it live. The original Zap is untouched and keeps running."
484
500
  );
485
501
  var TranslationIssueSchema = z.object({
@@ -552,6 +568,10 @@ var importWorkflowPlugin = defineMethod({
552
568
  if (input.private !== void 0) {
553
569
  body.is_private = input.private;
554
570
  }
571
+ const creationClient = toWorkflowCreationClient(input);
572
+ if (creationClient !== void 0) {
573
+ body.creation_client = creationClient;
574
+ }
555
575
  const raw = await api.post(
556
576
  `${CODE_SUBSTRATE_WORKFLOWS_API}/workflows/import`,
557
577
  body,
@@ -3392,4 +3412,4 @@ function createZapierSdk(options = {}) {
3392
3412
  });
3393
3413
  }
3394
3414
 
3395
- export { CreateWorkflowOptionsSchema, CreateWorkflowResponseSchema, INTERNAL_CREATE_WORKFLOW_FIELDS, createZapierSdk, zapierExperimentalSdkPlugin };
3415
+ export { CreateWorkflowOptionsSchema, CreateWorkflowResponseSchema, INTERNAL_CREATE_WORKFLOW_FIELDS, ImportWorkflowOptionsSchema, ImportWorkflowResponseSchema, createZapierSdk, zapierExperimentalSdkPlugin };
@@ -532,8 +532,11 @@ declare class ZapierRateLimitError extends ZapierError {
532
532
  * approval being resolved.
533
533
  * - `max_retries_exceeded`: A single request triggered more sequential approval
534
534
  * rounds than `maxApprovalRetries` allows (runaway-loop safeguard).
535
+ * - `approval_token_invalid`: The one-time approval token attached to a retry
536
+ * was rejected (consumed, expired, or wrong context). A new approval is
537
+ * required.
535
538
  */
536
- type ApprovalStatus = "denied" | "dismissed" | "failed" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded";
539
+ type ApprovalStatus = "denied" | "dismissed" | "failed" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded" | "approval_token_invalid";
537
540
  /**
538
541
  * Error thrown when a request requires approval and the approval is denied, times out,
539
542
  * or the auth type doesn't support the approval flow.
@@ -532,8 +532,11 @@ declare class ZapierRateLimitError extends ZapierError {
532
532
  * approval being resolved.
533
533
  * - `max_retries_exceeded`: A single request triggered more sequential approval
534
534
  * rounds than `maxApprovalRetries` allows (runaway-loop safeguard).
535
+ * - `approval_token_invalid`: The one-time approval token attached to a retry
536
+ * was rejected (consumed, expired, or wrong context). A new approval is
537
+ * required.
535
538
  */
536
- type ApprovalStatus = "denied" | "dismissed" | "failed" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded";
539
+ type ApprovalStatus = "denied" | "dismissed" | "failed" | "timeout" | "pending" | "policy_denied" | "approval_required" | "max_retries_exceeded" | "approval_token_invalid";
537
540
  /**
538
541
  * Error thrown when a request requires approval and the approval is denied, times out,
539
542
  * or the auth type doesn't support the approval flow.