@zapier/zapier-sdk 0.43.0 → 0.44.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.44.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fd8660c: Allow UUID connection IDs in the `.zapierrc` connections map. `ConnectionEntrySchema.connectionId` now accepts either a positive integer (legacy form) or a UUID-format string (returned by the Zapier connections API for newer connections).
8
+
3
9
  ## 0.43.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -338,18 +338,18 @@ const zapier = createZapierSdk({
338
338
  manifest: {
339
339
  apps: { slack: { implementationName: "SlackCLIAPI", version: "1.21.1" } },
340
340
  connections: {
341
- slack_work: { connectionId: 12345 },
341
+ slack_work: { connectionId: "01234567-89ab-cdef-0123-456789abcdef" },
342
342
  google_sheets: { connectionId: 67890 },
343
343
  },
344
344
  },
345
345
  });
346
346
  ```
347
347
 
348
- Each connection entry maps a name to a `connectionId`. App version resolution is handled separately via the `apps` section of `.zapierrc`.
348
+ Each connection entry maps a name to a `connectionId`. The Zapier connections API returns UUID-format IDs (the `id` field on entries from `listConnections`); positive integers from older connections are also accepted. App version resolution is handled separately via the `apps` section of `.zapierrc`.
349
349
 
350
350
  ### Using named connections
351
351
 
352
- Reference connections using the `connection` parameter. Pass a connection name to be resolved from the connections map or a connection ID to be used directly.
352
+ Reference connections using the `connection` parameter. Pass a connection name to be resolved from the connections map, or a connection ID to be used directly.
353
353
 
354
354
  ```typescript
355
355
  // Per-call with alias
@@ -372,8 +372,10 @@ await zapier.fetch("https://slack.com/api/auth.test", {
372
372
  connection: "slack_work",
373
373
  });
374
374
 
375
- // Direct connection ID also works
376
- await zapier.apps.slack.read.channels({ connection: 12345 });
375
+ // Direct connection ID also works (UUID or legacy positive integer)
376
+ await zapier.apps.slack.read.channels({
377
+ connection: "01234567-89ab-cdef-0123-456789abcdef",
378
+ });
377
379
  ```
378
380
 
379
381
  ## Available Functions
@@ -431,14 +433,14 @@ Get the JSON Schema representation of input fields for an action. Returns a JSON
431
433
 
432
434
  **Parameters:**
433
435
 
434
- | Name | Type | Required | Default | Possible Values | Description |
435
- | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
436
- | `options` | `object` | ✅ | — | — | |
437
- | ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
438
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
439
- | ↳ `action` | `string` | ✅ | — | — | Action key to get the input schema for |
440
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId. |
441
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
436
+ | Name | Type | Required | Default | Possible Values | Description |
437
+ | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
438
+ | `options` | `object` | ✅ | — | — | |
439
+ | ↳ `app` | `string` | ✅ | — | — | App key (e.g., 'SlackCLIAPI' or slug like 'github') to get the input schema for |
440
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
441
+ | ↳ `action` | `string` | ✅ | — | — | Action key to get the input schema for |
442
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
443
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect the schema (e.g., when fields depend on other field values) |
442
444
 
443
445
  **Returns:** `Promise<InputSchemaItem>`
444
446
 
@@ -500,19 +502,19 @@ Get the available choices for a dynamic dropdown input field
500
502
 
501
503
  **Parameters:**
502
504
 
503
- | Name | Type | Required | Default | Possible Values | Description |
504
- | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
505
- | `options` | `object` | ✅ | — | — | |
506
- | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
507
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
508
- | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
509
- | ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
510
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId. |
511
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
512
- | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
513
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
514
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
515
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
505
+ | Name | Type | Required | Default | Possible Values | Description |
506
+ | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
507
+ | `options` | `object` | ✅ | — | — | |
508
+ | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
509
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
510
+ | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
511
+ | ↳ `inputField` | `string` | ✅ | — | — | Input field key to get choices for |
512
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
513
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available choices |
514
+ | ↳ `page` | `number` | ❌ | — | — | Page number for paginated results |
515
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of choices per page |
516
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
517
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
516
518
 
517
519
  **Returns:** `Promise<PaginatedResult<InputFieldChoiceItem>>`
518
520
 
@@ -557,17 +559,17 @@ Get the input fields required for a specific action
557
559
 
558
560
  **Parameters:**
559
561
 
560
- | Name | Type | Required | Default | Possible Values | Description |
561
- | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
562
- | `options` | `object` | ✅ | — | — | |
563
- | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
564
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
565
- | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
566
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId. |
567
- | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
568
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
569
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
570
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
562
+ | Name | Type | Required | Default | Possible Values | Description |
563
+ | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
564
+ | `options` | `object` | ✅ | — | — | |
565
+ | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
566
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
567
+ | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
568
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
569
+ | ↳ `inputs` | `object` | ❌ | — | — | Current input values that may affect available fields |
570
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of input fields per page |
571
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
572
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
571
573
 
572
574
  **Returns:** `Promise<PaginatedResult<RootFieldItemItem>>`
573
575
 
@@ -608,18 +610,18 @@ Execute an action with the given inputs
608
610
 
609
611
  **Parameters:**
610
612
 
611
- | Name | Type | Required | Default | Possible Values | Description |
612
- | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
613
- | `options` | `object` | ✅ | — | — | |
614
- | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
615
- | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
616
- | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
617
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId. |
618
- | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
619
- | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
620
- | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
621
- | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
622
- | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
613
+ | Name | Type | Required | Default | Possible Values | Description |
614
+ | -------------- | ---------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
615
+ | `options` | `object` | ✅ | — | — | |
616
+ | ↳ `app` | `string` | ✅ | — | — | App slug (e.g., 'github'), implementation name (e.g., 'SlackCLIAPI'), or versioned ID (e.g., 'github@1.2.3') |
617
+ | ↳ `actionType` | `string` | ✅ | — | `read`, `read_bulk`, `write`, `run`, `search`, `search_or_write`, `search_and_write`, `filter` | Action type that matches the action's defined type |
618
+ | ↳ `action` | `string` | ✅ | — | — | Action key (e.g., 'send_message' or 'find_row') |
619
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId. |
620
+ | ↳ `inputs` | `object` | ❌ | — | — | Input parameters for the action |
621
+ | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
622
+ | ↳ `pageSize` | `number` | ❌ | — | — | Number of results per page |
623
+ | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
624
+ | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
623
625
 
624
626
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
625
627
 
@@ -662,10 +664,10 @@ Bind a connection alias or numeric connectionId to an app
662
664
 
663
665
  **Parameters:**
664
666
 
665
- | Name | Type | Required | Default | Possible Values | Description |
666
- | -------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
667
- | `options` | `object` | ✅ | — | — | |
668
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. |
667
+ | Name | Type | Required | Default | Possible Values | Description |
668
+ | -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
669
+ | `options` | `object` | ✅ | — | — | |
670
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
669
671
 
670
672
  **Returns:** `Promise<AppProxy>`
671
673
 
@@ -681,12 +683,12 @@ Execute an action with the given inputs for the bound app, as an alternative to
681
683
 
682
684
  **Parameters:**
683
685
 
684
- | Name | Type | Required | Default | Possible Values | Description |
685
- | -------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
686
- | `options` | `object` | ✅ | — | — | |
687
- | ↳ `inputs` | `object` | ❌ | — | — | |
688
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. |
689
- | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
686
+ | Name | Type | Required | Default | Possible Values | Description |
687
+ | -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
688
+ | `options` | `object` | ✅ | — | — | |
689
+ | ↳ `inputs` | `object` | ❌ | — | — | |
690
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
691
+ | ↳ `timeoutMs` | `number` | ❌ | — | — | Maximum time to wait for action completion in milliseconds (default: 180000) |
690
692
 
691
693
  **Returns:** `Promise<PaginatedResult<ActionResultItem>>`
692
694
 
@@ -901,10 +903,10 @@ Execute getConnection
901
903
 
902
904
  **Parameters:**
903
905
 
904
- | Name | Type | Required | Default | Possible Values | Description |
905
- | -------------- | ---------------- | -------- | ------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------- |
906
- | `options` | `object` | ✅ | — | — | |
907
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. |
906
+ | Name | Type | Required | Default | Possible Values | Description |
907
+ | -------------- | ---------------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
908
+ | `options` | `object` | ✅ | — | — | |
909
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
908
910
 
909
911
  **Returns:** `Promise<ConnectionItem>`
910
912
 
@@ -962,16 +964,16 @@ Make authenticated HTTP requests to any API through Zapier. Pass a connectionId
962
964
 
963
965
  **Parameters:**
964
966
 
965
- | Name | Type | Required | Default | Possible Values | Description |
966
- | --------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
967
- | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
968
- | `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
969
- | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
970
- | ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
971
- | ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
972
- | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. |
973
- | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
974
- | ↳ `maxTime` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
967
+ | Name | Type | Required | Default | Possible Values | Description |
968
+ | --------------- | ------------------------ | -------- | ------- | ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
969
+ | `url` | `string, custom` | ✅ | — | — | The full URL of the API endpoint to call (proxied through Zapier's Relay service) |
970
+ | `init` | `object` | ❌ | — | — | Request options including method, headers, body, and authentication |
971
+ | ↳ `method` | `string` | ❌ | — | `GET`, `POST`, `PUT`, `DELETE`, `PATCH`, `HEAD`, `OPTIONS` | HTTP method for the request (defaults to GET) |
972
+ | ↳ `headers` | `object` | ❌ | — | — | HTTP headers to include in the request |
973
+ | ↳ `body` | `string, custom, record` | ❌ | — | — | Request body — plain objects and JSON strings are auto-detected and Content-Type is set accordingly |
974
+ | ↳ `connection` | `string, number` | ❌ | — | — | Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. |
975
+ | ↳ `callbackUrl` | `string` | ❌ | — | — | URL to send async response to (makes request async) |
976
+ | ↳ `maxTime` | `number` | ❌ | — | — | Maximum seconds to wait for a response. Honored on a best-effort basis; the server may silently enforce a lower ceiling. |
975
977
 
976
978
  **Returns:** `Promise<Response>`
977
979
 
package/dist/index.cjs CHANGED
@@ -101,7 +101,7 @@ var AuthenticationIdPropertySchema = ConnectionIdPropertySchema.meta({
101
101
  deprecated: true
102
102
  });
103
103
  var ConnectionPropertySchema = zod.z.union([zod.z.string(), zod.z.number().int().positive()]).describe(
104
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly."
104
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly."
105
105
  );
106
106
  var InputsPropertySchema = zod.z.record(zod.z.string(), zod.z.unknown()).describe("Input parameters for the action");
107
107
  var LimitPropertySchema = zod.z.number().int().min(1).max(MAX_PAGE_LIMIT).default(50).describe("Maximum number of items to return");
@@ -3013,7 +3013,7 @@ var listActionsPlugin = (sdk) => {
3013
3013
  var ListInputFieldsDescription = "Get the input fields required for a specific action";
3014
3014
  var ListInputFieldsBaseSchema = zod.z.object({
3015
3015
  connection: ConnectionPropertySchema.optional().describe(
3016
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
3016
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
3017
3017
  ),
3018
3018
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
3019
3019
  "Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields."
@@ -4113,7 +4113,7 @@ var findUniqueConnectionPlugin = (sdk) => {
4113
4113
  var RunActionDescription = "Execute an action with the given inputs";
4114
4114
  var RunActionBaseSchema = zod.z.object({
4115
4115
  connection: ConnectionPropertySchema.optional().describe(
4116
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
4116
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
4117
4117
  ),
4118
4118
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
4119
4119
  "Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service."
@@ -4492,8 +4492,12 @@ async function readFile(filePath) {
4492
4492
  }
4493
4493
  throw new Error(`File not found: ${filePath}`);
4494
4494
  }
4495
+ var POSITIVE_INTEGER_OR_UUID = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
4495
4496
  var ConnectionEntrySchema = zod.z.object({
4496
- connectionId: zod.z.number().int().positive().describe("Zapier connection ID for the third-party service.")
4497
+ connectionId: zod.z.union([
4498
+ zod.z.string().regex(POSITIVE_INTEGER_OR_UUID),
4499
+ zod.z.number().int().positive()
4500
+ ]).describe("Zapier connection ID for the third-party service.")
4497
4501
  });
4498
4502
  var ConnectionsMapSchema = zod.z.record(zod.z.string(), ConnectionEntrySchema);
4499
4503
 
@@ -8051,7 +8055,7 @@ var findUniqueAuthenticationPlugin = (sdk) => ({
8051
8055
  var GetInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
8052
8056
  var GetInputFieldsSchemaBaseSchema = zod.z.object({
8053
8057
  connection: ConnectionPropertySchema.optional().describe(
8054
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
8058
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
8055
8059
  ),
8056
8060
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
8057
8061
  "Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
@@ -8189,7 +8193,7 @@ var InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
8189
8193
  var ListInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
8190
8194
  var ListInputFieldChoicesBaseSchema = zod.z.object({
8191
8195
  connection: ConnectionPropertySchema.optional().describe(
8192
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
8196
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
8193
8197
  ),
8194
8198
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
8195
8199
  "Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."
package/dist/index.d.mts CHANGED
@@ -895,7 +895,7 @@ type NeedsResponse = z.infer<typeof NeedsResponseSchema>;
895
895
  * Provides a connectionId that maps a named connection alias to a Zapier connection.
896
896
  */
897
897
  declare const ConnectionEntrySchema: z.ZodObject<{
898
- connectionId: z.ZodNumber;
898
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
899
899
  }, z.core.$strip>;
900
900
  type ConnectionEntry = z.infer<typeof ConnectionEntrySchema>;
901
901
  /**
@@ -904,7 +904,7 @@ type ConnectionEntry = z.infer<typeof ConnectionEntrySchema>;
904
904
  * `connection` parameter on action calls.
905
905
  */
906
906
  declare const ConnectionsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
907
- connectionId: z.ZodNumber;
907
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
908
908
  }, z.core.$strip>>;
909
909
  type ConnectionsMap = z.infer<typeof ConnectionsMapSchema>;
910
910
 
@@ -975,7 +975,7 @@ declare const ManifestPluginOptionsSchema: z.ZodObject<{
975
975
  canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
976
976
  canDeleteTables: z.ZodOptional<z.ZodBoolean>;
977
977
  connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
978
- connectionId: z.ZodNumber;
978
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
979
979
  }, z.core.$strip>>>;
980
980
  }, z.core.$strip>>;
981
981
  }, z.core.$strip>;
package/dist/index.mjs CHANGED
@@ -99,7 +99,7 @@ var AuthenticationIdPropertySchema = ConnectionIdPropertySchema.meta({
99
99
  deprecated: true
100
100
  });
101
101
  var ConnectionPropertySchema = z.union([z.string(), z.number().int().positive()]).describe(
102
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly."
102
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly."
103
103
  );
104
104
  var InputsPropertySchema = z.record(z.string(), z.unknown()).describe("Input parameters for the action");
105
105
  var LimitPropertySchema = z.number().int().min(1).max(MAX_PAGE_LIMIT).default(50).describe("Maximum number of items to return");
@@ -3011,7 +3011,7 @@ var listActionsPlugin = (sdk) => {
3011
3011
  var ListInputFieldsDescription = "Get the input fields required for a specific action";
3012
3012
  var ListInputFieldsBaseSchema = z.object({
3013
3013
  connection: ConnectionPropertySchema.optional().describe(
3014
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
3014
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
3015
3015
  ),
3016
3016
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
3017
3017
  "Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields."
@@ -4111,7 +4111,7 @@ var findUniqueConnectionPlugin = (sdk) => {
4111
4111
  var RunActionDescription = "Execute an action with the given inputs";
4112
4112
  var RunActionBaseSchema = z.object({
4113
4113
  connection: ConnectionPropertySchema.optional().describe(
4114
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
4114
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
4115
4115
  ),
4116
4116
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
4117
4117
  "Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service."
@@ -4490,8 +4490,12 @@ async function readFile(filePath) {
4490
4490
  }
4491
4491
  throw new Error(`File not found: ${filePath}`);
4492
4492
  }
4493
+ var POSITIVE_INTEGER_OR_UUID = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
4493
4494
  var ConnectionEntrySchema = z.object({
4494
- connectionId: z.number().int().positive().describe("Zapier connection ID for the third-party service.")
4495
+ connectionId: z.union([
4496
+ z.string().regex(POSITIVE_INTEGER_OR_UUID),
4497
+ z.number().int().positive()
4498
+ ]).describe("Zapier connection ID for the third-party service.")
4495
4499
  });
4496
4500
  var ConnectionsMapSchema = z.record(z.string(), ConnectionEntrySchema);
4497
4501
 
@@ -8049,7 +8053,7 @@ var findUniqueAuthenticationPlugin = (sdk) => ({
8049
8053
  var GetInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
8050
8054
  var GetInputFieldsSchemaBaseSchema = z.object({
8051
8055
  connection: ConnectionPropertySchema.optional().describe(
8052
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
8056
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
8053
8057
  ),
8054
8058
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
8055
8059
  "Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields."
@@ -8187,7 +8191,7 @@ var InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
8187
8191
  var ListInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
8188
8192
  var ListInputFieldChoicesBaseSchema = z.object({
8189
8193
  connection: ConnectionPropertySchema.optional().describe(
8190
- "Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."
8194
+ "Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."
8191
8195
  ),
8192
8196
  connectionId: ConnectionIdPropertySchema.nullable().optional().describe(
8193
8197
  "Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options."
@@ -3,7 +3,7 @@ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, Acti
3
3
  const GetInputFieldsSchemaDescription = "Get the JSON Schema representation of input fields for an action. Returns a JSON Schema object describing the structure, types, and validation rules for the action's input parameters.";
4
4
  // Base schema for shared (optional) properties
5
5
  const GetInputFieldsSchemaBaseSchema = z.object({
6
- connection: ConnectionPropertySchema.optional().describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."),
6
+ connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
7
7
  connectionId: ConnectionIdPropertySchema.nullable()
8
8
  .optional()
9
9
  .describe("Connection ID to use when fetching the schema. Required if the action needs a connection to determine available fields.")
@@ -32,7 +32,7 @@ export const InputFieldChoiceItemSchema = withFormatter(NeedChoicesSchema, {
32
32
  const ListInputFieldChoicesDescription = "Get the available choices for a dynamic dropdown input field";
33
33
  // Base schema for shared (optional) properties
34
34
  const ListInputFieldChoicesBaseSchema = z.object({
35
- connection: ConnectionPropertySchema.optional().describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."),
35
+ connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
36
36
  connectionId: ConnectionIdPropertySchema.nullable()
37
37
  .optional()
38
38
  .describe("Connection ID to use when listing available field choices. Required if the action needs a connection to populate dynamic dropdown options.")
@@ -3,7 +3,7 @@ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, Acti
3
3
  const ListInputFieldsDescription = "Get the input fields required for a specific action";
4
4
  // Base schema for shared (optional) properties
5
5
  const ListInputFieldsBaseSchema = z.object({
6
- connection: ConnectionPropertySchema.optional().describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."),
6
+ connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
7
7
  connectionId: ConnectionIdPropertySchema.nullable()
8
8
  .optional()
9
9
  .describe("Connection ID to use when listing input fields. Required if the action needs a connection to determine available fields.")
@@ -57,7 +57,7 @@ export declare const ManifestSchema: z.ZodObject<{
57
57
  canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
58
58
  canDeleteTables: z.ZodOptional<z.ZodBoolean>;
59
59
  connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
60
- connectionId: z.ZodNumber;
60
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
61
61
  }, z.core.$strip>>>;
62
62
  }, z.core.$strip>;
63
63
  export declare const ManifestPluginOptionsSchema: z.ZodObject<{
@@ -81,7 +81,7 @@ export declare const ManifestPluginOptionsSchema: z.ZodObject<{
81
81
  canIncludeSharedTables: z.ZodOptional<z.ZodBoolean>;
82
82
  canDeleteTables: z.ZodOptional<z.ZodBoolean>;
83
83
  connections: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
84
- connectionId: z.ZodNumber;
84
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
85
85
  }, z.core.$strip>>>;
86
86
  }, z.core.$strip>>;
87
87
  }, z.core.$strip>;
@@ -3,7 +3,7 @@ import { AppKeyPropertySchema, AppPropertySchema, ActionTypePropertySchema, Acti
3
3
  const RunActionDescription = "Execute an action with the given inputs";
4
4
  // Base schema for shared properties
5
5
  const RunActionBaseSchema = z.object({
6
- connection: ConnectionPropertySchema.optional().describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly. Mutually exclusive with connectionId."),
6
+ connection: ConnectionPropertySchema.optional().describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly. Mutually exclusive with connectionId."),
7
7
  connectionId: ConnectionIdPropertySchema.nullable()
8
8
  .optional()
9
9
  .describe("Connection ID to use when running the action. Required if the action needs a connection to authenticate and interact with the service.")
@@ -4,7 +4,7 @@ import { z } from "zod";
4
4
  * Provides a connectionId that maps a named connection alias to a Zapier connection.
5
5
  */
6
6
  export declare const ConnectionEntrySchema: z.ZodObject<{
7
- connectionId: z.ZodNumber;
7
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
8
8
  }, z.core.$strip>;
9
9
  export type ConnectionEntry = z.infer<typeof ConnectionEntrySchema>;
10
10
  /**
@@ -13,7 +13,7 @@ export type ConnectionEntry = z.infer<typeof ConnectionEntrySchema>;
13
13
  * `connection` parameter on action calls.
14
14
  */
15
15
  export declare const ConnectionsMapSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
16
- connectionId: z.ZodNumber;
16
+ connectionId: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
17
17
  }, z.core.$strip>>;
18
18
  export type ConnectionsMap = z.infer<typeof ConnectionsMapSchema>;
19
19
  //# sourceMappingURL=connections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/types/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;iBAMhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;kBAA8C,CAAC;AAEhF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
1
+ {"version":3,"file":"connections.d.ts","sourceRoot":"","sources":["../../src/types/connections.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;iBAOhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;kBAA8C,CAAC;AAEhF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,13 +1,15 @@
1
1
  import { z } from "zod";
2
+ const POSITIVE_INTEGER_OR_UUID = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
2
3
  /**
3
4
  * A single connection entry in the connections map.
4
5
  * Provides a connectionId that maps a named connection alias to a Zapier connection.
5
6
  */
6
7
  export const ConnectionEntrySchema = z.object({
7
8
  connectionId: z
8
- .number()
9
- .int()
10
- .positive()
9
+ .union([
10
+ z.string().regex(POSITIVE_INTEGER_OR_UUID),
11
+ z.number().int().positive(),
12
+ ])
11
13
  .describe("Zapier connection ID for the third-party service."),
12
14
  });
13
15
  /**
@@ -38,7 +38,7 @@ export const AuthenticationIdPropertySchema = ConnectionIdPropertySchema.meta({
38
38
  });
39
39
  export const ConnectionPropertySchema = z
40
40
  .union([z.string(), z.number().int().positive()])
41
- .describe("Connection alias (string) or numeric connectionId. Strings are resolved from the connections map; numbers are used directly.");
41
+ .describe("Connection alias or connection ID (UUID or positive integer). Strings that match a key in the connections map are resolved against it; otherwise the value is used as a connection ID directly.");
42
42
  export const InputsPropertySchema = z
43
43
  .record(z.string(), z.unknown())
44
44
  .describe("Input parameters for the action");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.43.0",
3
+ "version": "0.44.0",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",