@zapier/zapier-sdk 0.101.0 → 0.101.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/README.md +9 -9
- package/dist/{chunk-R6U6HNVF.mjs → chunk-6VGEVTLJ.mjs} +15 -17
- package/dist/{chunk-EOGYMKVF.cjs → chunk-ID4JBWNX.cjs} +15 -17
- package/dist/experimental.cjs +391 -391
- package/dist/experimental.mjs +2 -2
- package/dist/index.cjs +277 -277
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.101.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6bfea6d: Clarified that `pageSize` on `listConnections`, `listAuthentications`, and `listApps` may be capped by the upstream API — values above its limit are rejected rather than forwarded unbounded.
|
|
8
|
+
|
|
9
|
+
## 0.101.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- e0fcb04: `sdk.apps` now runs actions for apps that do not require a connection without rejecting the call before execution.
|
|
14
|
+
|
|
3
15
|
## 0.101.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1021,14 +1021,14 @@ List all available apps with optional filtering
|
|
|
1021
1021
|
|
|
1022
1022
|
**Parameters:**
|
|
1023
1023
|
|
|
1024
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
1025
|
-
| -------------- | -------- | -------- | ------- | --------------- |
|
|
1026
|
-
| `options` | `object` | ✅ | — | — |
|
|
1027
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter apps by name
|
|
1028
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of apps per page
|
|
1029
|
-
| ↳ `apps` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')
|
|
1030
|
-
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages
|
|
1031
|
-
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from
|
|
1024
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1025
|
+
| -------------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------- |
|
|
1026
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1027
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter apps by name |
|
|
1028
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of apps per page. The upstream API may cap this and reject values above its limit. |
|
|
1029
|
+
| ↳ `apps` | `array` | ❌ | — | — | Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
1030
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1031
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1032
1032
|
|
|
1033
1033
|
**Returns:** `Promise<PaginatedResult<AppItem>>`
|
|
1034
1034
|
|
|
@@ -2592,7 +2592,7 @@ List available connections with optional filtering
|
|
|
2592
2592
|
| ↳ `account` | `string` | ❌ | — | — | Account to filter by |
|
|
2593
2593
|
| ↳ `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. |
|
|
2594
2594
|
| ↳ `status` | `string` | ❌ | — | `active`, `expired`, `all` | Filter connections by expiry: 'active' (default) returns only non-expired connections, 'expired' only expired ones, and 'all' returns both. |
|
|
2595
|
-
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page
|
|
2595
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page. The upstream API may cap this and reject values above its limit. |
|
|
2596
2596
|
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
2597
2597
|
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
2598
2598
|
|
|
@@ -6901,7 +6901,7 @@ function parseDeprecationDate(value) {
|
|
|
6901
6901
|
}
|
|
6902
6902
|
|
|
6903
6903
|
// src/sdk-version.ts
|
|
6904
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.101.
|
|
6904
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.101.2" : void 0) || "unknown";
|
|
6905
6905
|
|
|
6906
6906
|
// src/utils/open-url.ts
|
|
6907
6907
|
var nodePrefix = "node:";
|
|
@@ -11343,8 +11343,7 @@ function resolveProxyConnection({
|
|
|
11343
11343
|
providedConnection,
|
|
11344
11344
|
providedAuthenticationId,
|
|
11345
11345
|
pinnedAuthId,
|
|
11346
|
-
pinnedConnection
|
|
11347
|
-
errorContext
|
|
11346
|
+
pinnedConnection
|
|
11348
11347
|
}) {
|
|
11349
11348
|
const hasDirectId = providedConnectionId != null || providedAuthenticationId != null;
|
|
11350
11349
|
if (hasDirectId && providedConnection != null) {
|
|
@@ -11362,9 +11361,6 @@ function resolveProxyConnection({
|
|
|
11362
11361
|
finalConnectionId = pinnedAuthId;
|
|
11363
11362
|
finalConnection = pinnedAuthId != null ? void 0 : pinnedConnection;
|
|
11364
11363
|
}
|
|
11365
|
-
if (finalConnectionId == null && finalConnection == null) {
|
|
11366
|
-
throw new ZapierValidationError(errorContext);
|
|
11367
|
-
}
|
|
11368
11364
|
return { connectionId: finalConnectionId, connection: finalConnection };
|
|
11369
11365
|
}
|
|
11370
11366
|
function createActionFunction(appKey, actionType, actionKey, imports, pinnedAuthId, pinnedConnection) {
|
|
@@ -11382,8 +11378,7 @@ function createActionFunction(appKey, actionType, actionKey, imports, pinnedAuth
|
|
|
11382
11378
|
providedConnection,
|
|
11383
11379
|
providedAuthenticationId,
|
|
11384
11380
|
pinnedAuthId,
|
|
11385
|
-
pinnedConnection
|
|
11386
|
-
errorContext: `Connection is required. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }) or sdk.apps.${appKey}({ connection: "name" }), or provide connectionId/connection in the action call.`
|
|
11381
|
+
pinnedConnection
|
|
11387
11382
|
});
|
|
11388
11383
|
return imports.runAction({
|
|
11389
11384
|
app: appKey,
|
|
@@ -11404,9 +11399,13 @@ function createActionTypeProxy(appKey, actionType, imports, pinnedAuthId, pinned
|
|
|
11404
11399
|
providedConnection: init?.connection,
|
|
11405
11400
|
providedAuthenticationId: init?.authenticationId,
|
|
11406
11401
|
pinnedAuthId,
|
|
11407
|
-
pinnedConnection
|
|
11408
|
-
errorContext: `Connection is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId/connection in the fetch call.`
|
|
11402
|
+
pinnedConnection
|
|
11409
11403
|
});
|
|
11404
|
+
if (connectionId == null && connection == null) {
|
|
11405
|
+
throw new ZapierValidationError(
|
|
11406
|
+
`Connection is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId/connection in the fetch call.`
|
|
11407
|
+
);
|
|
11408
|
+
}
|
|
11410
11409
|
return imports.fetch(url, {
|
|
11411
11410
|
...init,
|
|
11412
11411
|
connection: connectionId ?? connection
|
|
@@ -11460,11 +11459,6 @@ function createAppProxy(appKey, imports) {
|
|
|
11460
11459
|
"Cannot specify both connectionId/authenticationId and connection. Use connectionId for a direct ID, or connection for an alias or numeric ID."
|
|
11461
11460
|
);
|
|
11462
11461
|
}
|
|
11463
|
-
if (resolvedConnectionId == null && resolvedConnection == null) {
|
|
11464
|
-
throw new ZapierValidationError(
|
|
11465
|
-
`Connection is required. Use sdk.apps.${appKey}({ connectionId: "..." }) or sdk.apps.${appKey}({ connection: "name" })`
|
|
11466
|
-
);
|
|
11467
|
-
}
|
|
11468
11462
|
return createPinnedAppProxy(
|
|
11469
11463
|
appKey,
|
|
11470
11464
|
imports,
|
|
@@ -11545,7 +11539,9 @@ var ListAppsSchema = ListAppsQuerySchema.omit({
|
|
|
11545
11539
|
"Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')"
|
|
11546
11540
|
).meta({ deprecated: true }),
|
|
11547
11541
|
// Override pageSize to make optional (base has default value)
|
|
11548
|
-
pageSize: z.number().min(1).optional().describe(
|
|
11542
|
+
pageSize: z.number().min(1).optional().describe(
|
|
11543
|
+
"Number of apps per page. The upstream API may cap this and reject values above its limit."
|
|
11544
|
+
),
|
|
11549
11545
|
// SDK specific property for pagination/iterable helpers
|
|
11550
11546
|
maxItems: z.number().min(1).optional().describe("Maximum total items to return across all pages"),
|
|
11551
11547
|
// SDK specific property for pagination/iterable helpers
|
|
@@ -12334,7 +12330,9 @@ var ListConnectionsQuerySchema = ListConnectionsQuerySchema$1.omit({
|
|
|
12334
12330
|
deprecationMessage: "Use --status expired instead to show only expired connections, or --status all for both."
|
|
12335
12331
|
}),
|
|
12336
12332
|
// Override pageSize to make optional
|
|
12337
|
-
pageSize: z.number().min(1).optional().describe(
|
|
12333
|
+
pageSize: z.number().min(1).optional().describe(
|
|
12334
|
+
"Number of connections per page. The upstream API may cap this and reject values above its limit."
|
|
12335
|
+
),
|
|
12338
12336
|
// SDK specific property for pagination/iterable helpers
|
|
12339
12337
|
maxItems: z.number().min(1).optional().describe("Maximum total items to return across all pages"),
|
|
12340
12338
|
// SDK specific property for pagination/iterable helpers
|
|
@@ -6903,7 +6903,7 @@ function parseDeprecationDate(value) {
|
|
|
6903
6903
|
}
|
|
6904
6904
|
|
|
6905
6905
|
// src/sdk-version.ts
|
|
6906
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.101.
|
|
6906
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.101.2" : void 0) || "unknown";
|
|
6907
6907
|
|
|
6908
6908
|
// src/utils/open-url.ts
|
|
6909
6909
|
var nodePrefix = "node:";
|
|
@@ -11345,8 +11345,7 @@ function resolveProxyConnection({
|
|
|
11345
11345
|
providedConnection,
|
|
11346
11346
|
providedAuthenticationId,
|
|
11347
11347
|
pinnedAuthId,
|
|
11348
|
-
pinnedConnection
|
|
11349
|
-
errorContext
|
|
11348
|
+
pinnedConnection
|
|
11350
11349
|
}) {
|
|
11351
11350
|
const hasDirectId = providedConnectionId != null || providedAuthenticationId != null;
|
|
11352
11351
|
if (hasDirectId && providedConnection != null) {
|
|
@@ -11364,9 +11363,6 @@ function resolveProxyConnection({
|
|
|
11364
11363
|
finalConnectionId = pinnedAuthId;
|
|
11365
11364
|
finalConnection = pinnedAuthId != null ? void 0 : pinnedConnection;
|
|
11366
11365
|
}
|
|
11367
|
-
if (finalConnectionId == null && finalConnection == null) {
|
|
11368
|
-
throw new ZapierValidationError(errorContext);
|
|
11369
|
-
}
|
|
11370
11366
|
return { connectionId: finalConnectionId, connection: finalConnection };
|
|
11371
11367
|
}
|
|
11372
11368
|
function createActionFunction(appKey, actionType, actionKey, imports, pinnedAuthId, pinnedConnection) {
|
|
@@ -11384,8 +11380,7 @@ function createActionFunction(appKey, actionType, actionKey, imports, pinnedAuth
|
|
|
11384
11380
|
providedConnection,
|
|
11385
11381
|
providedAuthenticationId,
|
|
11386
11382
|
pinnedAuthId,
|
|
11387
|
-
pinnedConnection
|
|
11388
|
-
errorContext: `Connection is required. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }) or sdk.apps.${appKey}({ connection: "name" }), or provide connectionId/connection in the action call.`
|
|
11383
|
+
pinnedConnection
|
|
11389
11384
|
});
|
|
11390
11385
|
return imports.runAction({
|
|
11391
11386
|
app: appKey,
|
|
@@ -11406,9 +11401,13 @@ function createActionTypeProxy(appKey, actionType, imports, pinnedAuthId, pinned
|
|
|
11406
11401
|
providedConnection: init?.connection,
|
|
11407
11402
|
providedAuthenticationId: init?.authenticationId,
|
|
11408
11403
|
pinnedAuthId,
|
|
11409
|
-
pinnedConnection
|
|
11410
|
-
errorContext: `Connection is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId/connection in the fetch call.`
|
|
11404
|
+
pinnedConnection
|
|
11411
11405
|
});
|
|
11406
|
+
if (connectionId == null && connection == null) {
|
|
11407
|
+
throw new ZapierValidationError(
|
|
11408
|
+
`Connection is required for fetch. Either use the factory pattern: sdk.apps.${appKey}({ connectionId }).fetch(...) or provide connectionId/connection in the fetch call.`
|
|
11409
|
+
);
|
|
11410
|
+
}
|
|
11412
11411
|
return imports.fetch(url, {
|
|
11413
11412
|
...init,
|
|
11414
11413
|
connection: connectionId ?? connection
|
|
@@ -11462,11 +11461,6 @@ function createAppProxy(appKey, imports) {
|
|
|
11462
11461
|
"Cannot specify both connectionId/authenticationId and connection. Use connectionId for a direct ID, or connection for an alias or numeric ID."
|
|
11463
11462
|
);
|
|
11464
11463
|
}
|
|
11465
|
-
if (resolvedConnectionId == null && resolvedConnection == null) {
|
|
11466
|
-
throw new ZapierValidationError(
|
|
11467
|
-
`Connection is required. Use sdk.apps.${appKey}({ connectionId: "..." }) or sdk.apps.${appKey}({ connection: "name" })`
|
|
11468
|
-
);
|
|
11469
|
-
}
|
|
11470
11464
|
return createPinnedAppProxy(
|
|
11471
11465
|
appKey,
|
|
11472
11466
|
imports,
|
|
@@ -11547,7 +11541,9 @@ var ListAppsSchema = apps.ListAppsQuerySchema.omit({
|
|
|
11547
11541
|
"Filter apps by app keys (e.g., 'SlackCLIAPI' or slug like 'github')"
|
|
11548
11542
|
).meta({ deprecated: true }),
|
|
11549
11543
|
// Override pageSize to make optional (base has default value)
|
|
11550
|
-
pageSize: zod.z.number().min(1).optional().describe(
|
|
11544
|
+
pageSize: zod.z.number().min(1).optional().describe(
|
|
11545
|
+
"Number of apps per page. The upstream API may cap this and reject values above its limit."
|
|
11546
|
+
),
|
|
11551
11547
|
// SDK specific property for pagination/iterable helpers
|
|
11552
11548
|
maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
|
|
11553
11549
|
// SDK specific property for pagination/iterable helpers
|
|
@@ -12336,7 +12332,9 @@ var ListConnectionsQuerySchema = connections.ListConnectionsQuerySchema.omit({
|
|
|
12336
12332
|
deprecationMessage: "Use --status expired instead to show only expired connections, or --status all for both."
|
|
12337
12333
|
}),
|
|
12338
12334
|
// Override pageSize to make optional
|
|
12339
|
-
pageSize: zod.z.number().min(1).optional().describe(
|
|
12335
|
+
pageSize: zod.z.number().min(1).optional().describe(
|
|
12336
|
+
"Number of connections per page. The upstream API may cap this and reject values above its limit."
|
|
12337
|
+
),
|
|
12340
12338
|
// SDK specific property for pagination/iterable helpers
|
|
12341
12339
|
maxItems: zod.z.number().min(1).optional().describe("Maximum total items to return across all pages"),
|
|
12342
12340
|
// SDK specific property for pagination/iterable helpers
|