@zapier/zapier-sdk 0.54.1 → 0.56.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +15 -15
  3. package/dist/api/client.js +5 -6
  4. package/dist/api/types.d.ts +4 -3
  5. package/dist/api/types.d.ts.map +1 -1
  6. package/dist/constants.d.ts +14 -4
  7. package/dist/constants.d.ts.map +1 -1
  8. package/dist/constants.js +17 -4
  9. package/dist/experimental.cjs +29 -15
  10. package/dist/experimental.d.mts +2 -2
  11. package/dist/experimental.mjs +29 -16
  12. package/dist/{index-SDDmBk2j.d.mts → index-CjP7lGzL.d.mts} +26 -8
  13. package/dist/{index-SDDmBk2j.d.ts → index-CjP7lGzL.d.ts} +26 -8
  14. package/dist/index.cjs +29 -15
  15. package/dist/index.d.mts +1 -1
  16. package/dist/index.mjs +29 -16
  17. package/dist/resolvers/actionKey.d.ts.map +1 -1
  18. package/dist/resolvers/actionKey.js +2 -1
  19. package/dist/resolvers/appKey.d.ts.map +1 -1
  20. package/dist/resolvers/appKey.js +2 -3
  21. package/dist/resolvers/clientId.js +1 -1
  22. package/dist/resolvers/connectionId.js +1 -1
  23. package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
  24. package/dist/resolvers/inputFieldKey.js +5 -1
  25. package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
  26. package/dist/resolvers/tableFieldIds.js +2 -1
  27. package/dist/resolvers/tableId.js +1 -1
  28. package/dist/resolvers/tableRecordId.d.ts.map +1 -1
  29. package/dist/resolvers/tableRecordId.js +4 -3
  30. package/dist/resolvers/triggerInbox.d.ts.map +1 -1
  31. package/dist/resolvers/triggerInbox.js +2 -1
  32. package/dist/resolvers/triggerMessages.d.ts.map +1 -1
  33. package/dist/resolvers/triggerMessages.js +2 -1
  34. package/dist/types/sdk.js +1 -1
  35. package/dist/utils/schema-utils.d.ts +7 -0
  36. package/dist/utils/schema-utils.d.ts.map +1 -1
  37. package/package.json +1 -1
@@ -710,13 +710,14 @@ interface ApiClientOptions {
710
710
  maxConcurrentRequests?: number;
711
711
  /**
712
712
  * Controls how the approval flow is handled.
713
- * - "disabled": (default when env var is unset) Throw a ZapierApprovalError
714
- * on approval-required responses without creating an approval.
715
713
  * - "poll": Create the approval, open the URL in a browser, poll until
716
714
  * resolved, and retry the original request on success.
717
715
  * - "throw": Create the approval and throw a ZapierApprovalError immediately
718
716
  * with the approval URL so the caller can surface it.
719
- * Defaults to the ZAPIER_APPROVAL_MODE env var, then "disabled".
717
+ * - "disabled": Throw a ZapierApprovalError on approval-required responses
718
+ * without creating an approval.
719
+ * Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then a
720
+ * TTY-based default ("poll" if interactive, "throw" otherwise).
720
721
  */
721
722
  approvalMode?: "disabled" | "poll" | "throw";
722
723
  /**
@@ -5236,6 +5237,13 @@ interface PromptConfig {
5236
5237
  choices?: Array<{
5237
5238
  name: string;
5238
5239
  value: unknown;
5240
+ /**
5241
+ * Optional secondary info shown after `name`. The CLI wraps it in
5242
+ * dimmed parens; an array is joined with ", ". Use for keys, ids, or
5243
+ * other context that's useful but shouldn't compete visually with
5244
+ * the primary label.
5245
+ */
5246
+ hint?: string | string[];
5239
5247
  }>;
5240
5248
  default?: unknown;
5241
5249
  filter?: (value: unknown) => unknown;
@@ -8869,17 +8877,27 @@ declare function parseConcurrencyEnvVar(name: string): number | undefined;
8869
8877
  declare const ZAPIER_MAX_CONCURRENT_REQUESTS: number;
8870
8878
  /**
8871
8879
  * Approval flow behavior from environment variable.
8872
- * - "disabled": (default when env var is unset) Throw a ZapierApprovalError on
8873
- * approval-required responses without creating an approval. Callers must
8874
- * explicitly opt in to approvals via "poll" or "throw".
8875
8880
  * - "poll": Create the approval, open the URL in a browser, poll until
8876
8881
  * resolved, and retry the original request on success.
8877
8882
  * - "throw": Create the approval and throw a ZapierApprovalError immediately
8878
8883
  * with the approval URL so the caller can surface it.
8884
+ * - "disabled": Throw a ZapierApprovalError on approval-required responses
8885
+ * without creating an approval.
8879
8886
  *
8880
- * Read lazily so tests can set the env var after module import.
8887
+ * This parser only reflects the env var value. If unset, callers should fall
8888
+ * back to getZapierDefaultApprovalMode().
8889
+ *
8890
+ * Read lazily so tests can set env vars after module import.
8881
8891
  */
8882
8892
  declare function getZapierApprovalMode(): "disabled" | "poll" | "throw" | undefined;
8893
+ /**
8894
+ * Returns the default approval mode based on whether the process is running in
8895
+ * an interactive terminal. If both stdin and stdout are TTYs the user can act
8896
+ * on an approval URL immediately, so "poll" is the right default. In a
8897
+ * non-interactive context (CI, piped output) the process cannot open a browser
8898
+ * or wait for input, so "throw" hands the URL to the caller.
8899
+ */
8900
+ declare function getZapierDefaultApprovalMode(): "poll" | "throw";
8883
8901
  /**
8884
8902
  * Default timeout for approval polling (10 minutes)
8885
8903
  */
@@ -9760,4 +9778,4 @@ declare const registryPlugin: (sdk: {
9760
9778
  };
9761
9779
  }) => {};
9762
9780
 
9763
- export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, type FunctionOptions as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type MethodCalledEvent as aA, type EventEmissionProvides as aB, type EventContext as aC, type ApplicationLifecycleEventData as aD, type EnhancedErrorEventData as aE, type MethodCalledEventData as aF, generateEventId as aG, getCurrentTimestamp as aH, getReleaseId as aI, getOsInfo as aJ, getPlatformVersions as aK, isCi as aL, getCiPlatform as aM, getMemoryUsage as aN, getCpuTime as aO, buildApplicationLifecycleEvent as aP, buildErrorEventWithContext as aQ, buildErrorEvent as aR, createBaseEvent as aS, buildMethodCalledEvent as aT, type AppItem as aU, type ConnectionItem as aV, type ActionItem$1 as aW, type InputFieldItem as aX, type InfoFieldItem as aY, type RootFieldItem as aZ, type UserProfileItem as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type BaseEvent as az, type AddActionEntryOptions as b, ZapierValidationError as b$, type SdkPage as b0, type PaginatedSdkFunction as b1, AppKeyPropertySchema as b2, AppPropertySchema as b3, ActionTypePropertySchema as b4, ActionKeyPropertySchema as b5, ActionPropertySchema as b6, InputFieldPropertySchema as b7, ConnectionIdPropertySchema as b8, AuthenticationIdPropertySchema as b9, type ConnectionIdProperty as bA, type ConnectionProperty as bB, type AuthenticationIdProperty as bC, type InputsProperty as bD, type LimitProperty as bE, type OffsetProperty as bF, type OutputProperty as bG, type DebugProperty as bH, type ParamsProperty as bI, type ActionTimeoutMsProperty as bJ, type TableProperty as bK, type RecordProperty as bL, type RecordsProperty as bM, type FieldsProperty as bN, type AppsProperty as bO, type TablesProperty as bP, type ConnectionsProperty as bQ, type TriggerInboxProperty as bR, type TriggerInboxNameProperty as bS, type LeaseProperty as bT, type LeaseSecondsProperty as bU, type LeaseLimitProperty as bV, type ApiError as bW, type ErrorOptions as bX, ZapierError as bY, ZapierApiError as bZ, ZapierAppNotFoundError as b_, ConnectionPropertySchema as ba, InputsPropertySchema as bb, LimitPropertySchema as bc, OffsetPropertySchema as bd, OutputPropertySchema as be, DebugPropertySchema as bf, ParamsPropertySchema as bg, ActionTimeoutMsPropertySchema as bh, TablePropertySchema as bi, RecordPropertySchema as bj, RecordsPropertySchema as bk, FieldsPropertySchema as bl, AppsPropertySchema as bm, TablesPropertySchema as bn, ConnectionsPropertySchema as bo, TriggerInboxPropertySchema as bp, TriggerInboxNamePropertySchema as bq, LeasePropertySchema as br, LeaseSecondsPropertySchema as bs, LeaseLimitPropertySchema as bt, type AppKeyProperty as bu, type AppProperty as bv, type ActionTypeProperty as bw, type ActionKeyProperty as bx, type ActionProperty as by, type InputFieldProperty as bz, type AddActionEntryResult as c, type GetProfilePluginProvides as c$, ZapierUnknownError as c0, ZapierAuthenticationError as c1, ZapierNotFoundError as c2, ZapierResourceNotFoundError as c3, ZapierConfigurationError as c4, ZapierBundleError as c5, ZapierTimeoutError as c6, ZapierActionError as c7, ZapierConflictError as c8, type RateLimitInfo as c9, createClientCredentialsPlugin as cA, type CreateClientCredentialsPluginProvides as cB, deleteClientCredentialsPlugin as cC, type DeleteClientCredentialsPluginProvides as cD, getAppPlugin as cE, type GetAppPluginProvides as cF, getActionPlugin as cG, type GetActionPluginProvides as cH, getConnectionPlugin as cI, type GetConnectionPluginProvides as cJ, findFirstConnectionPlugin as cK, type FindFirstConnectionPluginProvides as cL, findUniqueConnectionPlugin as cM, type FindUniqueConnectionPluginProvides as cN, CONTEXT_CACHE_TTL_MS as cO, CONTEXT_CACHE_MAX_SIZE as cP, runActionPlugin as cQ, type RunActionPluginProvides as cR, requestPlugin as cS, type RequestPluginProvides as cT, type ManifestPluginOptions as cU, getPreferredManifestEntryKey as cV, manifestPlugin as cW, type ManifestPluginProvides as cX, DEFAULT_CONFIG_PATH as cY, type ManifestEntry as cZ, getProfilePlugin as c_, ZapierRateLimitError as ca, type ApprovalStatus as cb, ZapierApprovalError as cc, ZapierRelayError as cd, formatErrorMessage as ce, ZapierSignal as cf, appsPlugin as cg, type AppsPluginProvides as ch, type ActionExecutionOptions as ci, type AppFactoryInput as cj, fetchPlugin as ck, type FetchPluginProvides as cl, listAppsPlugin as cm, type ListAppsPluginProvides as cn, listActionsPlugin as co, type ListActionsPluginProvides as cp, listActionInputFieldsPlugin as cq, type ListActionInputFieldsPluginProvides as cr, listActionInputFieldChoicesPlugin as cs, type ListActionInputFieldChoicesPluginProvides as ct, getActionInputFieldsSchemaPlugin as cu, type GetActionInputFieldsSchemaPluginProvides as cv, listConnectionsPlugin as cw, type ListConnectionsPluginProvides as cx, listClientCredentialsPlugin as cy, type ListClientCredentialsPluginProvides as cz, type ActionEntry as d, CredentialsSchema as d$, type ApiPluginOptions as d0, apiPlugin as d1, type ApiPluginProvides as d2, appKeyResolver as d3, actionTypeResolver as d4, actionKeyResolver as d5, connectionIdResolver as d6, connectionIdGenericResolver as d7, inputsResolver as d8, inputsAllOptionalResolver as d9, type ZapierCacheSetOptions as dA, createMemoryCache as dB, type SdkEvent as dC, type AuthEvent as dD, type ApiEvent as dE, type LoadingEvent as dF, type EventCallback as dG, type Credentials as dH, type ResolvedCredentials as dI, type CredentialsObject as dJ, type ClientCredentialsObject as dK, type PkceCredentialsObject as dL, isClientCredentials as dM, isPkceCredentials as dN, isCredentialsObject as dO, isCredentialsFunction as dP, type ResolveCredentialsOptions as dQ, resolveCredentialsFromEnv as dR, resolveCredentials as dS, getBaseUrlFromCredentials as dT, getClientIdFromCredentials as dU, ClientCredentialsObjectSchema as dV, PkceCredentialsObjectSchema as dW, CredentialsObjectSchema as dX, ResolvedCredentialsSchema as dY, CredentialsFunctionSchema as dZ, type CredentialsFunction as d_, inputFieldKeyResolver as da, clientCredentialsNameResolver as db, clientIdResolver as dc, tableIdResolver as dd, triggerInboxResolver as de, triggerMessagesResolver as df, tableRecordIdResolver as dg, tableRecordIdsResolver as dh, tableFieldIdsResolver as di, tableNameResolver as dj, tableFieldsResolver as dk, tableRecordsResolver as dl, tableUpdateRecordsResolver as dm, tableFiltersResolver as dn, tableSortResolver as dp, type ResolveAuthTokenOptions as dq, clearTokenCache as dr, invalidateCachedToken as ds, injectCliLogin as dt, isCliLoginAvailable as du, getTokenFromCliLogin as dv, resolveAuthToken as dw, invalidateCredentialsToken as dx, type ZapierCache as dy, type ZapierCacheEntry as dz, type PaginatedSdkResult as e, ConnectionEntrySchema as e0, type ConnectionEntry as e1, ConnectionsMapSchema as e2, type ConnectionsMap as e3, connectionsPlugin as e4, type ConnectionsPluginProvides as e5, ZAPIER_BASE_URL as e6, getZapierSdkService as e7, MAX_PAGE_LIMIT as e8, DEFAULT_PAGE_SIZE as e9, type ListTableRecordsPluginProvides as eA, createTableRecordsPlugin as eB, type CreateTableRecordsPluginProvides as eC, deleteTableRecordsPlugin as eD, type DeleteTableRecordsPluginProvides as eE, updateTableRecordsPlugin as eF, type UpdateTableRecordsPluginProvides as eG, createZapierSdk as eH, type ZapierSdk as eI, DEFAULT_ACTION_TIMEOUT_MS as ea, ZAPIER_MAX_NETWORK_RETRIES as eb, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ec, MAX_CONCURRENCY_LIMIT as ed, parseConcurrencyEnvVar as ee, ZAPIER_MAX_CONCURRENT_REQUESTS as ef, getZapierApprovalMode as eg, DEFAULT_APPROVAL_TIMEOUT_MS as eh, DEFAULT_MAX_APPROVAL_RETRIES as ei, listTablesPlugin as ej, type ListTablesPluginProvides as ek, getTablePlugin as el, type GetTablePluginProvides as em, createTablePlugin as en, type CreateTablePluginProvides as eo, deleteTablePlugin as ep, type DeleteTablePluginProvides as eq, listTableFieldsPlugin as er, type ListTableFieldsPluginProvides as es, createTableFieldsPlugin as et, type CreateTableFieldsPluginProvides as eu, deleteTableFieldsPlugin as ev, type DeleteTableFieldsPluginProvides as ew, getTableRecordPlugin as ex, type GetTableRecordPluginProvides as ey, listTableRecordsPlugin as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
9781
+ export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, type FunctionOptions as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type MethodCalledEvent as aA, type EventEmissionProvides as aB, type EventContext as aC, type ApplicationLifecycleEventData as aD, type EnhancedErrorEventData as aE, type MethodCalledEventData as aF, generateEventId as aG, getCurrentTimestamp as aH, getReleaseId as aI, getOsInfo as aJ, getPlatformVersions as aK, isCi as aL, getCiPlatform as aM, getMemoryUsage as aN, getCpuTime as aO, buildApplicationLifecycleEvent as aP, buildErrorEventWithContext as aQ, buildErrorEvent as aR, createBaseEvent as aS, buildMethodCalledEvent as aT, type AppItem as aU, type ConnectionItem as aV, type ActionItem$1 as aW, type InputFieldItem as aX, type InfoFieldItem as aY, type RootFieldItem as aZ, type UserProfileItem as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type BaseEvent as az, type AddActionEntryOptions as b, ZapierValidationError as b$, type SdkPage as b0, type PaginatedSdkFunction as b1, AppKeyPropertySchema as b2, AppPropertySchema as b3, ActionTypePropertySchema as b4, ActionKeyPropertySchema as b5, ActionPropertySchema as b6, InputFieldPropertySchema as b7, ConnectionIdPropertySchema as b8, AuthenticationIdPropertySchema as b9, type ConnectionIdProperty as bA, type ConnectionProperty as bB, type AuthenticationIdProperty as bC, type InputsProperty as bD, type LimitProperty as bE, type OffsetProperty as bF, type OutputProperty as bG, type DebugProperty as bH, type ParamsProperty as bI, type ActionTimeoutMsProperty as bJ, type TableProperty as bK, type RecordProperty as bL, type RecordsProperty as bM, type FieldsProperty as bN, type AppsProperty as bO, type TablesProperty as bP, type ConnectionsProperty as bQ, type TriggerInboxProperty as bR, type TriggerInboxNameProperty as bS, type LeaseProperty as bT, type LeaseSecondsProperty as bU, type LeaseLimitProperty as bV, type ApiError as bW, type ErrorOptions as bX, ZapierError as bY, ZapierApiError as bZ, ZapierAppNotFoundError as b_, ConnectionPropertySchema as ba, InputsPropertySchema as bb, LimitPropertySchema as bc, OffsetPropertySchema as bd, OutputPropertySchema as be, DebugPropertySchema as bf, ParamsPropertySchema as bg, ActionTimeoutMsPropertySchema as bh, TablePropertySchema as bi, RecordPropertySchema as bj, RecordsPropertySchema as bk, FieldsPropertySchema as bl, AppsPropertySchema as bm, TablesPropertySchema as bn, ConnectionsPropertySchema as bo, TriggerInboxPropertySchema as bp, TriggerInboxNamePropertySchema as bq, LeasePropertySchema as br, LeaseSecondsPropertySchema as bs, LeaseLimitPropertySchema as bt, type AppKeyProperty as bu, type AppProperty as bv, type ActionTypeProperty as bw, type ActionKeyProperty as bx, type ActionProperty as by, type InputFieldProperty as bz, type AddActionEntryResult as c, type GetProfilePluginProvides as c$, ZapierUnknownError as c0, ZapierAuthenticationError as c1, ZapierNotFoundError as c2, ZapierResourceNotFoundError as c3, ZapierConfigurationError as c4, ZapierBundleError as c5, ZapierTimeoutError as c6, ZapierActionError as c7, ZapierConflictError as c8, type RateLimitInfo as c9, createClientCredentialsPlugin as cA, type CreateClientCredentialsPluginProvides as cB, deleteClientCredentialsPlugin as cC, type DeleteClientCredentialsPluginProvides as cD, getAppPlugin as cE, type GetAppPluginProvides as cF, getActionPlugin as cG, type GetActionPluginProvides as cH, getConnectionPlugin as cI, type GetConnectionPluginProvides as cJ, findFirstConnectionPlugin as cK, type FindFirstConnectionPluginProvides as cL, findUniqueConnectionPlugin as cM, type FindUniqueConnectionPluginProvides as cN, CONTEXT_CACHE_TTL_MS as cO, CONTEXT_CACHE_MAX_SIZE as cP, runActionPlugin as cQ, type RunActionPluginProvides as cR, requestPlugin as cS, type RequestPluginProvides as cT, type ManifestPluginOptions as cU, getPreferredManifestEntryKey as cV, manifestPlugin as cW, type ManifestPluginProvides as cX, DEFAULT_CONFIG_PATH as cY, type ManifestEntry as cZ, getProfilePlugin as c_, ZapierRateLimitError as ca, type ApprovalStatus as cb, ZapierApprovalError as cc, ZapierRelayError as cd, formatErrorMessage as ce, ZapierSignal as cf, appsPlugin as cg, type AppsPluginProvides as ch, type ActionExecutionOptions as ci, type AppFactoryInput as cj, fetchPlugin as ck, type FetchPluginProvides as cl, listAppsPlugin as cm, type ListAppsPluginProvides as cn, listActionsPlugin as co, type ListActionsPluginProvides as cp, listActionInputFieldsPlugin as cq, type ListActionInputFieldsPluginProvides as cr, listActionInputFieldChoicesPlugin as cs, type ListActionInputFieldChoicesPluginProvides as ct, getActionInputFieldsSchemaPlugin as cu, type GetActionInputFieldsSchemaPluginProvides as cv, listConnectionsPlugin as cw, type ListConnectionsPluginProvides as cx, listClientCredentialsPlugin as cy, type ListClientCredentialsPluginProvides as cz, type ActionEntry as d, CredentialsSchema as d$, type ApiPluginOptions as d0, apiPlugin as d1, type ApiPluginProvides as d2, appKeyResolver as d3, actionTypeResolver as d4, actionKeyResolver as d5, connectionIdResolver as d6, connectionIdGenericResolver as d7, inputsResolver as d8, inputsAllOptionalResolver as d9, type ZapierCacheSetOptions as dA, createMemoryCache as dB, type SdkEvent as dC, type AuthEvent as dD, type ApiEvent as dE, type LoadingEvent as dF, type EventCallback as dG, type Credentials as dH, type ResolvedCredentials as dI, type CredentialsObject as dJ, type ClientCredentialsObject as dK, type PkceCredentialsObject as dL, isClientCredentials as dM, isPkceCredentials as dN, isCredentialsObject as dO, isCredentialsFunction as dP, type ResolveCredentialsOptions as dQ, resolveCredentialsFromEnv as dR, resolveCredentials as dS, getBaseUrlFromCredentials as dT, getClientIdFromCredentials as dU, ClientCredentialsObjectSchema as dV, PkceCredentialsObjectSchema as dW, CredentialsObjectSchema as dX, ResolvedCredentialsSchema as dY, CredentialsFunctionSchema as dZ, type CredentialsFunction as d_, inputFieldKeyResolver as da, clientCredentialsNameResolver as db, clientIdResolver as dc, tableIdResolver as dd, triggerInboxResolver as de, triggerMessagesResolver as df, tableRecordIdResolver as dg, tableRecordIdsResolver as dh, tableFieldIdsResolver as di, tableNameResolver as dj, tableFieldsResolver as dk, tableRecordsResolver as dl, tableUpdateRecordsResolver as dm, tableFiltersResolver as dn, tableSortResolver as dp, type ResolveAuthTokenOptions as dq, clearTokenCache as dr, invalidateCachedToken as ds, injectCliLogin as dt, isCliLoginAvailable as du, getTokenFromCliLogin as dv, resolveAuthToken as dw, invalidateCredentialsToken as dx, type ZapierCache as dy, type ZapierCacheEntry as dz, type PaginatedSdkResult as e, ConnectionEntrySchema as e0, type ConnectionEntry as e1, ConnectionsMapSchema as e2, type ConnectionsMap as e3, connectionsPlugin as e4, type ConnectionsPluginProvides as e5, ZAPIER_BASE_URL as e6, getZapierSdkService as e7, MAX_PAGE_LIMIT as e8, DEFAULT_PAGE_SIZE as e9, listTableRecordsPlugin as eA, type ListTableRecordsPluginProvides as eB, createTableRecordsPlugin as eC, type CreateTableRecordsPluginProvides as eD, deleteTableRecordsPlugin as eE, type DeleteTableRecordsPluginProvides as eF, updateTableRecordsPlugin as eG, type UpdateTableRecordsPluginProvides as eH, createZapierSdk as eI, type ZapierSdk as eJ, DEFAULT_ACTION_TIMEOUT_MS as ea, ZAPIER_MAX_NETWORK_RETRIES as eb, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ec, MAX_CONCURRENCY_LIMIT as ed, parseConcurrencyEnvVar as ee, ZAPIER_MAX_CONCURRENT_REQUESTS as ef, getZapierApprovalMode as eg, getZapierDefaultApprovalMode as eh, DEFAULT_APPROVAL_TIMEOUT_MS as ei, DEFAULT_MAX_APPROVAL_RETRIES as ej, listTablesPlugin as ek, type ListTablesPluginProvides as el, getTablePlugin as em, type GetTablePluginProvides as en, createTablePlugin as eo, type CreateTablePluginProvides as ep, deleteTablePlugin as eq, type DeleteTablePluginProvides as er, listTableFieldsPlugin as es, type ListTableFieldsPluginProvides as et, createTableFieldsPlugin as eu, type CreateTableFieldsPluginProvides as ev, deleteTableFieldsPlugin as ew, type DeleteTableFieldsPluginProvides as ex, getTableRecordPlugin as ey, type GetTableRecordPluginProvides as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
@@ -710,13 +710,14 @@ interface ApiClientOptions {
710
710
  maxConcurrentRequests?: number;
711
711
  /**
712
712
  * Controls how the approval flow is handled.
713
- * - "disabled": (default when env var is unset) Throw a ZapierApprovalError
714
- * on approval-required responses without creating an approval.
715
713
  * - "poll": Create the approval, open the URL in a browser, poll until
716
714
  * resolved, and retry the original request on success.
717
715
  * - "throw": Create the approval and throw a ZapierApprovalError immediately
718
716
  * with the approval URL so the caller can surface it.
719
- * Defaults to the ZAPIER_APPROVAL_MODE env var, then "disabled".
717
+ * - "disabled": Throw a ZapierApprovalError on approval-required responses
718
+ * without creating an approval.
719
+ * Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then a
720
+ * TTY-based default ("poll" if interactive, "throw" otherwise).
720
721
  */
721
722
  approvalMode?: "disabled" | "poll" | "throw";
722
723
  /**
@@ -5236,6 +5237,13 @@ interface PromptConfig {
5236
5237
  choices?: Array<{
5237
5238
  name: string;
5238
5239
  value: unknown;
5240
+ /**
5241
+ * Optional secondary info shown after `name`. The CLI wraps it in
5242
+ * dimmed parens; an array is joined with ", ". Use for keys, ids, or
5243
+ * other context that's useful but shouldn't compete visually with
5244
+ * the primary label.
5245
+ */
5246
+ hint?: string | string[];
5239
5247
  }>;
5240
5248
  default?: unknown;
5241
5249
  filter?: (value: unknown) => unknown;
@@ -8869,17 +8877,27 @@ declare function parseConcurrencyEnvVar(name: string): number | undefined;
8869
8877
  declare const ZAPIER_MAX_CONCURRENT_REQUESTS: number;
8870
8878
  /**
8871
8879
  * Approval flow behavior from environment variable.
8872
- * - "disabled": (default when env var is unset) Throw a ZapierApprovalError on
8873
- * approval-required responses without creating an approval. Callers must
8874
- * explicitly opt in to approvals via "poll" or "throw".
8875
8880
  * - "poll": Create the approval, open the URL in a browser, poll until
8876
8881
  * resolved, and retry the original request on success.
8877
8882
  * - "throw": Create the approval and throw a ZapierApprovalError immediately
8878
8883
  * with the approval URL so the caller can surface it.
8884
+ * - "disabled": Throw a ZapierApprovalError on approval-required responses
8885
+ * without creating an approval.
8879
8886
  *
8880
- * Read lazily so tests can set the env var after module import.
8887
+ * This parser only reflects the env var value. If unset, callers should fall
8888
+ * back to getZapierDefaultApprovalMode().
8889
+ *
8890
+ * Read lazily so tests can set env vars after module import.
8881
8891
  */
8882
8892
  declare function getZapierApprovalMode(): "disabled" | "poll" | "throw" | undefined;
8893
+ /**
8894
+ * Returns the default approval mode based on whether the process is running in
8895
+ * an interactive terminal. If both stdin and stdout are TTYs the user can act
8896
+ * on an approval URL immediately, so "poll" is the right default. In a
8897
+ * non-interactive context (CI, piped output) the process cannot open a browser
8898
+ * or wait for input, so "throw" hands the URL to the caller.
8899
+ */
8900
+ declare function getZapierDefaultApprovalMode(): "poll" | "throw";
8883
8901
  /**
8884
8902
  * Default timeout for approval polling (10 minutes)
8885
8903
  */
@@ -9760,4 +9778,4 @@ declare const registryPlugin: (sdk: {
9760
9778
  };
9761
9779
  }) => {};
9762
9780
 
9763
- export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, type FunctionOptions as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type MethodCalledEvent as aA, type EventEmissionProvides as aB, type EventContext as aC, type ApplicationLifecycleEventData as aD, type EnhancedErrorEventData as aE, type MethodCalledEventData as aF, generateEventId as aG, getCurrentTimestamp as aH, getReleaseId as aI, getOsInfo as aJ, getPlatformVersions as aK, isCi as aL, getCiPlatform as aM, getMemoryUsage as aN, getCpuTime as aO, buildApplicationLifecycleEvent as aP, buildErrorEventWithContext as aQ, buildErrorEvent as aR, createBaseEvent as aS, buildMethodCalledEvent as aT, type AppItem as aU, type ConnectionItem as aV, type ActionItem$1 as aW, type InputFieldItem as aX, type InfoFieldItem as aY, type RootFieldItem as aZ, type UserProfileItem as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type BaseEvent as az, type AddActionEntryOptions as b, ZapierValidationError as b$, type SdkPage as b0, type PaginatedSdkFunction as b1, AppKeyPropertySchema as b2, AppPropertySchema as b3, ActionTypePropertySchema as b4, ActionKeyPropertySchema as b5, ActionPropertySchema as b6, InputFieldPropertySchema as b7, ConnectionIdPropertySchema as b8, AuthenticationIdPropertySchema as b9, type ConnectionIdProperty as bA, type ConnectionProperty as bB, type AuthenticationIdProperty as bC, type InputsProperty as bD, type LimitProperty as bE, type OffsetProperty as bF, type OutputProperty as bG, type DebugProperty as bH, type ParamsProperty as bI, type ActionTimeoutMsProperty as bJ, type TableProperty as bK, type RecordProperty as bL, type RecordsProperty as bM, type FieldsProperty as bN, type AppsProperty as bO, type TablesProperty as bP, type ConnectionsProperty as bQ, type TriggerInboxProperty as bR, type TriggerInboxNameProperty as bS, type LeaseProperty as bT, type LeaseSecondsProperty as bU, type LeaseLimitProperty as bV, type ApiError as bW, type ErrorOptions as bX, ZapierError as bY, ZapierApiError as bZ, ZapierAppNotFoundError as b_, ConnectionPropertySchema as ba, InputsPropertySchema as bb, LimitPropertySchema as bc, OffsetPropertySchema as bd, OutputPropertySchema as be, DebugPropertySchema as bf, ParamsPropertySchema as bg, ActionTimeoutMsPropertySchema as bh, TablePropertySchema as bi, RecordPropertySchema as bj, RecordsPropertySchema as bk, FieldsPropertySchema as bl, AppsPropertySchema as bm, TablesPropertySchema as bn, ConnectionsPropertySchema as bo, TriggerInboxPropertySchema as bp, TriggerInboxNamePropertySchema as bq, LeasePropertySchema as br, LeaseSecondsPropertySchema as bs, LeaseLimitPropertySchema as bt, type AppKeyProperty as bu, type AppProperty as bv, type ActionTypeProperty as bw, type ActionKeyProperty as bx, type ActionProperty as by, type InputFieldProperty as bz, type AddActionEntryResult as c, type GetProfilePluginProvides as c$, ZapierUnknownError as c0, ZapierAuthenticationError as c1, ZapierNotFoundError as c2, ZapierResourceNotFoundError as c3, ZapierConfigurationError as c4, ZapierBundleError as c5, ZapierTimeoutError as c6, ZapierActionError as c7, ZapierConflictError as c8, type RateLimitInfo as c9, createClientCredentialsPlugin as cA, type CreateClientCredentialsPluginProvides as cB, deleteClientCredentialsPlugin as cC, type DeleteClientCredentialsPluginProvides as cD, getAppPlugin as cE, type GetAppPluginProvides as cF, getActionPlugin as cG, type GetActionPluginProvides as cH, getConnectionPlugin as cI, type GetConnectionPluginProvides as cJ, findFirstConnectionPlugin as cK, type FindFirstConnectionPluginProvides as cL, findUniqueConnectionPlugin as cM, type FindUniqueConnectionPluginProvides as cN, CONTEXT_CACHE_TTL_MS as cO, CONTEXT_CACHE_MAX_SIZE as cP, runActionPlugin as cQ, type RunActionPluginProvides as cR, requestPlugin as cS, type RequestPluginProvides as cT, type ManifestPluginOptions as cU, getPreferredManifestEntryKey as cV, manifestPlugin as cW, type ManifestPluginProvides as cX, DEFAULT_CONFIG_PATH as cY, type ManifestEntry as cZ, getProfilePlugin as c_, ZapierRateLimitError as ca, type ApprovalStatus as cb, ZapierApprovalError as cc, ZapierRelayError as cd, formatErrorMessage as ce, ZapierSignal as cf, appsPlugin as cg, type AppsPluginProvides as ch, type ActionExecutionOptions as ci, type AppFactoryInput as cj, fetchPlugin as ck, type FetchPluginProvides as cl, listAppsPlugin as cm, type ListAppsPluginProvides as cn, listActionsPlugin as co, type ListActionsPluginProvides as cp, listActionInputFieldsPlugin as cq, type ListActionInputFieldsPluginProvides as cr, listActionInputFieldChoicesPlugin as cs, type ListActionInputFieldChoicesPluginProvides as ct, getActionInputFieldsSchemaPlugin as cu, type GetActionInputFieldsSchemaPluginProvides as cv, listConnectionsPlugin as cw, type ListConnectionsPluginProvides as cx, listClientCredentialsPlugin as cy, type ListClientCredentialsPluginProvides as cz, type ActionEntry as d, CredentialsSchema as d$, type ApiPluginOptions as d0, apiPlugin as d1, type ApiPluginProvides as d2, appKeyResolver as d3, actionTypeResolver as d4, actionKeyResolver as d5, connectionIdResolver as d6, connectionIdGenericResolver as d7, inputsResolver as d8, inputsAllOptionalResolver as d9, type ZapierCacheSetOptions as dA, createMemoryCache as dB, type SdkEvent as dC, type AuthEvent as dD, type ApiEvent as dE, type LoadingEvent as dF, type EventCallback as dG, type Credentials as dH, type ResolvedCredentials as dI, type CredentialsObject as dJ, type ClientCredentialsObject as dK, type PkceCredentialsObject as dL, isClientCredentials as dM, isPkceCredentials as dN, isCredentialsObject as dO, isCredentialsFunction as dP, type ResolveCredentialsOptions as dQ, resolveCredentialsFromEnv as dR, resolveCredentials as dS, getBaseUrlFromCredentials as dT, getClientIdFromCredentials as dU, ClientCredentialsObjectSchema as dV, PkceCredentialsObjectSchema as dW, CredentialsObjectSchema as dX, ResolvedCredentialsSchema as dY, CredentialsFunctionSchema as dZ, type CredentialsFunction as d_, inputFieldKeyResolver as da, clientCredentialsNameResolver as db, clientIdResolver as dc, tableIdResolver as dd, triggerInboxResolver as de, triggerMessagesResolver as df, tableRecordIdResolver as dg, tableRecordIdsResolver as dh, tableFieldIdsResolver as di, tableNameResolver as dj, tableFieldsResolver as dk, tableRecordsResolver as dl, tableUpdateRecordsResolver as dm, tableFiltersResolver as dn, tableSortResolver as dp, type ResolveAuthTokenOptions as dq, clearTokenCache as dr, invalidateCachedToken as ds, injectCliLogin as dt, isCliLoginAvailable as du, getTokenFromCliLogin as dv, resolveAuthToken as dw, invalidateCredentialsToken as dx, type ZapierCache as dy, type ZapierCacheEntry as dz, type PaginatedSdkResult as e, ConnectionEntrySchema as e0, type ConnectionEntry as e1, ConnectionsMapSchema as e2, type ConnectionsMap as e3, connectionsPlugin as e4, type ConnectionsPluginProvides as e5, ZAPIER_BASE_URL as e6, getZapierSdkService as e7, MAX_PAGE_LIMIT as e8, DEFAULT_PAGE_SIZE as e9, type ListTableRecordsPluginProvides as eA, createTableRecordsPlugin as eB, type CreateTableRecordsPluginProvides as eC, deleteTableRecordsPlugin as eD, type DeleteTableRecordsPluginProvides as eE, updateTableRecordsPlugin as eF, type UpdateTableRecordsPluginProvides as eG, createZapierSdk as eH, type ZapierSdk as eI, DEFAULT_ACTION_TIMEOUT_MS as ea, ZAPIER_MAX_NETWORK_RETRIES as eb, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ec, MAX_CONCURRENCY_LIMIT as ed, parseConcurrencyEnvVar as ee, ZAPIER_MAX_CONCURRENT_REQUESTS as ef, getZapierApprovalMode as eg, DEFAULT_APPROVAL_TIMEOUT_MS as eh, DEFAULT_MAX_APPROVAL_RETRIES as ei, listTablesPlugin as ej, type ListTablesPluginProvides as ek, getTablePlugin as el, type GetTablePluginProvides as em, createTablePlugin as en, type CreateTablePluginProvides as eo, deleteTablePlugin as ep, type DeleteTablePluginProvides as eq, listTableFieldsPlugin as er, type ListTableFieldsPluginProvides as es, createTableFieldsPlugin as et, type CreateTableFieldsPluginProvides as eu, deleteTableFieldsPlugin as ev, type DeleteTableFieldsPluginProvides as ew, getTableRecordPlugin as ex, type GetTableRecordPluginProvides as ey, listTableRecordsPlugin as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
9781
+ export { type Resolver as $, type ApiClient as A, type BaseSdkOptions as B, type CapabilitiesContext as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetAuthenticationPluginProvides as G, type ActionFieldChoice as H, type NeedsRequest as I, type NeedsResponse as J, type Connection as K, type LeasedTriggerMessageItem as L, type Manifest as M, type Need as N, type ConnectionsResponse as O, type PluginMeta as P, type UserProfile as Q, type ResolvedAppLocator as R, isPositional as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, createFunction as V, type WithAddPlugin as W, type FormattedItem as X, type FormatMetadata as Y, type ZapierSdkOptions as Z, type OutputFormatter as _, type UpdateManifestEntryResult as a, type FunctionOptions as a$, type ArrayResolver as a0, type ResolverMetadata as a1, type StaticResolver as a2, type DynamicListResolver as a3, type DynamicSearchResolver as a4, type FieldsResolver as a5, runWithTelemetryContext as a6, toSnakeCase as a7, toTitleCase as a8, batch as a9, type MethodCalledEvent as aA, type EventEmissionProvides as aB, type EventContext as aC, type ApplicationLifecycleEventData as aD, type EnhancedErrorEventData as aE, type MethodCalledEventData as aF, generateEventId as aG, getCurrentTimestamp as aH, getReleaseId as aI, getOsInfo as aJ, getPlatformVersions as aK, isCi as aL, getCiPlatform as aM, getMemoryUsage as aN, getCpuTime as aO, buildApplicationLifecycleEvent as aP, buildErrorEventWithContext as aQ, buildErrorEvent as aR, createBaseEvent as aS, buildMethodCalledEvent as aT, type AppItem as aU, type ConnectionItem as aV, type ActionItem$1 as aW, type InputFieldItem as aX, type InfoFieldItem as aY, type RootFieldItem as aZ, type UserProfileItem as a_, type BatchOptions as aa, buildCapabilityMessage as ab, logDeprecation as ac, resetDeprecationWarnings as ad, RelayRequestSchema as ae, RelayFetchSchema as af, createZapierSdkWithoutRegistry as ag, createSdk as ah, createOptionsPlugin as ai, type FunctionRegistryEntry as aj, type FunctionDeprecation as ak, BaseSdkOptionsSchema as al, type Plugin as am, type PluginProvides as an, definePlugin as ao, createPluginMethod as ap, createPaginatedPluginMethod as aq, composePlugins as ar, type ActionItem as as, type ActionTypeItem as at, registryPlugin as au, type RequestOptions as av, type PollOptions as aw, createZapierApi as ax, getOrCreateApiClient as ay, type BaseEvent as az, type AddActionEntryOptions as b, ZapierValidationError as b$, type SdkPage as b0, type PaginatedSdkFunction as b1, AppKeyPropertySchema as b2, AppPropertySchema as b3, ActionTypePropertySchema as b4, ActionKeyPropertySchema as b5, ActionPropertySchema as b6, InputFieldPropertySchema as b7, ConnectionIdPropertySchema as b8, AuthenticationIdPropertySchema as b9, type ConnectionIdProperty as bA, type ConnectionProperty as bB, type AuthenticationIdProperty as bC, type InputsProperty as bD, type LimitProperty as bE, type OffsetProperty as bF, type OutputProperty as bG, type DebugProperty as bH, type ParamsProperty as bI, type ActionTimeoutMsProperty as bJ, type TableProperty as bK, type RecordProperty as bL, type RecordsProperty as bM, type FieldsProperty as bN, type AppsProperty as bO, type TablesProperty as bP, type ConnectionsProperty as bQ, type TriggerInboxProperty as bR, type TriggerInboxNameProperty as bS, type LeaseProperty as bT, type LeaseSecondsProperty as bU, type LeaseLimitProperty as bV, type ApiError as bW, type ErrorOptions as bX, ZapierError as bY, ZapierApiError as bZ, ZapierAppNotFoundError as b_, ConnectionPropertySchema as ba, InputsPropertySchema as bb, LimitPropertySchema as bc, OffsetPropertySchema as bd, OutputPropertySchema as be, DebugPropertySchema as bf, ParamsPropertySchema as bg, ActionTimeoutMsPropertySchema as bh, TablePropertySchema as bi, RecordPropertySchema as bj, RecordsPropertySchema as bk, FieldsPropertySchema as bl, AppsPropertySchema as bm, TablesPropertySchema as bn, ConnectionsPropertySchema as bo, TriggerInboxPropertySchema as bp, TriggerInboxNamePropertySchema as bq, LeasePropertySchema as br, LeaseSecondsPropertySchema as bs, LeaseLimitPropertySchema as bt, type AppKeyProperty as bu, type AppProperty as bv, type ActionTypeProperty as bw, type ActionKeyProperty as bx, type ActionProperty as by, type InputFieldProperty as bz, type AddActionEntryResult as c, type GetProfilePluginProvides as c$, ZapierUnknownError as c0, ZapierAuthenticationError as c1, ZapierNotFoundError as c2, ZapierResourceNotFoundError as c3, ZapierConfigurationError as c4, ZapierBundleError as c5, ZapierTimeoutError as c6, ZapierActionError as c7, ZapierConflictError as c8, type RateLimitInfo as c9, createClientCredentialsPlugin as cA, type CreateClientCredentialsPluginProvides as cB, deleteClientCredentialsPlugin as cC, type DeleteClientCredentialsPluginProvides as cD, getAppPlugin as cE, type GetAppPluginProvides as cF, getActionPlugin as cG, type GetActionPluginProvides as cH, getConnectionPlugin as cI, type GetConnectionPluginProvides as cJ, findFirstConnectionPlugin as cK, type FindFirstConnectionPluginProvides as cL, findUniqueConnectionPlugin as cM, type FindUniqueConnectionPluginProvides as cN, CONTEXT_CACHE_TTL_MS as cO, CONTEXT_CACHE_MAX_SIZE as cP, runActionPlugin as cQ, type RunActionPluginProvides as cR, requestPlugin as cS, type RequestPluginProvides as cT, type ManifestPluginOptions as cU, getPreferredManifestEntryKey as cV, manifestPlugin as cW, type ManifestPluginProvides as cX, DEFAULT_CONFIG_PATH as cY, type ManifestEntry as cZ, getProfilePlugin as c_, ZapierRateLimitError as ca, type ApprovalStatus as cb, ZapierApprovalError as cc, ZapierRelayError as cd, formatErrorMessage as ce, ZapierSignal as cf, appsPlugin as cg, type AppsPluginProvides as ch, type ActionExecutionOptions as ci, type AppFactoryInput as cj, fetchPlugin as ck, type FetchPluginProvides as cl, listAppsPlugin as cm, type ListAppsPluginProvides as cn, listActionsPlugin as co, type ListActionsPluginProvides as cp, listActionInputFieldsPlugin as cq, type ListActionInputFieldsPluginProvides as cr, listActionInputFieldChoicesPlugin as cs, type ListActionInputFieldChoicesPluginProvides as ct, getActionInputFieldsSchemaPlugin as cu, type GetActionInputFieldsSchemaPluginProvides as cv, listConnectionsPlugin as cw, type ListConnectionsPluginProvides as cx, listClientCredentialsPlugin as cy, type ListClientCredentialsPluginProvides as cz, type ActionEntry as d, CredentialsSchema as d$, type ApiPluginOptions as d0, apiPlugin as d1, type ApiPluginProvides as d2, appKeyResolver as d3, actionTypeResolver as d4, actionKeyResolver as d5, connectionIdResolver as d6, connectionIdGenericResolver as d7, inputsResolver as d8, inputsAllOptionalResolver as d9, type ZapierCacheSetOptions as dA, createMemoryCache as dB, type SdkEvent as dC, type AuthEvent as dD, type ApiEvent as dE, type LoadingEvent as dF, type EventCallback as dG, type Credentials as dH, type ResolvedCredentials as dI, type CredentialsObject as dJ, type ClientCredentialsObject as dK, type PkceCredentialsObject as dL, isClientCredentials as dM, isPkceCredentials as dN, isCredentialsObject as dO, isCredentialsFunction as dP, type ResolveCredentialsOptions as dQ, resolveCredentialsFromEnv as dR, resolveCredentials as dS, getBaseUrlFromCredentials as dT, getClientIdFromCredentials as dU, ClientCredentialsObjectSchema as dV, PkceCredentialsObjectSchema as dW, CredentialsObjectSchema as dX, ResolvedCredentialsSchema as dY, CredentialsFunctionSchema as dZ, type CredentialsFunction as d_, inputFieldKeyResolver as da, clientCredentialsNameResolver as db, clientIdResolver as dc, tableIdResolver as dd, triggerInboxResolver as de, triggerMessagesResolver as df, tableRecordIdResolver as dg, tableRecordIdsResolver as dh, tableFieldIdsResolver as di, tableNameResolver as dj, tableFieldsResolver as dk, tableRecordsResolver as dl, tableUpdateRecordsResolver as dm, tableFiltersResolver as dn, tableSortResolver as dp, type ResolveAuthTokenOptions as dq, clearTokenCache as dr, invalidateCachedToken as ds, injectCliLogin as dt, isCliLoginAvailable as du, getTokenFromCliLogin as dv, resolveAuthToken as dw, invalidateCredentialsToken as dx, type ZapierCache as dy, type ZapierCacheEntry as dz, type PaginatedSdkResult as e, ConnectionEntrySchema as e0, type ConnectionEntry as e1, ConnectionsMapSchema as e2, type ConnectionsMap as e3, connectionsPlugin as e4, type ConnectionsPluginProvides as e5, ZAPIER_BASE_URL as e6, getZapierSdkService as e7, MAX_PAGE_LIMIT as e8, DEFAULT_PAGE_SIZE as e9, listTableRecordsPlugin as eA, type ListTableRecordsPluginProvides as eB, createTableRecordsPlugin as eC, type CreateTableRecordsPluginProvides as eD, deleteTableRecordsPlugin as eE, type DeleteTableRecordsPluginProvides as eF, updateTableRecordsPlugin as eG, type UpdateTableRecordsPluginProvides as eH, createZapierSdk as eI, type ZapierSdk as eJ, DEFAULT_ACTION_TIMEOUT_MS as ea, ZAPIER_MAX_NETWORK_RETRIES as eb, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ec, MAX_CONCURRENCY_LIMIT as ed, parseConcurrencyEnvVar as ee, ZAPIER_MAX_CONCURRENT_REQUESTS as ef, getZapierApprovalMode as eg, getZapierDefaultApprovalMode as eh, DEFAULT_APPROVAL_TIMEOUT_MS as ei, DEFAULT_MAX_APPROVAL_RETRIES as ej, listTablesPlugin as ek, type ListTablesPluginProvides as el, getTablePlugin as em, type GetTablePluginProvides as en, createTablePlugin as eo, type CreateTablePluginProvides as ep, deleteTablePlugin as eq, type DeleteTablePluginProvides as er, listTableFieldsPlugin as es, type ListTableFieldsPluginProvides as et, createTableFieldsPlugin as eu, type CreateTableFieldsPluginProvides as ev, deleteTableFieldsPlugin as ew, type DeleteTableFieldsPluginProvides as ex, getTableRecordPlugin as ey, type GetTableRecordPluginProvides as ez, findManifestEntry as f, type PositionalMetadata as g, type ZapierFetchInitOptions as h, type DynamicResolver as i, type WatchTriggerInboxOptions as j, type ActionProxy as k, type ZapierSdkApps as l, ZapierAbortDrainSignal as m, ZapierReleaseTriggerMessageSignal as n, type DrainTriggerInboxCallback as o, type DrainTriggerInboxErrorObserver as p, type ListAuthenticationsPluginProvides as q, readManifestFromFile as r, type FindFirstAuthenticationPluginProvides as s, type FindUniqueAuthenticationPluginProvides as t, type Action as u, type App as v, type Field as w, type Choice as x, type ActionExecutionResult as y, type ActionField as z };
package/dist/index.cjs CHANGED
@@ -84,6 +84,10 @@ function getZapierApprovalMode() {
84
84
  return value;
85
85
  return void 0;
86
86
  }
87
+ function getZapierDefaultApprovalMode() {
88
+ const isInteractive = !!globalThis.process?.stdin?.isTTY && !!globalThis.process?.stdout?.isTTY;
89
+ return isInteractive ? "poll" : "throw";
90
+ }
87
91
  var DEFAULT_APPROVAL_TIMEOUT_MS = 10 * 60 * 1e3;
88
92
  var DEFAULT_MAX_APPROVAL_RETRIES = 2;
89
93
 
@@ -2298,7 +2302,8 @@ var appKeyResolver = {
2298
2302
  name: "app",
2299
2303
  message: "Select app:",
2300
2304
  choices: apps.map((app) => ({
2301
- name: app.title ? `${app.title} (${getAppKeyList(app).join(", ")})` : app.key,
2305
+ name: app.title || app.key,
2306
+ hint: app.title ? getAppKeyList(app) : void 0,
2302
2307
  value: app.key
2303
2308
  }))
2304
2309
  })
@@ -2346,7 +2351,8 @@ var actionKeyResolver = {
2346
2351
  name: "action",
2347
2352
  message: "Select action:",
2348
2353
  choices: actions.map((action) => ({
2349
- name: `${action.title || action.name || action.key} - ${action.description || "No description"}`,
2354
+ name: action.title || action.name || action.key,
2355
+ hint: action.description || void 0,
2350
2356
  value: action.key
2351
2357
  }))
2352
2358
  })
@@ -2371,7 +2377,7 @@ function promptForConnection(connections, params) {
2371
2377
  name: "connection",
2372
2378
  message: params.app ? `Select connection for ${params.app}:` : "Select connection:",
2373
2379
  choices: connections.map((connection) => ({
2374
- name: `${connection.title || connection.label || "Connection"} (ID: ${connection.id})`,
2380
+ name: connection.title || connection.label || "Connection",
2375
2381
  value: connection.id
2376
2382
  }))
2377
2383
  };
@@ -2486,7 +2492,11 @@ var inputFieldKeyResolver = {
2486
2492
  name: "inputField",
2487
2493
  message: "Select input field:",
2488
2494
  choices: fields.map((field) => ({
2489
- name: `${field.title || field.key} - ${field.value_type || "No type"} ${field.is_required ? "(required)" : "(optional)"}`,
2495
+ name: field.title || field.key,
2496
+ hint: [
2497
+ field.value_type,
2498
+ field.is_required ? "required" : "optional"
2499
+ ].filter(Boolean),
2490
2500
  value: field.key
2491
2501
  }))
2492
2502
  })
@@ -2511,7 +2521,7 @@ var clientIdResolver = {
2511
2521
  name: "clientId",
2512
2522
  message: "Select client credentials to delete:",
2513
2523
  choices: credentials.map((cred) => ({
2514
- name: `${cred.name} (${cred.client_id})`,
2524
+ name: cred.name,
2515
2525
  value: cred.client_id
2516
2526
  }))
2517
2527
  })
@@ -2544,7 +2554,7 @@ var tableIdResolver = {
2544
2554
  name: "table",
2545
2555
  message: "Select a table:",
2546
2556
  choices: tables.map((table) => ({
2547
- name: `${table.name} (${table.id})`,
2557
+ name: table.name,
2548
2558
  value: table.id
2549
2559
  }))
2550
2560
  })
@@ -2561,7 +2571,8 @@ var triggerInboxResolver = {
2561
2571
  // `deleting` inboxes are on their way out — no operation against them
2562
2572
  // is useful (delete is a no-op, pause/resume/update are rejected).
2563
2573
  choices: inboxes.filter((inbox) => inbox.status !== "deleting").map((inbox) => ({
2564
- name: `${inbox.name ?? inbox.id} (${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status})`,
2574
+ name: inbox.name ?? inbox.id,
2575
+ hint: `${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status}`,
2565
2576
  value: inbox.id
2566
2577
  }))
2567
2578
  })
@@ -2584,7 +2595,8 @@ var triggerMessagesResolver = {
2584
2595
  // are gone from the inbox already; available/quarantined ones can't be
2585
2596
  // operated on by these methods.
2586
2597
  choices: messages.filter((message) => message.status === "leased").map((message) => ({
2587
- name: `${message.id} (${message.status}, lease_count: ${message.message_attributes.lease_count})`,
2598
+ name: message.id,
2599
+ hint: `${message.status}, lease_count: ${message.message_attributes.lease_count}`,
2588
2600
  value: message.id
2589
2601
  }))
2590
2602
  })
@@ -2830,8 +2842,8 @@ async function createFieldKeyTranslator({
2830
2842
  function summarizeRecord(record) {
2831
2843
  const values = Object.values(record.data);
2832
2844
  const preview = values.slice(0, 3).map((v) => formatFieldValue(v).replace(/\s+/g, " ").trim()).filter((s) => s.length > 0).join(", ");
2833
- const truncated = preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
2834
- return truncated ? `${record.id} \u2014 ${truncated}` : record.id;
2845
+ if (!preview) return void 0;
2846
+ return preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
2835
2847
  }
2836
2848
  function fetchRecords(sdk, params) {
2837
2849
  return sdk.listTableRecords({
@@ -2841,7 +2853,7 @@ function fetchRecords(sdk, params) {
2841
2853
  }
2842
2854
  function recordChoices(records) {
2843
2855
  return records.map((record) => ({
2844
- name: summarizeRecord(record),
2856
+ name: summarizeRecord(record) || record.id,
2845
2857
  value: record.id
2846
2858
  }));
2847
2859
  }
@@ -2881,7 +2893,8 @@ var tableFieldIdsResolver = {
2881
2893
  name: "fields",
2882
2894
  message: "Select fields:",
2883
2895
  choices: fields.map((field) => ({
2884
- name: `${field.name} (${field.id}, ${field.type})`,
2896
+ name: field.name,
2897
+ hint: [field.id, field.type],
2885
2898
  value: field.id
2886
2899
  })),
2887
2900
  validate: (value) => Array.isArray(value) && value.length > 0 ? true : "Select at least one field"
@@ -6309,7 +6322,7 @@ async function invalidateCredentialsToken(options) {
6309
6322
  }
6310
6323
 
6311
6324
  // src/sdk-version.ts
6312
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.54.1" : void 0) || "unknown";
6325
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.0" : void 0) || "unknown";
6313
6326
 
6314
6327
  // src/utils/open-url.ts
6315
6328
  var nodePrefix = "node:";
@@ -6639,7 +6652,7 @@ var ZapierApiClient = class {
6639
6652
  }
6640
6653
  if (errorType !== "approval_required") return response;
6641
6654
  if (attempt === maxRetries) break;
6642
- const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? "disabled";
6655
+ const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? getZapierDefaultApprovalMode();
6643
6656
  if (mode === "disabled") {
6644
6657
  throw new ZapierApprovalError(
6645
6658
  "Approvals are disabled. Set approvalMode to 'poll' or 'throw' (or ZAPIER_APPROVAL_MODE) to enable.",
@@ -9114,7 +9127,7 @@ var BaseSdkOptionsSchema = zod.z.object({
9114
9127
  "Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2."
9115
9128
  ),
9116
9129
  approvalMode: zod.z.enum(["disabled", "poll", "throw"]).optional().describe(
9117
- 'Approval flow behavior. "disabled" (default) throws a ZapierApprovalError on approval-required responses without creating an approval. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. Defaults to the ZAPIER_APPROVAL_MODE env var, then "disabled".'
9130
+ 'Approval flow behavior. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. "disabled" throws a ZapierApprovalError on approval-required responses without creating an approval. Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then the default behavior (poll for interactive TTY, throw otherwise).'
9118
9131
  ),
9119
9132
  // Internal
9120
9133
  manifestPath: zod.z.string().optional().describe("Path to a .zapierrc manifest file for app version locking.").meta({ internal: true }),
@@ -9276,6 +9289,7 @@ exports.getTablePlugin = getTablePlugin;
9276
9289
  exports.getTableRecordPlugin = getTableRecordPlugin;
9277
9290
  exports.getTokenFromCliLogin = getTokenFromCliLogin;
9278
9291
  exports.getZapierApprovalMode = getZapierApprovalMode;
9292
+ exports.getZapierDefaultApprovalMode = getZapierDefaultApprovalMode;
9279
9293
  exports.getZapierSdkService = getZapierSdkService;
9280
9294
  exports.injectCliLogin = injectCliLogin;
9281
9295
  exports.inputFieldKeyResolver = inputFieldKeyResolver;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { u as Action, d as ActionEntry, ci as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aW as ActionItem, bx as ActionKeyProperty, b5 as ActionKeyPropertySchema, by as ActionProperty, b6 as ActionPropertySchema, as as ActionResolverItem, bJ as ActionTimeoutMsProperty, bh as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bw as ActionTypeProperty, b4 as ActionTypePropertySchema, b as AddActionEntryOptions, c as AddActionEntryResult, A as ApiClient, bW as ApiError, dE as ApiEvent, d0 as ApiPluginOptions, d2 as ApiPluginProvides, v as App, cj as AppFactoryInput, aU as AppItem, bu as AppKeyProperty, b2 as AppKeyPropertySchema, bv as AppProperty, b3 as AppPropertySchema, aD as ApplicationLifecycleEventData, cb as ApprovalStatus, ch as AppsPluginProvides, bO as AppsProperty, bm as AppsPropertySchema, a0 as ArrayResolver, dD as AuthEvent, bC as AuthenticationIdProperty, b9 as AuthenticationIdPropertySchema, az as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cP as CONTEXT_CACHE_MAX_SIZE, cO as CONTEXT_CACHE_TTL_MS, x as Choice, dK as ClientCredentialsObject, dV as ClientCredentialsObjectSchema, K as Connection, e1 as ConnectionEntry, e0 as ConnectionEntrySchema, bA as ConnectionIdProperty, b8 as ConnectionIdPropertySchema, aV as ConnectionItem, bB as ConnectionProperty, ba as ConnectionPropertySchema, e3 as ConnectionsMap, e2 as ConnectionsMapSchema, e5 as ConnectionsPluginProvides, bQ as ConnectionsProperty, bo as ConnectionsPropertySchema, O as ConnectionsResponse, cB as CreateClientCredentialsPluginProvides, eu as CreateTableFieldsPluginProvides, eo as CreateTablePluginProvides, eC as CreateTableRecordsPluginProvides, dH as Credentials, d_ as CredentialsFunction, dZ as CredentialsFunctionSchema, dJ as CredentialsObject, dX as CredentialsObjectSchema, d$ as CredentialsSchema, ea as DEFAULT_ACTION_TIMEOUT_MS, eh as DEFAULT_APPROVAL_TIMEOUT_MS, cY as DEFAULT_CONFIG_PATH, ei as DEFAULT_MAX_APPROVAL_RETRIES, e9 as DEFAULT_PAGE_SIZE, bH as DebugProperty, bf as DebugPropertySchema, cD as DeleteClientCredentialsPluginProvides, ew as DeleteTableFieldsPluginProvides, eq as DeleteTablePluginProvides, eE as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a3 as DynamicListResolver, i as DynamicResolver, a4 as DynamicSearchResolver, aE as EnhancedErrorEventData, bX as ErrorOptions, dG as EventCallback, aC as EventContext, E as EventEmissionContext, aB as EventEmissionProvides, cl as FetchPluginProvides, w as Field, bN as FieldsProperty, bl as FieldsPropertySchema, a5 as FieldsResolver, F as FieldsetItem, s as FindFirstAuthenticationPluginProvides, cL as FindFirstConnectionPluginProvides, t as FindUniqueAuthenticationPluginProvides, cN as FindUniqueConnectionPluginProvides, Y as FormatMetadata, X as FormattedItem, ak as FunctionDeprecation, a$ as FunctionOptions, aj as FunctionRegistryEntry, cv as GetActionInputFieldsSchemaPluginProvides, cH as GetActionPluginProvides, cF as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cJ as GetConnectionPluginProvides, c$ as GetProfilePluginProvides, em as GetTablePluginProvides, ey as GetTableRecordPluginProvides, aY as InfoFieldItem, aX as InputFieldItem, bz as InputFieldProperty, b7 as InputFieldPropertySchema, bD as InputsProperty, bb as InputsPropertySchema, bV as LeaseLimitProperty, bt as LeaseLimitPropertySchema, bT as LeaseProperty, br as LeasePropertySchema, bU as LeaseSecondsProperty, bs as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bE as LimitProperty, bc as LimitPropertySchema, ct as ListActionInputFieldChoicesPluginProvides, cr as ListActionInputFieldsPluginProvides, cp as ListActionsPluginProvides, cn as ListAppsPluginProvides, q as ListAuthenticationsPluginProvides, cz as ListClientCredentialsPluginProvides, cx as ListConnectionsPluginProvides, es as ListTableFieldsPluginProvides, eA as ListTableRecordsPluginProvides, ek as ListTablesPluginProvides, dF as LoadingEvent, ed as MAX_CONCURRENCY_LIMIT, e8 as MAX_PAGE_LIMIT, M as Manifest, cZ as ManifestEntry, cU as ManifestPluginOptions, cX as ManifestPluginProvides, aA as MethodCalledEvent, aF as MethodCalledEventData, N as Need, I as NeedsRequest, J as NeedsResponse, bF as OffsetProperty, bd as OffsetPropertySchema, _ as OutputFormatter, bG as OutputProperty, be as OutputPropertySchema, b1 as PaginatedSdkFunction, e as PaginatedSdkResult, bI as ParamsProperty, bg as ParamsPropertySchema, dL as PkceCredentialsObject, dW as PkceCredentialsObjectSchema, am as Plugin, P as PluginMeta, an as PluginProvides, aw as PollOptions, g as PositionalMetadata, c9 as RateLimitInfo, bL as RecordProperty, bj as RecordPropertySchema, bM as RecordsProperty, bk as RecordsPropertySchema, af as RelayFetchSchema, ae as RelayRequestSchema, av as RequestOptions, cT as RequestPluginProvides, dq as ResolveAuthTokenOptions, dQ as ResolveCredentialsOptions, R as ResolvedAppLocator, dI as ResolvedCredentials, dY as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aZ as RootFieldItem, cR as RunActionPluginProvides, dC as SdkEvent, b0 as SdkPage, a2 as StaticResolver, bK as TableProperty, bi as TablePropertySchema, bP as TablesProperty, bn as TablesPropertySchema, bS as TriggerInboxNameProperty, bq as TriggerInboxNamePropertySchema, bR as TriggerInboxProperty, bp as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, eG as UpdateTableRecordsPluginProvides, Q as UserProfile, a_ as UserProfileItem, j as WatchTriggerInboxOptions, W as WithAddPlugin, e6 as ZAPIER_BASE_URL, ef as ZAPIER_MAX_CONCURRENT_REQUESTS, eb as ZAPIER_MAX_NETWORK_RETRIES, ec as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, m as ZapierAbortDrainSignal, c7 as ZapierActionError, bZ as ZapierApiError, b_ as ZapierAppNotFoundError, cc as ZapierApprovalError, c1 as ZapierAuthenticationError, c5 as ZapierBundleError, dy as ZapierCache, dz as ZapierCacheEntry, dA as ZapierCacheSetOptions, c4 as ZapierConfigurationError, c8 as ZapierConflictError, bY as ZapierError, h as ZapierFetchInitOptions, c2 as ZapierNotFoundError, ca as ZapierRateLimitError, cd as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, c3 as ZapierResourceNotFoundError, eI as ZapierSdk, l as ZapierSdkApps, Z as ZapierSdkOptions, cf as ZapierSignal, c6 as ZapierTimeoutError, c0 as ZapierUnknownError, b$ as ZapierValidationError, d5 as actionKeyResolver, d4 as actionTypeResolver, d1 as apiPlugin, d3 as appKeyResolver, cg as appsPlugin, d7 as authenticationIdGenericResolver, d6 as authenticationIdResolver, a9 as batch, aP as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, aR as buildErrorEvent, aQ as buildErrorEventWithContext, aT as buildMethodCalledEvent, dr as clearTokenCache, db as clientCredentialsNameResolver, dc as clientIdResolver, ar as composePlugins, d7 as connectionIdGenericResolver, d6 as connectionIdResolver, e4 as connectionsPlugin, aS as createBaseEvent, cA as createClientCredentialsPlugin, V as createFunction, dB as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, et as createTableFieldsPlugin, en as createTablePlugin, eB as createTableRecordsPlugin, ax as createZapierApi, eH as createZapierSdk, ag as createZapierSdkWithoutRegistry, ao as definePlugin, cC as deleteClientCredentialsPlugin, ev as deleteTableFieldsPlugin, ep as deleteTablePlugin, eD as deleteTableRecordsPlugin, ck as fetchPlugin, cK as findFirstConnectionPlugin, f as findManifestEntry, cM as findUniqueConnectionPlugin, ce as formatErrorMessage, aG as generateEventId, cu as getActionInputFieldsSchemaPlugin, cG as getActionPlugin, cE as getAppPlugin, dT as getBaseUrlFromCredentials, aM as getCiPlatform, dU as getClientIdFromCredentials, cI as getConnectionPlugin, aO as getCpuTime, aH as getCurrentTimestamp, aN as getMemoryUsage, ay as getOrCreateApiClient, aJ as getOsInfo, aK as getPlatformVersions, cV as getPreferredManifestEntryKey, c_ as getProfilePlugin, aI as getReleaseId, el as getTablePlugin, ex as getTableRecordPlugin, dv as getTokenFromCliLogin, eg as getZapierApprovalMode, e7 as getZapierSdkService, dt as injectCliLogin, da as inputFieldKeyResolver, d9 as inputsAllOptionalResolver, d8 as inputsResolver, ds as invalidateCachedToken, dx as invalidateCredentialsToken, aL as isCi, du as isCliLoginAvailable, dM as isClientCredentials, dP as isCredentialsFunction, dO as isCredentialsObject, dN as isPkceCredentials, S as isPositional, cs as listActionInputFieldChoicesPlugin, cq as listActionInputFieldsPlugin, co as listActionsPlugin, cm as listAppsPlugin, cy as listClientCredentialsPlugin, cw as listConnectionsPlugin, er as listTableFieldsPlugin, ez as listTableRecordsPlugin, ej as listTablesPlugin, ac as logDeprecation, cW as manifestPlugin, ee as parseConcurrencyEnvVar, r as readManifestFromFile, au as registryPlugin, cS as requestPlugin, ad as resetDeprecationWarnings, dw as resolveAuthToken, dS as resolveCredentials, dR as resolveCredentialsFromEnv, cQ as runActionPlugin, a6 as runWithTelemetryContext, di as tableFieldIdsResolver, dk as tableFieldsResolver, dn as tableFiltersResolver, dd as tableIdResolver, dj as tableNameResolver, dg as tableRecordIdResolver, dh as tableRecordIdsResolver, dl as tableRecordsResolver, dp as tableSortResolver, dm as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, de as triggerInboxResolver, df as triggerMessagesResolver, eF as updateTableRecordsPlugin } from './index-SDDmBk2j.mjs';
1
+ export { u as Action, d as ActionEntry, ci as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aW as ActionItem, bx as ActionKeyProperty, b5 as ActionKeyPropertySchema, by as ActionProperty, b6 as ActionPropertySchema, as as ActionResolverItem, bJ as ActionTimeoutMsProperty, bh as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bw as ActionTypeProperty, b4 as ActionTypePropertySchema, b as AddActionEntryOptions, c as AddActionEntryResult, A as ApiClient, bW as ApiError, dE as ApiEvent, d0 as ApiPluginOptions, d2 as ApiPluginProvides, v as App, cj as AppFactoryInput, aU as AppItem, bu as AppKeyProperty, b2 as AppKeyPropertySchema, bv as AppProperty, b3 as AppPropertySchema, aD as ApplicationLifecycleEventData, cb as ApprovalStatus, ch as AppsPluginProvides, bO as AppsProperty, bm as AppsPropertySchema, a0 as ArrayResolver, dD as AuthEvent, bC as AuthenticationIdProperty, b9 as AuthenticationIdPropertySchema, az as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cP as CONTEXT_CACHE_MAX_SIZE, cO as CONTEXT_CACHE_TTL_MS, x as Choice, dK as ClientCredentialsObject, dV as ClientCredentialsObjectSchema, K as Connection, e1 as ConnectionEntry, e0 as ConnectionEntrySchema, bA as ConnectionIdProperty, b8 as ConnectionIdPropertySchema, aV as ConnectionItem, bB as ConnectionProperty, ba as ConnectionPropertySchema, e3 as ConnectionsMap, e2 as ConnectionsMapSchema, e5 as ConnectionsPluginProvides, bQ as ConnectionsProperty, bo as ConnectionsPropertySchema, O as ConnectionsResponse, cB as CreateClientCredentialsPluginProvides, ev as CreateTableFieldsPluginProvides, ep as CreateTablePluginProvides, eD as CreateTableRecordsPluginProvides, dH as Credentials, d_ as CredentialsFunction, dZ as CredentialsFunctionSchema, dJ as CredentialsObject, dX as CredentialsObjectSchema, d$ as CredentialsSchema, ea as DEFAULT_ACTION_TIMEOUT_MS, ei as DEFAULT_APPROVAL_TIMEOUT_MS, cY as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e9 as DEFAULT_PAGE_SIZE, bH as DebugProperty, bf as DebugPropertySchema, cD as DeleteClientCredentialsPluginProvides, ex as DeleteTableFieldsPluginProvides, er as DeleteTablePluginProvides, eF as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, a3 as DynamicListResolver, i as DynamicResolver, a4 as DynamicSearchResolver, aE as EnhancedErrorEventData, bX as ErrorOptions, dG as EventCallback, aC as EventContext, E as EventEmissionContext, aB as EventEmissionProvides, cl as FetchPluginProvides, w as Field, bN as FieldsProperty, bl as FieldsPropertySchema, a5 as FieldsResolver, F as FieldsetItem, s as FindFirstAuthenticationPluginProvides, cL as FindFirstConnectionPluginProvides, t as FindUniqueAuthenticationPluginProvides, cN as FindUniqueConnectionPluginProvides, Y as FormatMetadata, X as FormattedItem, ak as FunctionDeprecation, a$ as FunctionOptions, aj as FunctionRegistryEntry, cv as GetActionInputFieldsSchemaPluginProvides, cH as GetActionPluginProvides, cF as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cJ as GetConnectionPluginProvides, c$ as GetProfilePluginProvides, en as GetTablePluginProvides, ez as GetTableRecordPluginProvides, aY as InfoFieldItem, aX as InputFieldItem, bz as InputFieldProperty, b7 as InputFieldPropertySchema, bD as InputsProperty, bb as InputsPropertySchema, bV as LeaseLimitProperty, bt as LeaseLimitPropertySchema, bT as LeaseProperty, br as LeasePropertySchema, bU as LeaseSecondsProperty, bs as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bE as LimitProperty, bc as LimitPropertySchema, ct as ListActionInputFieldChoicesPluginProvides, cr as ListActionInputFieldsPluginProvides, cp as ListActionsPluginProvides, cn as ListAppsPluginProvides, q as ListAuthenticationsPluginProvides, cz as ListClientCredentialsPluginProvides, cx as ListConnectionsPluginProvides, et as ListTableFieldsPluginProvides, eB as ListTableRecordsPluginProvides, el as ListTablesPluginProvides, dF as LoadingEvent, ed as MAX_CONCURRENCY_LIMIT, e8 as MAX_PAGE_LIMIT, M as Manifest, cZ as ManifestEntry, cU as ManifestPluginOptions, cX as ManifestPluginProvides, aA as MethodCalledEvent, aF as MethodCalledEventData, N as Need, I as NeedsRequest, J as NeedsResponse, bF as OffsetProperty, bd as OffsetPropertySchema, _ as OutputFormatter, bG as OutputProperty, be as OutputPropertySchema, b1 as PaginatedSdkFunction, e as PaginatedSdkResult, bI as ParamsProperty, bg as ParamsPropertySchema, dL as PkceCredentialsObject, dW as PkceCredentialsObjectSchema, am as Plugin, P as PluginMeta, an as PluginProvides, aw as PollOptions, g as PositionalMetadata, c9 as RateLimitInfo, bL as RecordProperty, bj as RecordPropertySchema, bM as RecordsProperty, bk as RecordsPropertySchema, af as RelayFetchSchema, ae as RelayRequestSchema, av as RequestOptions, cT as RequestPluginProvides, dq as ResolveAuthTokenOptions, dQ as ResolveCredentialsOptions, R as ResolvedAppLocator, dI as ResolvedCredentials, dY as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aZ as RootFieldItem, cR as RunActionPluginProvides, dC as SdkEvent, b0 as SdkPage, a2 as StaticResolver, bK as TableProperty, bi as TablePropertySchema, bP as TablesProperty, bn as TablesPropertySchema, bS as TriggerInboxNameProperty, bq as TriggerInboxNamePropertySchema, bR as TriggerInboxProperty, bp as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, eH as UpdateTableRecordsPluginProvides, Q as UserProfile, a_ as UserProfileItem, j as WatchTriggerInboxOptions, W as WithAddPlugin, e6 as ZAPIER_BASE_URL, ef as ZAPIER_MAX_CONCURRENT_REQUESTS, eb as ZAPIER_MAX_NETWORK_RETRIES, ec as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, m as ZapierAbortDrainSignal, c7 as ZapierActionError, bZ as ZapierApiError, b_ as ZapierAppNotFoundError, cc as ZapierApprovalError, c1 as ZapierAuthenticationError, c5 as ZapierBundleError, dy as ZapierCache, dz as ZapierCacheEntry, dA as ZapierCacheSetOptions, c4 as ZapierConfigurationError, c8 as ZapierConflictError, bY as ZapierError, h as ZapierFetchInitOptions, c2 as ZapierNotFoundError, ca as ZapierRateLimitError, cd as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, c3 as ZapierResourceNotFoundError, eJ as ZapierSdk, l as ZapierSdkApps, Z as ZapierSdkOptions, cf as ZapierSignal, c6 as ZapierTimeoutError, c0 as ZapierUnknownError, b$ as ZapierValidationError, d5 as actionKeyResolver, d4 as actionTypeResolver, d1 as apiPlugin, d3 as appKeyResolver, cg as appsPlugin, d7 as authenticationIdGenericResolver, d6 as authenticationIdResolver, a9 as batch, aP as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, aR as buildErrorEvent, aQ as buildErrorEventWithContext, aT as buildMethodCalledEvent, dr as clearTokenCache, db as clientCredentialsNameResolver, dc as clientIdResolver, ar as composePlugins, d7 as connectionIdGenericResolver, d6 as connectionIdResolver, e4 as connectionsPlugin, aS as createBaseEvent, cA as createClientCredentialsPlugin, V as createFunction, dB as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, eu as createTableFieldsPlugin, eo as createTablePlugin, eC as createTableRecordsPlugin, ax as createZapierApi, eI as createZapierSdk, ag as createZapierSdkWithoutRegistry, ao as definePlugin, cC as deleteClientCredentialsPlugin, ew as deleteTableFieldsPlugin, eq as deleteTablePlugin, eE as deleteTableRecordsPlugin, ck as fetchPlugin, cK as findFirstConnectionPlugin, f as findManifestEntry, cM as findUniqueConnectionPlugin, ce as formatErrorMessage, aG as generateEventId, cu as getActionInputFieldsSchemaPlugin, cG as getActionPlugin, cE as getAppPlugin, dT as getBaseUrlFromCredentials, aM as getCiPlatform, dU as getClientIdFromCredentials, cI as getConnectionPlugin, aO as getCpuTime, aH as getCurrentTimestamp, aN as getMemoryUsage, ay as getOrCreateApiClient, aJ as getOsInfo, aK as getPlatformVersions, cV as getPreferredManifestEntryKey, c_ as getProfilePlugin, aI as getReleaseId, em as getTablePlugin, ey as getTableRecordPlugin, dv as getTokenFromCliLogin, eg as getZapierApprovalMode, eh as getZapierDefaultApprovalMode, e7 as getZapierSdkService, dt as injectCliLogin, da as inputFieldKeyResolver, d9 as inputsAllOptionalResolver, d8 as inputsResolver, ds as invalidateCachedToken, dx as invalidateCredentialsToken, aL as isCi, du as isCliLoginAvailable, dM as isClientCredentials, dP as isCredentialsFunction, dO as isCredentialsObject, dN as isPkceCredentials, S as isPositional, cs as listActionInputFieldChoicesPlugin, cq as listActionInputFieldsPlugin, co as listActionsPlugin, cm as listAppsPlugin, cy as listClientCredentialsPlugin, cw as listConnectionsPlugin, es as listTableFieldsPlugin, eA as listTableRecordsPlugin, ek as listTablesPlugin, ac as logDeprecation, cW as manifestPlugin, ee as parseConcurrencyEnvVar, r as readManifestFromFile, au as registryPlugin, cS as requestPlugin, ad as resetDeprecationWarnings, dw as resolveAuthToken, dS as resolveCredentials, dR as resolveCredentialsFromEnv, cQ as runActionPlugin, a6 as runWithTelemetryContext, di as tableFieldIdsResolver, dk as tableFieldsResolver, dn as tableFiltersResolver, dd as tableIdResolver, dj as tableNameResolver, dg as tableRecordIdResolver, dh as tableRecordIdsResolver, dl as tableRecordsResolver, dp as tableSortResolver, dm as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, de as triggerInboxResolver, df as triggerMessagesResolver, eG as updateTableRecordsPlugin } from './index-CjP7lGzL.mjs';
2
2
  import 'zod';
3
3
  import '@zapier/zapier-sdk-core/v0/schemas/connections';
4
4
  import '@zapier/policy-context';
package/dist/index.mjs CHANGED
@@ -82,6 +82,10 @@ function getZapierApprovalMode() {
82
82
  return value;
83
83
  return void 0;
84
84
  }
85
+ function getZapierDefaultApprovalMode() {
86
+ const isInteractive = !!globalThis.process?.stdin?.isTTY && !!globalThis.process?.stdout?.isTTY;
87
+ return isInteractive ? "poll" : "throw";
88
+ }
85
89
  var DEFAULT_APPROVAL_TIMEOUT_MS = 10 * 60 * 1e3;
86
90
  var DEFAULT_MAX_APPROVAL_RETRIES = 2;
87
91
 
@@ -2296,7 +2300,8 @@ var appKeyResolver = {
2296
2300
  name: "app",
2297
2301
  message: "Select app:",
2298
2302
  choices: apps.map((app) => ({
2299
- name: app.title ? `${app.title} (${getAppKeyList(app).join(", ")})` : app.key,
2303
+ name: app.title || app.key,
2304
+ hint: app.title ? getAppKeyList(app) : void 0,
2300
2305
  value: app.key
2301
2306
  }))
2302
2307
  })
@@ -2344,7 +2349,8 @@ var actionKeyResolver = {
2344
2349
  name: "action",
2345
2350
  message: "Select action:",
2346
2351
  choices: actions.map((action) => ({
2347
- name: `${action.title || action.name || action.key} - ${action.description || "No description"}`,
2352
+ name: action.title || action.name || action.key,
2353
+ hint: action.description || void 0,
2348
2354
  value: action.key
2349
2355
  }))
2350
2356
  })
@@ -2369,7 +2375,7 @@ function promptForConnection(connections, params) {
2369
2375
  name: "connection",
2370
2376
  message: params.app ? `Select connection for ${params.app}:` : "Select connection:",
2371
2377
  choices: connections.map((connection) => ({
2372
- name: `${connection.title || connection.label || "Connection"} (ID: ${connection.id})`,
2378
+ name: connection.title || connection.label || "Connection",
2373
2379
  value: connection.id
2374
2380
  }))
2375
2381
  };
@@ -2484,7 +2490,11 @@ var inputFieldKeyResolver = {
2484
2490
  name: "inputField",
2485
2491
  message: "Select input field:",
2486
2492
  choices: fields.map((field) => ({
2487
- name: `${field.title || field.key} - ${field.value_type || "No type"} ${field.is_required ? "(required)" : "(optional)"}`,
2493
+ name: field.title || field.key,
2494
+ hint: [
2495
+ field.value_type,
2496
+ field.is_required ? "required" : "optional"
2497
+ ].filter(Boolean),
2488
2498
  value: field.key
2489
2499
  }))
2490
2500
  })
@@ -2509,7 +2519,7 @@ var clientIdResolver = {
2509
2519
  name: "clientId",
2510
2520
  message: "Select client credentials to delete:",
2511
2521
  choices: credentials.map((cred) => ({
2512
- name: `${cred.name} (${cred.client_id})`,
2522
+ name: cred.name,
2513
2523
  value: cred.client_id
2514
2524
  }))
2515
2525
  })
@@ -2542,7 +2552,7 @@ var tableIdResolver = {
2542
2552
  name: "table",
2543
2553
  message: "Select a table:",
2544
2554
  choices: tables.map((table) => ({
2545
- name: `${table.name} (${table.id})`,
2555
+ name: table.name,
2546
2556
  value: table.id
2547
2557
  }))
2548
2558
  })
@@ -2559,7 +2569,8 @@ var triggerInboxResolver = {
2559
2569
  // `deleting` inboxes are on their way out — no operation against them
2560
2570
  // is useful (delete is a no-op, pause/resume/update are rejected).
2561
2571
  choices: inboxes.filter((inbox) => inbox.status !== "deleting").map((inbox) => ({
2562
- name: `${inbox.name ?? inbox.id} (${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status})`,
2572
+ name: inbox.name ?? inbox.id,
2573
+ hint: `${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status}`,
2563
2574
  value: inbox.id
2564
2575
  }))
2565
2576
  })
@@ -2582,7 +2593,8 @@ var triggerMessagesResolver = {
2582
2593
  // are gone from the inbox already; available/quarantined ones can't be
2583
2594
  // operated on by these methods.
2584
2595
  choices: messages.filter((message) => message.status === "leased").map((message) => ({
2585
- name: `${message.id} (${message.status}, lease_count: ${message.message_attributes.lease_count})`,
2596
+ name: message.id,
2597
+ hint: `${message.status}, lease_count: ${message.message_attributes.lease_count}`,
2586
2598
  value: message.id
2587
2599
  }))
2588
2600
  })
@@ -2828,8 +2840,8 @@ async function createFieldKeyTranslator({
2828
2840
  function summarizeRecord(record) {
2829
2841
  const values = Object.values(record.data);
2830
2842
  const preview = values.slice(0, 3).map((v) => formatFieldValue(v).replace(/\s+/g, " ").trim()).filter((s) => s.length > 0).join(", ");
2831
- const truncated = preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
2832
- return truncated ? `${record.id} \u2014 ${truncated}` : record.id;
2843
+ if (!preview) return void 0;
2844
+ return preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
2833
2845
  }
2834
2846
  function fetchRecords(sdk, params) {
2835
2847
  return sdk.listTableRecords({
@@ -2839,7 +2851,7 @@ function fetchRecords(sdk, params) {
2839
2851
  }
2840
2852
  function recordChoices(records) {
2841
2853
  return records.map((record) => ({
2842
- name: summarizeRecord(record),
2854
+ name: summarizeRecord(record) || record.id,
2843
2855
  value: record.id
2844
2856
  }));
2845
2857
  }
@@ -2879,7 +2891,8 @@ var tableFieldIdsResolver = {
2879
2891
  name: "fields",
2880
2892
  message: "Select fields:",
2881
2893
  choices: fields.map((field) => ({
2882
- name: `${field.name} (${field.id}, ${field.type})`,
2894
+ name: field.name,
2895
+ hint: [field.id, field.type],
2883
2896
  value: field.id
2884
2897
  })),
2885
2898
  validate: (value) => Array.isArray(value) && value.length > 0 ? true : "Select at least one field"
@@ -6307,7 +6320,7 @@ async function invalidateCredentialsToken(options) {
6307
6320
  }
6308
6321
 
6309
6322
  // src/sdk-version.ts
6310
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.54.1" : void 0) || "unknown";
6323
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.0" : void 0) || "unknown";
6311
6324
 
6312
6325
  // src/utils/open-url.ts
6313
6326
  var nodePrefix = "node:";
@@ -6637,7 +6650,7 @@ var ZapierApiClient = class {
6637
6650
  }
6638
6651
  if (errorType !== "approval_required") return response;
6639
6652
  if (attempt === maxRetries) break;
6640
- const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? "disabled";
6653
+ const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? getZapierDefaultApprovalMode();
6641
6654
  if (mode === "disabled") {
6642
6655
  throw new ZapierApprovalError(
6643
6656
  "Approvals are disabled. Set approvalMode to 'poll' or 'throw' (or ZAPIER_APPROVAL_MODE) to enable.",
@@ -9112,7 +9125,7 @@ var BaseSdkOptionsSchema = z.object({
9112
9125
  "Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2."
9113
9126
  ),
9114
9127
  approvalMode: z.enum(["disabled", "poll", "throw"]).optional().describe(
9115
- 'Approval flow behavior. "disabled" (default) throws a ZapierApprovalError on approval-required responses without creating an approval. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. Defaults to the ZAPIER_APPROVAL_MODE env var, then "disabled".'
9128
+ 'Approval flow behavior. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. "disabled" throws a ZapierApprovalError on approval-required responses without creating an approval. Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then the default behavior (poll for interactive TTY, throw otherwise).'
9116
9129
  ),
9117
9130
  // Internal
9118
9131
  manifestPath: z.string().optional().describe("Path to a .zapierrc manifest file for app version locking.").meta({ internal: true }),
@@ -9138,4 +9151,4 @@ var registryPlugin = definePlugin((_sdk) => {
9138
9151
  return {};
9139
9152
  });
9140
9153
 
9141
- export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin };
9154
+ export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin };
@@ -1 +1 @@
1
- {"version":3,"file":"actionKey.d.ts","sourceRoot":"","sources":["../../src/resolvers/actionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAC7C,UAAU,EACV;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,kBAAkB,CAAA;CAAE,CAwBhD,CAAC"}
1
+ {"version":3,"file":"actionKey.d.ts","sourceRoot":"","sources":["../../src/resolvers/actionKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,EAAE,eAAe,CAC7C,UAAU,EACV;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,kBAAkB,CAAA;CAAE,CAuBhD,CAAC"}
@@ -12,7 +12,8 @@ export const actionKeyResolver = {
12
12
  name: "action",
13
13
  message: "Select action:",
14
14
  choices: actions.map((action) => ({
15
- name: `${action.title || action.name || action.key} - ${action.description || "No description"}`,
15
+ name: action.title || action.name || action.key,
16
+ hint: action.description || undefined,
16
17
  value: action.key,
17
18
  })),
18
19
  }),
@@ -1 +1 @@
1
- {"version":3,"file":"appKey.d.ts","sourceRoot":"","sources":["../../src/resolvers/appKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAI3D,KAAK,cAAc,GAAG,eAAe,CAAC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc,EAAE,cA6C5B,CAAC"}
1
+ {"version":3,"file":"appKey.d.ts","sourceRoot":"","sources":["../../src/resolvers/appKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAI3D,KAAK,cAAc,GAAG,eAAe,CAAC,OAAO,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEpE,eAAO,MAAM,cAAc,EAAE,cA4C5B,CAAC"}