@zapier/zapier-sdk-cli 0.39.8 → 0.39.9

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-cli
2
2
 
3
+ ## 0.39.9
4
+
5
+ ### Patch Changes
6
+
7
+ - a50b594: Fix ZodObject param handling in CLI
8
+
3
9
  ## 0.39.8
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -691,22 +691,22 @@ List records in a table with optional filtering and sorting
691
691
 
692
692
  **Options:**
693
693
 
694
- | Option | Type | Required | Default | Possible Values | Description |
695
- | --------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
696
- | `<table>` | `string` | ✅ | — | — | The unique identifier of the table |
697
- | ↳ `<field-key>` | `string` | | — | — | The field key to sort by |
698
- | `--filters` | `array` | ❌ | — | — | Filter conditions for the query |
699
- | `--sort` | `object` | | — | — | Sort records by a field |
700
- | ↳ `--direction` | `string` | ❌ | `"asc"` | — | Sort direction |
701
- | `--page-size` | `number` | ❌ | — | — | Number of records per page (max 1000) |
702
- | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
703
- | `--cursor` | `string` | ❌ | — | — | Cursor to start from |
704
- | `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
694
+ | Option | Type | Required | Default | Possible Values | Description |
695
+ | ------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
696
+ | `<table>` | `string` | ✅ | — | — | The unique identifier of the table |
697
+ | `--filters` | `array` | | — | — | Filter conditions for the query |
698
+ | `--sort` | `object` | ❌ | — | — | Sort records by a field |
699
+ | ↳ `fieldKey` | `string` | | — | — | The field key to sort by |
700
+ | ↳ `direction` | `string` | ❌ | `"asc"` | — | Sort direction |
701
+ | `--page-size` | `number` | ❌ | — | — | Number of records per page (max 1000) |
702
+ | `--max-items` | `number` | ❌ | — | — | Maximum total items to return across all pages |
703
+ | `--cursor` | `string` | ❌ | — | — | Cursor to start from |
704
+ | `--key-mode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
705
705
 
706
706
  **Usage:**
707
707
 
708
708
  ```bash
709
- npx zapier-sdk list-table-records <table> <field-key> [--filters] [--sort] [--direction] [--page-size] [--max-items] [--cursor] [--key-mode]
709
+ npx zapier-sdk list-table-records <table> [--filters] [--sort] [--field-key] [--direction] [--page-size] [--max-items] [--cursor] [--key-mode]
710
710
  ```
711
711
 
712
712
  #### `list-tables`
package/dist/cli.cjs CHANGED
@@ -1103,7 +1103,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
1103
1103
 
1104
1104
  // package.json
1105
1105
  var package_default = {
1106
- version: "0.39.8"};
1106
+ version: "0.39.9"};
1107
1107
 
1108
1108
  // src/telemetry/builders.ts
1109
1109
  function createCliBaseEvent(context = {}) {
@@ -1738,7 +1738,7 @@ function analyzeZodField(name, schema, functionInfo) {
1738
1738
  } else if (baseSchema instanceof zod.z.ZodEnum) {
1739
1739
  paramType = "string";
1740
1740
  choices = baseSchema.options;
1741
- } else if (baseSchema instanceof zod.z.ZodRecord) {
1741
+ } else if (baseSchema instanceof zod.z.ZodObject || baseSchema instanceof zod.z.ZodRecord) {
1742
1742
  paramType = "object";
1743
1743
  }
1744
1744
  let paramHasResolver = false;
@@ -4696,7 +4696,7 @@ function createZapierCliSdk(options = {}) {
4696
4696
  // package.json with { type: 'json' }
4697
4697
  var package_default2 = {
4698
4698
  name: "@zapier/zapier-sdk-cli",
4699
- version: "0.39.8"};
4699
+ version: "0.39.9"};
4700
4700
  var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
4701
4701
  var CACHE_RESET_INTERVAL_MS = (() => {
4702
4702
  const { ZAPIER_SDK_UPDATE_CHECK_INTERVAL_MS = `${ONE_DAY_MS}` } = process.env;
package/dist/cli.mjs CHANGED
@@ -1065,7 +1065,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
1065
1065
 
1066
1066
  // package.json
1067
1067
  var package_default = {
1068
- version: "0.39.8"};
1068
+ version: "0.39.9"};
1069
1069
 
1070
1070
  // src/telemetry/builders.ts
1071
1071
  function createCliBaseEvent(context = {}) {
@@ -1700,7 +1700,7 @@ function analyzeZodField(name, schema, functionInfo) {
1700
1700
  } else if (baseSchema instanceof z.ZodEnum) {
1701
1701
  paramType = "string";
1702
1702
  choices = baseSchema.options;
1703
- } else if (baseSchema instanceof z.ZodRecord) {
1703
+ } else if (baseSchema instanceof z.ZodObject || baseSchema instanceof z.ZodRecord) {
1704
1704
  paramType = "object";
1705
1705
  }
1706
1706
  let paramHasResolver = false;
@@ -4658,7 +4658,7 @@ function createZapierCliSdk(options = {}) {
4658
4658
  // package.json with { type: 'json' }
4659
4659
  var package_default2 = {
4660
4660
  name: "@zapier/zapier-sdk-cli",
4661
- version: "0.39.8"};
4661
+ version: "0.39.9"};
4662
4662
  var ONE_DAY_MS = 24 * 60 * 60 * 1e3;
4663
4663
  var CACHE_RESET_INTERVAL_MS = (() => {
4664
4664
  const { ZAPIER_SDK_UPDATE_CHECK_INTERVAL_MS = `${ONE_DAY_MS}` } = process.env;
package/dist/index.cjs CHANGED
@@ -2512,7 +2512,7 @@ function createZapierCliSdk(options = {}) {
2512
2512
 
2513
2513
  // package.json
2514
2514
  var package_default = {
2515
- version: "0.39.8"};
2515
+ version: "0.39.9"};
2516
2516
 
2517
2517
  // src/telemetry/builders.ts
2518
2518
  function createCliBaseEvent(context = {}) {
package/dist/index.mjs CHANGED
@@ -2479,7 +2479,7 @@ function createZapierCliSdk(options = {}) {
2479
2479
 
2480
2480
  // package.json
2481
2481
  var package_default = {
2482
- version: "0.39.8"};
2482
+ version: "0.39.9"};
2483
2483
 
2484
2484
  // src/telemetry/builders.ts
2485
2485
  function createCliBaseEvent(context = {}) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk-cli",
3
- "version": "0.39.8",
3
+ "version": "0.39.9",
4
4
  "description": "Command line interface for Zapier SDK",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -255,8 +255,9 @@ function analyzeZodField(name, schema, functionInfo) {
255
255
  paramType = "string";
256
256
  choices = baseSchema.options;
257
257
  }
258
- else if (baseSchema instanceof z.ZodRecord) {
259
- // Handle Record<string, any> - user passes JSON string, we parse to object
258
+ else if (baseSchema instanceof z.ZodObject ||
259
+ baseSchema instanceof z.ZodRecord) {
260
+ // User passes a JSON string; convertValue will parse it to an object
260
261
  paramType = "object";
261
262
  }
262
263
  // Check if this parameter has a resolver