@zapier/zapier-sdk 0.76.0 → 0.76.2

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.
@@ -3117,6 +3117,8 @@ interface BaseEvent {
3117
3117
  release_id: string;
3118
3118
  customuser_id?: number | null;
3119
3119
  account_id?: number | null;
3120
+ client_id?: string | null;
3121
+ auth_mechanism?: string | null;
3120
3122
  identity_id?: number | null;
3121
3123
  visitor_id?: string | null;
3122
3124
  correlation_id?: string | null;
@@ -3233,6 +3235,8 @@ interface TransportConfig {
3233
3235
  interface EventContext {
3234
3236
  customuser_id?: number | null;
3235
3237
  account_id?: number | null;
3238
+ client_id?: string | null;
3239
+ auth_mechanism?: string | null;
3236
3240
  identity_id?: number | null;
3237
3241
  visitor_id?: string | null;
3238
3242
  correlation_id?: string | null;
@@ -3363,49 +3367,6 @@ declare function getTtyContext(): {
3363
3367
  stdin_is_tty: boolean | null;
3364
3368
  stdout_is_tty: boolean | null;
3365
3369
  };
3366
- /**
3367
- * Detects which AI coding agent is executing the current process by inspecting
3368
- * well-known environment variables set by each agent's runtime.
3369
- *
3370
- * Claude Code
3371
- * CLAUDECODE — set to "1" in all subprocesses spawned by Claude Code
3372
- * https://code.claude.com/docs/en/env-vars
3373
- *
3374
- * GitHub Copilot
3375
- * COPILOT_AGENT — set to "1" in VS Code agent terminal sessions
3376
- * https://github.com/microsoft/vscode/pull/316267
3377
- *
3378
- * Cursor
3379
- * CURSOR_AGENT — set to "1" by Cursor when executing terminal commands
3380
- * https://cursor.com/docs/agent/tools/terminal
3381
- *
3382
- * Codex CLI
3383
- * CODEX_SANDBOX — set to "seatbelt" (macOS) or a non-empty string (Linux/Windows)
3384
- * https://github.com/openai/codex/blob/main/codex-rs/core/src/spawn.rs
3385
- *
3386
- * Gemini CLI
3387
- * GEMINI_CLI — set to "1" in subprocesses spawned by Gemini CLI's shell tool
3388
- * https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/shellExecutionService.ts
3389
- *
3390
- * Augment
3391
- * AUGMENT_AGENT — set to "1" when Auggie executes shell commands via its launch-process tool
3392
- * https://docs.augmentcode.com/cli/reference
3393
- *
3394
- * Cline
3395
- * CLINE_ACTIVE — set to "true" when Cline is executing terminal commands
3396
- * https://github.com/cline/cline/pull/5367
3397
- *
3398
- * OpenCode
3399
- * OPENCODE_CLIENT — client identifier set by OpenCode (defaults to "cli")
3400
- * https://anomalyco-opencode.mintlify.app/cli/overview#environment-variables
3401
- *
3402
- * Returns null if no known agent is detected or process is unavailable.
3403
- *
3404
- * Never throws: try/catch guards against exotic environments (e.g. a Proxy on
3405
- * globalThis.process) where property access could unexpectedly fail. Event
3406
- * emission must never cascade into a thrown exception.
3407
- */
3408
- declare function getAgent(): string | null;
3409
3370
 
3410
3371
  /**
3411
3372
  * Removes all registered process event listeners.
@@ -8361,6 +8322,18 @@ interface ResolveAuthTokenOptions {
8361
8322
  */
8362
8323
  cache?: ZapierCache;
8363
8324
  }
8325
+ declare enum AuthMechanism {
8326
+ ClientCredentials = "client_credentials",
8327
+ Jwt = "jwt",
8328
+ Token = "token",
8329
+ Pkce = "pkce",
8330
+ None = "none"
8331
+ }
8332
+ interface ResolvedAuth {
8333
+ token?: string;
8334
+ mechanism: AuthMechanism;
8335
+ clientId: string | null;
8336
+ }
8364
8337
  /**
8365
8338
  * Clear in-process caches. Useful for testing or to force the next
8366
8339
  * resolve to re-import the default cache adapter. Does not touch
@@ -8423,7 +8396,8 @@ declare function isCliLoginAvailable(): boolean | undefined;
8423
8396
  */
8424
8397
  declare function getTokenFromCliLogin(options: CliLoginOptions): Promise<string | undefined>;
8425
8398
  /**
8426
- * Resolves an auth token from wherever it can be found.
8399
+ * Resolves auth from wherever it can be found, returning the token plus
8400
+ * metadata about how it was resolved.
8427
8401
  *
8428
8402
  * Resolution order:
8429
8403
  * 1. Explicit credentials option (or deprecated token option)
@@ -8435,8 +8409,10 @@ declare function getTokenFromCliLogin(options: CliLoginOptions): Promise<string
8435
8409
  * - Client credentials: Exchanged for an access token (with caching)
8436
8410
  * - PKCE: Delegates to CLI login (throws if not available)
8437
8411
  *
8438
- * Returns undefined if no valid token is found.
8412
+ * When no auth can be resolved, returns a ResolvedAuth with
8413
+ * mechanism: None and no token.
8439
8414
  */
8415
+ declare function resolveAuth(options?: ResolveAuthTokenOptions): Promise<ResolvedAuth>;
8440
8416
  declare function resolveAuthToken(options?: ResolveAuthTokenOptions): Promise<string | undefined>;
8441
8417
  /**
8442
8418
  * Invalidate the cached token for the given credentials, if applicable.
@@ -15585,6 +15561,50 @@ declare function createZapierCoreStack(): PluginStack<object, {
15585
15561
  };
15586
15562
  }>;
15587
15563
 
15564
+ /**
15565
+ * Detects which AI coding agent is executing the current process by inspecting
15566
+ * well-known environment variables set by each agent's runtime.
15567
+ *
15568
+ * Claude Code
15569
+ * CLAUDECODE — set to "1" in all subprocesses spawned by Claude Code
15570
+ * https://code.claude.com/docs/en/env-vars
15571
+ *
15572
+ * GitHub Copilot
15573
+ * COPILOT_AGENT — set to "1" in VS Code agent terminal sessions
15574
+ * https://github.com/microsoft/vscode/pull/316267
15575
+ *
15576
+ * Cursor
15577
+ * CURSOR_AGENT — set to "1" by Cursor when executing terminal commands
15578
+ * https://cursor.com/docs/agent/tools/terminal
15579
+ *
15580
+ * Codex CLI
15581
+ * CODEX_SANDBOX — set to "seatbelt" (macOS) or a non-empty string (Linux/Windows)
15582
+ * https://github.com/openai/codex/blob/main/codex-rs/core/src/spawn.rs
15583
+ *
15584
+ * Gemini CLI
15585
+ * GEMINI_CLI — set to "1" in subprocesses spawned by Gemini CLI's shell tool
15586
+ * https://github.com/google-gemini/gemini-cli/blob/main/packages/core/src/services/shellExecutionService.ts
15587
+ *
15588
+ * Augment
15589
+ * AUGMENT_AGENT — set to "1" when Auggie executes shell commands via its launch-process tool
15590
+ * https://docs.augmentcode.com/cli/reference
15591
+ *
15592
+ * Cline
15593
+ * CLINE_ACTIVE — set to "true" when Cline is executing terminal commands
15594
+ * https://github.com/cline/cline/pull/5367
15595
+ *
15596
+ * OpenCode
15597
+ * OPENCODE_CLIENT — client identifier set by OpenCode (defaults to "cli")
15598
+ * https://anomalyco-opencode.mintlify.app/cli/overview#environment-variables
15599
+ *
15600
+ * Returns null if no known agent is detected or process is unavailable.
15601
+ *
15602
+ * Never throws: try/catch guards against exotic environments (e.g. a Proxy on
15603
+ * globalThis.process) where property access could unexpectedly fail. Event
15604
+ * emission must never cascade into a thrown exception.
15605
+ */
15606
+ declare function getAgent(): string | null;
15607
+
15588
15608
  /**
15589
15609
  * @deprecated `getRegistry` is now built into every sdk produced by
15590
15610
  * `buildSdk`. Adding this plugin is a no-op. Remove the
@@ -15596,4 +15616,4 @@ declare const registryPlugin: (sdk: {
15596
15616
  };
15597
15617
  }) => {};
15598
15618
 
15599
- export { type ConnectionsResponse as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetConnectionStartUrlItem as G, type Action as H, type App as I, type Field as J, type Choice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type ActionExecutionResult as Q, type ResolvedAppLocator as R, type ActionField as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type ActionFieldChoice as V, type WaitForNewConnectionItem as W, type NeedsRequest as X, type NeedsResponse as Y, type ZapierSdkOptions as Z, type Connection as _, type PluginMeta as a, type SdkPage as a$, type UserProfile as a0, isPositional as a1, createFunction as a2, createPluginStack as a3, createCorePlugin as a4, addPlugin as a5, type FormattedItem as a6, type Resolver as a7, type ArrayResolver as a8, type ResolverMetadata as a9, getCoreErrorCode as aA, getCoreErrorCause as aB, CORE_ERROR_SYMBOL as aC, CoreErrorCode as aD, type Plugin as aE, type PluginProvides as aF, definePlugin as aG, createPluginMethod as aH, createPaginatedPluginMethod as aI, composePlugins as aJ, type ActionItem as aK, type ActionTypeItem as aL, registryPlugin as aM, type RequestOptions as aN, type PollOptions as aO, createZapierApi as aP, getOrCreateApiClient as aQ, isPermanentHttpError as aR, type SseMessage as aS, type JsonSseMessage 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 StaticResolver as aa, type DynamicListResolver as ab, type DynamicSearchResolver as ac, type FieldsResolver as ad, runInMethodScope as ae, runWithTelemetryContext as af, getCallerContext as ag, runWithCallerContext as ah, type CallerContext as ai, toSnakeCase as aj, toTitleCase as ak, batch as al, type BatchOptions as am, buildCapabilityMessage as an, logDeprecation as ao, resetDeprecationWarnings as ap, RelayRequestSchema as aq, RelayFetchSchema as ar, createZapierSdkWithoutRegistry as as, createSdk as at, createOptionsPlugin as au, createZapierCoreStack as av, type FunctionRegistryEntry as aw, type FunctionDeprecation as ax, BaseSdkOptionsSchema as ay, isCoreError as az, type Manifest as b, ZapierApiError as b$, type PaginatedSdkFunction as b0, AppKeyPropertySchema as b1, AppPropertySchema as b2, ActionTypePropertySchema as b3, ActionKeyPropertySchema as b4, ActionPropertySchema as b5, InputFieldPropertySchema as b6, ConnectionIdPropertySchema as b7, AuthenticationIdPropertySchema as b8, ConnectionPropertySchema as b9, type ConnectionProperty as bA, type AuthenticationIdProperty as bB, type InputsProperty as bC, type LimitProperty as bD, type OffsetProperty as bE, type OutputProperty as bF, type DebugProperty as bG, type ParamsProperty as bH, type ActionTimeoutMsProperty as bI, type TableProperty as bJ, type RecordProperty as bK, type RecordsProperty as bL, type FieldsProperty as bM, type AppsProperty as bN, type TablesProperty as bO, type ConnectionsProperty as bP, type TriggerInboxProperty as bQ, type TriggerInboxNameProperty as bR, type LeaseProperty as bS, type LeaseSecondsProperty as bT, type LeaseLimitProperty as bU, type ErrorOptions as bV, ZapierError as bW, ZapierValidationError as bX, ZapierUnknownError as bY, ZapierAuthenticationError as bZ, zapierAdaptError as b_, InputsPropertySchema as ba, LimitPropertySchema as bb, OffsetPropertySchema as bc, OutputPropertySchema as bd, DebugPropertySchema as be, ParamsPropertySchema as bf, ActionTimeoutMsPropertySchema as bg, TablePropertySchema as bh, RecordPropertySchema as bi, RecordsPropertySchema as bj, FieldsPropertySchema as bk, AppsPropertySchema as bl, TablesPropertySchema as bm, ConnectionsPropertySchema as bn, TriggerInboxPropertySchema as bo, TriggerInboxNamePropertySchema as bp, LeasePropertySchema as bq, LeaseSecondsPropertySchema as br, LeaseLimitPropertySchema as bs, type AppKeyProperty as bt, type AppProperty as bu, type ActionTypeProperty as bv, type ActionKeyProperty as bw, type ActionProperty as bx, type InputFieldProperty as by, type ConnectionIdProperty as bz, type UpdateManifestEntryResult as c, type GetProfilePluginProvides as c$, ZapierAppNotFoundError as c0, ZapierNotFoundError as c1, ZapierResourceNotFoundError as c2, ZapierConfigurationError as c3, ZapierBundleError as c4, ZapierTimeoutError as c5, ZapierActionError as c6, ZapierConflictError as c7, type RateLimitInfo as c8, ZapierRateLimitError 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_, type ApprovalStatus as ca, ZapierApprovalError as cb, ZapierRelayError as cc, formatErrorMessage as cd, type ApiError 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 AddActionEntryOptions as d, CredentialsObjectSchema 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, resolveAuthToken as dA, invalidateCredentialsToken as dB, type ZapierCache as dC, type ZapierCacheEntry as dD, type ZapierCacheSetOptions as dE, createMemoryCache as dF, type SdkEvent as dG, type AuthEvent as dH, type ApiEvent as dI, type LoadingEvent as dJ, type EventCallback as dK, type Credentials as dL, type ResolvedCredentials as dM, type CredentialsObject as dN, type ClientCredentialsObject as dO, type PkceCredentialsObject as dP, isClientCredentials as dQ, isPkceCredentials as dR, isCredentialsObject as dS, isCredentialsFunction as dT, type ResolveCredentialsOptions as dU, resolveCredentialsFromEnv as dV, resolveCredentials as dW, getBaseUrlFromCredentials as dX, getClientIdFromCredentials as dY, ClientCredentialsObjectSchema as dZ, PkceCredentialsObjectSchema as d_, inputFieldKeyResolver as da, clientCredentialsNameResolver as db, clientIdResolver as dc, tableIdResolver as dd, triggerInboxResolver as de, workflowIdResolver as df, durableRunIdResolver as dg, workflowVersionIdResolver as dh, workflowRunIdResolver as di, triggerMessagesResolver as dj, tableRecordIdResolver as dk, tableRecordIdsResolver as dl, tableFieldIdsResolver as dm, tableNameResolver as dn, tableFieldsResolver as dp, tableRecordsResolver as dq, tableUpdateRecordsResolver as dr, tableFiltersResolver as ds, tableSortResolver as dt, type ResolveAuthTokenOptions as du, clearTokenCache as dv, invalidateCachedToken as dw, injectCliLogin as dx, isCliLoginAvailable as dy, getTokenFromCliLogin as dz, type AddActionEntryResult as e, type MethodCalledEvent as e$, ResolvedCredentialsSchema as e0, CredentialsFunctionSchema as e1, type CredentialsFunction as e2, CredentialsSchema as e3, ConnectionEntrySchema as e4, type ConnectionEntry as e5, ConnectionsMapSchema as e6, type ConnectionsMap as e7, connectionsPlugin as e8, type ConnectionsPluginProvides as e9, type CreateTableFieldsPluginProvides as eA, deleteTableFieldsPlugin as eB, type DeleteTableFieldsPluginProvides as eC, getTableRecordPlugin as eD, type GetTableRecordPluginProvides as eE, listTableRecordsPlugin as eF, type ListTableRecordsPluginProvides as eG, createTableRecordsPlugin as eH, type CreateTableRecordsPluginProvides as eI, deleteTableRecordsPlugin as eJ, type DeleteTableRecordsPluginProvides as eK, updateTableRecordsPlugin as eL, type UpdateTableRecordsPluginProvides as eM, cleanupEventListeners as eN, type EventEmissionConfig as eO, eventEmissionPlugin as eP, type EventEmissionProvides as eQ, type EventContext as eR, type ApplicationLifecycleEventData as eS, type EnhancedErrorEventData as eT, type MethodCalledEventData as eU, buildApplicationLifecycleEvent as eV, buildErrorEventWithContext as eW, buildErrorEvent as eX, createBaseEvent as eY, buildMethodCalledEvent as eZ, type BaseEvent as e_, ZAPIER_BASE_URL as ea, getZapierSdkService as eb, MAX_PAGE_LIMIT as ec, DEFAULT_PAGE_SIZE as ed, DEFAULT_ACTION_TIMEOUT_MS as ee, ZAPIER_MAX_NETWORK_RETRIES as ef, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as eg, MAX_CONCURRENCY_LIMIT as eh, parseConcurrencyEnvVar as ei, ZAPIER_MAX_CONCURRENT_REQUESTS as ej, getZapierApprovalMode as ek, getZapierOpenAutoModeApprovalsInBrowser as el, getZapierDefaultApprovalMode as em, DEFAULT_APPROVAL_TIMEOUT_MS as en, DEFAULT_MAX_APPROVAL_RETRIES as eo, listTablesPlugin as ep, type ListTablesPluginProvides as eq, getTablePlugin as er, type GetTablePluginProvides as es, createTablePlugin as et, type CreateTablePluginProvides as eu, deleteTablePlugin as ev, type DeleteTablePluginProvides as ew, listTableFieldsPlugin as ex, type ListTableFieldsPluginProvides as ey, createTableFieldsPlugin as ez, type ActionEntry as f, generateEventId as f0, getCurrentTimestamp as f1, getReleaseId as f2, getOsInfo as f3, getPlatformVersions as f4, isCi as f5, getCiPlatform as f6, getMemoryUsage as f7, getCpuTime as f8, getTtyContext as f9, getAgent as fa, createZapierSdk as fb, createZapierSdkStack as fc, type ZapierSdk as fd, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type CreateConnectionItem as j, type PositionalMetadata as k, type ZapierFetchInitOptions as l, type DynamicResolver as m, type WatchTriggerInboxOptions as n, type ActionProxy as o, type ZapierSdkApps as p, type WithAddPlugin as q, readManifestFromFile as r, ZapierAbortDrainSignal as s, ZapierReleaseTriggerMessageSignal as t, type DrainTriggerInboxCallback as u, type DrainTriggerInboxErrorObserver as v, type ListAuthenticationsPluginProvides as w, type GetAuthenticationPluginProvides as x, type FindFirstAuthenticationPluginProvides as y, type FindUniqueAuthenticationPluginProvides as z };
15619
+ export { type ConnectionsResponse as $, type ApiClient as A, type BaseSdkOptions as B, type CoreOptions as C, type DrainTriggerInboxOptions as D, type EventEmissionContext as E, type FieldsetItem as F, type GetConnectionStartUrlItem as G, type Action as H, type App as I, type Field as J, type Choice as K, type LeasedTriggerMessageItem as L, type MethodHooks as M, type Need as N, type OutputFormatter as O, type PluginStack as P, type ActionExecutionResult as Q, type ResolvedAppLocator as R, type ActionField as S, type TriggerMessageStatus as T, type UpdateManifestEntryOptions as U, type ActionFieldChoice as V, type WaitForNewConnectionItem as W, type NeedsRequest as X, type NeedsResponse as Y, type ZapierSdkOptions as Z, type Connection as _, type PluginMeta as a, type UserProfileItem as a$, type UserProfile as a0, isPositional as a1, createFunction as a2, createPluginStack as a3, createCorePlugin as a4, addPlugin as a5, type FormattedItem as a6, type Resolver as a7, type ArrayResolver as a8, type ResolverMetadata as a9, getCoreErrorCode as aA, getCoreErrorCause as aB, CORE_ERROR_SYMBOL as aC, CoreErrorCode as aD, type Plugin as aE, type PluginProvides as aF, definePlugin as aG, createPluginMethod as aH, createPaginatedPluginMethod as aI, composePlugins as aJ, type ActionItem as aK, type ActionTypeItem as aL, getAgent as aM, registryPlugin as aN, type RequestOptions as aO, type PollOptions as aP, createZapierApi as aQ, getOrCreateApiClient as aR, isPermanentHttpError as aS, type SseMessage as aT, type JsonSseMessage as aU, type AppItem as aV, type ConnectionItem as aW, type ActionItem$1 as aX, type InputFieldItem as aY, type InfoFieldItem as aZ, type RootFieldItem as a_, type StaticResolver as aa, type DynamicListResolver as ab, type DynamicSearchResolver as ac, type FieldsResolver as ad, runInMethodScope as ae, runWithTelemetryContext as af, getCallerContext as ag, runWithCallerContext as ah, type CallerContext as ai, toSnakeCase as aj, toTitleCase as ak, batch as al, type BatchOptions as am, buildCapabilityMessage as an, logDeprecation as ao, resetDeprecationWarnings as ap, RelayRequestSchema as aq, RelayFetchSchema as ar, createZapierSdkWithoutRegistry as as, createSdk as at, createOptionsPlugin as au, createZapierCoreStack as av, type FunctionRegistryEntry as aw, type FunctionDeprecation as ax, BaseSdkOptionsSchema as ay, isCoreError as az, type Manifest as b, zapierAdaptError 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 ErrorOptions as bW, ZapierError as bX, ZapierValidationError as bY, ZapierUnknownError as bZ, ZapierAuthenticationError 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 UpdateManifestEntryResult as c, getProfilePlugin as c$, ZapierApiError as c0, ZapierAppNotFoundError 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, type ListClientCredentialsPluginProvides as cA, createClientCredentialsPlugin as cB, type CreateClientCredentialsPluginProvides as cC, deleteClientCredentialsPlugin as cD, type DeleteClientCredentialsPluginProvides as cE, getAppPlugin as cF, type GetAppPluginProvides as cG, getActionPlugin as cH, type GetActionPluginProvides as cI, getConnectionPlugin as cJ, type GetConnectionPluginProvides as cK, findFirstConnectionPlugin as cL, type FindFirstConnectionPluginProvides as cM, findUniqueConnectionPlugin as cN, type FindUniqueConnectionPluginProvides as cO, CONTEXT_CACHE_TTL_MS as cP, CONTEXT_CACHE_MAX_SIZE as cQ, runActionPlugin as cR, type RunActionPluginProvides as cS, requestPlugin as cT, type RequestPluginProvides as cU, type ManifestPluginOptions as cV, getPreferredManifestEntryKey as cW, manifestPlugin as cX, type ManifestPluginProvides as cY, DEFAULT_CONFIG_PATH as cZ, type ManifestEntry as c_, ZapierRateLimitError as ca, type ApprovalStatus as cb, ZapierApprovalError as cc, ZapierRelayError as cd, formatErrorMessage as ce, type ApiError as cf, ZapierSignal as cg, appsPlugin as ch, type AppsPluginProvides as ci, type ActionExecutionOptions as cj, type AppFactoryInput as ck, fetchPlugin as cl, type FetchPluginProvides as cm, listAppsPlugin as cn, type ListAppsPluginProvides as co, listActionsPlugin as cp, type ListActionsPluginProvides as cq, listActionInputFieldsPlugin as cr, type ListActionInputFieldsPluginProvides as cs, listActionInputFieldChoicesPlugin as ct, type ListActionInputFieldChoicesPluginProvides as cu, getActionInputFieldsSchemaPlugin as cv, type GetActionInputFieldsSchemaPluginProvides as cw, listConnectionsPlugin as cx, type ListConnectionsPluginProvides as cy, listClientCredentialsPlugin as cz, type AddActionEntryOptions as d, getBaseUrlFromCredentials as d$, type GetProfilePluginProvides as d0, type ApiPluginOptions as d1, apiPlugin as d2, type ApiPluginProvides as d3, appKeyResolver as d4, actionTypeResolver as d5, actionKeyResolver as d6, connectionIdResolver as d7, connectionIdGenericResolver as d8, inputsResolver as d9, injectCliLogin as dA, isCliLoginAvailable as dB, getTokenFromCliLogin as dC, resolveAuth as dD, resolveAuthToken as dE, invalidateCredentialsToken as dF, type ZapierCache as dG, type ZapierCacheEntry as dH, type ZapierCacheSetOptions as dI, createMemoryCache as dJ, type SdkEvent as dK, type AuthEvent as dL, type ApiEvent as dM, type LoadingEvent as dN, type EventCallback as dO, type Credentials as dP, type ResolvedCredentials as dQ, type CredentialsObject as dR, type ClientCredentialsObject as dS, type PkceCredentialsObject as dT, isClientCredentials as dU, isPkceCredentials as dV, isCredentialsObject as dW, isCredentialsFunction as dX, type ResolveCredentialsOptions as dY, resolveCredentialsFromEnv as dZ, resolveCredentials as d_, inputsAllOptionalResolver as da, inputFieldKeyResolver as db, clientCredentialsNameResolver as dc, clientIdResolver as dd, tableIdResolver as de, triggerInboxResolver as df, workflowIdResolver as dg, durableRunIdResolver as dh, workflowVersionIdResolver as di, workflowRunIdResolver as dj, triggerMessagesResolver as dk, tableRecordIdResolver as dl, tableRecordIdsResolver as dm, tableFieldIdsResolver as dn, tableNameResolver as dp, tableFieldsResolver as dq, tableRecordsResolver as dr, tableUpdateRecordsResolver as ds, tableFiltersResolver as dt, tableSortResolver as du, type ResolveAuthTokenOptions as dv, AuthMechanism as dw, type ResolvedAuth as dx, clearTokenCache as dy, invalidateCachedToken as dz, type AddActionEntryResult as e, buildErrorEvent as e$, getClientIdFromCredentials as e0, ClientCredentialsObjectSchema as e1, PkceCredentialsObjectSchema as e2, CredentialsObjectSchema as e3, ResolvedCredentialsSchema as e4, CredentialsFunctionSchema as e5, type CredentialsFunction as e6, CredentialsSchema as e7, ConnectionEntrySchema as e8, type ConnectionEntry as e9, type DeleteTablePluginProvides as eA, listTableFieldsPlugin as eB, type ListTableFieldsPluginProvides as eC, createTableFieldsPlugin as eD, type CreateTableFieldsPluginProvides as eE, deleteTableFieldsPlugin as eF, type DeleteTableFieldsPluginProvides as eG, getTableRecordPlugin as eH, type GetTableRecordPluginProvides as eI, listTableRecordsPlugin as eJ, type ListTableRecordsPluginProvides as eK, createTableRecordsPlugin as eL, type CreateTableRecordsPluginProvides as eM, deleteTableRecordsPlugin as eN, type DeleteTableRecordsPluginProvides as eO, updateTableRecordsPlugin as eP, type UpdateTableRecordsPluginProvides as eQ, cleanupEventListeners as eR, type EventEmissionConfig as eS, eventEmissionPlugin as eT, type EventEmissionProvides as eU, type EventContext as eV, type ApplicationLifecycleEventData as eW, type EnhancedErrorEventData as eX, type MethodCalledEventData as eY, buildApplicationLifecycleEvent as eZ, buildErrorEventWithContext as e_, ConnectionsMapSchema as ea, type ConnectionsMap as eb, connectionsPlugin as ec, type ConnectionsPluginProvides as ed, ZAPIER_BASE_URL as ee, getZapierSdkService as ef, MAX_PAGE_LIMIT as eg, DEFAULT_PAGE_SIZE as eh, DEFAULT_ACTION_TIMEOUT_MS as ei, ZAPIER_MAX_NETWORK_RETRIES as ej, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS as ek, MAX_CONCURRENCY_LIMIT as el, parseConcurrencyEnvVar as em, ZAPIER_MAX_CONCURRENT_REQUESTS as en, getZapierApprovalMode as eo, getZapierOpenAutoModeApprovalsInBrowser as ep, getZapierDefaultApprovalMode as eq, DEFAULT_APPROVAL_TIMEOUT_MS as er, DEFAULT_MAX_APPROVAL_RETRIES as es, listTablesPlugin as et, type ListTablesPluginProvides as eu, getTablePlugin as ev, type GetTablePluginProvides as ew, createTablePlugin as ex, type CreateTablePluginProvides as ey, deleteTablePlugin as ez, type ActionEntry as f, createBaseEvent as f0, buildMethodCalledEvent as f1, type BaseEvent as f2, type MethodCalledEvent as f3, generateEventId as f4, getCurrentTimestamp as f5, getReleaseId as f6, getOsInfo as f7, getPlatformVersions as f8, isCi as f9, getCiPlatform as fa, getMemoryUsage as fb, getCpuTime as fc, getTtyContext as fd, createZapierSdk as fe, createZapierSdkStack as ff, type ZapierSdk as fg, findManifestEntry as g, type CapabilitiesContext as h, type PaginatedSdkResult as i, type CreateConnectionItem as j, type PositionalMetadata as k, type ZapierFetchInitOptions as l, type DynamicResolver as m, type WatchTriggerInboxOptions as n, type ActionProxy as o, type ZapierSdkApps as p, type WithAddPlugin as q, readManifestFromFile as r, ZapierAbortDrainSignal as s, ZapierReleaseTriggerMessageSignal as t, type DrainTriggerInboxCallback as u, type DrainTriggerInboxErrorObserver as v, type ListAuthenticationsPluginProvides as w, type GetAuthenticationPluginProvides as x, type FindFirstAuthenticationPluginProvides as y, type FindUniqueAuthenticationPluginProvides as z };
package/dist/index.cjs CHANGED
@@ -6402,6 +6402,14 @@ function createMemoryCache() {
6402
6402
 
6403
6403
  // src/auth.ts
6404
6404
  var DEFAULT_AUTH_BASE_URL = "https://zapier.com";
6405
+ var AuthMechanism = /* @__PURE__ */ ((AuthMechanism2) => {
6406
+ AuthMechanism2["ClientCredentials"] = "client_credentials";
6407
+ AuthMechanism2["Jwt"] = "jwt";
6408
+ AuthMechanism2["Token"] = "token";
6409
+ AuthMechanism2["Pkce"] = "pkce";
6410
+ AuthMechanism2["None"] = "none";
6411
+ return AuthMechanism2;
6412
+ })(AuthMechanism || {});
6405
6413
  var pendingExchanges = /* @__PURE__ */ new Map();
6406
6414
  var cachedDefaultCache;
6407
6415
  function buildCacheKey(options) {
@@ -6579,7 +6587,7 @@ async function getTokenFromCliLogin(options) {
6579
6587
  if (!cliLogin) return void 0;
6580
6588
  return await cliLogin.getToken(options);
6581
6589
  }
6582
- async function tryStoredClientCredentialToken(options) {
6590
+ async function tryStoredClientCredentialAuth(options) {
6583
6591
  const activeCredential = await getActiveCredentialsFromCli(options.baseUrl);
6584
6592
  if (!activeCredential) return void 0;
6585
6593
  const resolvedBaseUrl = activeCredential.baseUrl || options.baseUrl || DEFAULT_AUTH_BASE_URL;
@@ -6594,15 +6602,25 @@ async function tryStoredClientCredentialToken(options) {
6594
6602
  });
6595
6603
  const cache = await resolveCache(options);
6596
6604
  const pending = pendingExchanges.get(cacheKey);
6597
- if (pending) return pending;
6605
+ if (pending) {
6606
+ return {
6607
+ token: await pending,
6608
+ mechanism: "client_credentials" /* ClientCredentials */,
6609
+ clientId: activeCredential.clientId
6610
+ };
6611
+ }
6598
6612
  const cached = await readCachedToken(cacheKey, cache);
6599
6613
  if (cached !== void 0) {
6600
6614
  if (options.debug)
6601
6615
  console.error(
6602
6616
  `[auth] Using cached token (clientId: ${activeCredential.clientId})`
6603
6617
  );
6604
- emitAuthResolved(options.onEvent, "client_credentials");
6605
- return cached;
6618
+ emitAuthResolved(options.onEvent, "client_credentials" /* ClientCredentials */);
6619
+ return {
6620
+ token: cached,
6621
+ mechanism: "client_credentials" /* ClientCredentials */,
6622
+ clientId: activeCredential.clientId
6623
+ };
6606
6624
  }
6607
6625
  const storedCredential = await getStoredClientCredentialsFromCli(resolvedBaseUrl);
6608
6626
  if (!storedCredential) {
@@ -6620,24 +6638,25 @@ async function tryStoredClientCredentialToken(options) {
6620
6638
  console.error(
6621
6639
  `[auth] Using stored client credential (clientId: ${storedCredential.clientId})`
6622
6640
  );
6623
- const token = await resolveAuthTokenFromCredentials(
6624
- storedCredential,
6625
- options
6626
- );
6627
- emitAuthResolved(options.onEvent, "client_credentials");
6628
- return token;
6641
+ const auth = await resolveAuthFromCredentials(storedCredential, options);
6642
+ emitAuthResolved(options.onEvent, "client_credentials" /* ClientCredentials */);
6643
+ return {
6644
+ token: auth.token,
6645
+ mechanism: "client_credentials" /* ClientCredentials */,
6646
+ clientId: activeCredential.clientId
6647
+ };
6629
6648
  }
6630
- async function resolveAuthToken(options = {}) {
6649
+ async function resolveAuth(options = {}) {
6631
6650
  const credentials = await resolveCredentials({
6632
6651
  credentials: options.credentials,
6633
6652
  token: options.token,
6634
6653
  baseUrl: options.baseUrl
6635
6654
  });
6636
6655
  if (credentials !== void 0) {
6637
- return resolveAuthTokenFromCredentials(credentials, options);
6656
+ return resolveAuthFromCredentials(credentials, options);
6638
6657
  }
6639
- const storedToken = await tryStoredClientCredentialToken(options);
6640
- if (storedToken !== void 0) return storedToken;
6658
+ const storedAuth = await tryStoredClientCredentialAuth(options);
6659
+ if (storedAuth !== void 0) return storedAuth;
6641
6660
  if (options.debug) {
6642
6661
  console.error("[auth] Using JWT (no stored client credential found)");
6643
6662
  }
@@ -6647,14 +6666,30 @@ async function resolveAuthToken(options = {}) {
6647
6666
  debug: options.debug
6648
6667
  });
6649
6668
  if (jwtToken !== void 0) {
6650
- emitAuthResolved(options.onEvent, "jwt");
6669
+ emitAuthResolved(options.onEvent, "jwt" /* Jwt */);
6670
+ return {
6671
+ token: jwtToken,
6672
+ mechanism: "jwt" /* Jwt */,
6673
+ clientId: null
6674
+ };
6651
6675
  }
6652
- return jwtToken;
6676
+ return {
6677
+ token: void 0,
6678
+ mechanism: "none" /* None */,
6679
+ clientId: null
6680
+ };
6681
+ }
6682
+ async function resolveAuthToken(options = {}) {
6683
+ return (await resolveAuth(options)).token;
6653
6684
  }
6654
- async function resolveAuthTokenFromCredentials(credentials, options) {
6685
+ async function resolveAuthFromCredentials(credentials, options) {
6655
6686
  if (typeof credentials === "string") {
6656
- emitAuthResolved(options.onEvent, "token");
6657
- return credentials;
6687
+ emitAuthResolved(options.onEvent, "token" /* Token */);
6688
+ return {
6689
+ token: credentials,
6690
+ mechanism: "token" /* Token */,
6691
+ clientId: null
6692
+ };
6658
6693
  }
6659
6694
  if (isClientCredentials(credentials)) {
6660
6695
  const { clientId } = credentials;
@@ -6671,10 +6706,20 @@ async function resolveAuthTokenFromCredentials(credentials, options) {
6671
6706
  if (options.debug) {
6672
6707
  console.error(`[auth] Using cached token (clientId: ${clientId})`);
6673
6708
  }
6674
- return cached;
6709
+ return {
6710
+ token: cached,
6711
+ mechanism: "client_credentials" /* ClientCredentials */,
6712
+ clientId: credentials.clientId
6713
+ };
6675
6714
  }
6676
6715
  const pending = pendingExchanges.get(cacheKey);
6677
- if (pending) return pending;
6716
+ if (pending) {
6717
+ return {
6718
+ token: await pending,
6719
+ mechanism: "client_credentials" /* ClientCredentials */,
6720
+ clientId: credentials.clientId
6721
+ };
6722
+ }
6678
6723
  const runLocked = async () => {
6679
6724
  const recheck = await readCachedToken(cacheKey, cache);
6680
6725
  if (recheck !== void 0) {
@@ -6707,7 +6752,11 @@ async function resolveAuthTokenFromCredentials(credentials, options) {
6707
6752
  pendingExchanges.delete(cacheKey);
6708
6753
  });
6709
6754
  pendingExchanges.set(cacheKey, exchangePromise);
6710
- return exchangePromise;
6755
+ return {
6756
+ token: await exchangePromise,
6757
+ mechanism: "client_credentials" /* ClientCredentials */,
6758
+ clientId: credentials.clientId
6759
+ };
6711
6760
  }
6712
6761
  if (isPkceCredentials(credentials)) {
6713
6762
  const storedToken = await getTokenFromCliLogin({
@@ -6717,7 +6766,11 @@ async function resolveAuthTokenFromCredentials(credentials, options) {
6717
6766
  debug: options.debug
6718
6767
  });
6719
6768
  if (storedToken) {
6720
- return storedToken;
6769
+ return {
6770
+ token: storedToken,
6771
+ mechanism: "pkce" /* Pkce */,
6772
+ clientId: null
6773
+ };
6721
6774
  }
6722
6775
  throw new Error(
6723
6776
  "PKCE credentials require interactive login. Please run the 'login' command with the CLI first, or use client_credentials flow."
@@ -6760,6 +6813,38 @@ function getCallerContext() {
6760
6813
  }
6761
6814
  }
6762
6815
 
6816
+ // src/utils/agent.ts
6817
+ var isTruthy = (value) => {
6818
+ const lower = value.toLowerCase();
6819
+ return lower === "1" || lower === "true";
6820
+ };
6821
+ var isNonEmpty = (value) => value !== "";
6822
+ var agentDetectors = [
6823
+ { name: "claude-code", key: "CLAUDECODE", predicate: isTruthy },
6824
+ { name: "github-copilot", key: "COPILOT_AGENT", predicate: isTruthy },
6825
+ { name: "cursor", key: "CURSOR_AGENT", predicate: isTruthy },
6826
+ { name: "codex", key: "CODEX_SANDBOX", predicate: isNonEmpty },
6827
+ { name: "gemini-cli", key: "GEMINI_CLI", predicate: isTruthy },
6828
+ { name: "augment", key: "AUGMENT_AGENT", predicate: isTruthy },
6829
+ { name: "cline", key: "CLINE_ACTIVE", predicate: isTruthy },
6830
+ { name: "opencode", key: "OPENCODE_CLIENT", predicate: isNonEmpty }
6831
+ ];
6832
+ function getAgent() {
6833
+ try {
6834
+ const env = globalThis.process?.env;
6835
+ if (!env) return null;
6836
+ for (const detector of agentDetectors) {
6837
+ const value = env[detector.key];
6838
+ if (value !== void 0 && detector.predicate(value)) {
6839
+ return detector.name;
6840
+ }
6841
+ }
6842
+ return null;
6843
+ } catch {
6844
+ return null;
6845
+ }
6846
+ }
6847
+
6763
6848
  // src/api/sse-parser.ts
6764
6849
  async function* jsonFrames(source) {
6765
6850
  for await (const { data } of source) {
@@ -6911,7 +6996,7 @@ function parseApprovalReviewStreamPayload(parsed, toolNames) {
6911
6996
  }
6912
6997
 
6913
6998
  // src/sdk-version.ts
6914
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.76.0" : void 0) || "unknown";
6999
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.76.2" : void 0) || "unknown";
6915
7000
 
6916
7001
  // src/utils/open-url.ts
6917
7002
  var nodePrefix = "node:";
@@ -7629,6 +7714,10 @@ var ZapierApiClient = class {
7629
7714
  headers.set("zapier-service", sdkService);
7630
7715
  headers.set("x-zapier-service", sdkService);
7631
7716
  }
7717
+ const agent = getAgent();
7718
+ if (agent) {
7719
+ headers.set("zapier-sdk-agent", agent);
7720
+ }
7632
7721
  const callerPackage = this.options.callerPackage;
7633
7722
  if (callerPackage) {
7634
7723
  headers.set("zapier-sdk-package", callerPackage.name);
@@ -9695,36 +9784,6 @@ function getTtyContext() {
9695
9784
  return { stdin_is_tty: null, stdout_is_tty: null };
9696
9785
  }
9697
9786
  }
9698
- var isTruthy = (value) => {
9699
- const lower = value.toLowerCase();
9700
- return lower === "1" || lower === "true";
9701
- };
9702
- var isNonEmpty = (value) => value !== "";
9703
- var agentDetectors = [
9704
- { name: "claude-code", key: "CLAUDECODE", predicate: isTruthy },
9705
- { name: "github-copilot", key: "COPILOT_AGENT", predicate: isTruthy },
9706
- { name: "cursor", key: "CURSOR_AGENT", predicate: isTruthy },
9707
- { name: "codex", key: "CODEX_SANDBOX", predicate: isNonEmpty },
9708
- { name: "gemini-cli", key: "GEMINI_CLI", predicate: isTruthy },
9709
- { name: "augment", key: "AUGMENT_AGENT", predicate: isTruthy },
9710
- { name: "cline", key: "CLINE_ACTIVE", predicate: isTruthy },
9711
- { name: "opencode", key: "OPENCODE_CLIENT", predicate: isNonEmpty }
9712
- ];
9713
- function getAgent() {
9714
- try {
9715
- const env = globalThis.process?.env;
9716
- if (!env) return null;
9717
- for (const detector of agentDetectors) {
9718
- const value = env[detector.key];
9719
- if (value !== void 0 && detector.predicate(value)) {
9720
- return detector.name;
9721
- }
9722
- }
9723
- return null;
9724
- } catch {
9725
- return null;
9726
- }
9727
- }
9728
9787
 
9729
9788
  // src/plugins/eventEmission/builders.ts
9730
9789
  function createBaseEvent(context = {}) {
@@ -9734,6 +9793,8 @@ function createBaseEvent(context = {}) {
9734
9793
  release_id: getReleaseId(),
9735
9794
  customuser_id: context.customuser_id,
9736
9795
  account_id: context.account_id,
9796
+ client_id: context.client_id ?? null,
9797
+ auth_mechanism: context.auth_mechanism ?? null,
9737
9798
  identity_id: context.identity_id,
9738
9799
  visitor_id: context.visitor_id,
9739
9800
  correlation_id: context.correlation_id
@@ -9887,6 +9948,20 @@ function cleanupEventListeners() {
9887
9948
  var APPLICATION_LIFECYCLE_EVENT_SUBJECT = "platform.sdk.ApplicationLifecycleEvent";
9888
9949
  var ERROR_OCCURRED_EVENT_SUBJECT = "platform.sdk.ErrorOccurredEvent";
9889
9950
  var METHOD_CALLED_EVENT_SUBJECT = "platform.sdk.MethodCalledEvent";
9951
+ var NULL_EVENT_CONTEXT = Object.freeze({
9952
+ customuser_id: null,
9953
+ account_id: null,
9954
+ client_id: null,
9955
+ auth_mechanism: null
9956
+ });
9957
+ function buildEventAuthContext(auth) {
9958
+ const userIds = auth.token ? extractUserIdsFromJwt(auth.token) : { customuser_id: null, account_id: null };
9959
+ return {
9960
+ ...userIds,
9961
+ client_id: auth.clientId,
9962
+ auth_mechanism: auth.mechanism
9963
+ };
9964
+ }
9890
9965
  async function emitWithTimeout(transport, subject, event) {
9891
9966
  try {
9892
9967
  await Promise.race([
@@ -9962,16 +10037,11 @@ var eventEmissionPlugin = definePlugin(
9962
10037
  const getUserContext = (async () => {
9963
10038
  if (config.enabled) {
9964
10039
  try {
9965
- const token = await resolveAuthToken({
9966
- ...options
9967
- });
9968
- if (token) {
9969
- return extractUserIdsFromJwt(token);
9970
- }
10040
+ return buildEventAuthContext(await resolveAuth({ ...options }));
9971
10041
  } catch {
9972
10042
  }
9973
10043
  }
9974
- return { customuser_id: null, account_id: null };
10044
+ return NULL_EVENT_CONTEXT;
9975
10045
  })();
9976
10046
  const startupTime = Date.now();
9977
10047
  let shutdownStartTime = null;
@@ -10004,6 +10074,8 @@ var eventEmissionPlugin = definePlugin(
10004
10074
  release_id: getReleaseId(),
10005
10075
  customuser_id: null,
10006
10076
  account_id: null,
10077
+ client_id: null,
10078
+ auth_mechanism: null,
10007
10079
  identity_id: null,
10008
10080
  visitor_id: null,
10009
10081
  correlation_id: null
@@ -10032,6 +10104,8 @@ var eventEmissionPlugin = definePlugin(
10032
10104
  release_id: getReleaseId(),
10033
10105
  customuser_id: null,
10034
10106
  account_id: null,
10107
+ client_id: null,
10108
+ auth_mechanism: null,
10035
10109
  identity_id: null,
10036
10110
  visitor_id: null,
10037
10111
  correlation_id: null
@@ -10320,6 +10394,7 @@ exports.ActionTypePropertySchema = ActionTypePropertySchema;
10320
10394
  exports.AppKeyPropertySchema = AppKeyPropertySchema;
10321
10395
  exports.AppPropertySchema = AppPropertySchema;
10322
10396
  exports.AppsPropertySchema = AppsPropertySchema;
10397
+ exports.AuthMechanism = AuthMechanism;
10323
10398
  exports.AuthenticationIdPropertySchema = AuthenticationIdPropertySchema;
10324
10399
  exports.BaseSdkOptionsSchema = BaseSdkOptionsSchema;
10325
10400
  exports.CONTEXT_CACHE_MAX_SIZE = CONTEXT_CACHE_MAX_SIZE;
@@ -10498,6 +10573,7 @@ exports.readManifestFromFile = readManifestFromFile;
10498
10573
  exports.registryPlugin = registryPlugin;
10499
10574
  exports.requestPlugin = requestPlugin;
10500
10575
  exports.resetDeprecationWarnings = resetDeprecationWarnings2;
10576
+ exports.resolveAuth = resolveAuth;
10501
10577
  exports.resolveAuthToken = resolveAuthToken;
10502
10578
  exports.resolveCredentials = resolveCredentials;
10503
10579
  exports.resolveCredentialsFromEnv = resolveCredentialsFromEnv;
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- export { H as Action, f as ActionEntry, ci as ActionExecutionOptions, Q as ActionExecutionResult, S as ActionField, V as ActionFieldChoice, aW as ActionItem, bw as ActionKeyProperty, b4 as ActionKeyPropertySchema, bx as ActionProperty, b5 as ActionPropertySchema, aK as ActionResolverItem, bI as ActionTimeoutMsProperty, bg as ActionTimeoutMsPropertySchema, aL as ActionTypeItem, bv as ActionTypeProperty, b3 as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, ce as ApiError, dI as ApiEvent, d0 as ApiPluginOptions, d2 as ApiPluginProvides, I as App, cj as AppFactoryInput, aU as AppItem, bt as AppKeyProperty, b1 as AppKeyPropertySchema, bu as AppProperty, b2 as AppPropertySchema, eS as ApplicationLifecycleEventData, ca as ApprovalStatus, ch as AppsPluginProvides, bN as AppsProperty, bl as AppsPropertySchema, a8 as ArrayResolver, dH as AuthEvent, bB as AuthenticationIdProperty, b8 as AuthenticationIdPropertySchema, e_ as BaseEvent, ay as BaseSdkOptionsSchema, am as BatchOptions, cP as CONTEXT_CACHE_MAX_SIZE, cO as CONTEXT_CACHE_TTL_MS, aC as CORE_ERROR_SYMBOL, ai as CallerContext, K as Choice, dO as ClientCredentialsObject, dZ as ClientCredentialsObjectSchema, _ as Connection, e5 as ConnectionEntry, e4 as ConnectionEntrySchema, bz as ConnectionIdProperty, b7 as ConnectionIdPropertySchema, aV as ConnectionItem, bA as ConnectionProperty, b9 as ConnectionPropertySchema, e7 as ConnectionsMap, e6 as ConnectionsMapSchema, e9 as ConnectionsPluginProvides, bP as ConnectionsProperty, bn as ConnectionsPropertySchema, $ as ConnectionsResponse, aD as CoreErrorCode, cB as CreateClientCredentialsPluginProvides, eA as CreateTableFieldsPluginProvides, eu as CreateTablePluginProvides, eI as CreateTableRecordsPluginProvides, dL as Credentials, e2 as CredentialsFunction, e1 as CredentialsFunctionSchema, dN as CredentialsObject, d$ as CredentialsObjectSchema, e3 as CredentialsSchema, ee as DEFAULT_ACTION_TIMEOUT_MS, en as DEFAULT_APPROVAL_TIMEOUT_MS, cY as DEFAULT_CONFIG_PATH, eo as DEFAULT_MAX_APPROVAL_RETRIES, ed as DEFAULT_PAGE_SIZE, bG as DebugProperty, be as DebugPropertySchema, cD as DeleteClientCredentialsPluginProvides, eC as DeleteTableFieldsPluginProvides, ew as DeleteTablePluginProvides, eK as DeleteTableRecordsPluginProvides, u as DrainTriggerInboxCallback, v as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, ab as DynamicListResolver, m as DynamicResolver, ac as DynamicSearchResolver, eT as EnhancedErrorEventData, bV as ErrorOptions, dK as EventCallback, eR as EventContext, eO as EventEmissionConfig, E as EventEmissionContext, eQ as EventEmissionProvides, cl as FetchPluginProvides, J as Field, bM as FieldsProperty, bk as FieldsPropertySchema, ad as FieldsResolver, F as FieldsetItem, y as FindFirstAuthenticationPluginProvides, cL as FindFirstConnectionPluginProvides, z as FindUniqueAuthenticationPluginProvides, cN as FindUniqueConnectionPluginProvides, a6 as FormattedItem, ax as FunctionDeprecation, aw as FunctionRegistryEntry, cv as GetActionInputFieldsSchemaPluginProvides, cH as GetActionPluginProvides, cF as GetAppPluginProvides, x as GetAuthenticationPluginProvides, cJ as GetConnectionPluginProvides, c$ as GetProfilePluginProvides, es as GetTablePluginProvides, eE as GetTableRecordPluginProvides, aY as InfoFieldItem, aX as InputFieldItem, by as InputFieldProperty, b6 as InputFieldPropertySchema, bC as InputsProperty, ba as InputsPropertySchema, aT as JsonSseMessage, bU as LeaseLimitProperty, bs as LeaseLimitPropertySchema, bS as LeaseProperty, bq as LeasePropertySchema, bT as LeaseSecondsProperty, br as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bD as LimitProperty, bb as LimitPropertySchema, ct as ListActionInputFieldChoicesPluginProvides, cr as ListActionInputFieldsPluginProvides, cp as ListActionsPluginProvides, cn as ListAppsPluginProvides, w as ListAuthenticationsPluginProvides, cz as ListClientCredentialsPluginProvides, cx as ListConnectionsPluginProvides, ey as ListTableFieldsPluginProvides, eG as ListTableRecordsPluginProvides, eq as ListTablesPluginProvides, dJ as LoadingEvent, eh as MAX_CONCURRENCY_LIMIT, ec as MAX_PAGE_LIMIT, b as Manifest, cZ as ManifestEntry, cU as ManifestPluginOptions, cX as ManifestPluginProvides, e$ as MethodCalledEvent, eU as MethodCalledEventData, N as Need, X as NeedsRequest, Y as NeedsResponse, bE as OffsetProperty, bc as OffsetPropertySchema, O as OutputFormatter, bF as OutputProperty, bd as OutputPropertySchema, b0 as PaginatedSdkFunction, i as PaginatedSdkResult, bH as ParamsProperty, bf as ParamsPropertySchema, dP as PkceCredentialsObject, d_ as PkceCredentialsObjectSchema, aE as Plugin, a as PluginMeta, aF as PluginProvides, aO as PollOptions, k as PositionalMetadata, c8 as RateLimitInfo, bK as RecordProperty, bi as RecordPropertySchema, bL as RecordsProperty, bj as RecordsPropertySchema, ar as RelayFetchSchema, aq as RelayRequestSchema, aN as RequestOptions, cT as RequestPluginProvides, du as ResolveAuthTokenOptions, dU as ResolveCredentialsOptions, R as ResolvedAppLocator, dM as ResolvedCredentials, e0 as ResolvedCredentialsSchema, a7 as Resolver, a9 as ResolverMetadata, aZ as RootFieldItem, cR as RunActionPluginProvides, dG as SdkEvent, a$ as SdkPage, aS as SseMessage, aa as StaticResolver, bJ as TableProperty, bh as TablePropertySchema, bO as TablesProperty, bm as TablesPropertySchema, bR as TriggerInboxNameProperty, bp as TriggerInboxNamePropertySchema, bQ as TriggerInboxProperty, bo as TriggerInboxPropertySchema, T as TriggerMessageStatus, U as UpdateManifestEntryOptions, c as UpdateManifestEntryResult, eM as UpdateTableRecordsPluginProvides, a0 as UserProfile, a_ as UserProfileItem, n as WatchTriggerInboxOptions, q as WithAddPlugin, ea as ZAPIER_BASE_URL, ej as ZAPIER_MAX_CONCURRENT_REQUESTS, ef as ZAPIER_MAX_NETWORK_RETRIES, eg as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, s as ZapierAbortDrainSignal, c6 as ZapierActionError, b$ as ZapierApiError, c0 as ZapierAppNotFoundError, cb as ZapierApprovalError, bZ as ZapierAuthenticationError, c4 as ZapierBundleError, dC as ZapierCache, dD as ZapierCacheEntry, dE as ZapierCacheSetOptions, c3 as ZapierConfigurationError, c7 as ZapierConflictError, bW as ZapierError, l as ZapierFetchInitOptions, c1 as ZapierNotFoundError, c9 as ZapierRateLimitError, cc as ZapierRelayError, t as ZapierReleaseTriggerMessageSignal, c2 as ZapierResourceNotFoundError, fd as ZapierSdk, p as ZapierSdkApps, Z as ZapierSdkOptions, cf as ZapierSignal, c5 as ZapierTimeoutError, bY as ZapierUnknownError, bX as ZapierValidationError, d5 as actionKeyResolver, d4 as actionTypeResolver, a5 as addPlugin, d1 as apiPlugin, d3 as appKeyResolver, cg as appsPlugin, d7 as authenticationIdGenericResolver, d6 as authenticationIdResolver, al as batch, eV as buildApplicationLifecycleEvent, an as buildCapabilityMessage, eX as buildErrorEvent, eW as buildErrorEventWithContext, eZ as buildMethodCalledEvent, eN as cleanupEventListeners, dv as clearTokenCache, db as clientCredentialsNameResolver, dc as clientIdResolver, aJ as composePlugins, d7 as connectionIdGenericResolver, d6 as connectionIdResolver, e8 as connectionsPlugin, eY as createBaseEvent, cA as createClientCredentialsPlugin, a4 as createCorePlugin, a2 as createFunction, dF as createMemoryCache, au as createOptionsPlugin, aI as createPaginatedPluginMethod, aH as createPluginMethod, a3 as createPluginStack, at as createSdk, ez as createTableFieldsPlugin, et as createTablePlugin, eH as createTableRecordsPlugin, aP as createZapierApi, av as createZapierCoreStack, fb as createZapierSdk, fc as createZapierSdkStack, as as createZapierSdkWithoutRegistry, aG as definePlugin, cC as deleteClientCredentialsPlugin, eB as deleteTableFieldsPlugin, ev as deleteTablePlugin, eJ as deleteTableRecordsPlugin, dg as durableRunIdResolver, eP as eventEmissionPlugin, ck as fetchPlugin, cK as findFirstConnectionPlugin, g as findManifestEntry, cM as findUniqueConnectionPlugin, cd as formatErrorMessage, f0 as generateEventId, cu as getActionInputFieldsSchemaPlugin, cG as getActionPlugin, fa as getAgent, cE as getAppPlugin, dX as getBaseUrlFromCredentials, ag as getCallerContext, f6 as getCiPlatform, dY as getClientIdFromCredentials, cI as getConnectionPlugin, aB as getCoreErrorCause, aA as getCoreErrorCode, f8 as getCpuTime, f1 as getCurrentTimestamp, f7 as getMemoryUsage, aQ as getOrCreateApiClient, f3 as getOsInfo, f4 as getPlatformVersions, cV as getPreferredManifestEntryKey, c_ as getProfilePlugin, f2 as getReleaseId, er as getTablePlugin, eD as getTableRecordPlugin, dz as getTokenFromCliLogin, f9 as getTtyContext, ek as getZapierApprovalMode, em as getZapierDefaultApprovalMode, el as getZapierOpenAutoModeApprovalsInBrowser, eb as getZapierSdkService, dx as injectCliLogin, da as inputFieldKeyResolver, d9 as inputsAllOptionalResolver, d8 as inputsResolver, dw as invalidateCachedToken, dB as invalidateCredentialsToken, f5 as isCi, dy as isCliLoginAvailable, dQ as isClientCredentials, az as isCoreError, dT as isCredentialsFunction, dS as isCredentialsObject, aR as isPermanentHttpError, dR as isPkceCredentials, a1 as isPositional, cs as listActionInputFieldChoicesPlugin, cq as listActionInputFieldsPlugin, co as listActionsPlugin, cm as listAppsPlugin, cy as listClientCredentialsPlugin, cw as listConnectionsPlugin, ex as listTableFieldsPlugin, eF as listTableRecordsPlugin, ep as listTablesPlugin, ao as logDeprecation, cW as manifestPlugin, ei as parseConcurrencyEnvVar, r as readManifestFromFile, aM as registryPlugin, cS as requestPlugin, ap as resetDeprecationWarnings, dA as resolveAuthToken, dW as resolveCredentials, dV as resolveCredentialsFromEnv, cQ as runActionPlugin, ae as runInMethodScope, ah as runWithCallerContext, af as runWithTelemetryContext, dm as tableFieldIdsResolver, dp as tableFieldsResolver, ds as tableFiltersResolver, dd as tableIdResolver, dn as tableNameResolver, dk as tableRecordIdResolver, dl as tableRecordIdsResolver, dq as tableRecordsResolver, dt as tableSortResolver, dr as tableUpdateRecordsResolver, aj as toSnakeCase, ak as toTitleCase, de as triggerInboxResolver, dj as triggerMessagesResolver, eL as updateTableRecordsPlugin, df as workflowIdResolver, di as workflowRunIdResolver, dh as workflowVersionIdResolver, b_ as zapierAdaptError } from './index-Cq9YBV9i.mjs';
1
+ export { H as Action, f as ActionEntry, cj as ActionExecutionOptions, Q as ActionExecutionResult, S as ActionField, V as ActionFieldChoice, aX as ActionItem, bx as ActionKeyProperty, b5 as ActionKeyPropertySchema, by as ActionProperty, b6 as ActionPropertySchema, aK as ActionResolverItem, bJ as ActionTimeoutMsProperty, bh as ActionTimeoutMsPropertySchema, aL as ActionTypeItem, bw as ActionTypeProperty, b4 as ActionTypePropertySchema, d as AddActionEntryOptions, e as AddActionEntryResult, A as ApiClient, cf as ApiError, dM as ApiEvent, d1 as ApiPluginOptions, d3 as ApiPluginProvides, I as App, ck as AppFactoryInput, aV as AppItem, bu as AppKeyProperty, b2 as AppKeyPropertySchema, bv as AppProperty, b3 as AppPropertySchema, eW as ApplicationLifecycleEventData, cb as ApprovalStatus, ci as AppsPluginProvides, bO as AppsProperty, bm as AppsPropertySchema, a8 as ArrayResolver, dL as AuthEvent, dw as AuthMechanism, bC as AuthenticationIdProperty, b9 as AuthenticationIdPropertySchema, f2 as BaseEvent, ay as BaseSdkOptionsSchema, am as BatchOptions, cQ as CONTEXT_CACHE_MAX_SIZE, cP as CONTEXT_CACHE_TTL_MS, aC as CORE_ERROR_SYMBOL, ai as CallerContext, K as Choice, dS as ClientCredentialsObject, e1 as ClientCredentialsObjectSchema, _ as Connection, e9 as ConnectionEntry, e8 as ConnectionEntrySchema, bA as ConnectionIdProperty, b8 as ConnectionIdPropertySchema, aW as ConnectionItem, bB as ConnectionProperty, ba as ConnectionPropertySchema, eb as ConnectionsMap, ea as ConnectionsMapSchema, ed as ConnectionsPluginProvides, bQ as ConnectionsProperty, bo as ConnectionsPropertySchema, $ as ConnectionsResponse, aD as CoreErrorCode, cC as CreateClientCredentialsPluginProvides, eE as CreateTableFieldsPluginProvides, ey as CreateTablePluginProvides, eM as CreateTableRecordsPluginProvides, dP as Credentials, e6 as CredentialsFunction, e5 as CredentialsFunctionSchema, dR as CredentialsObject, e3 as CredentialsObjectSchema, e7 as CredentialsSchema, ei as DEFAULT_ACTION_TIMEOUT_MS, er as DEFAULT_APPROVAL_TIMEOUT_MS, cZ as DEFAULT_CONFIG_PATH, es as DEFAULT_MAX_APPROVAL_RETRIES, eh as DEFAULT_PAGE_SIZE, bH as DebugProperty, bf as DebugPropertySchema, cE as DeleteClientCredentialsPluginProvides, eG as DeleteTableFieldsPluginProvides, eA as DeleteTablePluginProvides, eO as DeleteTableRecordsPluginProvides, u as DrainTriggerInboxCallback, v as DrainTriggerInboxErrorObserver, D as DrainTriggerInboxOptions, ab as DynamicListResolver, m as DynamicResolver, ac as DynamicSearchResolver, eX as EnhancedErrorEventData, bW as ErrorOptions, dO as EventCallback, eV as EventContext, eS as EventEmissionConfig, E as EventEmissionContext, eU as EventEmissionProvides, cm as FetchPluginProvides, J as Field, bN as FieldsProperty, bl as FieldsPropertySchema, ad as FieldsResolver, F as FieldsetItem, y as FindFirstAuthenticationPluginProvides, cM as FindFirstConnectionPluginProvides, z as FindUniqueAuthenticationPluginProvides, cO as FindUniqueConnectionPluginProvides, a6 as FormattedItem, ax as FunctionDeprecation, aw as FunctionRegistryEntry, cw as GetActionInputFieldsSchemaPluginProvides, cI as GetActionPluginProvides, cG as GetAppPluginProvides, x as GetAuthenticationPluginProvides, cK as GetConnectionPluginProvides, d0 as GetProfilePluginProvides, ew as GetTablePluginProvides, eI as GetTableRecordPluginProvides, aZ as InfoFieldItem, aY as InputFieldItem, bz as InputFieldProperty, b7 as InputFieldPropertySchema, bD as InputsProperty, bb as InputsPropertySchema, aU as JsonSseMessage, 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, cu as ListActionInputFieldChoicesPluginProvides, cs as ListActionInputFieldsPluginProvides, cq as ListActionsPluginProvides, co as ListAppsPluginProvides, w as ListAuthenticationsPluginProvides, cA as ListClientCredentialsPluginProvides, cy as ListConnectionsPluginProvides, eC as ListTableFieldsPluginProvides, eK as ListTableRecordsPluginProvides, eu as ListTablesPluginProvides, dN as LoadingEvent, el as MAX_CONCURRENCY_LIMIT, eg as MAX_PAGE_LIMIT, b as Manifest, c_ as ManifestEntry, cV as ManifestPluginOptions, cY as ManifestPluginProvides, f3 as MethodCalledEvent, eY as MethodCalledEventData, N as Need, X as NeedsRequest, Y as NeedsResponse, bF as OffsetProperty, bd as OffsetPropertySchema, O as OutputFormatter, bG as OutputProperty, be as OutputPropertySchema, b1 as PaginatedSdkFunction, i as PaginatedSdkResult, bI as ParamsProperty, bg as ParamsPropertySchema, dT as PkceCredentialsObject, e2 as PkceCredentialsObjectSchema, aE as Plugin, a as PluginMeta, aF as PluginProvides, aP as PollOptions, k as PositionalMetadata, c9 as RateLimitInfo, bL as RecordProperty, bj as RecordPropertySchema, bM as RecordsProperty, bk as RecordsPropertySchema, ar as RelayFetchSchema, aq as RelayRequestSchema, aO as RequestOptions, cU as RequestPluginProvides, dv as ResolveAuthTokenOptions, dY as ResolveCredentialsOptions, R as ResolvedAppLocator, dx as ResolvedAuth, dQ as ResolvedCredentials, e4 as ResolvedCredentialsSchema, a7 as Resolver, a9 as ResolverMetadata, a_ as RootFieldItem, cS as RunActionPluginProvides, dK as SdkEvent, b0 as SdkPage, aT as SseMessage, aa 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, c as UpdateManifestEntryResult, eQ as UpdateTableRecordsPluginProvides, a0 as UserProfile, a$ as UserProfileItem, n as WatchTriggerInboxOptions, q as WithAddPlugin, ee as ZAPIER_BASE_URL, en as ZAPIER_MAX_CONCURRENT_REQUESTS, ej as ZAPIER_MAX_NETWORK_RETRIES, ek as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, s as ZapierAbortDrainSignal, c7 as ZapierActionError, c0 as ZapierApiError, c1 as ZapierAppNotFoundError, cc as ZapierApprovalError, b_ as ZapierAuthenticationError, c5 as ZapierBundleError, dG as ZapierCache, dH as ZapierCacheEntry, dI as ZapierCacheSetOptions, c4 as ZapierConfigurationError, c8 as ZapierConflictError, bX as ZapierError, l as ZapierFetchInitOptions, c2 as ZapierNotFoundError, ca as ZapierRateLimitError, cd as ZapierRelayError, t as ZapierReleaseTriggerMessageSignal, c3 as ZapierResourceNotFoundError, fg as ZapierSdk, p as ZapierSdkApps, Z as ZapierSdkOptions, cg as ZapierSignal, c6 as ZapierTimeoutError, bZ as ZapierUnknownError, bY as ZapierValidationError, d6 as actionKeyResolver, d5 as actionTypeResolver, a5 as addPlugin, d2 as apiPlugin, d4 as appKeyResolver, ch as appsPlugin, d8 as authenticationIdGenericResolver, d7 as authenticationIdResolver, al as batch, eZ as buildApplicationLifecycleEvent, an as buildCapabilityMessage, e$ as buildErrorEvent, e_ as buildErrorEventWithContext, f1 as buildMethodCalledEvent, eR as cleanupEventListeners, dy as clearTokenCache, dc as clientCredentialsNameResolver, dd as clientIdResolver, aJ as composePlugins, d8 as connectionIdGenericResolver, d7 as connectionIdResolver, ec as connectionsPlugin, f0 as createBaseEvent, cB as createClientCredentialsPlugin, a4 as createCorePlugin, a2 as createFunction, dJ as createMemoryCache, au as createOptionsPlugin, aI as createPaginatedPluginMethod, aH as createPluginMethod, a3 as createPluginStack, at as createSdk, eD as createTableFieldsPlugin, ex as createTablePlugin, eL as createTableRecordsPlugin, aQ as createZapierApi, av as createZapierCoreStack, fe as createZapierSdk, ff as createZapierSdkStack, as as createZapierSdkWithoutRegistry, aG as definePlugin, cD as deleteClientCredentialsPlugin, eF as deleteTableFieldsPlugin, ez as deleteTablePlugin, eN as deleteTableRecordsPlugin, dh as durableRunIdResolver, eT as eventEmissionPlugin, cl as fetchPlugin, cL as findFirstConnectionPlugin, g as findManifestEntry, cN as findUniqueConnectionPlugin, ce as formatErrorMessage, f4 as generateEventId, cv as getActionInputFieldsSchemaPlugin, cH as getActionPlugin, aM as getAgent, cF as getAppPlugin, d$ as getBaseUrlFromCredentials, ag as getCallerContext, fa as getCiPlatform, e0 as getClientIdFromCredentials, cJ as getConnectionPlugin, aB as getCoreErrorCause, aA as getCoreErrorCode, fc as getCpuTime, f5 as getCurrentTimestamp, fb as getMemoryUsage, aR as getOrCreateApiClient, f7 as getOsInfo, f8 as getPlatformVersions, cW as getPreferredManifestEntryKey, c$ as getProfilePlugin, f6 as getReleaseId, ev as getTablePlugin, eH as getTableRecordPlugin, dC as getTokenFromCliLogin, fd as getTtyContext, eo as getZapierApprovalMode, eq as getZapierDefaultApprovalMode, ep as getZapierOpenAutoModeApprovalsInBrowser, ef as getZapierSdkService, dA as injectCliLogin, db as inputFieldKeyResolver, da as inputsAllOptionalResolver, d9 as inputsResolver, dz as invalidateCachedToken, dF as invalidateCredentialsToken, f9 as isCi, dB as isCliLoginAvailable, dU as isClientCredentials, az as isCoreError, dX as isCredentialsFunction, dW as isCredentialsObject, aS as isPermanentHttpError, dV as isPkceCredentials, a1 as isPositional, ct as listActionInputFieldChoicesPlugin, cr as listActionInputFieldsPlugin, cp as listActionsPlugin, cn as listAppsPlugin, cz as listClientCredentialsPlugin, cx as listConnectionsPlugin, eB as listTableFieldsPlugin, eJ as listTableRecordsPlugin, et as listTablesPlugin, ao as logDeprecation, cX as manifestPlugin, em as parseConcurrencyEnvVar, r as readManifestFromFile, aN as registryPlugin, cT as requestPlugin, ap as resetDeprecationWarnings, dD as resolveAuth, dE as resolveAuthToken, d_ as resolveCredentials, dZ as resolveCredentialsFromEnv, cR as runActionPlugin, ae as runInMethodScope, ah as runWithCallerContext, af as runWithTelemetryContext, dn as tableFieldIdsResolver, dq as tableFieldsResolver, dt as tableFiltersResolver, de as tableIdResolver, dp as tableNameResolver, dl as tableRecordIdResolver, dm as tableRecordIdsResolver, dr as tableRecordsResolver, du as tableSortResolver, ds as tableUpdateRecordsResolver, aj as toSnakeCase, ak as toTitleCase, df as triggerInboxResolver, dk as triggerMessagesResolver, eP as updateTableRecordsPlugin, dg as workflowIdResolver, dj as workflowRunIdResolver, di as workflowVersionIdResolver, b$ as zapierAdaptError } from './index-BZShISEr.mjs';
2
2
  import 'zod';
3
3
  import 'zod/v4/core';
4
4
  import '@zapier/zapier-sdk-core/v0/schemas/connections';
package/dist/index.d.ts CHANGED
@@ -70,6 +70,7 @@ export { definePlugin, createPluginMethod, createPaginatedPluginMethod, composeP
70
70
  export type { ActionItem as ActionResolverItem } from "./resolvers/actionKey";
71
71
  export type { ActionTypeItem } from "./resolvers/actionType";
72
72
  export type { ResolvedAppLocator } from "./utils/domain-utils";
73
+ export { getAgent } from "./utils/agent";
73
74
  export { registryPlugin } from "./plugins/registry";
74
75
  export type { ApiClient, RequestOptions, PollOptions } from "./api/types";
75
76
  export { createZapierApi, getOrCreateApiClient } from "./api";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,wBAAwB,EACxB,wBAAwB,EACxB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,YAAY,EACV,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AACrD,cAAc,2B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EACV,cAAc,EACd,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,GACf,MAAM,SAAS,CAAC;AAKjB,YAAY,EAAE,UAAU,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpD,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAC7C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAGxD,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -86,6 +86,7 @@ export { BaseSdkOptionsSchema } from "./types/sdk";
86
86
  // so consumers don't need to add kitcore as a dependency.
87
87
  export { isCoreError, getCoreErrorCode, getCoreErrorCause, CORE_ERROR_SYMBOL, CoreErrorCode, } from "kitcore";
88
88
  export { definePlugin, createPluginMethod, createPaginatedPluginMethod, composePlugins, } from "kitcore";
89
+ export { getAgent } from "./utils/agent";
89
90
  // Export registry plugin for manual use
90
91
  export { registryPlugin } from "./plugins/registry";
91
92
  export { createZapierApi, getOrCreateApiClient } from "./api";