@zapier/zapier-sdk 0.50.0 → 0.51.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 (50) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +1 -1
  3. package/dist/api/auth.d.ts +1 -6
  4. package/dist/api/auth.d.ts.map +1 -1
  5. package/dist/api/auth.js +34 -27
  6. package/dist/api/client.d.ts.map +1 -1
  7. package/dist/api/client.js +3 -2
  8. package/dist/api/index.d.ts +1 -1
  9. package/dist/api/index.d.ts.map +1 -1
  10. package/dist/api/index.js +1 -1
  11. package/dist/api/schemas.d.ts +3 -3
  12. package/dist/auth.d.ts +13 -2
  13. package/dist/auth.d.ts.map +1 -1
  14. package/dist/auth.js +95 -11
  15. package/dist/experimental.cjs +167 -29
  16. package/dist/experimental.d.mts +2 -2
  17. package/dist/experimental.d.ts +26 -26
  18. package/dist/experimental.mjs +166 -30
  19. package/dist/{index-BQ2ii0Bs.d.mts → index-C52BjTXh.d.mts} +109 -2
  20. package/dist/{index-BQ2ii0Bs.d.ts → index-C52BjTXh.d.ts} +109 -2
  21. package/dist/index.cjs +167 -29
  22. package/dist/index.d.mts +1 -1
  23. package/dist/index.d.ts +2 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +1 -0
  26. package/dist/index.mjs +166 -30
  27. package/dist/plugins/apps/index.d.ts +2 -2
  28. package/dist/plugins/deprecated/inputFields.d.ts +18 -18
  29. package/dist/plugins/getAction/index.d.ts +6 -6
  30. package/dist/plugins/getAction/schemas.d.ts +4 -4
  31. package/dist/plugins/getActionInputFieldsSchema/index.d.ts +5 -5
  32. package/dist/plugins/getActionInputFieldsSchema/schemas.d.ts +4 -4
  33. package/dist/plugins/listActionInputFieldChoices/index.d.ts +5 -5
  34. package/dist/plugins/listActionInputFieldChoices/schemas.d.ts +4 -4
  35. package/dist/plugins/listActionInputFields/index.d.ts +5 -5
  36. package/dist/plugins/listActionInputFields/schemas.d.ts +4 -4
  37. package/dist/plugins/listActions/index.d.ts +3 -3
  38. package/dist/plugins/listActions/schemas.d.ts +4 -4
  39. package/dist/plugins/runAction/index.d.ts +5 -5
  40. package/dist/plugins/runAction/schemas.d.ts +4 -4
  41. package/dist/plugins/triggers/getTriggerInputFieldsSchema/index.d.ts +2 -2
  42. package/dist/plugins/triggers/listTriggerInputFieldChoices/index.d.ts +2 -2
  43. package/dist/plugins/triggers/listTriggerInputFields/index.d.ts +2 -2
  44. package/dist/schemas/Action.d.ts +1 -1
  45. package/dist/sdk.d.ts +52 -52
  46. package/dist/types/properties.d.ts +1 -1
  47. package/dist/utils/telemetry.d.ts +11 -0
  48. package/dist/utils/telemetry.d.ts.map +1 -0
  49. package/dist/utils/telemetry.js +19 -0
  50. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -5233,33 +5233,40 @@ function getAuthorizationHeader(token) {
5233
5233
  }
5234
5234
  return `Bearer ${token}`;
5235
5235
  }
5236
- function extractUserIdsFromJwt(token) {
5236
+ function readJwtPayload(token) {
5237
5237
  const parts = parseJwt(token);
5238
- if (!parts) {
5239
- return { customuser_id: null, account_id: null };
5240
- }
5238
+ if (!parts) return null;
5239
+ let payload;
5241
5240
  try {
5242
- const payload = JSON.parse(
5243
- Buffer.from(parts[1], "base64url").toString("utf-8")
5244
- );
5245
- let actualPayload = payload;
5246
- if (payload.sub_type === "service" && payload.njwt) {
5247
- const nestedParts = payload.njwt.split(".");
5248
- if (nestedParts.length === 3) {
5249
- actualPayload = JSON.parse(
5241
+ payload = JSON.parse(Buffer.from(parts[1], "base64url").toString("utf-8"));
5242
+ } catch {
5243
+ return null;
5244
+ }
5245
+ if (payload["sub_type"] === "service" && typeof payload["njwt"] === "string") {
5246
+ const nestedParts = parseJwt(payload["njwt"]);
5247
+ if (nestedParts) {
5248
+ try {
5249
+ return JSON.parse(
5250
5250
  Buffer.from(nestedParts[1], "base64url").toString("utf-8")
5251
5251
  );
5252
+ } catch {
5252
5253
  }
5253
5254
  }
5254
- const accountId = actualPayload["zap:acc"] != null ? parseInt(String(actualPayload["zap:acc"]), 10) : null;
5255
- const customUserId = actualPayload.sub_type === "customuser" && actualPayload.sub != null ? parseInt(String(actualPayload.sub), 10) : null;
5256
- return {
5257
- customuser_id: customUserId !== null && !isNaN(customUserId) ? customUserId : null,
5258
- account_id: accountId !== null && !isNaN(accountId) ? accountId : null
5259
- };
5260
- } catch {
5255
+ }
5256
+ return payload;
5257
+ }
5258
+ function extractUserIdsFromJwt(token) {
5259
+ const payload = readJwtPayload(token);
5260
+ if (!payload) {
5261
5261
  return { customuser_id: null, account_id: null };
5262
5262
  }
5263
+ const accRaw = payload["zap:acc"];
5264
+ const accountId = accRaw != null ? parseInt(String(accRaw), 10) : null;
5265
+ const customUserId = payload["sub_type"] === "customuser" && payload["sub"] != null ? parseInt(String(payload["sub"]), 10) : null;
5266
+ return {
5267
+ customuser_id: customUserId !== null && !isNaN(customUserId) ? customUserId : null,
5268
+ account_id: accountId !== null && !isNaN(accountId) ? accountId : null
5269
+ };
5263
5270
  }
5264
5271
 
5265
5272
  // src/api/debug.ts
@@ -5608,6 +5615,19 @@ function isCredentialsFunction(credentials) {
5608
5615
  return typeof credentials === "function";
5609
5616
  }
5610
5617
 
5618
+ // src/utils/telemetry.ts
5619
+ var emittedOnce = /* @__PURE__ */ new WeakMap();
5620
+ function emitOnce(onEvent, event) {
5621
+ if (!emittedOnce.has(onEvent)) {
5622
+ emittedOnce.set(onEvent, /* @__PURE__ */ new Set());
5623
+ }
5624
+ const fired = emittedOnce.get(onEvent);
5625
+ if (!fired.has(event.type)) {
5626
+ fired.add(event.type);
5627
+ onEvent(event);
5628
+ }
5629
+ }
5630
+
5611
5631
  // src/utils/url-utils.ts
5612
5632
  function getZapierBaseUrl(baseUrl) {
5613
5633
  if (!baseUrl) {
@@ -5830,8 +5850,10 @@ async function resolveCache(options) {
5830
5850
  if (cliLogin?.createCache) {
5831
5851
  try {
5832
5852
  const cache = cliLogin.createCache();
5833
- cachedDefaultCache = cache;
5834
- return cache;
5853
+ if (cache) {
5854
+ cachedDefaultCache = cache;
5855
+ return cache;
5856
+ }
5835
5857
  } catch {
5836
5858
  }
5837
5859
  }
@@ -5843,6 +5865,11 @@ function entryIsValid(entry) {
5843
5865
  if (entry.expiresAt === void 0) return true;
5844
5866
  return entry.expiresAt > Date.now() + TOKEN_EXPIRATION_BUFFER_MS;
5845
5867
  }
5868
+ async function readCachedToken(cacheKey, cache) {
5869
+ const cached = await cache.get(cacheKey);
5870
+ if (cached && entryIsValid(cached)) return cached.value;
5871
+ return void 0;
5872
+ }
5846
5873
  async function invalidateCachedToken(options) {
5847
5874
  const cacheKey = buildCacheKey(options);
5848
5875
  pendingExchanges.delete(cacheKey);
@@ -5956,11 +5983,76 @@ function isCliLoginAvailable() {
5956
5983
  if (cachedCliLogin === void 0) return void 0;
5957
5984
  return cachedCliLogin !== false;
5958
5985
  }
5986
+ function emitAuthResolved(onEvent, mechanism) {
5987
+ if (onEvent) {
5988
+ emitOnce(onEvent, {
5989
+ type: "auth_resolved",
5990
+ payload: { mechanism },
5991
+ timestamp: Date.now()
5992
+ });
5993
+ }
5994
+ }
5995
+ async function getActiveCredentialsFromCli(baseUrl) {
5996
+ const cliLogin = await getCliLogin();
5997
+ return cliLogin?.getActiveCredentials?.({ baseUrl });
5998
+ }
5999
+ async function getStoredClientCredentialsFromCli(baseUrl) {
6000
+ const cliLogin = await getCliLogin();
6001
+ return cliLogin?.getStoredClientCredentials?.({ baseUrl });
6002
+ }
5959
6003
  async function getTokenFromCliLogin(options) {
5960
6004
  const cliLogin = await getCliLogin();
5961
6005
  if (!cliLogin) return void 0;
5962
6006
  return await cliLogin.getToken(options);
5963
6007
  }
6008
+ async function tryStoredClientCredentialToken(options) {
6009
+ const activeCredential = await getActiveCredentialsFromCli(options.baseUrl);
6010
+ if (!activeCredential) return void 0;
6011
+ const resolvedBaseUrl = activeCredential.baseUrl || options.baseUrl || DEFAULT_AUTH_BASE_URL;
6012
+ const mergedScopes = mergeScopes(
6013
+ activeCredential.scopes.join(" "),
6014
+ options.requiredScopes
6015
+ );
6016
+ const cacheKey = buildCacheKey({
6017
+ clientId: activeCredential.clientId,
6018
+ scopes: mergedScopes,
6019
+ baseUrl: resolvedBaseUrl
6020
+ });
6021
+ const cache = await resolveCache(options);
6022
+ const pending = pendingExchanges.get(cacheKey);
6023
+ if (pending) return pending;
6024
+ const cached = await readCachedToken(cacheKey, cache);
6025
+ if (cached !== void 0) {
6026
+ if (options.debug)
6027
+ console.log(
6028
+ `[auth] Using cached token (clientId: ${activeCredential.clientId})`
6029
+ );
6030
+ emitAuthResolved(options.onEvent, "client_credentials");
6031
+ return cached;
6032
+ }
6033
+ const storedCredential = await getStoredClientCredentialsFromCli(resolvedBaseUrl);
6034
+ if (!storedCredential) {
6035
+ await invalidateCachedToken({
6036
+ clientId: activeCredential.clientId,
6037
+ scopes: activeCredential.scopes,
6038
+ baseUrl: resolvedBaseUrl,
6039
+ cache: options.cache
6040
+ });
6041
+ throw new ZapierAuthenticationError(
6042
+ `Stored client credential is missing its secret (clientId: ${activeCredential.clientId}). Run \`zapier-sdk login\` to recreate it.`
6043
+ );
6044
+ }
6045
+ if (options.debug)
6046
+ console.log(
6047
+ `[auth] Using stored client credential (clientId: ${storedCredential.clientId})`
6048
+ );
6049
+ const token = await resolveAuthTokenFromCredentials(
6050
+ storedCredential,
6051
+ options
6052
+ );
6053
+ emitAuthResolved(options.onEvent, "client_credentials");
6054
+ return token;
6055
+ }
5964
6056
  async function resolveAuthToken(options = {}) {
5965
6057
  const credentials = await resolveCredentials({
5966
6058
  credentials: options.credentials,
@@ -5970,14 +6062,24 @@ async function resolveAuthToken(options = {}) {
5970
6062
  if (credentials !== void 0) {
5971
6063
  return resolveAuthTokenFromCredentials(credentials, options);
5972
6064
  }
5973
- return getTokenFromCliLogin({
6065
+ const storedToken = await tryStoredClientCredentialToken(options);
6066
+ if (storedToken !== void 0) return storedToken;
6067
+ if (options.debug) {
6068
+ console.log("[auth] Using JWT (no stored client credential found)");
6069
+ }
6070
+ const jwtToken = await getTokenFromCliLogin({
5974
6071
  onEvent: options.onEvent,
5975
6072
  fetch: options.fetch,
5976
6073
  debug: options.debug
5977
6074
  });
6075
+ if (jwtToken !== void 0) {
6076
+ emitAuthResolved(options.onEvent, "jwt");
6077
+ }
6078
+ return jwtToken;
5978
6079
  }
5979
6080
  async function resolveAuthTokenFromCredentials(credentials, options) {
5980
6081
  if (typeof credentials === "string") {
6082
+ emitAuthResolved(options.onEvent, "token");
5981
6083
  return credentials;
5982
6084
  }
5983
6085
  if (isClientCredentials(credentials)) {
@@ -5990,15 +6092,25 @@ async function resolveAuthTokenFromCredentials(credentials, options) {
5990
6092
  baseUrl: resolvedBaseUrl
5991
6093
  });
5992
6094
  const cache = await resolveCache(options);
5993
- const cached = await cache.get(cacheKey);
5994
- if (cached && entryIsValid(cached)) {
5995
- return cached.value;
6095
+ const cached = await readCachedToken(cacheKey, cache);
6096
+ if (cached !== void 0) {
6097
+ if (options.debug) {
6098
+ console.log(`[auth] Using cached token (clientId: ${clientId})`);
6099
+ }
6100
+ return cached;
5996
6101
  }
5997
6102
  const pending = pendingExchanges.get(cacheKey);
5998
6103
  if (pending) return pending;
5999
6104
  const runLocked = async () => {
6000
- const recheck = await cache.get(cacheKey);
6001
- if (recheck && entryIsValid(recheck)) return recheck.value;
6105
+ const recheck = await readCachedToken(cacheKey, cache);
6106
+ if (recheck !== void 0) {
6107
+ if (options.debug) {
6108
+ console.log(
6109
+ `[auth] Using cached token (clientId: ${clientId}, locked recheck)`
6110
+ );
6111
+ }
6112
+ return recheck;
6113
+ }
6002
6114
  const { accessToken, expiresIn } = await exchangeClientCredentials({
6003
6115
  clientId: credentials.clientId,
6004
6116
  clientSecret: credentials.clientSecret,
@@ -6056,7 +6168,7 @@ async function invalidateCredentialsToken(options) {
6056
6168
  }
6057
6169
 
6058
6170
  // src/sdk-version.ts
6059
- var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.50.0" : void 0) || "unknown";
6171
+ var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.51.0" : void 0) || "unknown";
6060
6172
 
6061
6173
  // src/utils/open-url.ts
6062
6174
  var nodePrefix = "node:";
@@ -6637,7 +6749,9 @@ var ZapierApiClient = class {
6637
6749
  if (data && typeof data === "object") {
6638
6750
  headers["Content-Type"] = "application/json";
6639
6751
  }
6640
- const wasMissingAuthToken = options.authRequired && await this.getAuthToken({ requiredScopes: options.requiredScopes }) == null;
6752
+ const wasMissingAuthToken = options.authRequired && await this.getAuthToken({
6753
+ requiredScopes: options.requiredScopes
6754
+ }) == null;
6641
6755
  const response = await this.fetch(path, {
6642
6756
  ...options,
6643
6757
  method,
@@ -6831,6 +6945,28 @@ var createZapierApi = (options) => {
6831
6945
  });
6832
6946
  };
6833
6947
 
6948
+ // src/api/index.ts
6949
+ function getOrCreateApiClient(config) {
6950
+ const {
6951
+ baseUrl = ZAPIER_BASE_URL,
6952
+ credentials,
6953
+ token,
6954
+ api: providedApi,
6955
+ debug = false,
6956
+ fetch: customFetch
6957
+ } = config;
6958
+ if (providedApi) {
6959
+ return providedApi;
6960
+ }
6961
+ return createZapierApi({
6962
+ baseUrl,
6963
+ credentials,
6964
+ token,
6965
+ debug,
6966
+ fetch: customFetch
6967
+ });
6968
+ }
6969
+
6834
6970
  // src/plugins/api/index.ts
6835
6971
  var apiPlugin = definePlugin(
6836
6972
  (sdk) => {
@@ -8773,4 +8909,4 @@ var registryPlugin = definePlugin((_sdk) => {
8773
8909
  return {};
8774
8910
  });
8775
8911
 
8776
- 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_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, 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, createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, 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, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, updateTableRecordsPlugin };
8912
+ 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_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, 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, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, updateTableRecordsPlugin };
@@ -38,7 +38,7 @@ export declare const appsPlugin: (sdk: {
38
38
  } & {
39
39
  runAction: (options?: (({
40
40
  app: string;
41
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
41
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
42
42
  action: string;
43
43
  connection?: string | number | undefined;
44
44
  connectionId?: string | number | null | undefined;
@@ -50,7 +50,7 @@ export declare const appsPlugin: (sdk: {
50
50
  cursor?: string | undefined;
51
51
  } | {
52
52
  appKey: string;
53
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
53
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
54
54
  actionKey: string;
55
55
  connection?: string | number | undefined;
56
56
  connectionId?: string | number | null | undefined;
@@ -20,7 +20,7 @@
20
20
  export declare const listInputFieldsDeprecatedPlugin: (sdk: {
21
21
  listActionInputFields: (options?: (({
22
22
  app: string;
23
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
23
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
24
24
  action: string;
25
25
  connection?: string | number | undefined;
26
26
  connectionId?: string | number | null | undefined;
@@ -31,7 +31,7 @@ export declare const listInputFieldsDeprecatedPlugin: (sdk: {
31
31
  cursor?: string | undefined;
32
32
  } | {
33
33
  appKey: string;
34
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
34
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
35
35
  actionKey: string;
36
36
  connection?: string | number | undefined;
37
37
  connectionId?: string | number | null | undefined;
@@ -78,7 +78,7 @@ export declare const listInputFieldsDeprecatedPlugin: (sdk: {
78
78
  }) => {
79
79
  listInputFields: (options?: (({
80
80
  app: string;
81
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
81
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
82
82
  action: string;
83
83
  connection?: string | number | undefined;
84
84
  connectionId?: string | number | null | undefined;
@@ -89,7 +89,7 @@ export declare const listInputFieldsDeprecatedPlugin: (sdk: {
89
89
  cursor?: string | undefined;
90
90
  } | {
91
91
  appKey: string;
92
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
92
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
93
93
  actionKey: string;
94
94
  connection?: string | number | undefined;
95
95
  connectionId?: string | number | null | undefined;
@@ -135,13 +135,13 @@ export declare const listInputFieldsDeprecatedPlugin: (sdk: {
135
135
  };
136
136
  actionType: import("zod").ZodEnum<{
137
137
  filter: "filter";
138
+ write: "write";
138
139
  read: "read";
139
140
  read_bulk: "read_bulk";
140
141
  run: "run";
141
142
  search: "search";
142
143
  search_and_write: "search_and_write";
143
144
  search_or_write: "search_or_write";
144
- write: "write";
145
145
  }>;
146
146
  action: import("zod").ZodString & {
147
147
  _def: import("zod/v4/core").$ZodStringDef & import("../..").PositionalMetadata;
@@ -159,13 +159,13 @@ export declare const listInputFieldsDeprecatedPlugin: (sdk: {
159
159
  };
160
160
  actionType: import("zod").ZodEnum<{
161
161
  filter: "filter";
162
+ write: "write";
162
163
  read: "read";
163
164
  read_bulk: "read_bulk";
164
165
  run: "run";
165
166
  search: "search";
166
167
  search_and_write: "search_and_write";
167
168
  search_or_write: "search_or_write";
168
- write: "write";
169
169
  }>;
170
170
  actionKey: import("zod").ZodString;
171
171
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -209,7 +209,7 @@ export type ListInputFieldsDeprecatedPluginProvides = ReturnType<typeof listInpu
209
209
  export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
210
210
  listActionInputFieldChoices: (options?: (({
211
211
  app: string;
212
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
212
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
213
213
  action: string;
214
214
  inputField: string;
215
215
  connection?: string | number | undefined;
@@ -222,7 +222,7 @@ export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
222
222
  cursor?: string | undefined;
223
223
  } | {
224
224
  appKey: string;
225
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
225
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
226
226
  actionKey: string;
227
227
  inputFieldKey: string;
228
228
  connection?: string | number | undefined;
@@ -256,7 +256,7 @@ export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
256
256
  }) => {
257
257
  listInputFieldChoices: (options?: (({
258
258
  app: string;
259
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
259
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
260
260
  action: string;
261
261
  inputField: string;
262
262
  connection?: string | number | undefined;
@@ -269,7 +269,7 @@ export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
269
269
  cursor?: string | undefined;
270
270
  } | {
271
271
  appKey: string;
272
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
272
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
273
273
  actionKey: string;
274
274
  inputFieldKey: string;
275
275
  connection?: string | number | undefined;
@@ -302,13 +302,13 @@ export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
302
302
  };
303
303
  actionType: import("zod").ZodEnum<{
304
304
  filter: "filter";
305
+ write: "write";
305
306
  read: "read";
306
307
  read_bulk: "read_bulk";
307
308
  run: "run";
308
309
  search: "search";
309
310
  search_and_write: "search_and_write";
310
311
  search_or_write: "search_or_write";
311
- write: "write";
312
312
  }>;
313
313
  action: import("zod").ZodString & {
314
314
  _def: import("zod/v4/core").$ZodStringDef & import("../..").PositionalMetadata;
@@ -330,13 +330,13 @@ export declare const listInputFieldChoicesDeprecatedPlugin: (sdk: {
330
330
  };
331
331
  actionType: import("zod").ZodEnum<{
332
332
  filter: "filter";
333
+ write: "write";
333
334
  read: "read";
334
335
  read_bulk: "read_bulk";
335
336
  run: "run";
336
337
  search: "search";
337
338
  search_and_write: "search_and_write";
338
339
  search_or_write: "search_or_write";
339
- write: "write";
340
340
  }>;
341
341
  actionKey: import("zod").ZodString;
342
342
  inputFieldKey: import("zod").ZodString;
@@ -367,7 +367,7 @@ export type ListInputFieldChoicesDeprecatedPluginProvides = ReturnType<typeof li
367
367
  export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
368
368
  getActionInputFieldsSchema: (options?: {
369
369
  app: string;
370
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
370
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
371
371
  action: string;
372
372
  connection?: string | number | undefined;
373
373
  connectionId?: string | number | null | undefined;
@@ -375,7 +375,7 @@ export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
375
375
  inputs?: Record<string, unknown> | undefined;
376
376
  } | {
377
377
  appKey: string;
378
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
378
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
379
379
  actionKey: string;
380
380
  connection?: string | number | undefined;
381
381
  connectionId?: string | number | null | undefined;
@@ -397,7 +397,7 @@ export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
397
397
  }) => {
398
398
  getInputFieldsSchema: (options?: {
399
399
  app: string;
400
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
400
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
401
401
  action: string;
402
402
  connection?: string | number | undefined;
403
403
  connectionId?: string | number | null | undefined;
@@ -405,7 +405,7 @@ export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
405
405
  inputs?: Record<string, unknown> | undefined;
406
406
  } | {
407
407
  appKey: string;
408
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
408
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
409
409
  actionKey: string;
410
410
  connection?: string | number | undefined;
411
411
  connectionId?: string | number | null | undefined;
@@ -425,13 +425,13 @@ export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
425
425
  };
426
426
  actionType: import("zod").ZodEnum<{
427
427
  filter: "filter";
428
+ write: "write";
428
429
  read: "read";
429
430
  read_bulk: "read_bulk";
430
431
  run: "run";
431
432
  search: "search";
432
433
  search_and_write: "search_and_write";
433
434
  search_or_write: "search_or_write";
434
- write: "write";
435
435
  }>;
436
436
  action: import("zod").ZodString & {
437
437
  _def: import("zod/v4/core").$ZodStringDef & import("../..").PositionalMetadata;
@@ -446,13 +446,13 @@ export declare const getInputFieldsSchemaDeprecatedPlugin: (sdk: {
446
446
  };
447
447
  actionType: import("zod").ZodEnum<{
448
448
  filter: "filter";
449
+ write: "write";
449
450
  read: "read";
450
451
  read_bulk: "read_bulk";
451
452
  run: "run";
452
453
  search: "search";
453
454
  search_and_write: "search_and_write";
454
455
  search_or_write: "search_or_write";
455
- write: "write";
456
456
  }>;
457
457
  actionKey: import("zod").ZodString;
458
458
  connection: import("zod").ZodOptional<import("zod").ZodUnion<readonly [import("zod").ZodString, import("zod").ZodNumber]>>;
@@ -2,13 +2,13 @@ import type { ApiClient } from "../../api";
2
2
  export declare const getActionPlugin: (sdk: {
3
3
  listActions: (options?: (({
4
4
  app: string;
5
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
5
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
6
6
  pageSize?: number | undefined;
7
7
  maxItems?: number | undefined;
8
8
  cursor?: string | undefined;
9
9
  } | {
10
10
  appKey: string;
11
- actionType?: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write" | undefined;
11
+ actionType?: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | undefined;
12
12
  pageSize?: number | undefined;
13
13
  maxItems?: number | undefined;
14
14
  cursor?: string | undefined;
@@ -20,7 +20,7 @@ export declare const getActionPlugin: (sdk: {
20
20
  description: string;
21
21
  key: string;
22
22
  app_key: string;
23
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
23
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
24
24
  title: string;
25
25
  type: "action";
26
26
  id?: string | undefined;
@@ -47,18 +47,18 @@ export declare const getActionPlugin: (sdk: {
47
47
  }) => {
48
48
  getAction: (options?: {
49
49
  app: string;
50
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
50
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
51
51
  action: string;
52
52
  } | {
53
53
  appKey: string;
54
- actionType: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
54
+ actionType: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
55
55
  actionKey: string;
56
56
  } | undefined) => Promise<{
57
57
  data: {
58
58
  description: string;
59
59
  key: string;
60
60
  app_key: string;
61
- action_type: "filter" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write" | "write";
61
+ action_type: "filter" | "write" | "read" | "read_bulk" | "run" | "search" | "search_and_write" | "search_or_write";
62
62
  title: string;
63
63
  type: "action";
64
64
  id?: string | undefined;
@@ -6,13 +6,13 @@ export declare const GetActionSchema: z.ZodObject<{
6
6
  };
7
7
  actionType: z.ZodEnum<{
8
8
  filter: "filter";
9
+ write: "write";
9
10
  read: "read";
10
11
  read_bulk: "read_bulk";
11
12
  run: "run";
12
13
  search: "search";
13
14
  search_and_write: "search_and_write";
14
15
  search_or_write: "search_or_write";
15
- write: "write";
16
16
  }>;
17
17
  action: z.ZodString & {
18
18
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
@@ -24,13 +24,13 @@ declare const GetActionSchemaDeprecated: z.ZodObject<{
24
24
  };
25
25
  actionType: z.ZodEnum<{
26
26
  filter: "filter";
27
+ write: "write";
27
28
  read: "read";
28
29
  read_bulk: "read_bulk";
29
30
  run: "run";
30
31
  search: "search";
31
32
  search_and_write: "search_and_write";
32
33
  search_or_write: "search_or_write";
33
- write: "write";
34
34
  }>;
35
35
  actionKey: z.ZodString;
36
36
  }, z.core.$strip>;
@@ -40,13 +40,13 @@ export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
40
40
  };
41
41
  actionType: z.ZodEnum<{
42
42
  filter: "filter";
43
+ write: "write";
43
44
  read: "read";
44
45
  read_bulk: "read_bulk";
45
46
  run: "run";
46
47
  search: "search";
47
48
  search_and_write: "search_and_write";
48
49
  search_or_write: "search_or_write";
49
- write: "write";
50
50
  }>;
51
51
  action: z.ZodString & {
52
52
  _def: z.core.$ZodStringDef & import("../..").PositionalMetadata;
@@ -57,13 +57,13 @@ export declare const GetActionInputSchema: z.ZodUnion<readonly [z.ZodObject<{
57
57
  };
58
58
  actionType: z.ZodEnum<{
59
59
  filter: "filter";
60
+ write: "write";
60
61
  read: "read";
61
62
  read_bulk: "read_bulk";
62
63
  run: "run";
63
64
  search: "search";
64
65
  search_and_write: "search_and_write";
65
66
  search_or_write: "search_or_write";
66
- write: "write";
67
67
  }>;
68
68
  actionKey: z.ZodString;
69
69
  }, z.core.$strip>]>;