@zapier/zapier-sdk 0.40.2 → 0.40.4
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 +12 -0
- package/README.md +3 -3
- package/dist/api/polling.js +3 -4
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +14 -7
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -2
- package/dist/credentials.d.ts.map +1 -1
- package/dist/credentials.js +21 -19
- package/dist/index.cjs +105 -101
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +105 -81
- package/dist/plugins/capabilities/index.d.ts.map +1 -1
- package/dist/plugins/capabilities/index.js +1 -3
- package/dist/plugins/eventEmission/builders.d.ts.map +1 -1
- package/dist/plugins/eventEmission/builders.js +4 -4
- package/dist/plugins/eventEmission/index.d.ts.map +1 -1
- package/dist/plugins/eventEmission/index.js +11 -11
- package/dist/plugins/eventEmission/utils.d.ts.map +1 -1
- package/dist/plugins/eventEmission/utils.js +43 -36
- package/dist/plugins/findFirstConnection/schemas.d.ts +1 -0
- package/dist/plugins/findFirstConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/findUniqueConnection/schemas.d.ts +1 -0
- package/dist/plugins/findUniqueConnection/schemas.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +5 -0
- package/dist/plugins/listConnections/schemas.d.ts +1 -0
- package/dist/plugins/listConnections/schemas.d.ts.map +1 -1
- package/dist/plugins/listConnections/schemas.js +13 -2
- package/dist/utils/batch-utils.d.ts.map +1 -1
- package/dist/utils/batch-utils.js +5 -6
- package/dist/utils/url-utils.js +2 -2
- package/package.json +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.40.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e3f5a81: Replace Node-only imports (timers/promises, os) with browser-safe alternatives and add browser compatibility test suite
|
|
8
|
+
|
|
9
|
+
## 0.40.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b250545: Connections - Replace isExpired with expired
|
|
14
|
+
|
|
3
15
|
## 0.40.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -860,7 +860,7 @@ Find the first connection matching the criteria
|
|
|
860
860
|
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
861
861
|
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
862
862
|
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
863
|
-
| ↳ `
|
|
863
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
864
864
|
|
|
865
865
|
**Returns:** `Promise<ConnectionItem>`
|
|
866
866
|
|
|
@@ -885,7 +885,7 @@ Find a unique connection matching the criteria
|
|
|
885
885
|
| ↳ `app` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
886
886
|
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
887
887
|
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
888
|
-
| ↳ `
|
|
888
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
889
889
|
|
|
890
890
|
**Returns:** `Promise<ConnectionItem>`
|
|
891
891
|
|
|
@@ -930,7 +930,7 @@ List available connections with optional filtering
|
|
|
930
930
|
| ↳ `connections` | `array` | ❌ | — | — | List of connection IDs to filter by |
|
|
931
931
|
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
932
932
|
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include connections shared with you. By default, only your own connections are returned (owner=me). Set to true to also include shared connections. |
|
|
933
|
-
| ↳ `
|
|
933
|
+
| ↳ `expired` | `boolean` | ❌ | — | — | Show only expired connections (default: only non-expired connections are returned) |
|
|
934
934
|
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page |
|
|
935
935
|
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
936
936
|
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
package/dist/api/polling.js
CHANGED
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
* with configurable retry logic and exponential backoff.
|
|
6
6
|
*/
|
|
7
7
|
import { ZapierTimeoutError, ZapierApiError, ZapierValidationError, } from "../types/errors";
|
|
8
|
-
import {
|
|
9
|
-
import { calculateErrorBackoffMs, MAX_CONSECUTIVE_ERRORS, } from "../utils/retry-utils";
|
|
8
|
+
import { sleep, calculateErrorBackoffMs, MAX_CONSECUTIVE_ERRORS, } from "../utils/retry-utils";
|
|
10
9
|
// Constants
|
|
11
10
|
const DEFAULT_TIMEOUT_MS = 180000;
|
|
12
11
|
const DEFAULT_SUCCESS_STATUS = 200;
|
|
@@ -105,7 +104,7 @@ export async function pollUntilComplete(options) {
|
|
|
105
104
|
let errorCount = 0;
|
|
106
105
|
// Apply initial delay if specified
|
|
107
106
|
if (initialDelay > 0) {
|
|
108
|
-
await
|
|
107
|
+
await sleep(initialDelay);
|
|
109
108
|
}
|
|
110
109
|
while (true) {
|
|
111
110
|
const elapsedTime = Date.now() - startTime;
|
|
@@ -119,7 +118,7 @@ export async function pollUntilComplete(options) {
|
|
|
119
118
|
if (attempts > 0) {
|
|
120
119
|
const interval = getPollingInterval(elapsedTime);
|
|
121
120
|
const waitTime = calculateErrorBackoffMs(interval, errorCount);
|
|
122
|
-
await
|
|
121
|
+
await sleep(waitTime);
|
|
123
122
|
}
|
|
124
123
|
attempts++;
|
|
125
124
|
// Perform the poll request
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,qBAAqB,CAAC;AAM5E,YAAY,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA+BD;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAItC;AA0CD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAAE,GACf,IAAI,CAIN;AA6HD;;GAEG;AACH,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAGD,KAAK,cAAc,GAAG,cAAc,8BAA8B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAuB,MAAM,qBAAqB,CAAC;AAM5E,YAAY,EACV,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,aAAa,GACd,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,WAAW,EACX,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gDAAgD;IAChD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AA+BD;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAItC;AA0CD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EAAE,GACf,IAAI,CAIN;AA6HD;;GAEG;AACH,UAAU,eAAe;IACvB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;IAChC,WAAW,CAAC,EAAE;QACZ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAGD,KAAK,cAAc,GAAG,cAAc,8BAA8B,CAAC,CAAC;AA2CpE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAE3D;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,GAAG,SAAS,CAGzD;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAK7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,gBAAgB,CACpC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAmB7B;AA6ED;;;;GAIG;AACH,wBAAsB,0BAA0B,CAAC,OAAO,EAAE;IACxD,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B,GAAG,OAAO,CAAC,IAAI,CAAC,CAQhB"}
|
package/dist/auth.js
CHANGED
|
@@ -186,20 +186,27 @@ async function getCliLogin() {
|
|
|
186
186
|
return cachedCliLogin || undefined;
|
|
187
187
|
}
|
|
188
188
|
try {
|
|
189
|
-
|
|
190
|
-
|
|
189
|
+
const mod = await import("@zapier/zapier-sdk-cli/login");
|
|
190
|
+
if (typeof mod.getToken === "function") {
|
|
191
|
+
cachedCliLogin = mod;
|
|
192
|
+
return cachedCliLogin;
|
|
193
|
+
}
|
|
191
194
|
}
|
|
192
195
|
catch {
|
|
193
|
-
//
|
|
196
|
+
// Not available, try fallback
|
|
194
197
|
}
|
|
195
198
|
try {
|
|
196
|
-
|
|
197
|
-
|
|
199
|
+
const mod = await import("@zapier/zapier-sdk-cli-login");
|
|
200
|
+
if (typeof mod.getToken === "function") {
|
|
201
|
+
cachedCliLogin = mod;
|
|
202
|
+
return cachedCliLogin;
|
|
203
|
+
}
|
|
198
204
|
}
|
|
199
205
|
catch {
|
|
200
|
-
|
|
201
|
-
return undefined;
|
|
206
|
+
// Not available
|
|
202
207
|
}
|
|
208
|
+
cachedCliLogin = false;
|
|
209
|
+
return undefined;
|
|
203
210
|
}
|
|
204
211
|
/**
|
|
205
212
|
* Inject an already-loaded CLI login module so the SDK skips its dynamic import.
|
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,
|
|
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;;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"}
|
package/dist/constants.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Base URL for Zapier API endpoints
|
|
8
8
|
*/
|
|
9
|
-
export const ZAPIER_BASE_URL = process
|
|
9
|
+
export const ZAPIER_BASE_URL = globalThis.process?.env?.ZAPIER_BASE_URL || "https://zapier.com";
|
|
10
10
|
/**
|
|
11
11
|
* Maximum number of items that can be requested per page across all paginated functions
|
|
12
12
|
*/
|
|
@@ -20,7 +20,7 @@ export const DEFAULT_PAGE_SIZE = 100;
|
|
|
20
20
|
*/
|
|
21
21
|
export const DEFAULT_ACTION_TIMEOUT_MS = 180000;
|
|
22
22
|
function parseIntEnvVar(name) {
|
|
23
|
-
const value = process
|
|
23
|
+
const value = globalThis.process?.env?.[name];
|
|
24
24
|
if (value === undefined)
|
|
25
25
|
return undefined;
|
|
26
26
|
const parsed = parseInt(value, 10);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EAEpB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,mBAAmB,EAEpB,MAAM,qBAAqB,CAAC;AAa7B;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAqDD;;;;;;;;;;GAUG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,CAAC,EAAE,MAAM,GAClB,mBAAmB,GAAG,SAAS,CA2DjC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,GAAE,yBAA8B,GACtC,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAC,CAkD1C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAC3C,MAAM,GAAG,SAAS,CAKpB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,mBAAmB,GAAG,SAAS,GAC3C,MAAM,GAAG,SAAS,CAKpB"}
|
package/dist/credentials.js
CHANGED
|
@@ -27,9 +27,9 @@ function normalizeCredentialsObject(obj, sdkBaseUrl) {
|
|
|
27
27
|
// Build defaults from env vars for optional fields, then override with explicit credentials.
|
|
28
28
|
// clientId is required in CredentialsObject so it always comes from obj.
|
|
29
29
|
const merged = {
|
|
30
|
-
clientSecret: process
|
|
31
|
-
baseUrl: process
|
|
32
|
-
scope: process
|
|
30
|
+
clientSecret: globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_SECRET,
|
|
31
|
+
baseUrl: globalThis.process?.env?.ZAPIER_CREDENTIALS_BASE_URL,
|
|
32
|
+
scope: globalThis.process?.env?.ZAPIER_CREDENTIALS_SCOPE,
|
|
33
33
|
...obj,
|
|
34
34
|
};
|
|
35
35
|
// Derive baseUrl from SDK if still not set
|
|
@@ -65,45 +65,47 @@ function normalizeCredentialsObject(obj, sdkBaseUrl) {
|
|
|
65
65
|
*/
|
|
66
66
|
export function resolveCredentialsFromEnv(sdkBaseUrl) {
|
|
67
67
|
// 1. Check ZAPIER_CREDENTIALS (string token only)
|
|
68
|
-
if (process
|
|
69
|
-
return process
|
|
68
|
+
if (globalThis.process?.env?.ZAPIER_CREDENTIALS) {
|
|
69
|
+
return globalThis.process?.env?.ZAPIER_CREDENTIALS;
|
|
70
70
|
}
|
|
71
71
|
// 2. Check ZAPIER_CREDENTIALS_* individual vars
|
|
72
|
-
if (process
|
|
73
|
-
const resolvedBaseUrl = process
|
|
72
|
+
if (globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_ID) {
|
|
73
|
+
const resolvedBaseUrl = globalThis.process?.env?.ZAPIER_CREDENTIALS_BASE_URL ||
|
|
74
|
+
deriveAuthBaseUrl(sdkBaseUrl);
|
|
74
75
|
// Infer type from presence of clientSecret
|
|
75
|
-
if (process
|
|
76
|
+
if (globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_SECRET) {
|
|
76
77
|
return {
|
|
77
78
|
type: "client_credentials",
|
|
78
|
-
clientId: process
|
|
79
|
-
clientSecret: process
|
|
79
|
+
clientId: globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_ID,
|
|
80
|
+
clientSecret: globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_SECRET,
|
|
80
81
|
baseUrl: resolvedBaseUrl,
|
|
81
|
-
scope: process
|
|
82
|
+
scope: globalThis.process?.env?.ZAPIER_CREDENTIALS_SCOPE,
|
|
82
83
|
};
|
|
83
84
|
}
|
|
84
85
|
else {
|
|
85
86
|
return {
|
|
86
87
|
type: "pkce",
|
|
87
|
-
clientId: process
|
|
88
|
+
clientId: globalThis.process?.env?.ZAPIER_CREDENTIALS_CLIENT_ID,
|
|
88
89
|
baseUrl: resolvedBaseUrl,
|
|
89
|
-
scope: process
|
|
90
|
+
scope: globalThis.process?.env?.ZAPIER_CREDENTIALS_SCOPE,
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
94
|
// 3. Check deprecated env vars (with warnings)
|
|
94
|
-
if (process
|
|
95
|
+
if (globalThis.process?.env?.ZAPIER_TOKEN) {
|
|
95
96
|
logDeprecation("ZAPIER_TOKEN is deprecated. Use ZAPIER_CREDENTIALS instead.");
|
|
96
|
-
return process
|
|
97
|
+
return globalThis.process?.env?.ZAPIER_TOKEN;
|
|
97
98
|
}
|
|
98
|
-
if (process
|
|
99
|
+
if (globalThis.process?.env?.ZAPIER_AUTH_CLIENT_ID) {
|
|
99
100
|
logDeprecation("ZAPIER_AUTH_CLIENT_ID is deprecated. Use ZAPIER_CREDENTIALS_CLIENT_ID instead.");
|
|
100
|
-
if (process
|
|
101
|
+
if (globalThis.process?.env?.ZAPIER_AUTH_BASE_URL) {
|
|
101
102
|
logDeprecation("ZAPIER_AUTH_BASE_URL is deprecated. Use ZAPIER_CREDENTIALS_BASE_URL instead.");
|
|
102
103
|
}
|
|
103
|
-
const resolvedBaseUrl = process
|
|
104
|
+
const resolvedBaseUrl = globalThis.process?.env?.ZAPIER_AUTH_BASE_URL ||
|
|
105
|
+
deriveAuthBaseUrl(sdkBaseUrl);
|
|
104
106
|
return {
|
|
105
107
|
type: "pkce",
|
|
106
|
-
clientId: process
|
|
108
|
+
clientId: globalThis.process?.env?.ZAPIER_AUTH_CLIENT_ID,
|
|
107
109
|
baseUrl: resolvedBaseUrl,
|
|
108
110
|
};
|
|
109
111
|
}
|