@zapier/zapier-sdk 0.54.1 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/README.md +15 -15
- package/dist/api/client.js +5 -6
- package/dist/api/types.d.ts +4 -3
- package/dist/api/types.d.ts.map +1 -1
- package/dist/constants.d.ts +14 -4
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -4
- package/dist/experimental.cjs +29 -15
- package/dist/experimental.d.mts +2 -2
- package/dist/experimental.mjs +29 -16
- package/dist/{index-SDDmBk2j.d.mts → index-CjP7lGzL.d.mts} +26 -8
- package/dist/{index-SDDmBk2j.d.ts → index-CjP7lGzL.d.ts} +26 -8
- package/dist/index.cjs +29 -15
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +29 -16
- package/dist/resolvers/actionKey.d.ts.map +1 -1
- package/dist/resolvers/actionKey.js +2 -1
- package/dist/resolvers/appKey.d.ts.map +1 -1
- package/dist/resolvers/appKey.js +2 -3
- package/dist/resolvers/clientId.js +1 -1
- package/dist/resolvers/connectionId.js +1 -1
- package/dist/resolvers/inputFieldKey.d.ts.map +1 -1
- package/dist/resolvers/inputFieldKey.js +5 -1
- package/dist/resolvers/tableFieldIds.d.ts.map +1 -1
- package/dist/resolvers/tableFieldIds.js +2 -1
- package/dist/resolvers/tableId.js +1 -1
- package/dist/resolvers/tableRecordId.d.ts.map +1 -1
- package/dist/resolvers/tableRecordId.js +4 -3
- package/dist/resolvers/triggerInbox.d.ts.map +1 -1
- package/dist/resolvers/triggerInbox.js +2 -1
- package/dist/resolvers/triggerMessages.d.ts.map +1 -1
- package/dist/resolvers/triggerMessages.js +2 -1
- package/dist/types/sdk.js +1 -1
- package/dist/utils/schema-utils.d.ts +7 -0
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.56.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d2aa0e9: Allow opting into approvals during login
|
|
8
|
+
|
|
9
|
+
## 0.55.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ce779d1: Add `hint?: string | string[]` to `PromptConfig.choices`. The CLI renders it after the choice's `name` as dimmed parens; an unset `hint` with a primitive `value` auto-renders the value.
|
|
14
|
+
|
|
15
|
+
All built-in resolvers migrate to the new shape, so existing dropdowns get small visual cleanups (dim parens, no `ID:` prefix, dash converted to parens, em-dash in `tableRecordId` gone).
|
|
16
|
+
|
|
17
|
+
Plugin authors who embed the value in `name` (e.g. `"Foo (${id})"`) should drop the embedded parens; the auto-default appends a second otherwise.
|
|
18
|
+
|
|
3
19
|
## 0.54.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -330,21 +330,21 @@ console.log(emojiData.emoji);
|
|
|
330
330
|
|
|
331
331
|
The `createZapierSdk(...)` factory function is the main entry point for the SDK. It provides methods for managing connections, listing apps, running actions, and more.
|
|
332
332
|
|
|
333
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
334
|
-
| ----------------------------- | -------------------------- | -------- | ------- | --------------------------- |
|
|
335
|
-
| `credentials` | `string, object, function` | ❌ | — | — | Authentication credentials. Can be a string (token or API key), a client credentials object ({ clientId, clientSecret }), a PKCE object ({ clientId }), or a function returning any of those.
|
|
336
|
-
| `debug` | `boolean` | ❌ | — | — | Enable debug logging.
|
|
337
|
-
| `baseUrl` | `string` | ❌ | — | — | Base URL for Zapier API endpoints.
|
|
338
|
-
| `trackingBaseUrl` | `string` | ❌ | — | — | Base URL for Zapier tracking endpoints.
|
|
339
|
-
| `maxNetworkRetries` | `number` | ❌ | — | — | Max retries for rate-limited requests (default: 3).
|
|
340
|
-
| `maxNetworkRetryDelayMs` | `number` | ❌ | — | — | Max delay in ms to wait for retry (default: 60000).
|
|
341
|
-
| `maxConcurrentRequests` | `number, literal` | ❌ | — | — | Max concurrent in-flight HTTP requests (default: 200, max: 10000).
|
|
342
|
-
| `approvalTimeoutMs` | `number` | ❌ | — | — | Timeout in ms for approval polling. Default: 600000 (10 min).
|
|
343
|
-
| `maxApprovalRetries` | `number` | ❌ | — | — | Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2.
|
|
344
|
-
| `approvalMode` | `string` | ❌ | — | `disabled`, `poll`, `throw` | Approval flow behavior. "
|
|
345
|
-
| `canIncludeSharedConnections` | `boolean` | ❌ | — | — | Allow listing shared connections.
|
|
346
|
-
| `canIncludeSharedTables` | `boolean` | ❌ | — | — | Allow listing shared tables.
|
|
347
|
-
| `canDeleteTables` | `boolean` | ❌ | — | — | Allow deleting tables.
|
|
333
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
334
|
+
| ----------------------------- | -------------------------- | -------- | ------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
335
|
+
| `credentials` | `string, object, function` | ❌ | — | — | Authentication credentials. Can be a string (token or API key), a client credentials object ({ clientId, clientSecret }), a PKCE object ({ clientId }), or a function returning any of those. |
|
|
336
|
+
| `debug` | `boolean` | ❌ | — | — | Enable debug logging. |
|
|
337
|
+
| `baseUrl` | `string` | ❌ | — | — | Base URL for Zapier API endpoints. |
|
|
338
|
+
| `trackingBaseUrl` | `string` | ❌ | — | — | Base URL for Zapier tracking endpoints. |
|
|
339
|
+
| `maxNetworkRetries` | `number` | ❌ | — | — | Max retries for rate-limited requests (default: 3). |
|
|
340
|
+
| `maxNetworkRetryDelayMs` | `number` | ❌ | — | — | Max delay in ms to wait for retry (default: 60000). |
|
|
341
|
+
| `maxConcurrentRequests` | `number, literal` | ❌ | — | — | Max concurrent in-flight HTTP requests (default: 200, max: 10000). |
|
|
342
|
+
| `approvalTimeoutMs` | `number` | ❌ | — | — | Timeout in ms for approval polling. Default: 600000 (10 min). |
|
|
343
|
+
| `maxApprovalRetries` | `number` | ❌ | — | — | Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2. |
|
|
344
|
+
| `approvalMode` | `string` | ❌ | — | `disabled`, `poll`, `throw` | Approval flow behavior. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. "disabled" throws a ZapierApprovalError on approval-required responses without creating an approval. Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then the default behavior (poll for interactive TTY, throw otherwise). |
|
|
345
|
+
| `canIncludeSharedConnections` | `boolean` | ❌ | — | — | Allow listing shared connections. |
|
|
346
|
+
| `canIncludeSharedTables` | `boolean` | ❌ | — | — | Allow listing shared tables. |
|
|
347
|
+
| `canDeleteTables` | `boolean` | ❌ | — | — | Allow deleting tables. |
|
|
348
348
|
|
|
349
349
|
## Named Connections
|
|
350
350
|
|
package/dist/api/client.js
CHANGED
|
@@ -13,7 +13,7 @@ import { getZapierBaseUrl, isLocalhostBaseUrl } from "../utils/url-utils";
|
|
|
13
13
|
import { sleep, calculateExponentialBackoffMs } from "../utils/retry-utils";
|
|
14
14
|
import { isPlainObject } from "../utils/type-guard-utils";
|
|
15
15
|
import { ZapierApiError, ZapierApprovalError, ZapierAuthenticationError, ZapierConfigurationError, ZapierTimeoutError, ZapierValidationError, ZapierResourceNotFoundError, ZapierRateLimitError, } from "../types/errors";
|
|
16
|
-
import { MAX_CONCURRENCY_LIMIT, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, getZapierApprovalMode, getZapierSdkService, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_MAX_APPROVAL_RETRIES, } from "../constants";
|
|
16
|
+
import { MAX_CONCURRENCY_LIMIT, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_MAX_APPROVAL_RETRIES, } from "../constants";
|
|
17
17
|
import { SDK_VERSION } from "../sdk-version";
|
|
18
18
|
import { openApproval } from "../utils/open-approval";
|
|
19
19
|
import { z } from "zod";
|
|
@@ -307,11 +307,10 @@ class ZapierApiClient {
|
|
|
307
307
|
// and throw `max_retries_exceeded` below.
|
|
308
308
|
if (attempt === maxRetries)
|
|
309
309
|
break;
|
|
310
|
-
// Resolve the mode: explicit option > env var >
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? "disabled";
|
|
310
|
+
// Resolve the mode: explicit option > env var > TTY-based default.
|
|
311
|
+
const mode = this.options.approvalMode ??
|
|
312
|
+
getZapierApprovalMode() ??
|
|
313
|
+
getZapierDefaultApprovalMode();
|
|
315
314
|
if (mode === "disabled") {
|
|
316
315
|
throw new ZapierApprovalError("Approvals are disabled. Set approvalMode to 'poll' or 'throw' (or ZAPIER_APPROVAL_MODE) to enable.", { status: "approval_required" });
|
|
317
316
|
}
|
package/dist/api/types.d.ts
CHANGED
|
@@ -48,13 +48,14 @@ export interface ApiClientOptions {
|
|
|
48
48
|
maxConcurrentRequests?: number;
|
|
49
49
|
/**
|
|
50
50
|
* Controls how the approval flow is handled.
|
|
51
|
-
* - "disabled": (default when env var is unset) Throw a ZapierApprovalError
|
|
52
|
-
* on approval-required responses without creating an approval.
|
|
53
51
|
* - "poll": Create the approval, open the URL in a browser, poll until
|
|
54
52
|
* resolved, and retry the original request on success.
|
|
55
53
|
* - "throw": Create the approval and throw a ZapierApprovalError immediately
|
|
56
54
|
* with the approval URL so the caller can surface it.
|
|
57
|
-
*
|
|
55
|
+
* - "disabled": Throw a ZapierApprovalError on approval-required responses
|
|
56
|
+
* without creating an approval.
|
|
57
|
+
* Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then a
|
|
58
|
+
* TTY-based default ("poll" if interactive, "throw" otherwise).
|
|
58
59
|
*/
|
|
59
60
|
approvalMode?: "disabled" | "poll" | "throw";
|
|
60
61
|
/**
|
package/dist/api/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/api/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,gDAAgD,CAAC;AACxD,OAAO,KAAK,EACV,wBAAwB,EACxB,iCAAiC,EAClC,MAAM,oDAAoD,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EACV,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,2BAA2B,EAC3B,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACb,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,6BAA6B,EAC7B,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AAMnB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1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C,CACzC,CAAC;AAGF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC5E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC;AACF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAC5C,OAAO,8BAA8B,CACtC,CAAC"}
|
package/dist/constants.d.ts
CHANGED
|
@@ -48,17 +48,27 @@ export declare function parseConcurrencyEnvVar(name: string): number | undefined
|
|
|
48
48
|
export declare const ZAPIER_MAX_CONCURRENT_REQUESTS: number;
|
|
49
49
|
/**
|
|
50
50
|
* Approval flow behavior from environment variable.
|
|
51
|
-
* - "disabled": (default when env var is unset) Throw a ZapierApprovalError on
|
|
52
|
-
* approval-required responses without creating an approval. Callers must
|
|
53
|
-
* explicitly opt in to approvals via "poll" or "throw".
|
|
54
51
|
* - "poll": Create the approval, open the URL in a browser, poll until
|
|
55
52
|
* resolved, and retry the original request on success.
|
|
56
53
|
* - "throw": Create the approval and throw a ZapierApprovalError immediately
|
|
57
54
|
* with the approval URL so the caller can surface it.
|
|
55
|
+
* - "disabled": Throw a ZapierApprovalError on approval-required responses
|
|
56
|
+
* without creating an approval.
|
|
58
57
|
*
|
|
59
|
-
*
|
|
58
|
+
* This parser only reflects the env var value. If unset, callers should fall
|
|
59
|
+
* back to getZapierDefaultApprovalMode().
|
|
60
|
+
*
|
|
61
|
+
* Read lazily so tests can set env vars after module import.
|
|
60
62
|
*/
|
|
61
63
|
export declare function getZapierApprovalMode(): "disabled" | "poll" | "throw" | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the default approval mode based on whether the process is running in
|
|
66
|
+
* an interactive terminal. If both stdin and stdout are TTYs the user can act
|
|
67
|
+
* on an approval URL immediately, so "poll" is the right default. In a
|
|
68
|
+
* non-interactive context (CI, piped output) the process cannot open a browser
|
|
69
|
+
* or wait for input, so "throw" hands the URL to the caller.
|
|
70
|
+
*/
|
|
71
|
+
export declare function getZapierDefaultApprovalMode(): "poll" | "throw";
|
|
62
72
|
/**
|
|
63
73
|
* Default timeout for approval polling (10 minutes)
|
|
64
74
|
*/
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,QACsC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAExD;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,yBAAyB,SAAU,CAAC;AAejD;;GAEG;AACH,eAAO,MAAM,0BAA0B,QACY,CAAC;AACpD,eAAO,MAAM,iCAAiC,QACiB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAE5C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,QACsB,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,eAAe,QACsC,CAAC;AAEnE;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAExD;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,QAAQ,CAAC;AAEpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,yBAAyB,SAAU,CAAC;AAejD;;GAEG;AACH,eAAO,MAAM,0BAA0B,QACY,CAAC;AACpD,eAAO,MAAM,iCAAiC,QACiB,CAAC;AAEhE;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,QAAS,CAAC;AAE5C,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYvE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,QACsB,CAAC;AAElE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,IACjC,UAAU,GACV,MAAM,GACN,OAAO,GACP,SAAS,CAKZ;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,IAAI,MAAM,GAAG,OAAO,CAI/D;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,QAAiB,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -74,15 +74,17 @@ export function parseConcurrencyEnvVar(name) {
|
|
|
74
74
|
export const ZAPIER_MAX_CONCURRENT_REQUESTS = parseConcurrencyEnvVar("ZAPIER_MAX_CONCURRENT_REQUESTS") ?? 200;
|
|
75
75
|
/**
|
|
76
76
|
* Approval flow behavior from environment variable.
|
|
77
|
-
* - "disabled": (default when env var is unset) Throw a ZapierApprovalError on
|
|
78
|
-
* approval-required responses without creating an approval. Callers must
|
|
79
|
-
* explicitly opt in to approvals via "poll" or "throw".
|
|
80
77
|
* - "poll": Create the approval, open the URL in a browser, poll until
|
|
81
78
|
* resolved, and retry the original request on success.
|
|
82
79
|
* - "throw": Create the approval and throw a ZapierApprovalError immediately
|
|
83
80
|
* with the approval URL so the caller can surface it.
|
|
81
|
+
* - "disabled": Throw a ZapierApprovalError on approval-required responses
|
|
82
|
+
* without creating an approval.
|
|
84
83
|
*
|
|
85
|
-
*
|
|
84
|
+
* This parser only reflects the env var value. If unset, callers should fall
|
|
85
|
+
* back to getZapierDefaultApprovalMode().
|
|
86
|
+
*
|
|
87
|
+
* Read lazily so tests can set env vars after module import.
|
|
86
88
|
*/
|
|
87
89
|
export function getZapierApprovalMode() {
|
|
88
90
|
const value = globalThis.process?.env?.ZAPIER_APPROVAL_MODE;
|
|
@@ -90,6 +92,17 @@ export function getZapierApprovalMode() {
|
|
|
90
92
|
return value;
|
|
91
93
|
return undefined;
|
|
92
94
|
}
|
|
95
|
+
/**
|
|
96
|
+
* Returns the default approval mode based on whether the process is running in
|
|
97
|
+
* an interactive terminal. If both stdin and stdout are TTYs the user can act
|
|
98
|
+
* on an approval URL immediately, so "poll" is the right default. In a
|
|
99
|
+
* non-interactive context (CI, piped output) the process cannot open a browser
|
|
100
|
+
* or wait for input, so "throw" hands the URL to the caller.
|
|
101
|
+
*/
|
|
102
|
+
export function getZapierDefaultApprovalMode() {
|
|
103
|
+
const isInteractive = !!globalThis.process?.stdin?.isTTY && !!globalThis.process?.stdout?.isTTY;
|
|
104
|
+
return isInteractive ? "poll" : "throw";
|
|
105
|
+
}
|
|
93
106
|
/**
|
|
94
107
|
* Default timeout for approval polling (10 minutes)
|
|
95
108
|
*/
|
package/dist/experimental.cjs
CHANGED
|
@@ -171,6 +171,10 @@ function getZapierApprovalMode() {
|
|
|
171
171
|
return value;
|
|
172
172
|
return void 0;
|
|
173
173
|
}
|
|
174
|
+
function getZapierDefaultApprovalMode() {
|
|
175
|
+
const isInteractive = !!globalThis.process?.stdin?.isTTY && !!globalThis.process?.stdout?.isTTY;
|
|
176
|
+
return isInteractive ? "poll" : "throw";
|
|
177
|
+
}
|
|
174
178
|
var DEFAULT_APPROVAL_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
175
179
|
var DEFAULT_MAX_APPROVAL_RETRIES = 2;
|
|
176
180
|
|
|
@@ -2881,7 +2885,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2881
2885
|
}
|
|
2882
2886
|
|
|
2883
2887
|
// src/sdk-version.ts
|
|
2884
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2888
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.0" : void 0) || "unknown";
|
|
2885
2889
|
|
|
2886
2890
|
// src/utils/open-url.ts
|
|
2887
2891
|
var nodePrefix = "node:";
|
|
@@ -3211,7 +3215,7 @@ var ZapierApiClient = class {
|
|
|
3211
3215
|
}
|
|
3212
3216
|
if (errorType !== "approval_required") return response;
|
|
3213
3217
|
if (attempt === maxRetries) break;
|
|
3214
|
-
const mode = this.options.approvalMode ?? getZapierApprovalMode() ??
|
|
3218
|
+
const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? getZapierDefaultApprovalMode();
|
|
3215
3219
|
if (mode === "disabled") {
|
|
3216
3220
|
throw new ZapierApprovalError(
|
|
3217
3221
|
"Approvals are disabled. Set approvalMode to 'poll' or 'throw' (or ZAPIER_APPROVAL_MODE) to enable.",
|
|
@@ -3978,7 +3982,8 @@ var appKeyResolver = {
|
|
|
3978
3982
|
name: "app",
|
|
3979
3983
|
message: "Select app:",
|
|
3980
3984
|
choices: apps.map((app) => ({
|
|
3981
|
-
name: app.title
|
|
3985
|
+
name: app.title || app.key,
|
|
3986
|
+
hint: app.title ? getAppKeyList(app) : void 0,
|
|
3982
3987
|
value: app.key
|
|
3983
3988
|
}))
|
|
3984
3989
|
})
|
|
@@ -4026,7 +4031,8 @@ var actionKeyResolver = {
|
|
|
4026
4031
|
name: "action",
|
|
4027
4032
|
message: "Select action:",
|
|
4028
4033
|
choices: actions.map((action) => ({
|
|
4029
|
-
name:
|
|
4034
|
+
name: action.title || action.name || action.key,
|
|
4035
|
+
hint: action.description || void 0,
|
|
4030
4036
|
value: action.key
|
|
4031
4037
|
}))
|
|
4032
4038
|
})
|
|
@@ -4051,7 +4057,7 @@ function promptForConnection(connections, params) {
|
|
|
4051
4057
|
name: "connection",
|
|
4052
4058
|
message: params.app ? `Select connection for ${params.app}:` : "Select connection:",
|
|
4053
4059
|
choices: connections.map((connection) => ({
|
|
4054
|
-
name:
|
|
4060
|
+
name: connection.title || connection.label || "Connection",
|
|
4055
4061
|
value: connection.id
|
|
4056
4062
|
}))
|
|
4057
4063
|
};
|
|
@@ -4166,7 +4172,11 @@ var inputFieldKeyResolver = {
|
|
|
4166
4172
|
name: "inputField",
|
|
4167
4173
|
message: "Select input field:",
|
|
4168
4174
|
choices: fields.map((field) => ({
|
|
4169
|
-
name:
|
|
4175
|
+
name: field.title || field.key,
|
|
4176
|
+
hint: [
|
|
4177
|
+
field.value_type,
|
|
4178
|
+
field.is_required ? "required" : "optional"
|
|
4179
|
+
].filter(Boolean),
|
|
4170
4180
|
value: field.key
|
|
4171
4181
|
}))
|
|
4172
4182
|
})
|
|
@@ -4191,7 +4201,7 @@ var clientIdResolver = {
|
|
|
4191
4201
|
name: "clientId",
|
|
4192
4202
|
message: "Select client credentials to delete:",
|
|
4193
4203
|
choices: credentials.map((cred) => ({
|
|
4194
|
-
name:
|
|
4204
|
+
name: cred.name,
|
|
4195
4205
|
value: cred.client_id
|
|
4196
4206
|
}))
|
|
4197
4207
|
})
|
|
@@ -4224,7 +4234,7 @@ var tableIdResolver = {
|
|
|
4224
4234
|
name: "table",
|
|
4225
4235
|
message: "Select a table:",
|
|
4226
4236
|
choices: tables.map((table) => ({
|
|
4227
|
-
name:
|
|
4237
|
+
name: table.name,
|
|
4228
4238
|
value: table.id
|
|
4229
4239
|
}))
|
|
4230
4240
|
})
|
|
@@ -4241,7 +4251,8 @@ var triggerInboxResolver = {
|
|
|
4241
4251
|
// `deleting` inboxes are on their way out — no operation against them
|
|
4242
4252
|
// is useful (delete is a no-op, pause/resume/update are rejected).
|
|
4243
4253
|
choices: inboxes.filter((inbox) => inbox.status !== "deleting").map((inbox) => ({
|
|
4244
|
-
name:
|
|
4254
|
+
name: inbox.name ?? inbox.id,
|
|
4255
|
+
hint: `${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status}`,
|
|
4245
4256
|
value: inbox.id
|
|
4246
4257
|
}))
|
|
4247
4258
|
})
|
|
@@ -4264,7 +4275,8 @@ var triggerMessagesResolver = {
|
|
|
4264
4275
|
// are gone from the inbox already; available/quarantined ones can't be
|
|
4265
4276
|
// operated on by these methods.
|
|
4266
4277
|
choices: messages.filter((message) => message.status === "leased").map((message) => ({
|
|
4267
|
-
name:
|
|
4278
|
+
name: message.id,
|
|
4279
|
+
hint: `${message.status}, lease_count: ${message.message_attributes.lease_count}`,
|
|
4268
4280
|
value: message.id
|
|
4269
4281
|
}))
|
|
4270
4282
|
})
|
|
@@ -4510,8 +4522,8 @@ async function createFieldKeyTranslator({
|
|
|
4510
4522
|
function summarizeRecord(record) {
|
|
4511
4523
|
const values = Object.values(record.data);
|
|
4512
4524
|
const preview = values.slice(0, 3).map((v) => formatFieldValue(v).replace(/\s+/g, " ").trim()).filter((s) => s.length > 0).join(", ");
|
|
4513
|
-
|
|
4514
|
-
return
|
|
4525
|
+
if (!preview) return void 0;
|
|
4526
|
+
return preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
|
|
4515
4527
|
}
|
|
4516
4528
|
function fetchRecords(sdk, params) {
|
|
4517
4529
|
return sdk.listTableRecords({
|
|
@@ -4521,7 +4533,7 @@ function fetchRecords(sdk, params) {
|
|
|
4521
4533
|
}
|
|
4522
4534
|
function recordChoices(records) {
|
|
4523
4535
|
return records.map((record) => ({
|
|
4524
|
-
name: summarizeRecord(record),
|
|
4536
|
+
name: summarizeRecord(record) || record.id,
|
|
4525
4537
|
value: record.id
|
|
4526
4538
|
}));
|
|
4527
4539
|
}
|
|
@@ -4561,7 +4573,8 @@ var tableFieldIdsResolver = {
|
|
|
4561
4573
|
name: "fields",
|
|
4562
4574
|
message: "Select fields:",
|
|
4563
4575
|
choices: fields.map((field) => ({
|
|
4564
|
-
name:
|
|
4576
|
+
name: field.name,
|
|
4577
|
+
hint: [field.id, field.type],
|
|
4565
4578
|
value: field.id
|
|
4566
4579
|
})),
|
|
4567
4580
|
validate: (value) => Array.isArray(value) && value.length > 0 ? true : "Select at least one field"
|
|
@@ -10589,7 +10602,7 @@ var BaseSdkOptionsSchema = zod.z.object({
|
|
|
10589
10602
|
"Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2."
|
|
10590
10603
|
),
|
|
10591
10604
|
approvalMode: zod.z.enum(["disabled", "poll", "throw"]).optional().describe(
|
|
10592
|
-
'Approval flow behavior. "
|
|
10605
|
+
'Approval flow behavior. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. "disabled" throws a ZapierApprovalError on approval-required responses without creating an approval. Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then the default behavior (poll for interactive TTY, throw otherwise).'
|
|
10593
10606
|
),
|
|
10594
10607
|
// Internal
|
|
10595
10608
|
manifestPath: zod.z.string().optional().describe("Path to a .zapierrc manifest file for app version locking.").meta({ internal: true }),
|
|
@@ -10756,6 +10769,7 @@ exports.getTablePlugin = getTablePlugin;
|
|
|
10756
10769
|
exports.getTableRecordPlugin = getTableRecordPlugin;
|
|
10757
10770
|
exports.getTokenFromCliLogin = getTokenFromCliLogin;
|
|
10758
10771
|
exports.getZapierApprovalMode = getZapierApprovalMode;
|
|
10772
|
+
exports.getZapierDefaultApprovalMode = getZapierDefaultApprovalMode;
|
|
10759
10773
|
exports.getZapierSdkService = getZapierSdkService;
|
|
10760
10774
|
exports.injectCliLogin = injectCliLogin;
|
|
10761
10775
|
exports.inputFieldKeyResolver = inputFieldKeyResolver;
|
package/dist/experimental.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseSdkOptions, W as WithAddPlugin, P as PluginMeta, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, M as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, b as AddActionEntryOptions, c as AddActionEntryResult, d as ActionEntry, f as findManifestEntry, r as readManifestFromFile, C as CapabilitiesContext, e as PaginatedSdkResult, F as FieldsetItem, g as PositionalMetadata, h as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, i as DynamicResolver, j as WatchTriggerInboxOptions, k as ActionProxy, l as ZapierSdkApps } from './index-
|
|
2
|
-
export { u as Action, ci as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aW as ActionItem, bx as ActionKeyProperty, b5 as ActionKeyPropertySchema, by as ActionProperty, b6 as ActionPropertySchema, as as ActionResolverItem, bJ as ActionTimeoutMsProperty, bh as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bw as ActionTypeProperty, b4 as ActionTypePropertySchema, bW as ApiError, dE as ApiEvent, d0 as ApiPluginOptions, d2 as ApiPluginProvides, v as App, cj as AppFactoryInput, aU as AppItem, bu as AppKeyProperty, b2 as AppKeyPropertySchema, bv as AppProperty, b3 as AppPropertySchema, aD as ApplicationLifecycleEventData, cb as ApprovalStatus, ch as AppsPluginProvides, bO as AppsProperty, bm as AppsPropertySchema, a0 as ArrayResolver, dD as AuthEvent, bC as AuthenticationIdProperty, b9 as AuthenticationIdPropertySchema, az as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cP as CONTEXT_CACHE_MAX_SIZE, cO as CONTEXT_CACHE_TTL_MS, x as Choice, dK as ClientCredentialsObject, dV as ClientCredentialsObjectSchema, K as Connection, e1 as ConnectionEntry, e0 as ConnectionEntrySchema, bA as ConnectionIdProperty, b8 as ConnectionIdPropertySchema, aV as ConnectionItem, bB as ConnectionProperty, ba as ConnectionPropertySchema, e3 as ConnectionsMap, e2 as ConnectionsMapSchema, e5 as ConnectionsPluginProvides, bQ as ConnectionsProperty, bo as ConnectionsPropertySchema, O as ConnectionsResponse, cB as CreateClientCredentialsPluginProvides,
|
|
1
|
+
import { B as BaseSdkOptions, W as WithAddPlugin, P as PluginMeta, Z as ZapierSdkOptions$1, E as EventEmissionContext, A as ApiClient, M as Manifest, R as ResolvedAppLocator, U as UpdateManifestEntryOptions, a as UpdateManifestEntryResult, b as AddActionEntryOptions, c as AddActionEntryResult, d as ActionEntry, f as findManifestEntry, r as readManifestFromFile, C as CapabilitiesContext, e as PaginatedSdkResult, F as FieldsetItem, g as PositionalMetadata, h as ZapierFetchInitOptions, D as DrainTriggerInboxOptions, i as DynamicResolver, j as WatchTriggerInboxOptions, k as ActionProxy, l as ZapierSdkApps } from './index-CjP7lGzL.mjs';
|
|
2
|
+
export { u as Action, ci as ActionExecutionOptions, y as ActionExecutionResult, z as ActionField, H as ActionFieldChoice, aW as ActionItem, bx as ActionKeyProperty, b5 as ActionKeyPropertySchema, by as ActionProperty, b6 as ActionPropertySchema, as as ActionResolverItem, bJ as ActionTimeoutMsProperty, bh as ActionTimeoutMsPropertySchema, at as ActionTypeItem, bw as ActionTypeProperty, b4 as ActionTypePropertySchema, bW as ApiError, dE as ApiEvent, d0 as ApiPluginOptions, d2 as ApiPluginProvides, v as App, cj as AppFactoryInput, aU as AppItem, bu as AppKeyProperty, b2 as AppKeyPropertySchema, bv as AppProperty, b3 as AppPropertySchema, aD as ApplicationLifecycleEventData, cb as ApprovalStatus, ch as AppsPluginProvides, bO as AppsProperty, bm as AppsPropertySchema, a0 as ArrayResolver, dD as AuthEvent, bC as AuthenticationIdProperty, b9 as AuthenticationIdPropertySchema, az as BaseEvent, al as BaseSdkOptionsSchema, aa as BatchOptions, cP as CONTEXT_CACHE_MAX_SIZE, cO as CONTEXT_CACHE_TTL_MS, x as Choice, dK as ClientCredentialsObject, dV as ClientCredentialsObjectSchema, K as Connection, e1 as ConnectionEntry, e0 as ConnectionEntrySchema, bA as ConnectionIdProperty, b8 as ConnectionIdPropertySchema, aV as ConnectionItem, bB as ConnectionProperty, ba as ConnectionPropertySchema, e3 as ConnectionsMap, e2 as ConnectionsMapSchema, e5 as ConnectionsPluginProvides, bQ as ConnectionsProperty, bo as ConnectionsPropertySchema, O as ConnectionsResponse, cB as CreateClientCredentialsPluginProvides, ev as CreateTableFieldsPluginProvides, ep as CreateTablePluginProvides, eD as CreateTableRecordsPluginProvides, dH as Credentials, d_ as CredentialsFunction, dZ as CredentialsFunctionSchema, dJ as CredentialsObject, dX as CredentialsObjectSchema, d$ as CredentialsSchema, ea as DEFAULT_ACTION_TIMEOUT_MS, ei as DEFAULT_APPROVAL_TIMEOUT_MS, cY as DEFAULT_CONFIG_PATH, ej as DEFAULT_MAX_APPROVAL_RETRIES, e9 as DEFAULT_PAGE_SIZE, bH as DebugProperty, bf as DebugPropertySchema, cD as DeleteClientCredentialsPluginProvides, ex as DeleteTableFieldsPluginProvides, er as DeleteTablePluginProvides, eF as DeleteTableRecordsPluginProvides, o as DrainTriggerInboxCallback, p as DrainTriggerInboxErrorObserver, a3 as DynamicListResolver, a4 as DynamicSearchResolver, aE as EnhancedErrorEventData, bX as ErrorOptions, dG as EventCallback, aC as EventContext, aB as EventEmissionProvides, cl as FetchPluginProvides, w as Field, bN as FieldsProperty, bl as FieldsPropertySchema, a5 as FieldsResolver, s as FindFirstAuthenticationPluginProvides, cL as FindFirstConnectionPluginProvides, t as FindUniqueAuthenticationPluginProvides, cN as FindUniqueConnectionPluginProvides, Y as FormatMetadata, X as FormattedItem, ak as FunctionDeprecation, a$ as FunctionOptions, aj as FunctionRegistryEntry, cv as GetActionInputFieldsSchemaPluginProvides, cH as GetActionPluginProvides, cF as GetAppPluginProvides, G as GetAuthenticationPluginProvides, cJ as GetConnectionPluginProvides, c$ as GetProfilePluginProvides, en as GetTablePluginProvides, ez as GetTableRecordPluginProvides, aY as InfoFieldItem, aX as InputFieldItem, bz as InputFieldProperty, b7 as InputFieldPropertySchema, bD as InputsProperty, bb as InputsPropertySchema, bV as LeaseLimitProperty, bt as LeaseLimitPropertySchema, bT as LeaseProperty, br as LeasePropertySchema, bU as LeaseSecondsProperty, bs as LeaseSecondsPropertySchema, L as LeasedTriggerMessageItem, bE as LimitProperty, bc as LimitPropertySchema, ct as ListActionInputFieldChoicesPluginProvides, cr as ListActionInputFieldsPluginProvides, cp as ListActionsPluginProvides, cn as ListAppsPluginProvides, q as ListAuthenticationsPluginProvides, cz as ListClientCredentialsPluginProvides, cx as ListConnectionsPluginProvides, et as ListTableFieldsPluginProvides, eB as ListTableRecordsPluginProvides, el as ListTablesPluginProvides, dF as LoadingEvent, ed as MAX_CONCURRENCY_LIMIT, e8 as MAX_PAGE_LIMIT, cZ as ManifestEntry, cU as ManifestPluginOptions, cX as ManifestPluginProvides, aA as MethodCalledEvent, aF as MethodCalledEventData, N as Need, I as NeedsRequest, J as NeedsResponse, bF as OffsetProperty, bd as OffsetPropertySchema, _ as OutputFormatter, bG as OutputProperty, be as OutputPropertySchema, b1 as PaginatedSdkFunction, bI as ParamsProperty, bg as ParamsPropertySchema, dL as PkceCredentialsObject, dW as PkceCredentialsObjectSchema, am as Plugin, an as PluginProvides, aw as PollOptions, c9 as RateLimitInfo, bL as RecordProperty, bj as RecordPropertySchema, bM as RecordsProperty, bk as RecordsPropertySchema, af as RelayFetchSchema, ae as RelayRequestSchema, av as RequestOptions, cT as RequestPluginProvides, dq as ResolveAuthTokenOptions, dQ as ResolveCredentialsOptions, dI as ResolvedCredentials, dY as ResolvedCredentialsSchema, $ as Resolver, a1 as ResolverMetadata, aZ as RootFieldItem, cR as RunActionPluginProvides, dC as SdkEvent, b0 as SdkPage, a2 as StaticResolver, bK as TableProperty, bi as TablePropertySchema, bP as TablesProperty, bn as TablesPropertySchema, bS as TriggerInboxNameProperty, bq as TriggerInboxNamePropertySchema, bR as TriggerInboxProperty, bp as TriggerInboxPropertySchema, T as TriggerMessageStatus, eH as UpdateTableRecordsPluginProvides, Q as UserProfile, a_ as UserProfileItem, e6 as ZAPIER_BASE_URL, ef as ZAPIER_MAX_CONCURRENT_REQUESTS, eb as ZAPIER_MAX_NETWORK_RETRIES, ec as ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, m as ZapierAbortDrainSignal, c7 as ZapierActionError, bZ as ZapierApiError, b_ as ZapierAppNotFoundError, cc as ZapierApprovalError, c1 as ZapierAuthenticationError, c5 as ZapierBundleError, dy as ZapierCache, dz as ZapierCacheEntry, dA as ZapierCacheSetOptions, c4 as ZapierConfigurationError, c8 as ZapierConflictError, bY as ZapierError, c2 as ZapierNotFoundError, ca as ZapierRateLimitError, cd as ZapierRelayError, n as ZapierReleaseTriggerMessageSignal, c3 as ZapierResourceNotFoundError, cf as ZapierSignal, c6 as ZapierTimeoutError, c0 as ZapierUnknownError, b$ as ZapierValidationError, d5 as actionKeyResolver, d4 as actionTypeResolver, d1 as apiPlugin, d3 as appKeyResolver, cg as appsPlugin, d7 as authenticationIdGenericResolver, d6 as authenticationIdResolver, a9 as batch, aP as buildApplicationLifecycleEvent, ab as buildCapabilityMessage, aR as buildErrorEvent, aQ as buildErrorEventWithContext, aT as buildMethodCalledEvent, dr as clearTokenCache, db as clientCredentialsNameResolver, dc as clientIdResolver, ar as composePlugins, d7 as connectionIdGenericResolver, d6 as connectionIdResolver, e4 as connectionsPlugin, aS as createBaseEvent, cA as createClientCredentialsPlugin, V as createFunction, dB as createMemoryCache, ai as createOptionsPlugin, aq as createPaginatedPluginMethod, ap as createPluginMethod, ah as createSdk, eu as createTableFieldsPlugin, eo as createTablePlugin, eC as createTableRecordsPlugin, ax as createZapierApi, ag as createZapierSdkWithoutRegistry, ao as definePlugin, cC as deleteClientCredentialsPlugin, ew as deleteTableFieldsPlugin, eq as deleteTablePlugin, eE as deleteTableRecordsPlugin, ck as fetchPlugin, cK as findFirstConnectionPlugin, cM as findUniqueConnectionPlugin, ce as formatErrorMessage, aG as generateEventId, cu as getActionInputFieldsSchemaPlugin, cG as getActionPlugin, cE as getAppPlugin, dT as getBaseUrlFromCredentials, aM as getCiPlatform, dU as getClientIdFromCredentials, cI as getConnectionPlugin, aO as getCpuTime, aH as getCurrentTimestamp, aN as getMemoryUsage, ay as getOrCreateApiClient, aJ as getOsInfo, aK as getPlatformVersions, cV as getPreferredManifestEntryKey, c_ as getProfilePlugin, aI as getReleaseId, em as getTablePlugin, ey as getTableRecordPlugin, dv as getTokenFromCliLogin, eg as getZapierApprovalMode, eh as getZapierDefaultApprovalMode, e7 as getZapierSdkService, dt as injectCliLogin, da as inputFieldKeyResolver, d9 as inputsAllOptionalResolver, d8 as inputsResolver, ds as invalidateCachedToken, dx as invalidateCredentialsToken, aL as isCi, du as isCliLoginAvailable, dM as isClientCredentials, dP as isCredentialsFunction, dO as isCredentialsObject, dN as isPkceCredentials, S as isPositional, cs as listActionInputFieldChoicesPlugin, cq as listActionInputFieldsPlugin, co as listActionsPlugin, cm as listAppsPlugin, cy as listClientCredentialsPlugin, cw as listConnectionsPlugin, es as listTableFieldsPlugin, eA as listTableRecordsPlugin, ek as listTablesPlugin, ac as logDeprecation, cW as manifestPlugin, ee as parseConcurrencyEnvVar, au as registryPlugin, cS as requestPlugin, ad as resetDeprecationWarnings, dw as resolveAuthToken, dS as resolveCredentials, dR as resolveCredentialsFromEnv, cQ as runActionPlugin, a6 as runWithTelemetryContext, di as tableFieldIdsResolver, dk as tableFieldsResolver, dn as tableFiltersResolver, dd as tableIdResolver, dj as tableNameResolver, dg as tableRecordIdResolver, dh as tableRecordIdsResolver, dl as tableRecordsResolver, dp as tableSortResolver, dm as tableUpdateRecordsResolver, a7 as toSnakeCase, a8 as toTitleCase, de as triggerInboxResolver, df as triggerMessagesResolver, eG as updateTableRecordsPlugin } from './index-CjP7lGzL.mjs';
|
|
3
3
|
import * as zod_v4_core from 'zod/v4/core';
|
|
4
4
|
import * as zod from 'zod';
|
|
5
5
|
import '@zapier/zapier-sdk-core/v0/schemas/connections';
|
package/dist/experimental.mjs
CHANGED
|
@@ -169,6 +169,10 @@ function getZapierApprovalMode() {
|
|
|
169
169
|
return value;
|
|
170
170
|
return void 0;
|
|
171
171
|
}
|
|
172
|
+
function getZapierDefaultApprovalMode() {
|
|
173
|
+
const isInteractive = !!globalThis.process?.stdin?.isTTY && !!globalThis.process?.stdout?.isTTY;
|
|
174
|
+
return isInteractive ? "poll" : "throw";
|
|
175
|
+
}
|
|
172
176
|
var DEFAULT_APPROVAL_TIMEOUT_MS = 10 * 60 * 1e3;
|
|
173
177
|
var DEFAULT_MAX_APPROVAL_RETRIES = 2;
|
|
174
178
|
|
|
@@ -2879,7 +2883,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
2879
2883
|
}
|
|
2880
2884
|
|
|
2881
2885
|
// src/sdk-version.ts
|
|
2882
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.
|
|
2886
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.56.0" : void 0) || "unknown";
|
|
2883
2887
|
|
|
2884
2888
|
// src/utils/open-url.ts
|
|
2885
2889
|
var nodePrefix = "node:";
|
|
@@ -3209,7 +3213,7 @@ var ZapierApiClient = class {
|
|
|
3209
3213
|
}
|
|
3210
3214
|
if (errorType !== "approval_required") return response;
|
|
3211
3215
|
if (attempt === maxRetries) break;
|
|
3212
|
-
const mode = this.options.approvalMode ?? getZapierApprovalMode() ??
|
|
3216
|
+
const mode = this.options.approvalMode ?? getZapierApprovalMode() ?? getZapierDefaultApprovalMode();
|
|
3213
3217
|
if (mode === "disabled") {
|
|
3214
3218
|
throw new ZapierApprovalError(
|
|
3215
3219
|
"Approvals are disabled. Set approvalMode to 'poll' or 'throw' (or ZAPIER_APPROVAL_MODE) to enable.",
|
|
@@ -3976,7 +3980,8 @@ var appKeyResolver = {
|
|
|
3976
3980
|
name: "app",
|
|
3977
3981
|
message: "Select app:",
|
|
3978
3982
|
choices: apps.map((app) => ({
|
|
3979
|
-
name: app.title
|
|
3983
|
+
name: app.title || app.key,
|
|
3984
|
+
hint: app.title ? getAppKeyList(app) : void 0,
|
|
3980
3985
|
value: app.key
|
|
3981
3986
|
}))
|
|
3982
3987
|
})
|
|
@@ -4024,7 +4029,8 @@ var actionKeyResolver = {
|
|
|
4024
4029
|
name: "action",
|
|
4025
4030
|
message: "Select action:",
|
|
4026
4031
|
choices: actions.map((action) => ({
|
|
4027
|
-
name:
|
|
4032
|
+
name: action.title || action.name || action.key,
|
|
4033
|
+
hint: action.description || void 0,
|
|
4028
4034
|
value: action.key
|
|
4029
4035
|
}))
|
|
4030
4036
|
})
|
|
@@ -4049,7 +4055,7 @@ function promptForConnection(connections, params) {
|
|
|
4049
4055
|
name: "connection",
|
|
4050
4056
|
message: params.app ? `Select connection for ${params.app}:` : "Select connection:",
|
|
4051
4057
|
choices: connections.map((connection) => ({
|
|
4052
|
-
name:
|
|
4058
|
+
name: connection.title || connection.label || "Connection",
|
|
4053
4059
|
value: connection.id
|
|
4054
4060
|
}))
|
|
4055
4061
|
};
|
|
@@ -4164,7 +4170,11 @@ var inputFieldKeyResolver = {
|
|
|
4164
4170
|
name: "inputField",
|
|
4165
4171
|
message: "Select input field:",
|
|
4166
4172
|
choices: fields.map((field) => ({
|
|
4167
|
-
name:
|
|
4173
|
+
name: field.title || field.key,
|
|
4174
|
+
hint: [
|
|
4175
|
+
field.value_type,
|
|
4176
|
+
field.is_required ? "required" : "optional"
|
|
4177
|
+
].filter(Boolean),
|
|
4168
4178
|
value: field.key
|
|
4169
4179
|
}))
|
|
4170
4180
|
})
|
|
@@ -4189,7 +4199,7 @@ var clientIdResolver = {
|
|
|
4189
4199
|
name: "clientId",
|
|
4190
4200
|
message: "Select client credentials to delete:",
|
|
4191
4201
|
choices: credentials.map((cred) => ({
|
|
4192
|
-
name:
|
|
4202
|
+
name: cred.name,
|
|
4193
4203
|
value: cred.client_id
|
|
4194
4204
|
}))
|
|
4195
4205
|
})
|
|
@@ -4222,7 +4232,7 @@ var tableIdResolver = {
|
|
|
4222
4232
|
name: "table",
|
|
4223
4233
|
message: "Select a table:",
|
|
4224
4234
|
choices: tables.map((table) => ({
|
|
4225
|
-
name:
|
|
4235
|
+
name: table.name,
|
|
4226
4236
|
value: table.id
|
|
4227
4237
|
}))
|
|
4228
4238
|
})
|
|
@@ -4239,7 +4249,8 @@ var triggerInboxResolver = {
|
|
|
4239
4249
|
// `deleting` inboxes are on their way out — no operation against them
|
|
4240
4250
|
// is useful (delete is a no-op, pause/resume/update are rejected).
|
|
4241
4251
|
choices: inboxes.filter((inbox) => inbox.status !== "deleting").map((inbox) => ({
|
|
4242
|
-
name:
|
|
4252
|
+
name: inbox.name ?? inbox.id,
|
|
4253
|
+
hint: `${inbox.subscription.app_key} / ${inbox.subscription.action_key}, ${inbox.status}`,
|
|
4243
4254
|
value: inbox.id
|
|
4244
4255
|
}))
|
|
4245
4256
|
})
|
|
@@ -4262,7 +4273,8 @@ var triggerMessagesResolver = {
|
|
|
4262
4273
|
// are gone from the inbox already; available/quarantined ones can't be
|
|
4263
4274
|
// operated on by these methods.
|
|
4264
4275
|
choices: messages.filter((message) => message.status === "leased").map((message) => ({
|
|
4265
|
-
name:
|
|
4276
|
+
name: message.id,
|
|
4277
|
+
hint: `${message.status}, lease_count: ${message.message_attributes.lease_count}`,
|
|
4266
4278
|
value: message.id
|
|
4267
4279
|
}))
|
|
4268
4280
|
})
|
|
@@ -4508,8 +4520,8 @@ async function createFieldKeyTranslator({
|
|
|
4508
4520
|
function summarizeRecord(record) {
|
|
4509
4521
|
const values = Object.values(record.data);
|
|
4510
4522
|
const preview = values.slice(0, 3).map((v) => formatFieldValue(v).replace(/\s+/g, " ").trim()).filter((s) => s.length > 0).join(", ");
|
|
4511
|
-
|
|
4512
|
-
return
|
|
4523
|
+
if (!preview) return void 0;
|
|
4524
|
+
return preview.length > 60 ? preview.slice(0, 57) + "..." : preview;
|
|
4513
4525
|
}
|
|
4514
4526
|
function fetchRecords(sdk, params) {
|
|
4515
4527
|
return sdk.listTableRecords({
|
|
@@ -4519,7 +4531,7 @@ function fetchRecords(sdk, params) {
|
|
|
4519
4531
|
}
|
|
4520
4532
|
function recordChoices(records) {
|
|
4521
4533
|
return records.map((record) => ({
|
|
4522
|
-
name: summarizeRecord(record),
|
|
4534
|
+
name: summarizeRecord(record) || record.id,
|
|
4523
4535
|
value: record.id
|
|
4524
4536
|
}));
|
|
4525
4537
|
}
|
|
@@ -4559,7 +4571,8 @@ var tableFieldIdsResolver = {
|
|
|
4559
4571
|
name: "fields",
|
|
4560
4572
|
message: "Select fields:",
|
|
4561
4573
|
choices: fields.map((field) => ({
|
|
4562
|
-
name:
|
|
4574
|
+
name: field.name,
|
|
4575
|
+
hint: [field.id, field.type],
|
|
4563
4576
|
value: field.id
|
|
4564
4577
|
})),
|
|
4565
4578
|
validate: (value) => Array.isArray(value) && value.length > 0 ? true : "Select at least one field"
|
|
@@ -10587,7 +10600,7 @@ var BaseSdkOptionsSchema = z.object({
|
|
|
10587
10600
|
"Maximum number of sequential approval rounds per request (one per gating policy) before giving up. Default: 2."
|
|
10588
10601
|
),
|
|
10589
10602
|
approvalMode: z.enum(["disabled", "poll", "throw"]).optional().describe(
|
|
10590
|
-
'Approval flow behavior. "
|
|
10603
|
+
'Approval flow behavior. "poll" creates the approval, opens it in a browser, polls until resolved, and retries the original request. "throw" creates the approval and throws a ZapierApprovalError with the approval URL so the caller can surface it. "disabled" throws a ZapierApprovalError on approval-required responses without creating an approval. Resolution order is: explicit option, then ZAPIER_APPROVAL_MODE, then the default behavior (poll for interactive TTY, throw otherwise).'
|
|
10591
10604
|
),
|
|
10592
10605
|
// Internal
|
|
10593
10606
|
manifestPath: z.string().optional().describe("Path to a .zapierrc manifest file for app version locking.").meta({ internal: true }),
|
|
@@ -10618,4 +10631,4 @@ function createZapierSdk2(options = {}) {
|
|
|
10618
10631
|
return createSdk().addPlugin(createOptionsPlugin(options)).addPlugin(eventEmissionPlugin).addPlugin(apiPlugin).addPlugin(manifestPlugin).addPlugin(capabilitiesPlugin).addPlugin(connectionsPlugin).addPlugin(listAppsPlugin).addPlugin(getAppPlugin).addPlugin(listActionsPlugin).addPlugin(getActionPlugin).addPlugin(listActionInputFieldsPlugin).addPlugin(getActionInputFieldsSchemaPlugin).addPlugin(listActionInputFieldChoicesPlugin).addPlugin(listInputFieldsDeprecatedPlugin).addPlugin(getInputFieldsSchemaDeprecatedPlugin).addPlugin(listInputFieldChoicesDeprecatedPlugin).addPlugin(runActionPlugin).addPlugin(listConnectionsPlugin).addPlugin(getConnectionPlugin).addPlugin(findFirstConnectionPlugin).addPlugin(findUniqueConnectionPlugin).addPlugin(listAuthenticationsPlugin).addPlugin(getAuthenticationPlugin).addPlugin(findFirstAuthenticationPlugin).addPlugin(findUniqueAuthenticationPlugin).addPlugin(listClientCredentialsPlugin).addPlugin(createClientCredentialsPlugin).addPlugin(deleteClientCredentialsPlugin).addPlugin(fetchPlugin).addPlugin(requestPlugin).addPlugin(createTriggerInboxPlugin).addPlugin(ensureTriggerInboxPlugin).addPlugin(listTriggerInboxesPlugin).addPlugin(getTriggerInboxPlugin).addPlugin(updateTriggerInboxPlugin).addPlugin(deleteTriggerInboxPlugin).addPlugin(pauseTriggerInboxPlugin).addPlugin(resumeTriggerInboxPlugin).addPlugin(listTriggerInboxMessagesPlugin).addPlugin(leaseTriggerInboxMessagesPlugin).addPlugin(ackTriggerInboxMessagesPlugin).addPlugin(releaseTriggerInboxMessagesPlugin).addPlugin(drainTriggerInboxPlugin).addPlugin(watchTriggerInboxPlugin).addPlugin(listTriggersPlugin).addPlugin(listTriggerInputFieldsPlugin).addPlugin(listTriggerInputFieldChoicesPlugin).addPlugin(getTriggerInputFieldsSchemaPlugin).addPlugin(listTablesPlugin).addPlugin(getTablePlugin).addPlugin(deleteTablePlugin).addPlugin(createTablePlugin).addPlugin(listTableFieldsPlugin).addPlugin(createTableFieldsPlugin).addPlugin(deleteTableFieldsPlugin).addPlugin(getTableRecordPlugin).addPlugin(listTableRecordsPlugin).addPlugin(createTableRecordsPlugin).addPlugin(deleteTableRecordsPlugin).addPlugin(updateTableRecordsPlugin).addPlugin(appsPlugin).addPlugin(getProfilePlugin);
|
|
10619
10632
|
}
|
|
10620
10633
|
|
|
10621
|
-
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk2 as createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin };
|
|
10634
|
+
export { ActionKeyPropertySchema, ActionPropertySchema, ActionTimeoutMsPropertySchema, ActionTypePropertySchema, AppKeyPropertySchema, AppPropertySchema, AppsPropertySchema, AuthenticationIdPropertySchema, BaseSdkOptionsSchema, CONTEXT_CACHE_MAX_SIZE, CONTEXT_CACHE_TTL_MS, ClientCredentialsObjectSchema, ConnectionEntrySchema, ConnectionIdPropertySchema, ConnectionPropertySchema, ConnectionsMapSchema, ConnectionsPropertySchema, CredentialsFunctionSchema, CredentialsObjectSchema, CredentialsSchema, DEFAULT_ACTION_TIMEOUT_MS, DEFAULT_APPROVAL_TIMEOUT_MS, DEFAULT_CONFIG_PATH, DEFAULT_MAX_APPROVAL_RETRIES, DEFAULT_PAGE_SIZE, DebugPropertySchema, FieldsPropertySchema, InputFieldPropertySchema, InputsPropertySchema, LeaseLimitPropertySchema, LeasePropertySchema, LeaseSecondsPropertySchema, LimitPropertySchema, MAX_CONCURRENCY_LIMIT, MAX_PAGE_LIMIT, OffsetPropertySchema, OutputPropertySchema, ParamsPropertySchema, PkceCredentialsObjectSchema, RecordPropertySchema, RecordsPropertySchema, RelayFetchSchema, RelayRequestSchema, ResolvedCredentialsSchema, TablePropertySchema, TablesPropertySchema, TriggerInboxNamePropertySchema, TriggerInboxPropertySchema, ZAPIER_BASE_URL, ZAPIER_MAX_CONCURRENT_REQUESTS, ZAPIER_MAX_NETWORK_RETRIES, ZAPIER_MAX_NETWORK_RETRY_DELAY_MS, ZapierAbortDrainSignal, ZapierActionError, ZapierApiError, ZapierAppNotFoundError, ZapierApprovalError, ZapierAuthenticationError, ZapierBundleError, ZapierConfigurationError, ZapierConflictError, ZapierError, ZapierNotFoundError, ZapierRateLimitError, ZapierRelayError, ZapierReleaseTriggerMessageSignal, ZapierResourceNotFoundError, ZapierSignal, ZapierTimeoutError, ZapierUnknownError, ZapierValidationError, actionKeyResolver, actionTypeResolver, apiPlugin, appKeyResolver, appsPlugin, connectionIdGenericResolver as authenticationIdGenericResolver, connectionIdResolver as authenticationIdResolver, batch, buildApplicationLifecycleEvent, buildCapabilityMessage, buildErrorEvent, buildErrorEventWithContext, buildMethodCalledEvent, clearTokenCache, clientCredentialsNameResolver, clientIdResolver, composePlugins, connectionIdGenericResolver, connectionIdResolver, connectionsPlugin, createBaseEvent, createClientCredentialsPlugin, createFunction, createMemoryCache, createOptionsPlugin, createPaginatedPluginMethod, createPluginMethod, createSdk, createTableFieldsPlugin, createTablePlugin, createTableRecordsPlugin, createZapierApi, createZapierSdk2 as createZapierSdk, createZapierSdkWithoutRegistry, definePlugin, deleteClientCredentialsPlugin, deleteTableFieldsPlugin, deleteTablePlugin, deleteTableRecordsPlugin, fetchPlugin, findFirstConnectionPlugin, findManifestEntry, findUniqueConnectionPlugin, formatErrorMessage, generateEventId, getActionInputFieldsSchemaPlugin, getActionPlugin, getAppPlugin, getBaseUrlFromCredentials, getCiPlatform, getClientIdFromCredentials, getConnectionPlugin, getCpuTime, getCurrentTimestamp, getMemoryUsage, getOrCreateApiClient, getOsInfo, getPlatformVersions, getPreferredManifestEntryKey, getProfilePlugin, getReleaseId, getTablePlugin, getTableRecordPlugin, getTokenFromCliLogin, getZapierApprovalMode, getZapierDefaultApprovalMode, getZapierSdkService, injectCliLogin, inputFieldKeyResolver, inputsAllOptionalResolver, inputsResolver, invalidateCachedToken, invalidateCredentialsToken, isCi, isCliLoginAvailable, isClientCredentials, isCredentialsFunction, isCredentialsObject, isPkceCredentials, isPositional, listActionInputFieldChoicesPlugin, listActionInputFieldsPlugin, listActionsPlugin, listAppsPlugin, listClientCredentialsPlugin, listConnectionsPlugin, listTableFieldsPlugin, listTableRecordsPlugin, listTablesPlugin, logDeprecation, manifestPlugin, parseConcurrencyEnvVar, readManifestFromFile, registryPlugin, requestPlugin, resetDeprecationWarnings, resolveAuthToken, resolveCredentials, resolveCredentialsFromEnv, runActionPlugin, runWithTelemetryContext, tableFieldIdsResolver, tableFieldsResolver, tableFiltersResolver, tableIdResolver, tableNameResolver, tableRecordIdResolver, tableRecordIdsResolver, tableRecordsResolver, tableSortResolver, tableUpdateRecordsResolver, toSnakeCase, toTitleCase, triggerInboxResolver, triggerMessagesResolver, updateTableRecordsPlugin };
|