@zapier/zapier-sdk 0.37.0 → 0.39.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 +12 -0
- package/README.md +56 -49
- package/dist/apps.cjs +9036 -0
- package/dist/apps.d.mts +23 -0
- package/dist/apps.d.ts +23 -0
- package/dist/apps.mjs +9034 -0
- package/dist/define/apps-entrypoint.d.ts +3 -0
- package/dist/define/apps-entrypoint.d.ts.map +1 -0
- package/dist/define/apps-entrypoint.js +1 -0
- package/dist/define/apps-registry-keys.d.ts +2 -0
- package/dist/define/apps-registry-keys.d.ts.map +1 -0
- package/dist/define/apps-registry-keys.js +2 -0
- package/dist/define/apps-registry.d.ts +13 -0
- package/dist/define/apps-registry.d.ts.map +1 -0
- package/dist/define/apps-registry.js +31 -0
- package/dist/define/apps-registry.json +9010 -0
- package/dist/define/apps.d.ts +11 -0
- package/dist/define/apps.d.ts.map +1 -0
- package/dist/define/apps.js +2 -0
- package/dist/define/define.d.ts +13 -0
- package/dist/define/define.d.ts.map +1 -0
- package/dist/define/define.js +93 -0
- package/dist/define/helpers.d.ts +8 -0
- package/dist/define/helpers.d.ts.map +1 -0
- package/dist/define/helpers.js +6 -0
- package/dist/define/index.d.ts +5 -0
- package/dist/define/index.d.ts.map +1 -0
- package/dist/define/index.js +2 -0
- package/dist/define/types.d.ts +235 -0
- package/dist/define/types.d.ts.map +1 -0
- package/dist/define/types.js +1 -0
- package/dist/define.cjs +113 -0
- package/dist/define.d.mts +254 -0
- package/dist/define.d.ts +254 -0
- package/dist/define.mjs +107 -0
- package/dist/index.cjs +145 -41
- package/dist/index.d.mts +38 -7
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.mjs +145 -42
- package/dist/plugins/capabilities/index.d.ts +22 -0
- package/dist/plugins/capabilities/index.d.ts.map +1 -0
- package/dist/plugins/capabilities/index.js +76 -0
- 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 +2 -1
- package/dist/plugins/listConnections/index.d.ts.map +1 -1
- package/dist/plugins/listConnections/index.js +10 -3
- 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 +5 -0
- package/dist/plugins/manifest/index.d.ts +1 -0
- package/dist/plugins/manifest/index.d.ts.map +1 -1
- package/dist/plugins/manifest/index.js +1 -0
- package/dist/plugins/manifest/schemas.d.ts +9 -0
- package/dist/plugins/manifest/schemas.d.ts.map +1 -1
- package/dist/plugins/manifest/schemas.js +9 -0
- package/dist/plugins/tables/deleteTable/index.d.ts +2 -1
- package/dist/plugins/tables/deleteTable/index.d.ts.map +1 -1
- package/dist/plugins/tables/deleteTable/index.js +1 -0
- package/dist/plugins/tables/listTables/index.d.ts +2 -1
- package/dist/plugins/tables/listTables/index.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/index.js +14 -6
- package/dist/plugins/tables/listTables/schemas.d.ts +1 -0
- package/dist/plugins/tables/listTables/schemas.d.ts.map +1 -1
- package/dist/plugins/tables/listTables/schemas.js +5 -1
- package/dist/resolvers/connectionId.d.ts.map +1 -1
- package/dist/resolvers/connectionId.js +13 -23
- package/dist/resolvers/tableId.d.ts.map +1 -1
- package/dist/resolvers/tableId.js +17 -6
- package/dist/sdk.d.ts +3 -2
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +3 -0
- package/dist/types/sdk.d.ts +3 -0
- package/dist/types/sdk.d.ts.map +1 -1
- package/dist/types/sdk.js +9 -0
- package/dist/utils/pagination-utils.d.ts +6 -0
- package/dist/utils/pagination-utils.d.ts.map +1 -1
- package/dist/utils/pagination-utils.js +8 -0
- package/dist/utils/schema-utils.d.ts +6 -1
- package/dist/utils/schema-utils.d.ts.map +1 -1
- package/package.json +23 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @zapier/zapier-sdk
|
|
2
2
|
|
|
3
|
+
## 0.39.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- a20d36a: Add define primitives (defineTool, defineDurable, defineComponent) via @zapier/zapier-sdk/define entrypoint and app registry via @zapier/zapier-sdk/apps entrypoint.
|
|
8
|
+
|
|
9
|
+
## 0.38.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 2906101: Default `listConnections` and `listTables` to only return your own items. Gate shared access and table deletion behind boolean flags: `canIncludeSharedConnections`, `canIncludeSharedTables`, `canDeleteTables`. Set via SDK options, `.zapierrc`, CLI flags (`--can-delete-tables`), or env vars (`ZAPIER_CAN_DELETE_TABLES=true`).
|
|
14
|
+
|
|
3
15
|
## 0.37.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -320,14 +320,17 @@ console.log(emojiData.emoji);
|
|
|
320
320
|
|
|
321
321
|
The `createZapierSdk(...)` factory function is the main entry point for the SDK. It provides methods for managing connections, listing apps, running actions, and more.
|
|
322
322
|
|
|
323
|
-
| Name
|
|
324
|
-
|
|
|
325
|
-
| `credentials`
|
|
326
|
-
| `debug`
|
|
327
|
-
| `baseUrl`
|
|
328
|
-
| `trackingBaseUrl`
|
|
329
|
-
| `maxNetworkRetries`
|
|
330
|
-
| `maxNetworkRetryDelayMs`
|
|
323
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
324
|
+
| ----------------------------- | -------------------------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
325
|
+
| `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. |
|
|
326
|
+
| `debug` | `boolean` | ❌ | — | — | Enable debug logging. |
|
|
327
|
+
| `baseUrl` | `string` | ❌ | — | — | Base URL for Zapier API endpoints. |
|
|
328
|
+
| `trackingBaseUrl` | `string` | ❌ | — | — | Base URL for Zapier tracking endpoints. |
|
|
329
|
+
| `maxNetworkRetries` | `number` | ❌ | — | — | Max retries for rate-limited requests (default: 3). |
|
|
330
|
+
| `maxNetworkRetryDelayMs` | `number` | ❌ | — | — | Max delay in ms to wait for retry (default: 60000). |
|
|
331
|
+
| `canIncludeSharedConnections` | `boolean` | ❌ | — | — | Allow listing shared connections. |
|
|
332
|
+
| `canIncludeSharedTables` | `boolean` | ❌ | — | — | Allow listing shared tables. |
|
|
333
|
+
| `canDeleteTables` | `boolean` | ❌ | — | — | Allow deleting tables. |
|
|
331
334
|
|
|
332
335
|
## Named Connections
|
|
333
336
|
|
|
@@ -862,15 +865,16 @@ Find the first connection matching the criteria
|
|
|
862
865
|
|
|
863
866
|
**Parameters:**
|
|
864
867
|
|
|
865
|
-
| Name
|
|
866
|
-
|
|
|
867
|
-
| `options`
|
|
868
|
-
| ↳ `search`
|
|
869
|
-
| ↳ `title`
|
|
870
|
-
| ↳ `owner`
|
|
871
|
-
| ↳ `appKey`
|
|
872
|
-
| ↳ `accountId`
|
|
873
|
-
| ↳ `
|
|
868
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
869
|
+
| ----------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
870
|
+
| `options` | `object` | ✅ | — | — | |
|
|
871
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
872
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
873
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
874
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
875
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
|
|
876
|
+
| ↳ `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. |
|
|
877
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
|
|
874
878
|
|
|
875
879
|
**Returns:** `Promise<ConnectionItem>`
|
|
876
880
|
|
|
@@ -886,15 +890,16 @@ Find a unique connection matching the criteria
|
|
|
886
890
|
|
|
887
891
|
**Parameters:**
|
|
888
892
|
|
|
889
|
-
| Name
|
|
890
|
-
|
|
|
891
|
-
| `options`
|
|
892
|
-
| ↳ `search`
|
|
893
|
-
| ↳ `title`
|
|
894
|
-
| ↳ `owner`
|
|
895
|
-
| ↳ `appKey`
|
|
896
|
-
| ↳ `accountId`
|
|
897
|
-
| ↳ `
|
|
893
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
894
|
+
| ----------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
895
|
+
| `options` | `object` | ✅ | — | — | |
|
|
896
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
897
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
898
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
899
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
900
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
|
|
901
|
+
| ↳ `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. |
|
|
902
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
|
|
898
903
|
|
|
899
904
|
**Returns:** `Promise<ConnectionItem>`
|
|
900
905
|
|
|
@@ -929,19 +934,20 @@ List available connections with optional filtering
|
|
|
929
934
|
|
|
930
935
|
**Parameters:**
|
|
931
936
|
|
|
932
|
-
| Name | Type | Required | Default | Possible Values | Description
|
|
933
|
-
| ----------------- | --------- | -------- | ------- | --------------- |
|
|
934
|
-
| `options` | `object` | ✅ | — | — |
|
|
935
|
-
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title
|
|
936
|
-
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally)
|
|
937
|
-
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID
|
|
938
|
-
| ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github')
|
|
939
|
-
| ↳ `connectionIds` | `array` | ❌ | — | — | List of connection IDs to filter by
|
|
940
|
-
| ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by
|
|
941
|
-
| ↳ `
|
|
942
|
-
| ↳ `
|
|
943
|
-
| ↳ `
|
|
944
|
-
| ↳ `
|
|
937
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
938
|
+
| ----------------- | --------- | -------- | ------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
939
|
+
| `options` | `object` | ✅ | — | — | |
|
|
940
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter connections by title |
|
|
941
|
+
| ↳ `title` | `string` | ❌ | — | — | Filter connections by exact title match (searches first, then filters locally) |
|
|
942
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by owner, 'me' for your own connections or a specific user ID |
|
|
943
|
+
| ↳ `appKey` | `string` | ❌ | — | — | App key of connections to list (e.g., 'SlackCLIAPI' or slug like 'github') |
|
|
944
|
+
| ↳ `connectionIds` | `array` | ❌ | — | — | List of connection IDs to filter by |
|
|
945
|
+
| ↳ `accountId` | `string` | ❌ | — | — | Account ID to filter by |
|
|
946
|
+
| ↳ `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. |
|
|
947
|
+
| ↳ `isExpired` | `boolean` | ❌ | — | — | Filter by expired status |
|
|
948
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of connections per page |
|
|
949
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
950
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
945
951
|
|
|
946
952
|
**Returns:** `Promise<PaginatedResult<ConnectionItem>>`
|
|
947
953
|
|
|
@@ -1263,16 +1269,17 @@ List tables available to the authenticated user
|
|
|
1263
1269
|
|
|
1264
1270
|
**Parameters:**
|
|
1265
1271
|
|
|
1266
|
-
| Name
|
|
1267
|
-
|
|
|
1268
|
-
| `options`
|
|
1269
|
-
| ↳ `tableIds`
|
|
1270
|
-
| ↳ `kind`
|
|
1271
|
-
| ↳ `search`
|
|
1272
|
-
| ↳ `owner`
|
|
1273
|
-
| ↳ `
|
|
1274
|
-
| ↳ `
|
|
1275
|
-
| ↳ `
|
|
1272
|
+
| Name | Type | Required | Default | Possible Values | Description |
|
|
1273
|
+
| ----------------- | --------- | -------- | ------- | -------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
|
1274
|
+
| `options` | `object` | ✅ | — | — | |
|
|
1275
|
+
| ↳ `tableIds` | `array` | ❌ | — | — | Filter by specific table IDs |
|
|
1276
|
+
| ↳ `kind` | `string` | ❌ | — | `table`, `virtual_table`, `both` | Filter by table type |
|
|
1277
|
+
| ↳ `search` | `string` | ❌ | — | — | Search term to filter tables by name |
|
|
1278
|
+
| ↳ `owner` | `string` | ❌ | — | — | Filter by table owner. Use "me" for the current user, or a numeric user ID. Requires includeShared to be true. |
|
|
1279
|
+
| ↳ `includeShared` | `boolean` | ❌ | — | — | Include tables shared with you. Without this, only your own tables are returned. |
|
|
1280
|
+
| ↳ `pageSize` | `number` | ❌ | — | — | Number of tables per page |
|
|
1281
|
+
| ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
|
|
1282
|
+
| ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
|
|
1276
1283
|
|
|
1277
1284
|
**Returns:** `Promise<PaginatedResult<TableItem>>`
|
|
1278
1285
|
|