@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.
package/dist/beta.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseSdkOptions, A as ApiClient, M as ManifestProvider, a as Manifest, E as EventCallback, b as EventEmissionConfig, Z as ZapierCache, C as ConnectionsProvider, c as CapabilitiesContext, F as FieldsetItem, d as ZapierFetchInitOptions, e as ActionProxy, f as ZapierSdkApps, D as DeleteTriggerInboxResult, g as DrainTriggerInboxOptions, W as WatchTriggerInboxOptions, L as ListActionsOptions, h as ListActionInputFieldsOptions, i as ListActionInputFieldChoicesOptions, G as GetActionInputFieldsSchemaOptions, j as ApiClientDurationOptions, k as EventTransport, l as BaseEvent, R as ResolveCredentialsFn } from './index-7k7tYEeJ.mjs';
2
- export { e9 as ACTION_RUNS_PATH, cM as API_ID, x as Action, cI as ActionEntry, c2 as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, at as ActionItem, b3 as ActionKeyProperty, aB as ActionKeyPropertySchema, b4 as ActionProperty, aC as ActionPropertySchema, ad as ActionResolverItem, bg as ActionTimeoutMillisecondsProperty, aO as ActionTimeoutMillisecondsPropertySchema, bf as ActionTimeoutSecondsProperty, aN as ActionTimeoutSecondsPropertySchema, ae as ActionTypeItem, b2 as ActionTypeProperty, aA as ActionTypePropertySchema, dz as ApiEvent, cL as ApiPluginOptions, y as App, c3 as AppFactoryInput, ar as AppItem, b0 as AppKeyProperty, ay as AppKeyPropertySchema, b1 as AppProperty, az as AppPropertySchema, eE as ApplicationLifecycleEventData, bL as ApprovalStatus, bl as AppsProperty, aT as AppsPropertySchema, dy as AuthEvent, dj as AuthMechanism, b8 as AuthenticationIdProperty, aF as AuthenticationIdPropertySchema, aa as BaseSdkOptionsSchema, a2 as BatchOptions, d$ as CONNECTIONS_ID, cp as CONTEXT_CACHE_MAX_SIZE, co as CONTEXT_CACHE_TTL_MILLISECONDS, a0 as CallerContext, H as Choice, dE as ClientCredentialsObject, dP as ClientCredentialsObjectSchema, Q as Connection, dX as ConnectionEntry, dW as ConnectionEntrySchema, b6 as ConnectionIdProperty, aE as ConnectionIdPropertySchema, as as ConnectionItem, b7 as ConnectionProperty, aG as ConnectionPropertySchema, dZ as ConnectionsMap, dY as ConnectionsMapSchema, bn as ConnectionsProperty, aV as ConnectionsPropertySchema, S as ConnectionsResponse, cr as CreateActionRunPluginProvides, dB as Credentials, dU as CredentialsFunction, dT as CredentialsFunctionSchema, dD as CredentialsObject, dR as CredentialsObjectSchema, dV as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MILLISECONDS, ei as DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, cG as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, ap as DEPRECATION_NOTICE_EVENT, bd as DebugProperty, aL as DebugPropertySchema, aq as DeprecationNoticePayload, q as DrainTriggerInboxCallback, r as DrainTriggerInboxErrorObserver, ez as EVENT_EMISSION_ID, eF as EnhancedErrorEventData, bu as ErrorOptions, eD as EventContext, ex as EventEmissionContext, ey as EventEmitter, c4 as FetchPluginProvides, z as Field, bk as FieldsProperty, aS as FieldsPropertySchema, v as FindFirstAuthenticationPluginProvides, w as FindUniqueAuthenticationPluginProvides, ct as GetActionRunPluginProvides, u as GetAuthenticationPluginProvides, cK as GetProfilePluginProvides, av as InfoFieldItem, au as InputFieldItem, b5 as InputFieldProperty, aD as InputFieldPropertySchema, b9 as InputsProperty, aH as InputsPropertySchema, ao as JsonSseMessage, bt as LeaseLimitProperty, a$ as LeaseLimitPropertySchema, br as LeaseProperty, aZ as LeasePropertySchema, bs as LeaseSecondsProperty, a_ as LeaseSecondsPropertySchema, s as LeasedTriggerMessageItem, ba as LimitProperty, aI as LimitPropertySchema, cb as ListActionInputFieldsPluginProvides, c9 as ListActionsPluginProvides, c7 as ListAppsPluginProvides, t as ListAuthenticationsPluginProvides, cf as ListConnectionsPluginProvides, dA as LoadingEvent, cB as MANIFEST_ID, ec as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cH as ManifestEntry, cx as ManifestPluginOptions, eM as MethodCalledEvent, eG as MethodCalledEventData, N as Need, O as NeedsRequest, P as NeedsResponse, bb as OffsetProperty, aJ as OffsetPropertySchema, bc as OutputProperty, aK as OutputPropertySchema, be as ParamsProperty, aM as ParamsPropertySchema, dF as PkceCredentialsObject, dQ as PkceCredentialsObjectSchema, aj as PollOptions, cP as RESOLVE_CREDENTIALS_ID, bJ as RateLimitInfo, bi as RecordProperty, aQ as RecordPropertySchema, bj as RecordsProperty, aR as RecordsPropertySchema, a7 as RelayFetchSchema, a6 as RelayRequestSchema, ai as RequestOptions, di as ResolveAuthTokenOptions, d_ as ResolveConnection, dK as ResolveCredentialsOptions, af as ResolvedAppLocator, dk as ResolvedAuth, dC as ResolvedCredentials, dS as ResolvedCredentialsSchema, aw as RootFieldItem, cv as RunActionPluginProvides, X as SDK_OPTIONS_ID, ab as STABILITY_DEFINITIONS, dx as SdkEvent, an as SseMessage, bh as TableProperty, aP as TablePropertySchema, bm as TablesProperty, aU as TablesPropertySchema, bp as TriggerInboxKeyProperty, aX as TriggerInboxKeyPropertySchema, bq as TriggerInboxNameProperty, aY as TriggerInboxNamePropertySchema, bo as TriggerInboxProperty, aW as TriggerInboxPropertySchema, T as TriggerMessageStatus, cE as UpdateManifestEntryOptions, cF as UpdateManifestEntryResult, U as UserProfile, ax as UserProfileItem, e2 as ZAPIER_BASE_URL, ee as ZAPIER_MAX_CONCURRENT_REQUESTS, ea as ZAPIER_MAX_NETWORK_RETRIES, eb as ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, m as ZapierAbortDrainSignal, bH as ZapierActionError, bA as ZapierApiError, bB as ZapierAppNotFoundError, bM as ZapierApprovalError, by as ZapierAuthenticationError, bF as ZapierBundleError, du as ZapierCacheEntry, dv as ZapierCacheSetOptions, bE as ZapierConfigurationError, bI as ZapierConflictError, bv as ZapierError, bC as ZapierNotFoundError, bK as ZapierRateLimitError, bN as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bD as ZapierResourceNotFoundError, b$ as ZapierSignal, bG as ZapierTimeoutError, bx as ZapierUnknownError, bw as ZapierValidationError, cU as actionKeyResolver, cT as actionTypeResolver, cO as apiPlugin, cN as apiPluginRef, cS as appKeyResolver, c1 as appsPlugin, a1 as batch, eH as buildApplicationLifecycleEvent, a3 as buildCapabilityMessage, eJ as buildErrorEvent, eI as buildErrorEventWithContext, eL as buildMethodCalledEvent, ew as cleanupEventListeners, dl as clearTokenCache, c_ as clientCredentialsNameResolver, c$ as clientIdResolver, cW as connectionIdGenericResolver, cV as connectionIdResolver, e1 as connectionsPlugin, e0 as connectionsPluginRef, cq as createActionRunPlugin, eK as createBaseEvent, ch as createClientCredentialsPlugin, dw as createMemoryCache, ep as createTableFieldsPlugin, em as createTablePlugin, et as createTableRecordsPlugin, ak as createZapierApi, a8 as createZapierSdkWithoutRegistry, ci as deleteClientCredentialsPlugin, eq as deleteTableFieldsPlugin, en as deleteTablePlugin, eu as deleteTableRecordsPlugin, ah as descriptionFor, d3 as durableRunIdResolver, eC as eventEmissionHookPlugin, eB as eventEmissionPlugin, eA as eventEmissionPluginRef, c5 as fetchPlugin, cm as findFirstConnectionPlugin, cA as findManifestEntry, cn as findUniqueConnectionPlugin, b_ as formatErrorMessage, ac as formatExtensionPluginFailure, eO as generateEventId, cd as getActionInputFieldsSchemaPlugin, ck as getActionPlugin, cs as getActionRunPlugin, ag as getAgent, cj as getAppPlugin, dN as getBaseUrlFromCredentials, _ as getCallerContext, eU as getCiPlatform, dO as getClientIdFromCredentials, cl as getConnectionPlugin, eW as getCpuTime, eP as getCurrentTimestamp, eV as getMemoryUsage, al as getOrCreateApiClient, eR as getOsInfo, eS as getPlatformVersions, cz as getPreferredManifestEntryKey, cJ as getProfilePlugin, eQ as getReleaseId, el as getTablePlugin, er as getTableRecordPlugin, dq as getTokenFromCliLogin, eX as getTtyContext, ef as getZapierApprovalMode, e5 as getZapierCausationId, e4 as getZapierCorrelationId, eh as getZapierDefaultApprovalMode, eg as getZapierOpenAutoModeApprovalsInBrowser, e3 as getZapierSdkService, dn as injectCliLogin, cZ as inputFieldKeyResolver, cY as inputsAllOptionalResolver, cX as inputsResolver, dm as invalidateCachedToken, dt as invalidateCredentialsToken, eT as isCi, dp as isCliLoginAvailable, dG as isClientCredentials, dJ as isCredentialsFunction, dI as isCredentialsObject, am as isPermanentHttpError, dH as isPkceCredentials, o as isZapierAbortDrainSignal, bX as isZapierActionError, bR as isZapierAppNotFoundError, bZ as isZapierApprovalError, bQ as isZapierAuthenticationError, bW as isZapierBundleError, bU as isZapierConflictError, bO as isZapierError, bS as isZapierNotFoundError, bY as isZapierRateLimitError, p as isZapierReleaseTriggerMessageSignal, bT as isZapierResourceNotFoundError, c0 as isZapierSignal, bV as isZapierTimeoutError, bP as isZapierValidationError, cc as listActionInputFieldChoicesPlugin, ca as listActionInputFieldsPlugin, c8 as listActionsPlugin, c6 as listAppsPlugin, cg as listClientCredentialsPlugin, ce as listConnectionsPlugin, eo as listTableFieldsPlugin, es as listTableRecordsPlugin, ek as listTablesPlugin, a4 as logDeprecation, cD as manifestPlugin, cC as manifestPluginRef, eN as operationAnnotatorPlugin, ed as parseConcurrencyEnvVar, cy as readManifestFromFile, cw as requestPlugin, a5 as resetDeprecationWarnings, dr as resolveAuth, ds as resolveAuthToken, dM as resolveCredentials, dL as resolveCredentialsFromEnv, cR as resolveCredentialsPlugin, cQ as resolveCredentialsPluginRef, cu as runActionPlugin, $ as runWithCallerContext, Y as sdkOptionsPluginRef, db as tableFieldIdsResolver, dd as tableFieldsResolver, dg as tableFiltersResolver, d0 as tableIdResolver, dc as tableNameResolver, d9 as tableRecordIdResolver, da as tableRecordIdsResolver, de as tableRecordsResolver, dh as tableSortResolver, df as tableUpdateRecordsResolver, d1 as triggerInboxResolver, d8 as triggerMessagesResolver, ev as updateTableRecordsPlugin, d5 as workflowDraftIdResolver, d6 as workflowDraftRevisionResolver, d2 as workflowIdResolver, d7 as workflowRunIdResolver, d4 as workflowVersionIdResolver, bz as zapierAdaptError, a9 as zapierCoreOptions, V as zapierSdkPlugin } from './index-7k7tYEeJ.mjs';
1
+ import { B as BaseSdkOptions, A as ApiClient, M as ManifestProvider, a as Manifest, E as EventCallback, b as EventEmissionConfig, Z as ZapierCache, C as ConnectionsProvider, c as CapabilitiesContext, F as FieldsetItem, d as ZapierFetchInitOptions, e as ActionProxy, f as ZapierSdkApps, D as DeleteTriggerInboxResult, g as DrainTriggerInboxOptions, W as WatchTriggerInboxOptions, L as ListActionsOptions, h as ListActionInputFieldsOptions, i as ListActionInputFieldChoicesOptions, G as GetActionInputFieldsSchemaOptions, j as ApiClientDurationOptions, k as EventTransport, l as BaseEvent, R as ResolveCredentialsFn } from './index-BrhSgvFN.mjs';
2
+ export { e9 as ACTION_RUNS_PATH, cM as API_ID, x as Action, cI as ActionEntry, c2 as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, at as ActionItem, b3 as ActionKeyProperty, aB as ActionKeyPropertySchema, b4 as ActionProperty, aC as ActionPropertySchema, ad as ActionResolverItem, bg as ActionTimeoutMillisecondsProperty, aO as ActionTimeoutMillisecondsPropertySchema, bf as ActionTimeoutSecondsProperty, aN as ActionTimeoutSecondsPropertySchema, ae as ActionTypeItem, b2 as ActionTypeProperty, aA as ActionTypePropertySchema, dz as ApiEvent, cL as ApiPluginOptions, y as App, c3 as AppFactoryInput, ar as AppItem, b0 as AppKeyProperty, ay as AppKeyPropertySchema, b1 as AppProperty, az as AppPropertySchema, eE as ApplicationLifecycleEventData, bL as ApprovalStatus, bl as AppsProperty, aT as AppsPropertySchema, dy as AuthEvent, dj as AuthMechanism, b8 as AuthenticationIdProperty, aF as AuthenticationIdPropertySchema, aa as BaseSdkOptionsSchema, a2 as BatchOptions, d$ as CONNECTIONS_ID, cp as CONTEXT_CACHE_MAX_SIZE, co as CONTEXT_CACHE_TTL_MILLISECONDS, a0 as CallerContext, H as Choice, dE as ClientCredentialsObject, dP as ClientCredentialsObjectSchema, Q as Connection, dX as ConnectionEntry, dW as ConnectionEntrySchema, b6 as ConnectionIdProperty, aE as ConnectionIdPropertySchema, as as ConnectionItem, b7 as ConnectionProperty, aG as ConnectionPropertySchema, dZ as ConnectionsMap, dY as ConnectionsMapSchema, bn as ConnectionsProperty, aV as ConnectionsPropertySchema, S as ConnectionsResponse, cr as CreateActionRunPluginProvides, dB as Credentials, dU as CredentialsFunction, dT as CredentialsFunctionSchema, dD as CredentialsObject, dR as CredentialsObjectSchema, dV as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MILLISECONDS, ei as DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, cG as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, ap as DEPRECATION_NOTICE_EVENT, bd as DebugProperty, aL as DebugPropertySchema, aq as DeprecationNoticePayload, q as DrainTriggerInboxCallback, r as DrainTriggerInboxErrorObserver, ez as EVENT_EMISSION_ID, eF as EnhancedErrorEventData, bu as ErrorOptions, eD as EventContext, ex as EventEmissionContext, ey as EventEmitter, c4 as FetchPluginProvides, z as Field, bk as FieldsProperty, aS as FieldsPropertySchema, v as FindFirstAuthenticationPluginProvides, w as FindUniqueAuthenticationPluginProvides, ct as GetActionRunPluginProvides, u as GetAuthenticationPluginProvides, cK as GetProfilePluginProvides, av as InfoFieldItem, au as InputFieldItem, b5 as InputFieldProperty, aD as InputFieldPropertySchema, b9 as InputsProperty, aH as InputsPropertySchema, ao as JsonSseMessage, bt as LeaseLimitProperty, a$ as LeaseLimitPropertySchema, br as LeaseProperty, aZ as LeasePropertySchema, bs as LeaseSecondsProperty, a_ as LeaseSecondsPropertySchema, s as LeasedTriggerMessageItem, ba as LimitProperty, aI as LimitPropertySchema, cb as ListActionInputFieldsPluginProvides, c9 as ListActionsPluginProvides, c7 as ListAppsPluginProvides, t as ListAuthenticationsPluginProvides, cf as ListConnectionsPluginProvides, dA as LoadingEvent, cB as MANIFEST_ID, ec as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cH as ManifestEntry, cx as ManifestPluginOptions, eM as MethodCalledEvent, eG as MethodCalledEventData, N as Need, O as NeedsRequest, P as NeedsResponse, bb as OffsetProperty, aJ as OffsetPropertySchema, bc as OutputProperty, aK as OutputPropertySchema, be as ParamsProperty, aM as ParamsPropertySchema, dF as PkceCredentialsObject, dQ as PkceCredentialsObjectSchema, aj as PollOptions, cP as RESOLVE_CREDENTIALS_ID, bJ as RateLimitInfo, bi as RecordProperty, aQ as RecordPropertySchema, bj as RecordsProperty, aR as RecordsPropertySchema, a7 as RelayFetchSchema, a6 as RelayRequestSchema, ai as RequestOptions, di as ResolveAuthTokenOptions, d_ as ResolveConnection, dK as ResolveCredentialsOptions, af as ResolvedAppLocator, dk as ResolvedAuth, dC as ResolvedCredentials, dS as ResolvedCredentialsSchema, aw as RootFieldItem, cv as RunActionPluginProvides, X as SDK_OPTIONS_ID, ab as STABILITY_DEFINITIONS, dx as SdkEvent, an as SseMessage, bh as TableProperty, aP as TablePropertySchema, bm as TablesProperty, aU as TablesPropertySchema, bp as TriggerInboxKeyProperty, aX as TriggerInboxKeyPropertySchema, bq as TriggerInboxNameProperty, aY as TriggerInboxNamePropertySchema, bo as TriggerInboxProperty, aW as TriggerInboxPropertySchema, T as TriggerMessageStatus, cE as UpdateManifestEntryOptions, cF as UpdateManifestEntryResult, U as UserProfile, ax as UserProfileItem, e2 as ZAPIER_BASE_URL, ee as ZAPIER_MAX_CONCURRENT_REQUESTS, ea as ZAPIER_MAX_NETWORK_RETRIES, eb as ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, m as ZapierAbortDrainSignal, bH as ZapierActionError, bA as ZapierApiError, bB as ZapierAppNotFoundError, bM as ZapierApprovalError, by as ZapierAuthenticationError, bF as ZapierBundleError, du as ZapierCacheEntry, dv as ZapierCacheSetOptions, bE as ZapierConfigurationError, bI as ZapierConflictError, bv as ZapierError, bC as ZapierNotFoundError, bK as ZapierRateLimitError, bN as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bD as ZapierResourceNotFoundError, b$ as ZapierSignal, bG as ZapierTimeoutError, bx as ZapierUnknownError, bw as ZapierValidationError, cU as actionKeyResolver, cT as actionTypeResolver, cO as apiPlugin, cN as apiPluginRef, cS as appKeyResolver, c1 as appsPlugin, a1 as batch, eH as buildApplicationLifecycleEvent, a3 as buildCapabilityMessage, eJ as buildErrorEvent, eI as buildErrorEventWithContext, eL as buildMethodCalledEvent, ew as cleanupEventListeners, dl as clearTokenCache, c_ as clientCredentialsNameResolver, c$ as clientIdResolver, cW as connectionIdGenericResolver, cV as connectionIdResolver, e1 as connectionsPlugin, e0 as connectionsPluginRef, cq as createActionRunPlugin, eK as createBaseEvent, ch as createClientCredentialsPlugin, dw as createMemoryCache, ep as createTableFieldsPlugin, em as createTablePlugin, et as createTableRecordsPlugin, ak as createZapierApi, a8 as createZapierSdkWithoutRegistry, ci as deleteClientCredentialsPlugin, eq as deleteTableFieldsPlugin, en as deleteTablePlugin, eu as deleteTableRecordsPlugin, ah as descriptionFor, d3 as durableRunIdResolver, eC as eventEmissionHookPlugin, eB as eventEmissionPlugin, eA as eventEmissionPluginRef, c5 as fetchPlugin, cm as findFirstConnectionPlugin, cA as findManifestEntry, cn as findUniqueConnectionPlugin, b_ as formatErrorMessage, ac as formatExtensionPluginFailure, eO as generateEventId, cd as getActionInputFieldsSchemaPlugin, ck as getActionPlugin, cs as getActionRunPlugin, ag as getAgent, cj as getAppPlugin, dN as getBaseUrlFromCredentials, _ as getCallerContext, eU as getCiPlatform, dO as getClientIdFromCredentials, cl as getConnectionPlugin, eW as getCpuTime, eP as getCurrentTimestamp, eV as getMemoryUsage, al as getOrCreateApiClient, eR as getOsInfo, eS as getPlatformVersions, cz as getPreferredManifestEntryKey, cJ as getProfilePlugin, eQ as getReleaseId, el as getTablePlugin, er as getTableRecordPlugin, dq as getTokenFromCliLogin, eX as getTtyContext, ef as getZapierApprovalMode, e5 as getZapierCausationId, e4 as getZapierCorrelationId, eh as getZapierDefaultApprovalMode, eg as getZapierOpenAutoModeApprovalsInBrowser, e3 as getZapierSdkService, dn as injectCliLogin, cZ as inputFieldKeyResolver, cY as inputsAllOptionalResolver, cX as inputsResolver, dm as invalidateCachedToken, dt as invalidateCredentialsToken, eT as isCi, dp as isCliLoginAvailable, dG as isClientCredentials, dJ as isCredentialsFunction, dI as isCredentialsObject, am as isPermanentHttpError, dH as isPkceCredentials, o as isZapierAbortDrainSignal, bX as isZapierActionError, bR as isZapierAppNotFoundError, bZ as isZapierApprovalError, bQ as isZapierAuthenticationError, bW as isZapierBundleError, bU as isZapierConflictError, bO as isZapierError, bS as isZapierNotFoundError, bY as isZapierRateLimitError, p as isZapierReleaseTriggerMessageSignal, bT as isZapierResourceNotFoundError, c0 as isZapierSignal, bV as isZapierTimeoutError, bP as isZapierValidationError, cc as listActionInputFieldChoicesPlugin, ca as listActionInputFieldsPlugin, c8 as listActionsPlugin, c6 as listAppsPlugin, cg as listClientCredentialsPlugin, ce as listConnectionsPlugin, eo as listTableFieldsPlugin, es as listTableRecordsPlugin, ek as listTablesPlugin, a4 as logDeprecation, cD as manifestPlugin, cC as manifestPluginRef, eN as operationAnnotatorPlugin, ed as parseConcurrencyEnvVar, cy as readManifestFromFile, cw as requestPlugin, a5 as resetDeprecationWarnings, dr as resolveAuth, ds as resolveAuthToken, dM as resolveCredentials, dL as resolveCredentialsFromEnv, cR as resolveCredentialsPlugin, cQ as resolveCredentialsPluginRef, cu as runActionPlugin, $ as runWithCallerContext, Y as sdkOptionsPluginRef, db as tableFieldIdsResolver, dd as tableFieldsResolver, dg as tableFiltersResolver, d0 as tableIdResolver, dc as tableNameResolver, d9 as tableRecordIdResolver, da as tableRecordIdsResolver, de as tableRecordsResolver, dh as tableSortResolver, df as tableUpdateRecordsResolver, d1 as triggerInboxResolver, d8 as triggerMessagesResolver, ev as updateTableRecordsPlugin, d5 as workflowDraftIdResolver, d6 as workflowDraftRevisionResolver, d2 as workflowIdResolver, d7 as workflowRunIdResolver, d4 as workflowVersionIdResolver, bz as zapierAdaptError, a9 as zapierCoreOptions, V as zapierSdkPlugin } from './index-BrhSgvFN.mjs';
3
3
  import * as zod from 'zod';
4
4
  import * as zod_v4_core from 'zod/v4/core';
5
5
  import * as _zapier_kitcore from '@zapier/kitcore';
package/dist/beta.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as BaseSdkOptions, A as ApiClient, M as ManifestProvider, a as Manifest, E as EventCallback, b as EventEmissionConfig, Z as ZapierCache, C as ConnectionsProvider, c as CapabilitiesContext, F as FieldsetItem, d as ZapierFetchInitOptions, e as ActionProxy, f as ZapierSdkApps, D as DeleteTriggerInboxResult, g as DrainTriggerInboxOptions, W as WatchTriggerInboxOptions, L as ListActionsOptions, h as ListActionInputFieldsOptions, i as ListActionInputFieldChoicesOptions, G as GetActionInputFieldsSchemaOptions, j as ApiClientDurationOptions, k as EventTransport, l as BaseEvent, R as ResolveCredentialsFn } from './index-7k7tYEeJ.js';
2
- export { e9 as ACTION_RUNS_PATH, cM as API_ID, x as Action, cI as ActionEntry, c2 as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, at as ActionItem, b3 as ActionKeyProperty, aB as ActionKeyPropertySchema, b4 as ActionProperty, aC as ActionPropertySchema, ad as ActionResolverItem, bg as ActionTimeoutMillisecondsProperty, aO as ActionTimeoutMillisecondsPropertySchema, bf as ActionTimeoutSecondsProperty, aN as ActionTimeoutSecondsPropertySchema, ae as ActionTypeItem, b2 as ActionTypeProperty, aA as ActionTypePropertySchema, dz as ApiEvent, cL as ApiPluginOptions, y as App, c3 as AppFactoryInput, ar as AppItem, b0 as AppKeyProperty, ay as AppKeyPropertySchema, b1 as AppProperty, az as AppPropertySchema, eE as ApplicationLifecycleEventData, bL as ApprovalStatus, bl as AppsProperty, aT as AppsPropertySchema, dy as AuthEvent, dj as AuthMechanism, b8 as AuthenticationIdProperty, aF as AuthenticationIdPropertySchema, aa as BaseSdkOptionsSchema, a2 as BatchOptions, d$ as CONNECTIONS_ID, cp as CONTEXT_CACHE_MAX_SIZE, co as CONTEXT_CACHE_TTL_MILLISECONDS, a0 as CallerContext, H as Choice, dE as ClientCredentialsObject, dP as ClientCredentialsObjectSchema, Q as Connection, dX as ConnectionEntry, dW as ConnectionEntrySchema, b6 as ConnectionIdProperty, aE as ConnectionIdPropertySchema, as as ConnectionItem, b7 as ConnectionProperty, aG as ConnectionPropertySchema, dZ as ConnectionsMap, dY as ConnectionsMapSchema, bn as ConnectionsProperty, aV as ConnectionsPropertySchema, S as ConnectionsResponse, cr as CreateActionRunPluginProvides, dB as Credentials, dU as CredentialsFunction, dT as CredentialsFunctionSchema, dD as CredentialsObject, dR as CredentialsObjectSchema, dV as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MILLISECONDS, ei as DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, cG as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, ap as DEPRECATION_NOTICE_EVENT, bd as DebugProperty, aL as DebugPropertySchema, aq as DeprecationNoticePayload, q as DrainTriggerInboxCallback, r as DrainTriggerInboxErrorObserver, ez as EVENT_EMISSION_ID, eF as EnhancedErrorEventData, bu as ErrorOptions, eD as EventContext, ex as EventEmissionContext, ey as EventEmitter, c4 as FetchPluginProvides, z as Field, bk as FieldsProperty, aS as FieldsPropertySchema, v as FindFirstAuthenticationPluginProvides, w as FindUniqueAuthenticationPluginProvides, ct as GetActionRunPluginProvides, u as GetAuthenticationPluginProvides, cK as GetProfilePluginProvides, av as InfoFieldItem, au as InputFieldItem, b5 as InputFieldProperty, aD as InputFieldPropertySchema, b9 as InputsProperty, aH as InputsPropertySchema, ao as JsonSseMessage, bt as LeaseLimitProperty, a$ as LeaseLimitPropertySchema, br as LeaseProperty, aZ as LeasePropertySchema, bs as LeaseSecondsProperty, a_ as LeaseSecondsPropertySchema, s as LeasedTriggerMessageItem, ba as LimitProperty, aI as LimitPropertySchema, cb as ListActionInputFieldsPluginProvides, c9 as ListActionsPluginProvides, c7 as ListAppsPluginProvides, t as ListAuthenticationsPluginProvides, cf as ListConnectionsPluginProvides, dA as LoadingEvent, cB as MANIFEST_ID, ec as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cH as ManifestEntry, cx as ManifestPluginOptions, eM as MethodCalledEvent, eG as MethodCalledEventData, N as Need, O as NeedsRequest, P as NeedsResponse, bb as OffsetProperty, aJ as OffsetPropertySchema, bc as OutputProperty, aK as OutputPropertySchema, be as ParamsProperty, aM as ParamsPropertySchema, dF as PkceCredentialsObject, dQ as PkceCredentialsObjectSchema, aj as PollOptions, cP as RESOLVE_CREDENTIALS_ID, bJ as RateLimitInfo, bi as RecordProperty, aQ as RecordPropertySchema, bj as RecordsProperty, aR as RecordsPropertySchema, a7 as RelayFetchSchema, a6 as RelayRequestSchema, ai as RequestOptions, di as ResolveAuthTokenOptions, d_ as ResolveConnection, dK as ResolveCredentialsOptions, af as ResolvedAppLocator, dk as ResolvedAuth, dC as ResolvedCredentials, dS as ResolvedCredentialsSchema, aw as RootFieldItem, cv as RunActionPluginProvides, X as SDK_OPTIONS_ID, ab as STABILITY_DEFINITIONS, dx as SdkEvent, an as SseMessage, bh as TableProperty, aP as TablePropertySchema, bm as TablesProperty, aU as TablesPropertySchema, bp as TriggerInboxKeyProperty, aX as TriggerInboxKeyPropertySchema, bq as TriggerInboxNameProperty, aY as TriggerInboxNamePropertySchema, bo as TriggerInboxProperty, aW as TriggerInboxPropertySchema, T as TriggerMessageStatus, cE as UpdateManifestEntryOptions, cF as UpdateManifestEntryResult, U as UserProfile, ax as UserProfileItem, e2 as ZAPIER_BASE_URL, ee as ZAPIER_MAX_CONCURRENT_REQUESTS, ea as ZAPIER_MAX_NETWORK_RETRIES, eb as ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, m as ZapierAbortDrainSignal, bH as ZapierActionError, bA as ZapierApiError, bB as ZapierAppNotFoundError, bM as ZapierApprovalError, by as ZapierAuthenticationError, bF as ZapierBundleError, du as ZapierCacheEntry, dv as ZapierCacheSetOptions, bE as ZapierConfigurationError, bI as ZapierConflictError, bv as ZapierError, bC as ZapierNotFoundError, bK as ZapierRateLimitError, bN as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bD as ZapierResourceNotFoundError, b$ as ZapierSignal, bG as ZapierTimeoutError, bx as ZapierUnknownError, bw as ZapierValidationError, cU as actionKeyResolver, cT as actionTypeResolver, cO as apiPlugin, cN as apiPluginRef, cS as appKeyResolver, c1 as appsPlugin, a1 as batch, eH as buildApplicationLifecycleEvent, a3 as buildCapabilityMessage, eJ as buildErrorEvent, eI as buildErrorEventWithContext, eL as buildMethodCalledEvent, ew as cleanupEventListeners, dl as clearTokenCache, c_ as clientCredentialsNameResolver, c$ as clientIdResolver, cW as connectionIdGenericResolver, cV as connectionIdResolver, e1 as connectionsPlugin, e0 as connectionsPluginRef, cq as createActionRunPlugin, eK as createBaseEvent, ch as createClientCredentialsPlugin, dw as createMemoryCache, ep as createTableFieldsPlugin, em as createTablePlugin, et as createTableRecordsPlugin, ak as createZapierApi, a8 as createZapierSdkWithoutRegistry, ci as deleteClientCredentialsPlugin, eq as deleteTableFieldsPlugin, en as deleteTablePlugin, eu as deleteTableRecordsPlugin, ah as descriptionFor, d3 as durableRunIdResolver, eC as eventEmissionHookPlugin, eB as eventEmissionPlugin, eA as eventEmissionPluginRef, c5 as fetchPlugin, cm as findFirstConnectionPlugin, cA as findManifestEntry, cn as findUniqueConnectionPlugin, b_ as formatErrorMessage, ac as formatExtensionPluginFailure, eO as generateEventId, cd as getActionInputFieldsSchemaPlugin, ck as getActionPlugin, cs as getActionRunPlugin, ag as getAgent, cj as getAppPlugin, dN as getBaseUrlFromCredentials, _ as getCallerContext, eU as getCiPlatform, dO as getClientIdFromCredentials, cl as getConnectionPlugin, eW as getCpuTime, eP as getCurrentTimestamp, eV as getMemoryUsage, al as getOrCreateApiClient, eR as getOsInfo, eS as getPlatformVersions, cz as getPreferredManifestEntryKey, cJ as getProfilePlugin, eQ as getReleaseId, el as getTablePlugin, er as getTableRecordPlugin, dq as getTokenFromCliLogin, eX as getTtyContext, ef as getZapierApprovalMode, e5 as getZapierCausationId, e4 as getZapierCorrelationId, eh as getZapierDefaultApprovalMode, eg as getZapierOpenAutoModeApprovalsInBrowser, e3 as getZapierSdkService, dn as injectCliLogin, cZ as inputFieldKeyResolver, cY as inputsAllOptionalResolver, cX as inputsResolver, dm as invalidateCachedToken, dt as invalidateCredentialsToken, eT as isCi, dp as isCliLoginAvailable, dG as isClientCredentials, dJ as isCredentialsFunction, dI as isCredentialsObject, am as isPermanentHttpError, dH as isPkceCredentials, o as isZapierAbortDrainSignal, bX as isZapierActionError, bR as isZapierAppNotFoundError, bZ as isZapierApprovalError, bQ as isZapierAuthenticationError, bW as isZapierBundleError, bU as isZapierConflictError, bO as isZapierError, bS as isZapierNotFoundError, bY as isZapierRateLimitError, p as isZapierReleaseTriggerMessageSignal, bT as isZapierResourceNotFoundError, c0 as isZapierSignal, bV as isZapierTimeoutError, bP as isZapierValidationError, cc as listActionInputFieldChoicesPlugin, ca as listActionInputFieldsPlugin, c8 as listActionsPlugin, c6 as listAppsPlugin, cg as listClientCredentialsPlugin, ce as listConnectionsPlugin, eo as listTableFieldsPlugin, es as listTableRecordsPlugin, ek as listTablesPlugin, a4 as logDeprecation, cD as manifestPlugin, cC as manifestPluginRef, eN as operationAnnotatorPlugin, ed as parseConcurrencyEnvVar, cy as readManifestFromFile, cw as requestPlugin, a5 as resetDeprecationWarnings, dr as resolveAuth, ds as resolveAuthToken, dM as resolveCredentials, dL as resolveCredentialsFromEnv, cR as resolveCredentialsPlugin, cQ as resolveCredentialsPluginRef, cu as runActionPlugin, $ as runWithCallerContext, Y as sdkOptionsPluginRef, db as tableFieldIdsResolver, dd as tableFieldsResolver, dg as tableFiltersResolver, d0 as tableIdResolver, dc as tableNameResolver, d9 as tableRecordIdResolver, da as tableRecordIdsResolver, de as tableRecordsResolver, dh as tableSortResolver, df as tableUpdateRecordsResolver, d1 as triggerInboxResolver, d8 as triggerMessagesResolver, ev as updateTableRecordsPlugin, d5 as workflowDraftIdResolver, d6 as workflowDraftRevisionResolver, d2 as workflowIdResolver, d7 as workflowRunIdResolver, d4 as workflowVersionIdResolver, bz as zapierAdaptError, a9 as zapierCoreOptions, V as zapierSdkPlugin } from './index-7k7tYEeJ.js';
1
+ import { B as BaseSdkOptions, A as ApiClient, M as ManifestProvider, a as Manifest, E as EventCallback, b as EventEmissionConfig, Z as ZapierCache, C as ConnectionsProvider, c as CapabilitiesContext, F as FieldsetItem, d as ZapierFetchInitOptions, e as ActionProxy, f as ZapierSdkApps, D as DeleteTriggerInboxResult, g as DrainTriggerInboxOptions, W as WatchTriggerInboxOptions, L as ListActionsOptions, h as ListActionInputFieldsOptions, i as ListActionInputFieldChoicesOptions, G as GetActionInputFieldsSchemaOptions, j as ApiClientDurationOptions, k as EventTransport, l as BaseEvent, R as ResolveCredentialsFn } from './index-BrhSgvFN.js';
2
+ export { e9 as ACTION_RUNS_PATH, cM as API_ID, x as Action, cI as ActionEntry, c2 as ActionExecutionOptions, I as ActionExecutionResult, J as ActionField, K as ActionFieldChoice, at as ActionItem, b3 as ActionKeyProperty, aB as ActionKeyPropertySchema, b4 as ActionProperty, aC as ActionPropertySchema, ad as ActionResolverItem, bg as ActionTimeoutMillisecondsProperty, aO as ActionTimeoutMillisecondsPropertySchema, bf as ActionTimeoutSecondsProperty, aN as ActionTimeoutSecondsPropertySchema, ae as ActionTypeItem, b2 as ActionTypeProperty, aA as ActionTypePropertySchema, dz as ApiEvent, cL as ApiPluginOptions, y as App, c3 as AppFactoryInput, ar as AppItem, b0 as AppKeyProperty, ay as AppKeyPropertySchema, b1 as AppProperty, az as AppPropertySchema, eE as ApplicationLifecycleEventData, bL as ApprovalStatus, bl as AppsProperty, aT as AppsPropertySchema, dy as AuthEvent, dj as AuthMechanism, b8 as AuthenticationIdProperty, aF as AuthenticationIdPropertySchema, aa as BaseSdkOptionsSchema, a2 as BatchOptions, d$ as CONNECTIONS_ID, cp as CONTEXT_CACHE_MAX_SIZE, co as CONTEXT_CACHE_TTL_MILLISECONDS, a0 as CallerContext, H as Choice, dE as ClientCredentialsObject, dP as ClientCredentialsObjectSchema, Q as Connection, dX as ConnectionEntry, dW as ConnectionEntrySchema, b6 as ConnectionIdProperty, aE as ConnectionIdPropertySchema, as as ConnectionItem, b7 as ConnectionProperty, aG as ConnectionPropertySchema, dZ as ConnectionsMap, dY as ConnectionsMapSchema, bn as ConnectionsProperty, aV as ConnectionsPropertySchema, S as ConnectionsResponse, cr as CreateActionRunPluginProvides, dB as Credentials, dU as CredentialsFunction, dT as CredentialsFunctionSchema, dD as CredentialsObject, dR as CredentialsObjectSchema, dV as CredentialsSchema, e8 as DEFAULT_ACTION_TIMEOUT_MILLISECONDS, ei as DEFAULT_APPROVAL_TIMEOUT_MILLISECONDS, cG as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e7 as DEFAULT_PAGE_SIZE, ap as DEPRECATION_NOTICE_EVENT, bd as DebugProperty, aL as DebugPropertySchema, aq as DeprecationNoticePayload, q as DrainTriggerInboxCallback, r as DrainTriggerInboxErrorObserver, ez as EVENT_EMISSION_ID, eF as EnhancedErrorEventData, bu as ErrorOptions, eD as EventContext, ex as EventEmissionContext, ey as EventEmitter, c4 as FetchPluginProvides, z as Field, bk as FieldsProperty, aS as FieldsPropertySchema, v as FindFirstAuthenticationPluginProvides, w as FindUniqueAuthenticationPluginProvides, ct as GetActionRunPluginProvides, u as GetAuthenticationPluginProvides, cK as GetProfilePluginProvides, av as InfoFieldItem, au as InputFieldItem, b5 as InputFieldProperty, aD as InputFieldPropertySchema, b9 as InputsProperty, aH as InputsPropertySchema, ao as JsonSseMessage, bt as LeaseLimitProperty, a$ as LeaseLimitPropertySchema, br as LeaseProperty, aZ as LeasePropertySchema, bs as LeaseSecondsProperty, a_ as LeaseSecondsPropertySchema, s as LeasedTriggerMessageItem, ba as LimitProperty, aI as LimitPropertySchema, cb as ListActionInputFieldsPluginProvides, c9 as ListActionsPluginProvides, c7 as ListAppsPluginProvides, t as ListAuthenticationsPluginProvides, cf as ListConnectionsPluginProvides, dA as LoadingEvent, cB as MANIFEST_ID, ec as MAX_CONCURRENCY_LIMIT, e6 as MAX_PAGE_LIMIT, cH as ManifestEntry, cx as ManifestPluginOptions, eM as MethodCalledEvent, eG as MethodCalledEventData, N as Need, O as NeedsRequest, P as NeedsResponse, bb as OffsetProperty, aJ as OffsetPropertySchema, bc as OutputProperty, aK as OutputPropertySchema, be as ParamsProperty, aM as ParamsPropertySchema, dF as PkceCredentialsObject, dQ as PkceCredentialsObjectSchema, aj as PollOptions, cP as RESOLVE_CREDENTIALS_ID, bJ as RateLimitInfo, bi as RecordProperty, aQ as RecordPropertySchema, bj as RecordsProperty, aR as RecordsPropertySchema, a7 as RelayFetchSchema, a6 as RelayRequestSchema, ai as RequestOptions, di as ResolveAuthTokenOptions, d_ as ResolveConnection, dK as ResolveCredentialsOptions, af as ResolvedAppLocator, dk as ResolvedAuth, dC as ResolvedCredentials, dS as ResolvedCredentialsSchema, aw as RootFieldItem, cv as RunActionPluginProvides, X as SDK_OPTIONS_ID, ab as STABILITY_DEFINITIONS, dx as SdkEvent, an as SseMessage, bh as TableProperty, aP as TablePropertySchema, bm as TablesProperty, aU as TablesPropertySchema, bp as TriggerInboxKeyProperty, aX as TriggerInboxKeyPropertySchema, bq as TriggerInboxNameProperty, aY as TriggerInboxNamePropertySchema, bo as TriggerInboxProperty, aW as TriggerInboxPropertySchema, T as TriggerMessageStatus, cE as UpdateManifestEntryOptions, cF as UpdateManifestEntryResult, U as UserProfile, ax as UserProfileItem, e2 as ZAPIER_BASE_URL, ee as ZAPIER_MAX_CONCURRENT_REQUESTS, ea as ZAPIER_MAX_NETWORK_RETRIES, eb as ZAPIER_MAX_NETWORK_RETRY_DELAY_MILLISECONDS, m as ZapierAbortDrainSignal, bH as ZapierActionError, bA as ZapierApiError, bB as ZapierAppNotFoundError, bM as ZapierApprovalError, by as ZapierAuthenticationError, bF as ZapierBundleError, du as ZapierCacheEntry, dv as ZapierCacheSetOptions, bE as ZapierConfigurationError, bI as ZapierConflictError, bv as ZapierError, bC as ZapierNotFoundError, bK as ZapierRateLimitError, bN as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, bD as ZapierResourceNotFoundError, b$ as ZapierSignal, bG as ZapierTimeoutError, bx as ZapierUnknownError, bw as ZapierValidationError, cU as actionKeyResolver, cT as actionTypeResolver, cO as apiPlugin, cN as apiPluginRef, cS as appKeyResolver, c1 as appsPlugin, a1 as batch, eH as buildApplicationLifecycleEvent, a3 as buildCapabilityMessage, eJ as buildErrorEvent, eI as buildErrorEventWithContext, eL as buildMethodCalledEvent, ew as cleanupEventListeners, dl as clearTokenCache, c_ as clientCredentialsNameResolver, c$ as clientIdResolver, cW as connectionIdGenericResolver, cV as connectionIdResolver, e1 as connectionsPlugin, e0 as connectionsPluginRef, cq as createActionRunPlugin, eK as createBaseEvent, ch as createClientCredentialsPlugin, dw as createMemoryCache, ep as createTableFieldsPlugin, em as createTablePlugin, et as createTableRecordsPlugin, ak as createZapierApi, a8 as createZapierSdkWithoutRegistry, ci as deleteClientCredentialsPlugin, eq as deleteTableFieldsPlugin, en as deleteTablePlugin, eu as deleteTableRecordsPlugin, ah as descriptionFor, d3 as durableRunIdResolver, eC as eventEmissionHookPlugin, eB as eventEmissionPlugin, eA as eventEmissionPluginRef, c5 as fetchPlugin, cm as findFirstConnectionPlugin, cA as findManifestEntry, cn as findUniqueConnectionPlugin, b_ as formatErrorMessage, ac as formatExtensionPluginFailure, eO as generateEventId, cd as getActionInputFieldsSchemaPlugin, ck as getActionPlugin, cs as getActionRunPlugin, ag as getAgent, cj as getAppPlugin, dN as getBaseUrlFromCredentials, _ as getCallerContext, eU as getCiPlatform, dO as getClientIdFromCredentials, cl as getConnectionPlugin, eW as getCpuTime, eP as getCurrentTimestamp, eV as getMemoryUsage, al as getOrCreateApiClient, eR as getOsInfo, eS as getPlatformVersions, cz as getPreferredManifestEntryKey, cJ as getProfilePlugin, eQ as getReleaseId, el as getTablePlugin, er as getTableRecordPlugin, dq as getTokenFromCliLogin, eX as getTtyContext, ef as getZapierApprovalMode, e5 as getZapierCausationId, e4 as getZapierCorrelationId, eh as getZapierDefaultApprovalMode, eg as getZapierOpenAutoModeApprovalsInBrowser, e3 as getZapierSdkService, dn as injectCliLogin, cZ as inputFieldKeyResolver, cY as inputsAllOptionalResolver, cX as inputsResolver, dm as invalidateCachedToken, dt as invalidateCredentialsToken, eT as isCi, dp as isCliLoginAvailable, dG as isClientCredentials, dJ as isCredentialsFunction, dI as isCredentialsObject, am as isPermanentHttpError, dH as isPkceCredentials, o as isZapierAbortDrainSignal, bX as isZapierActionError, bR as isZapierAppNotFoundError, bZ as isZapierApprovalError, bQ as isZapierAuthenticationError, bW as isZapierBundleError, bU as isZapierConflictError, bO as isZapierError, bS as isZapierNotFoundError, bY as isZapierRateLimitError, p as isZapierReleaseTriggerMessageSignal, bT as isZapierResourceNotFoundError, c0 as isZapierSignal, bV as isZapierTimeoutError, bP as isZapierValidationError, cc as listActionInputFieldChoicesPlugin, ca as listActionInputFieldsPlugin, c8 as listActionsPlugin, c6 as listAppsPlugin, cg as listClientCredentialsPlugin, ce as listConnectionsPlugin, eo as listTableFieldsPlugin, es as listTableRecordsPlugin, ek as listTablesPlugin, a4 as logDeprecation, cD as manifestPlugin, cC as manifestPluginRef, eN as operationAnnotatorPlugin, ed as parseConcurrencyEnvVar, cy as readManifestFromFile, cw as requestPlugin, a5 as resetDeprecationWarnings, dr as resolveAuth, ds as resolveAuthToken, dM as resolveCredentials, dL as resolveCredentialsFromEnv, cR as resolveCredentialsPlugin, cQ as resolveCredentialsPluginRef, cu as runActionPlugin, $ as runWithCallerContext, Y as sdkOptionsPluginRef, db as tableFieldIdsResolver, dd as tableFieldsResolver, dg as tableFiltersResolver, d0 as tableIdResolver, dc as tableNameResolver, d9 as tableRecordIdResolver, da as tableRecordIdsResolver, de as tableRecordsResolver, dh as tableSortResolver, df as tableUpdateRecordsResolver, d1 as triggerInboxResolver, d8 as triggerMessagesResolver, ev as updateTableRecordsPlugin, d5 as workflowDraftIdResolver, d6 as workflowDraftRevisionResolver, d2 as workflowIdResolver, d7 as workflowRunIdResolver, d4 as workflowVersionIdResolver, bz as zapierAdaptError, a9 as zapierCoreOptions, V as zapierSdkPlugin } from './index-BrhSgvFN.js';
3
3
  import * as zod from 'zod';
4
4
  import * as zod_v4_core from 'zod/v4/core';
5
5
  import * as _zapier_kitcore from '@zapier/kitcore';
package/dist/beta.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { createZapierSdk, zapierBetaSdkPlugin } from './chunk-M33SNIHR.mjs';
2
- 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, 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, 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
+ export { createZapierSdk, zapierBetaSdkPlugin } from './chunk-NOHDNPVD.mjs';
2
+ 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, 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, 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';
3
3
  import './chunk-Y6FXYEAI.mjs';
@@ -1,18 +1,18 @@
1
1
  'use strict';
2
2
 
3
- var chunk2HPOD34J_cjs = require('./chunk-2HPOD34J.cjs');
3
+ var chunkGQI5FACN_cjs = require('./chunk-GQI5FACN.cjs');
4
4
  var kitcore = require('@zapier/kitcore');
5
5
 
6
6
  var zapierBetaSdkPlugin = kitcore.definePlugin({
7
7
  namespace: "zapier",
8
8
  name: "beta-sdk",
9
- exports: [chunk2HPOD34J_cjs.zapierSdkPlugin]
9
+ exports: [chunkGQI5FACN_cjs.zapierSdkPlugin]
10
10
  });
11
11
  function createZapierSdk(options = {}) {
12
12
  return kitcore.createSdk(zapierBetaSdkPlugin, {
13
13
  configuration: {
14
- [chunk2HPOD34J_cjs.SDK_OPTIONS_ID]: options,
15
- [kitcore.CORE_OPTIONS_ID]: chunk2HPOD34J_cjs.zapierCoreOptions
14
+ [chunkGQI5FACN_cjs.SDK_OPTIONS_ID]: options,
15
+ [kitcore.CORE_OPTIONS_ID]: chunkGQI5FACN_cjs.zapierCoreOptions
16
16
  }
17
17
  });
18
18
  }
@@ -723,7 +723,7 @@ function createDebugLogger(enabled) {
723
723
  function censorHeaders(headers) {
724
724
  if (!headers) return headers;
725
725
  const headersObj = new Headers(headers);
726
- const authKeys = ["authorization", "x-api-key"];
726
+ const authKeys = ["authorization", "x-api-key", "x-zapier-approval-token"];
727
727
  for (const [key, value] of headersObj.entries()) {
728
728
  if (authKeys.some((authKey) => key.toLowerCase() === authKey)) {
729
729
  const spaceIndex = value.indexOf(" ");
@@ -2821,7 +2821,7 @@ function logRouteOverride({
2821
2821
  }
2822
2822
 
2823
2823
  // src/sdk-version.ts
2824
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.5" : void 0) || "unknown";
2824
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.115.1" : void 0) || "unknown";
2825
2825
 
2826
2826
  // src/utils/open-url.ts
2827
2827
  var nodePrefix = "node:";
@@ -2914,6 +2914,8 @@ var CreateApprovalResponseSchema = zod.z.object({
2914
2914
  approval_url: zod.z.string().url(),
2915
2915
  poll_url: zod.z.string().url(),
2916
2916
  stream_url: zod.z.string().url().optional(),
2917
+ // Present when the approval mints one-time tokens; absent on legacy/manual approvals.
2918
+ tokens_url: zod.z.string().url().optional(),
2917
2919
  reason: zod.z.string().optional()
2918
2920
  }).transform((approval, ctx) => {
2919
2921
  const id = approval.id ?? approval.approval_id;
@@ -2926,6 +2928,14 @@ var CreateApprovalResponseSchema = zod.z.object({
2926
2928
  }
2927
2929
  return { ...approval, id };
2928
2930
  });
2931
+ var APPROVAL_TOKEN_HANDLE_PATTERN = /^zat_[0-9A-Za-z]{24}$/;
2932
+ var MAX_APPROVAL_TOKEN_HANDLES = 20;
2933
+ var ApprovalTokenSchema = zod.z.object({
2934
+ handle: zod.z.string().regex(APPROVAL_TOKEN_HANDLE_PATTERN)
2935
+ });
2936
+ var ApprovalTokensResponseSchema = zod.z.object({
2937
+ tokens: zod.z.array(zod.z.unknown())
2938
+ });
2929
2939
  var PollApprovalResponseSchema = zod.z.object({
2930
2940
  id: zod.z.string().optional(),
2931
2941
  status: ApprovalStatusSchema,
@@ -3090,6 +3100,25 @@ var ZapierApiClient = class {
3090
3100
  return { response };
3091
3101
  }
3092
3102
  const errorType = response.headers.get("x-zapier-error-type");
3103
+ if (errorType === "approval_token_invalid") {
3104
+ const { data } = await this.parseResult(response);
3105
+ const { message, errors } = this.parseErrorResponse({
3106
+ status: response.status,
3107
+ statusText: response.statusText,
3108
+ data
3109
+ });
3110
+ return {
3111
+ response,
3112
+ approvalRoundError: new ZapierApprovalError(
3113
+ message || "Approval token rejected by the server",
3114
+ {
3115
+ status: "approval_token_invalid",
3116
+ statusCode: response.status,
3117
+ errors
3118
+ }
3119
+ )
3120
+ };
3121
+ }
3093
3122
  if (errorType !== "approval_required") {
3094
3123
  return { response };
3095
3124
  }
@@ -3106,8 +3135,9 @@ var ZapierApiClient = class {
3106
3135
  "x-zapier-ask-statement-ids"
3107
3136
  );
3108
3137
  const askStatementIds = askStatementIdsHeader ? JSON.parse(askStatementIdsHeader) : void 0;
3138
+ let approvalTokens;
3109
3139
  try {
3110
- await this.runOneApprovalRound({
3140
+ approvalTokens = await this.runOneApprovalRound({
3111
3141
  buildContext: approvalContext,
3112
3142
  mode: approvalMode,
3113
3143
  signal: init?.signal ?? void 0,
@@ -3117,6 +3147,13 @@ var ZapierApiClient = class {
3117
3147
  } catch (error) {
3118
3148
  return { response, approvalRoundError: error };
3119
3149
  }
3150
+ const nextHeaders = new Headers(init?.headers);
3151
+ if (approvalTokens.length > 0) {
3152
+ nextHeaders.set("x-zapier-approval-token", approvalTokens.join(","));
3153
+ } else {
3154
+ nextHeaders.delete("x-zapier-approval-token");
3155
+ }
3156
+ init = { ...init, headers: nextHeaders };
3120
3157
  }
3121
3158
  throw new ZapierApiError("Approval retry loop ended unexpectedly");
3122
3159
  };
@@ -3130,9 +3167,10 @@ var ZapierApiClient = class {
3130
3167
  * - `request_denied_by_policy` → a policy rule permanently blocks the
3131
3168
  * request; no human can approve it. Throw.
3132
3169
  * - `approval_required` → the request needs human approval; the
3133
- * SDK creates an approval, opens the URL
3134
- * (poll mode), waits for resolution, and
3135
- * retries the original request.
3170
+ * SDK creates an approval, waits for
3171
+ * resolution, then retries with any
3172
+ * minted one-time token(s) attached.
3173
+ * - `approval_token_invalid` → a retried token was rejected. Terminal.
3136
3174
  * - anything else → not our concern, pass through.
3137
3175
  *
3138
3176
  * The retry loop exists because a single user action can legitimately
@@ -3190,6 +3228,9 @@ var ZapierApiClient = class {
3190
3228
  );
3191
3229
  }
3192
3230
  if (errorType !== "approval_required") {
3231
+ if (approvalRoundError) {
3232
+ throw approvalRoundError;
3233
+ }
3193
3234
  return response;
3194
3235
  }
3195
3236
  if (approvalRoundError) {
@@ -3696,9 +3737,48 @@ var ZapierApiClient = class {
3696
3737
  }
3697
3738
  }
3698
3739
  /**
3699
- * Run a single approval round: create the approval, open the URL (poll mode)
3700
- * or throw (throw mode), poll until resolved, and emit events. Throws on
3701
- * denied/failed/timeout/unexpected status. Returns on approved.
3740
+ * Fetch every token handle minted for a resolved approval. Fails open
3741
+ * (returns [], emits approval:error) on any non-200, malformed body, or
3742
+ * network error, so a token-fetch failure never blocks the retry. Aborts
3743
+ * propagate.
3744
+ */
3745
+ async fetchApprovalTokens(approvalId, tokensUrl, signal, callId) {
3746
+ const failOpen = (message) => {
3747
+ this.emitEvent("approval:error", { approvalId, message });
3748
+ return [];
3749
+ };
3750
+ try {
3751
+ const response = await this.withSemaphore(
3752
+ { url: tokensUrl, method: "GET", signal },
3753
+ () => this.rawFetchUrl(tokensUrl, {
3754
+ method: "GET",
3755
+ headers: { Accept: "application/json" },
3756
+ signal,
3757
+ [CORRELATION_CALL_ID]: callId
3758
+ })
3759
+ );
3760
+ if (!response.ok) {
3761
+ return failOpen(`Failed to fetch approval tokens: ${response.status}`);
3762
+ }
3763
+ const { data } = await this.parseResult(response);
3764
+ const body = ApprovalTokensResponseSchema.safeParse(data);
3765
+ if (!body.success) {
3766
+ return failOpen("Failed to parse approval tokens response");
3767
+ }
3768
+ return body.data.tokens.map((t) => ApprovalTokenSchema.safeParse(t)).filter((parsed) => parsed.success).map((parsed) => parsed.data.handle).slice(0, MAX_APPROVAL_TOKEN_HANDLES);
3769
+ } catch (err) {
3770
+ if (signal?.aborted || isAbortError(err)) throw err;
3771
+ return failOpen(
3772
+ `Failed to fetch approval tokens: ${err instanceof Error ? err.message : String(err)}`
3773
+ );
3774
+ }
3775
+ }
3776
+ /**
3777
+ * Run a single approval round: create the approval, open the URL (poll
3778
+ * mode) or throw (throw mode), poll until resolved, and emit events.
3779
+ * Throws on denied/failed/timeout/unexpected status. Returns on approved
3780
+ * with every one-time token handle the approval minted (via tokens_url),
3781
+ * or [] when no tokens_url is present (legacy/manual policy-sync path).
3702
3782
  *
3703
3783
  * Caller is responsible for passing a non-"disabled" mode; this method
3704
3784
  * unconditionally creates an approval.
@@ -3788,6 +3868,13 @@ var ZapierApiClient = class {
3788
3868
  if (approval.stream_url) {
3789
3869
  assertApprovalOrigin(approval.stream_url, sdkapiOrigin, "stream_url");
3790
3870
  }
3871
+ if (approval.tokens_url) {
3872
+ assertApprovalOrigin(
3873
+ approval.tokens_url,
3874
+ approvalsOrigin,
3875
+ "tokens_url"
3876
+ );
3877
+ }
3791
3878
  assertApprovalOrigin(
3792
3879
  approval.approval_url,
3793
3880
  browserOrigin,
@@ -3809,7 +3896,12 @@ var ZapierApiClient = class {
3809
3896
  this.emitEvent("approval:approved", {
3810
3897
  approvalId: approval.id
3811
3898
  });
3812
- return;
3899
+ return approval.tokens_url ? this.fetchApprovalTokens(
3900
+ approval.id,
3901
+ approval.tokens_url,
3902
+ signal,
3903
+ callId
3904
+ ) : [];
3813
3905
  }
3814
3906
  if (approval.status === "denied") {
3815
3907
  this.emitEvent("approval:denied", {
@@ -4001,6 +4093,12 @@ var ZapierApiClient = class {
4001
4093
  this.emitEvent("approval:approved", {
4002
4094
  approvalId: approval.id
4003
4095
  });
4096
+ return approval.tokens_url ? this.fetchApprovalTokens(
4097
+ approval.id,
4098
+ approval.tokens_url,
4099
+ signal,
4100
+ callId
4101
+ ) : [];
4004
4102
  }
4005
4103
  throwApprovalFailed({
4006
4104
  approvalId,
@@ -1,4 +1,4 @@
1
- import { zapierSdkPlugin, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-GWDDPYFO.mjs';
1
+ import { zapierSdkPlugin, zapierCoreOptions, SDK_OPTIONS_ID } from './chunk-RWJJBIN6.mjs';
2
2
  import { definePlugin, createSdk, CORE_OPTIONS_ID } from '@zapier/kitcore';
3
3
 
4
4
  var zapierBetaSdkPlugin = definePlugin({
@@ -722,7 +722,7 @@ function createDebugLogger(enabled) {
722
722
  function censorHeaders(headers) {
723
723
  if (!headers) return headers;
724
724
  const headersObj = new Headers(headers);
725
- const authKeys = ["authorization", "x-api-key"];
725
+ const authKeys = ["authorization", "x-api-key", "x-zapier-approval-token"];
726
726
  for (const [key, value] of headersObj.entries()) {
727
727
  if (authKeys.some((authKey) => key.toLowerCase() === authKey)) {
728
728
  const spaceIndex = value.indexOf(" ");
@@ -2820,7 +2820,7 @@ function logRouteOverride({
2820
2820
  }
2821
2821
 
2822
2822
  // src/sdk-version.ts
2823
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.114.5" : void 0) || "unknown";
2823
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.115.1" : void 0) || "unknown";
2824
2824
 
2825
2825
  // src/utils/open-url.ts
2826
2826
  var nodePrefix = "node:";
@@ -2913,6 +2913,8 @@ var CreateApprovalResponseSchema = z.object({
2913
2913
  approval_url: z.string().url(),
2914
2914
  poll_url: z.string().url(),
2915
2915
  stream_url: z.string().url().optional(),
2916
+ // Present when the approval mints one-time tokens; absent on legacy/manual approvals.
2917
+ tokens_url: z.string().url().optional(),
2916
2918
  reason: z.string().optional()
2917
2919
  }).transform((approval, ctx) => {
2918
2920
  const id = approval.id ?? approval.approval_id;
@@ -2925,6 +2927,14 @@ var CreateApprovalResponseSchema = z.object({
2925
2927
  }
2926
2928
  return { ...approval, id };
2927
2929
  });
2930
+ var APPROVAL_TOKEN_HANDLE_PATTERN = /^zat_[0-9A-Za-z]{24}$/;
2931
+ var MAX_APPROVAL_TOKEN_HANDLES = 20;
2932
+ var ApprovalTokenSchema = z.object({
2933
+ handle: z.string().regex(APPROVAL_TOKEN_HANDLE_PATTERN)
2934
+ });
2935
+ var ApprovalTokensResponseSchema = z.object({
2936
+ tokens: z.array(z.unknown())
2937
+ });
2928
2938
  var PollApprovalResponseSchema = z.object({
2929
2939
  id: z.string().optional(),
2930
2940
  status: ApprovalStatusSchema,
@@ -3089,6 +3099,25 @@ var ZapierApiClient = class {
3089
3099
  return { response };
3090
3100
  }
3091
3101
  const errorType = response.headers.get("x-zapier-error-type");
3102
+ if (errorType === "approval_token_invalid") {
3103
+ const { data } = await this.parseResult(response);
3104
+ const { message, errors } = this.parseErrorResponse({
3105
+ status: response.status,
3106
+ statusText: response.statusText,
3107
+ data
3108
+ });
3109
+ return {
3110
+ response,
3111
+ approvalRoundError: new ZapierApprovalError(
3112
+ message || "Approval token rejected by the server",
3113
+ {
3114
+ status: "approval_token_invalid",
3115
+ statusCode: response.status,
3116
+ errors
3117
+ }
3118
+ )
3119
+ };
3120
+ }
3092
3121
  if (errorType !== "approval_required") {
3093
3122
  return { response };
3094
3123
  }
@@ -3105,8 +3134,9 @@ var ZapierApiClient = class {
3105
3134
  "x-zapier-ask-statement-ids"
3106
3135
  );
3107
3136
  const askStatementIds = askStatementIdsHeader ? JSON.parse(askStatementIdsHeader) : void 0;
3137
+ let approvalTokens;
3108
3138
  try {
3109
- await this.runOneApprovalRound({
3139
+ approvalTokens = await this.runOneApprovalRound({
3110
3140
  buildContext: approvalContext,
3111
3141
  mode: approvalMode,
3112
3142
  signal: init?.signal ?? void 0,
@@ -3116,6 +3146,13 @@ var ZapierApiClient = class {
3116
3146
  } catch (error) {
3117
3147
  return { response, approvalRoundError: error };
3118
3148
  }
3149
+ const nextHeaders = new Headers(init?.headers);
3150
+ if (approvalTokens.length > 0) {
3151
+ nextHeaders.set("x-zapier-approval-token", approvalTokens.join(","));
3152
+ } else {
3153
+ nextHeaders.delete("x-zapier-approval-token");
3154
+ }
3155
+ init = { ...init, headers: nextHeaders };
3119
3156
  }
3120
3157
  throw new ZapierApiError("Approval retry loop ended unexpectedly");
3121
3158
  };
@@ -3129,9 +3166,10 @@ var ZapierApiClient = class {
3129
3166
  * - `request_denied_by_policy` → a policy rule permanently blocks the
3130
3167
  * request; no human can approve it. Throw.
3131
3168
  * - `approval_required` → the request needs human approval; the
3132
- * SDK creates an approval, opens the URL
3133
- * (poll mode), waits for resolution, and
3134
- * retries the original request.
3169
+ * SDK creates an approval, waits for
3170
+ * resolution, then retries with any
3171
+ * minted one-time token(s) attached.
3172
+ * - `approval_token_invalid` → a retried token was rejected. Terminal.
3135
3173
  * - anything else → not our concern, pass through.
3136
3174
  *
3137
3175
  * The retry loop exists because a single user action can legitimately
@@ -3189,6 +3227,9 @@ var ZapierApiClient = class {
3189
3227
  );
3190
3228
  }
3191
3229
  if (errorType !== "approval_required") {
3230
+ if (approvalRoundError) {
3231
+ throw approvalRoundError;
3232
+ }
3192
3233
  return response;
3193
3234
  }
3194
3235
  if (approvalRoundError) {
@@ -3695,9 +3736,48 @@ var ZapierApiClient = class {
3695
3736
  }
3696
3737
  }
3697
3738
  /**
3698
- * Run a single approval round: create the approval, open the URL (poll mode)
3699
- * or throw (throw mode), poll until resolved, and emit events. Throws on
3700
- * denied/failed/timeout/unexpected status. Returns on approved.
3739
+ * Fetch every token handle minted for a resolved approval. Fails open
3740
+ * (returns [], emits approval:error) on any non-200, malformed body, or
3741
+ * network error, so a token-fetch failure never blocks the retry. Aborts
3742
+ * propagate.
3743
+ */
3744
+ async fetchApprovalTokens(approvalId, tokensUrl, signal, callId) {
3745
+ const failOpen = (message) => {
3746
+ this.emitEvent("approval:error", { approvalId, message });
3747
+ return [];
3748
+ };
3749
+ try {
3750
+ const response = await this.withSemaphore(
3751
+ { url: tokensUrl, method: "GET", signal },
3752
+ () => this.rawFetchUrl(tokensUrl, {
3753
+ method: "GET",
3754
+ headers: { Accept: "application/json" },
3755
+ signal,
3756
+ [CORRELATION_CALL_ID]: callId
3757
+ })
3758
+ );
3759
+ if (!response.ok) {
3760
+ return failOpen(`Failed to fetch approval tokens: ${response.status}`);
3761
+ }
3762
+ const { data } = await this.parseResult(response);
3763
+ const body = ApprovalTokensResponseSchema.safeParse(data);
3764
+ if (!body.success) {
3765
+ return failOpen("Failed to parse approval tokens response");
3766
+ }
3767
+ return body.data.tokens.map((t) => ApprovalTokenSchema.safeParse(t)).filter((parsed) => parsed.success).map((parsed) => parsed.data.handle).slice(0, MAX_APPROVAL_TOKEN_HANDLES);
3768
+ } catch (err) {
3769
+ if (signal?.aborted || isAbortError(err)) throw err;
3770
+ return failOpen(
3771
+ `Failed to fetch approval tokens: ${err instanceof Error ? err.message : String(err)}`
3772
+ );
3773
+ }
3774
+ }
3775
+ /**
3776
+ * Run a single approval round: create the approval, open the URL (poll
3777
+ * mode) or throw (throw mode), poll until resolved, and emit events.
3778
+ * Throws on denied/failed/timeout/unexpected status. Returns on approved
3779
+ * with every one-time token handle the approval minted (via tokens_url),
3780
+ * or [] when no tokens_url is present (legacy/manual policy-sync path).
3701
3781
  *
3702
3782
  * Caller is responsible for passing a non-"disabled" mode; this method
3703
3783
  * unconditionally creates an approval.
@@ -3787,6 +3867,13 @@ var ZapierApiClient = class {
3787
3867
  if (approval.stream_url) {
3788
3868
  assertApprovalOrigin(approval.stream_url, sdkapiOrigin, "stream_url");
3789
3869
  }
3870
+ if (approval.tokens_url) {
3871
+ assertApprovalOrigin(
3872
+ approval.tokens_url,
3873
+ approvalsOrigin,
3874
+ "tokens_url"
3875
+ );
3876
+ }
3790
3877
  assertApprovalOrigin(
3791
3878
  approval.approval_url,
3792
3879
  browserOrigin,
@@ -3808,7 +3895,12 @@ var ZapierApiClient = class {
3808
3895
  this.emitEvent("approval:approved", {
3809
3896
  approvalId: approval.id
3810
3897
  });
3811
- return;
3898
+ return approval.tokens_url ? this.fetchApprovalTokens(
3899
+ approval.id,
3900
+ approval.tokens_url,
3901
+ signal,
3902
+ callId
3903
+ ) : [];
3812
3904
  }
3813
3905
  if (approval.status === "denied") {
3814
3906
  this.emitEvent("approval:denied", {
@@ -4000,6 +4092,12 @@ var ZapierApiClient = class {
4000
4092
  this.emitEvent("approval:approved", {
4001
4093
  approvalId: approval.id
4002
4094
  });
4095
+ return approval.tokens_url ? this.fetchApprovalTokens(
4096
+ approval.id,
4097
+ approval.tokens_url,
4098
+ signal,
4099
+ callId
4100
+ ) : [];
4003
4101
  }
4004
4102
  throwApprovalFailed({
4005
4103
  approvalId,