@zapier/zapier-sdk 0.45.1 → 0.45.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 +6 -0
- package/README.md +5 -5
- package/dist/index.cjs +10 -7
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +10 -7
- package/dist/plugins/getApp/index.js +1 -1
- package/dist/plugins/listApps/index.js +2 -2
- package/dist/plugins/listApps/schemas.d.ts.map +1 -1
- package/dist/plugins/listApps/schemas.js +2 -0
- package/dist/plugins/listClientCredentials/index.js +1 -1
- package/dist/plugins/listClientCredentials/schemas.d.ts.map +1 -1
- package/dist/plugins/listClientCredentials/schemas.js +1 -0
- package/dist/schemas/Connection.d.ts +3 -0
- package/dist/schemas/Connection.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.45.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 783e180: Convert API query params from camelCase to snake_case (appKeys -> app_keys, pageSize -> page_size) to match the updated API contract. Also updated all `zapier-sdk-*` packages to Zod to 4.3.6
|
|
8
|
+
|
|
3
9
|
## 0.45.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1081,11 +1081,11 @@ Delete one or more fields from a table
|
|
|
1081
1081
|
|
|
1082
1082
|
**Parameters:**
|
|
1083
1083
|
|
|
1084
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
1085
|
-
| ---------- | -------- | -------- | ------- | --------------- |
|
|
1086
|
-
| `options` | `object` | ✅ | — | — |
|
|
1087
|
-
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table
|
|
1088
|
-
| ↳ `fields` | `array` | ✅ | — | — |
|
|
1084
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1085
|
+
| ---------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------- |
|
|
1086
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1087
|
+
| ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
|
|
1088
|
+
| ↳ `fields` | `array` | ✅ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
|
|
1089
1089
|
|
|
1090
1090
|
**Returns:** `Promise<any>`
|
|
1091
1091
|
|
package/dist/index.cjs
CHANGED
|
@@ -1546,7 +1546,9 @@ function createPaginatedFunction(coreFn, schema, telemetry, explicitFunctionName
|
|
|
1546
1546
|
return namedFunctions[functionName];
|
|
1547
1547
|
}
|
|
1548
1548
|
var ListAppsSchema = apps.ListAppsQuerySchema.omit({
|
|
1549
|
-
offset: true
|
|
1549
|
+
offset: true,
|
|
1550
|
+
app_keys: true,
|
|
1551
|
+
page_size: true
|
|
1550
1552
|
}).extend({
|
|
1551
1553
|
// New name for appKeys
|
|
1552
1554
|
apps: AppsPropertySchema.optional().describe(
|
|
@@ -1656,10 +1658,10 @@ var listAppsPlugin = (sdk) => {
|
|
|
1656
1658
|
});
|
|
1657
1659
|
return await api.get("/api/v0/apps", {
|
|
1658
1660
|
searchParams: {
|
|
1659
|
-
|
|
1661
|
+
app_keys: implementationIds.join(","),
|
|
1660
1662
|
...options.search && { search: options.search },
|
|
1661
1663
|
...options.pageSize !== void 0 && {
|
|
1662
|
-
|
|
1664
|
+
page_size: options.pageSize.toString()
|
|
1663
1665
|
},
|
|
1664
1666
|
...options.cursor && { offset: options.cursor }
|
|
1665
1667
|
}
|
|
@@ -3599,7 +3601,8 @@ var listConnectionsPlugin = (sdk) => {
|
|
|
3599
3601
|
};
|
|
3600
3602
|
};
|
|
3601
3603
|
var ListClientCredentialsQuerySchema = clientCredentials.ListClientCredentialsQuerySchema.omit({
|
|
3602
|
-
offset: true
|
|
3604
|
+
offset: true,
|
|
3605
|
+
page_size: true
|
|
3603
3606
|
}).extend({
|
|
3604
3607
|
// Override pageSize to make optional
|
|
3605
3608
|
pageSize: zod.z.number().min(1).optional().describe("Number of credentials per page"),
|
|
@@ -3657,7 +3660,7 @@ var listClientCredentialsPlugin = (sdk) => {
|
|
|
3657
3660
|
const { api } = sdk.context;
|
|
3658
3661
|
const searchParams = {};
|
|
3659
3662
|
if (options.pageSize !== void 0) {
|
|
3660
|
-
searchParams.
|
|
3663
|
+
searchParams.page_size = options.pageSize.toString();
|
|
3661
3664
|
}
|
|
3662
3665
|
if (options.cursor) {
|
|
3663
3666
|
searchParams.offset = options.cursor;
|
|
@@ -3855,7 +3858,7 @@ var getAppPlugin = (sdk) => {
|
|
|
3855
3858
|
async function getApp(options) {
|
|
3856
3859
|
const appKey = "app" in options ? options.app : options.appKey;
|
|
3857
3860
|
const appsIterable = sdk.listApps({
|
|
3858
|
-
|
|
3861
|
+
apps: [appKey]
|
|
3859
3862
|
}).items();
|
|
3860
3863
|
for await (const app of appsIterable) {
|
|
3861
3864
|
return {
|
|
@@ -5746,7 +5749,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
5746
5749
|
}
|
|
5747
5750
|
|
|
5748
5751
|
// src/sdk-version.ts
|
|
5749
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.45.
|
|
5752
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.45.2" : void 0) || "unknown";
|
|
5750
5753
|
|
|
5751
5754
|
// src/utils/open-url.ts
|
|
5752
5755
|
var nodePrefix = "node:";
|
package/dist/index.d.mts
CHANGED
|
@@ -2106,6 +2106,9 @@ declare const ConnectionItemSchema: z.ZodObject<{
|
|
|
2106
2106
|
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
2107
2107
|
members: z.ZodOptional<z.ZodString>;
|
|
2108
2108
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
2109
|
+
public_id: z.ZodOptional<z.ZodString>;
|
|
2110
|
+
account_public_id: z.ZodOptional<z.ZodString>;
|
|
2111
|
+
customuser_public_id: z.ZodOptional<z.ZodString>;
|
|
2109
2112
|
id: z.ZodString;
|
|
2110
2113
|
account_id: z.ZodString;
|
|
2111
2114
|
implementation_id: z.ZodOptional<z.ZodString>;
|
package/dist/index.mjs
CHANGED
|
@@ -1544,7 +1544,9 @@ function createPaginatedFunction(coreFn, schema, telemetry, explicitFunctionName
|
|
|
1544
1544
|
return namedFunctions[functionName];
|
|
1545
1545
|
}
|
|
1546
1546
|
var ListAppsSchema = ListAppsQuerySchema.omit({
|
|
1547
|
-
offset: true
|
|
1547
|
+
offset: true,
|
|
1548
|
+
app_keys: true,
|
|
1549
|
+
page_size: true
|
|
1548
1550
|
}).extend({
|
|
1549
1551
|
// New name for appKeys
|
|
1550
1552
|
apps: AppsPropertySchema.optional().describe(
|
|
@@ -1654,10 +1656,10 @@ var listAppsPlugin = (sdk) => {
|
|
|
1654
1656
|
});
|
|
1655
1657
|
return await api.get("/api/v0/apps", {
|
|
1656
1658
|
searchParams: {
|
|
1657
|
-
|
|
1659
|
+
app_keys: implementationIds.join(","),
|
|
1658
1660
|
...options.search && { search: options.search },
|
|
1659
1661
|
...options.pageSize !== void 0 && {
|
|
1660
|
-
|
|
1662
|
+
page_size: options.pageSize.toString()
|
|
1661
1663
|
},
|
|
1662
1664
|
...options.cursor && { offset: options.cursor }
|
|
1663
1665
|
}
|
|
@@ -3597,7 +3599,8 @@ var listConnectionsPlugin = (sdk) => {
|
|
|
3597
3599
|
};
|
|
3598
3600
|
};
|
|
3599
3601
|
var ListClientCredentialsQuerySchema = ListClientCredentialsQuerySchema$1.omit({
|
|
3600
|
-
offset: true
|
|
3602
|
+
offset: true,
|
|
3603
|
+
page_size: true
|
|
3601
3604
|
}).extend({
|
|
3602
3605
|
// Override pageSize to make optional
|
|
3603
3606
|
pageSize: z.number().min(1).optional().describe("Number of credentials per page"),
|
|
@@ -3655,7 +3658,7 @@ var listClientCredentialsPlugin = (sdk) => {
|
|
|
3655
3658
|
const { api } = sdk.context;
|
|
3656
3659
|
const searchParams = {};
|
|
3657
3660
|
if (options.pageSize !== void 0) {
|
|
3658
|
-
searchParams.
|
|
3661
|
+
searchParams.page_size = options.pageSize.toString();
|
|
3659
3662
|
}
|
|
3660
3663
|
if (options.cursor) {
|
|
3661
3664
|
searchParams.offset = options.cursor;
|
|
@@ -3853,7 +3856,7 @@ var getAppPlugin = (sdk) => {
|
|
|
3853
3856
|
async function getApp(options) {
|
|
3854
3857
|
const appKey = "app" in options ? options.app : options.appKey;
|
|
3855
3858
|
const appsIterable = sdk.listApps({
|
|
3856
|
-
|
|
3859
|
+
apps: [appKey]
|
|
3857
3860
|
}).items();
|
|
3858
3861
|
for await (const app of appsIterable) {
|
|
3859
3862
|
return {
|
|
@@ -5744,7 +5747,7 @@ async function invalidateCredentialsToken(options) {
|
|
|
5744
5747
|
}
|
|
5745
5748
|
|
|
5746
5749
|
// src/sdk-version.ts
|
|
5747
|
-
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.45.
|
|
5750
|
+
var SDK_VERSION = (typeof process !== "undefined" && process.env ? "0.45.2" : void 0) || "unknown";
|
|
5748
5751
|
|
|
5749
5752
|
// src/utils/open-url.ts
|
|
5750
5753
|
var nodePrefix = "node:";
|
|
@@ -42,10 +42,10 @@ export const listAppsPlugin = (sdk) => {
|
|
|
42
42
|
});
|
|
43
43
|
return await api.get("/api/v0/apps", {
|
|
44
44
|
searchParams: {
|
|
45
|
-
|
|
45
|
+
app_keys: implementationIds.join(","),
|
|
46
46
|
...(options.search && { search: options.search }),
|
|
47
47
|
...(options.pageSize !== undefined && {
|
|
48
|
-
|
|
48
|
+
page_size: options.pageSize.toString(),
|
|
49
49
|
}),
|
|
50
50
|
...(options.cursor && { offset: options.cursor }),
|
|
51
51
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listApps/schemas.ts"],"names":[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AAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAG7D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,aAAa,GAAG,cAAc,GAAG,qBAAqB,CAAC;AAGnE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,oBAAoB,CAAC,eAAe,GAAG,SAAS,EAAE,OAAO,CAAC,CAAC;CACtE"}
|
|
@@ -10,7 +10,7 @@ export const listClientCredentialsPlugin = (sdk) => {
|
|
|
10
10
|
const { api } = sdk.context;
|
|
11
11
|
const searchParams = {};
|
|
12
12
|
if (options.pageSize !== undefined) {
|
|
13
|
-
searchParams.
|
|
13
|
+
searchParams.page_size = options.pageSize.toString();
|
|
14
14
|
}
|
|
15
15
|
if (options.cursor) {
|
|
16
16
|
searchParams.offset = options.cursor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listClientCredentials/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAEnG,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,eAAO,MAAM,gCAAgC;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/plugins/listClientCredentials/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAEnG,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAC5B,eAAO,MAAM,gCAAgC;;;;iBAqBsB,CAAC;AAGpE,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,gCAAgC,CACxC,CAAC;AAGF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,qBAAqB,EAAE,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAGD,MAAM,MAAM,0BAA0B,GAClC,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB,EAAE,oBAAoB,CACzC,4BAA4B,EAC5B,qBAAqB,CACtB,CAAC;CACH"}
|
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { ListClientCredentialsQuerySchema as ListClientCredentialsQueryBase } from "@zapier/zapier-sdk-core/v0/schemas/client-credentials";
|
|
3
3
|
export const ListClientCredentialsQuerySchema = ListClientCredentialsQueryBase.omit({
|
|
4
4
|
offset: true,
|
|
5
|
+
page_size: true,
|
|
5
6
|
})
|
|
6
7
|
.extend({
|
|
7
8
|
// Override pageSize to make optional
|
|
@@ -16,6 +16,9 @@ export declare const ConnectionItemSchema: z.ZodObject<{
|
|
|
16
16
|
groups: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
17
17
|
members: z.ZodOptional<z.ZodString>;
|
|
18
18
|
permissions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
|
|
19
|
+
public_id: z.ZodOptional<z.ZodString>;
|
|
20
|
+
account_public_id: z.ZodOptional<z.ZodString>;
|
|
21
|
+
customuser_public_id: z.ZodOptional<z.ZodString>;
|
|
19
22
|
id: z.ZodString;
|
|
20
23
|
account_id: z.ZodString;
|
|
21
24
|
implementation_id: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../src/schemas/Connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQ7B,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"Connection.d.ts","sourceRoot":"","sources":["../../src/schemas/Connection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQ7B,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6B/B,CAAC;AAMH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.2",
|
|
4
4
|
"description": "Complete Zapier SDK - combines all Zapier SDK packages",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -75,8 +75,8 @@
|
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@zapier/policy-context": "0.7.0",
|
|
77
77
|
"@zapier/policy-schema": "0.11.0",
|
|
78
|
-
"@zapier/zapier-sdk-core": "
|
|
79
|
-
"zod": "4.
|
|
78
|
+
"@zapier/zapier-sdk-core": "0.12.0",
|
|
79
|
+
"zod": "4.3.6"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@types/node": "^24.0.1",
|