@zapier/zapier-sdk 0.40.0 → 0.40.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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @zapier/zapier-sdk
2
2
 
3
+ ## 0.40.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 362bc56: Make sure CLI only shows non-deprecated positional parameters.
8
+
9
+ ## 0.40.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 5391c65: Fix ordering problem with tables CLI commands.
14
+
3
15
  ## 0.40.0
4
16
 
5
17
  ### Minor Changes
package/README.md CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  ## Table of Contents
4
4
 
5
- - [Closed Beta](#closed-beta)
6
5
  - [Documentation](#documentation)
7
6
  - [Quick Start](#quick-start)
8
7
  - [Installation](#installation)
@@ -48,20 +47,12 @@
48
47
  - [`listTables`](#listtables)
49
48
  - [`updateTableRecords`](#updatetablerecords)
50
49
 
51
- ## Closed Beta
52
-
53
- At the time of publishing this package, the Zapier SDK requires an invite for most features. If you want to try it out, let us know at the following page!
54
-
55
- https://sdk-beta.zapier.app/signup
56
-
57
50
  ## Documentation
58
51
 
59
- The official documentation will soon be available at:
52
+ The official documentation is available at:
60
53
 
61
54
  https://docs.zapier.com/sdk
62
55
 
63
- While the dust settles, that documentation may be incomplete, and this README may have additional documentation.
64
-
65
56
  Agents are sometimes blocked from viewing docs on npm, so you may want to provide them a link to the official docs or copy the docs here into a prompt.
66
57
 
67
58
  ## Quick Start
@@ -1022,8 +1013,8 @@ Create one or more fields in a table
1022
1013
  | Name | Type | Required | Default | Possible Values | Description |
1023
1014
  | ---------- | -------- | -------- | ------- | --------------- | ------------------------------------ |
1024
1015
  | `options` | `object` | ✅ | — | — | |
1025
- | ↳ `fields` | `array` | ✅ | — | — | Array of field definitions to create |
1026
1016
  | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1017
+ | ↳ `fields` | `array` | ✅ | — | — | Array of field definitions to create |
1027
1018
 
1028
1019
  **Returns:** `Promise<any>`
1029
1020
 
@@ -1031,8 +1022,8 @@ Create one or more fields in a table
1031
1022
 
1032
1023
  ```typescript
1033
1024
  const result = await zapier.createTableFields({
1034
- fields: ["example-item"],
1035
1025
  table: "example-value",
1026
+ fields: ["example-item"],
1036
1027
  });
1037
1028
  ```
1038
1029
 
@@ -1045,9 +1036,9 @@ Create one or more records in a table
1045
1036
  | Name | Type | Required | Default | Possible Values | Description |
1046
1037
  | ----------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1047
1038
  | `options` | `object` | ✅ | — | — | |
1039
+ | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1048
1040
  | ↳ `records` | `array` | ✅ | — | — | Array of records to create (max 100) |
1049
1041
  | ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
1050
- | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1051
1042
 
1052
1043
  **Returns:** `Promise<any>`
1053
1044
 
@@ -1055,8 +1046,8 @@ Create one or more records in a table
1055
1046
 
1056
1047
  ```typescript
1057
1048
  const result = await zapier.createTableRecords({
1058
- records: ["example-item"],
1059
1049
  table: "example-value",
1050
+ records: ["example-item"],
1060
1051
  });
1061
1052
  ```
1062
1053
 
@@ -1157,9 +1148,9 @@ Get a single record from a table by ID
1157
1148
  | Name | Type | Required | Default | Possible Values | Description |
1158
1149
  | ----------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1159
1150
  | `options` | `object` | ✅ | — | — | |
1160
- | ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
1161
1151
  | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1162
1152
  | ↳ `record` | `string` | ✅ | — | — | The unique identifier of the record |
1153
+ | ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
1163
1154
 
1164
1155
  **Returns:** `Promise<RecordItem>`
1165
1156
 
@@ -1181,8 +1172,8 @@ List fields for a table
1181
1172
  | Name | Type | Required | Default | Possible Values | Description |
1182
1173
  | ---------- | -------- | -------- | ------- | --------------- | ----------------------------------------------------------------------------------------- |
1183
1174
  | `options` | `object` | ✅ | — | — | |
1184
- | ↳ `fields` | `array` | ❌ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
1185
1175
  | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1176
+ | ↳ `fields` | `array` | ❌ | — | — | Fields to operate on. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6). |
1186
1177
 
1187
1178
  **Returns:** `Promise<PaginatedResult<FieldItem>>`
1188
1179
 
@@ -1220,6 +1211,7 @@ List records in a table with optional filtering and sorting
1220
1211
  | Name | Type | Required | Default | Possible Values | Description |
1221
1212
  | ------------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1222
1213
  | `options` | `object` | ✅ | — | — | |
1214
+ | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1223
1215
  | ↳ `filters` | `array` | ❌ | — | — | Filter conditions for the query |
1224
1216
  | ↳ `sort` | `object` | ❌ | — | — | Sort records by a field |
1225
1217
  | ↳ `fieldKey` | `string` | ✅ | — | — | The field key to sort by |
@@ -1228,7 +1220,6 @@ List records in a table with optional filtering and sorting
1228
1220
  | ↳ `maxItems` | `number` | ❌ | — | — | Maximum total items to return across all pages |
1229
1221
  | ↳ `cursor` | `string` | ❌ | — | — | Cursor to start from |
1230
1222
  | ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
1231
- | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1232
1223
 
1233
1224
  **Returns:** `Promise<PaginatedResult<RecordItem>>`
1234
1225
 
@@ -1303,9 +1294,9 @@ Update one or more records in a table
1303
1294
  | Name | Type | Required | Default | Possible Values | Description |
1304
1295
  | ----------- | -------- | -------- | --------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------- |
1305
1296
  | `options` | `object` | ✅ | — | — | |
1297
+ | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1306
1298
  | ↳ `records` | `array` | ✅ | — | — | Array of records to update (max 100) |
1307
1299
  | ↳ `keyMode` | `string` | ❌ | `"names"` | — | How to interpret field keys in record data. "names" (default) uses human-readable field names, "ids" uses raw field IDs (f1, f2). |
1308
- | ↳ `table` | `string` | ✅ | — | — | The unique identifier of the table |
1309
1300
 
1310
1301
  **Returns:** `Promise<any>`
1311
1302
 
@@ -1313,7 +1304,7 @@ Update one or more records in a table
1313
1304
 
1314
1305
  ```typescript
1315
1306
  const result = await zapier.updateTableRecords({
1316
- records: ["example-item"],
1317
1307
  table: "example-value",
1308
+ records: ["example-item"],
1318
1309
  });
1319
1310
  ```
package/dist/index.cjs CHANGED
@@ -2467,12 +2467,12 @@ var ListTableFieldsOptionsBaseSchema = zod.z.object({
2467
2467
  'Filter by specific fields. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6).'
2468
2468
  ).meta({ deprecated: true })
2469
2469
  });
2470
- var ListTableFieldsOptionsSchema = ListTableFieldsOptionsBaseSchema.extend({
2470
+ var ListTableFieldsOptionsSchema = zod.z.object({
2471
2471
  table: TablePropertySchema
2472
- }).describe(ListTableFieldsDescription).meta({ aliases: { tableId: "table", fieldKeys: "fields" } });
2473
- var ListTableFieldsOptionsSchemaDeprecated = ListTableFieldsOptionsBaseSchema.extend({
2472
+ }).merge(ListTableFieldsOptionsBaseSchema).describe(ListTableFieldsDescription).meta({ aliases: { tableId: "table", fieldKeys: "fields" } });
2473
+ var ListTableFieldsOptionsSchemaDeprecated = zod.z.object({
2474
2474
  tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
2475
- });
2475
+ }).merge(ListTableFieldsOptionsBaseSchema);
2476
2476
  var ListTableFieldsOptionsInputSchema = zod.z.union([ListTableFieldsOptionsSchema, ListTableFieldsOptionsSchemaDeprecated]).describe(ListTableFieldsDescription);
2477
2477
 
2478
2478
  // src/resolvers/tableFields.ts
@@ -6536,12 +6536,12 @@ var CreateTableFieldsDescription = "Create one or more fields in a table";
6536
6536
  var CreateTableFieldsBase = zod.z.object({
6537
6537
  fields: zod.z.array(NewFieldSchema).min(1).describe("Array of field definitions to create")
6538
6538
  });
6539
- var CreateTableFieldsOptionsSchema = CreateTableFieldsBase.extend({
6539
+ var CreateTableFieldsOptionsSchema = zod.z.object({
6540
6540
  table: TablePropertySchema
6541
- }).describe(CreateTableFieldsDescription).meta({ aliases: { tableId: "table" } });
6542
- var CreateTableFieldsOptionsSchemaDeprecated = CreateTableFieldsBase.extend({
6541
+ }).merge(CreateTableFieldsBase).describe(CreateTableFieldsDescription).meta({ aliases: { tableId: "table" } });
6542
+ var CreateTableFieldsOptionsSchemaDeprecated = zod.z.object({
6543
6543
  tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6544
- });
6544
+ }).merge(CreateTableFieldsBase);
6545
6545
  var CreateTableFieldsOptionsInputSchema = zod.z.union([
6546
6546
  CreateTableFieldsOptionsSchema,
6547
6547
  CreateTableFieldsOptionsSchemaDeprecated
@@ -6719,14 +6719,14 @@ var GetTableRecordDescription = "Get a single record from a table by ID";
6719
6719
  var GetTableRecordOptionsBaseSchema = zod.z.object({
6720
6720
  keyMode: KeyModeSchema
6721
6721
  });
6722
- var GetTableRecordOptionsSchema = GetTableRecordOptionsBaseSchema.extend({
6722
+ var GetTableRecordOptionsSchema = zod.z.object({
6723
6723
  table: TablePropertySchema,
6724
6724
  record: RecordPropertySchema
6725
- }).describe(GetTableRecordDescription).meta({ aliases: { tableId: "table", recordId: "record" } });
6726
- var GetTableRecordOptionsSchemaDeprecated = GetTableRecordOptionsBaseSchema.extend({
6725
+ }).merge(GetTableRecordOptionsBaseSchema).describe(GetTableRecordDescription).meta({ aliases: { tableId: "table", recordId: "record" } });
6726
+ var GetTableRecordOptionsSchemaDeprecated = zod.z.object({
6727
6727
  tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table"),
6728
6728
  recordId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Record ID must be a valid ULID").describe("The unique identifier of the record")
6729
- });
6729
+ }).merge(GetTableRecordOptionsBaseSchema);
6730
6730
  var GetTableRecordOptionsInputSchema = zod.z.union([GetTableRecordOptionsSchema, GetTableRecordOptionsSchemaDeprecated]).describe(GetTableRecordDescription);
6731
6731
 
6732
6732
  // src/formatters/tableRecord.ts
@@ -6868,12 +6868,12 @@ var ListTableRecordsBase = zod.z.object({
6868
6868
  cursor: zod.z.string().optional().describe("Cursor to start from"),
6869
6869
  keyMode: KeyModeSchema
6870
6870
  });
6871
- var ListTableRecordsOptionsSchema = ListTableRecordsBase.extend({
6871
+ var ListTableRecordsOptionsSchema = zod.z.object({
6872
6872
  table: TablePropertySchema
6873
- }).describe(ListTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6874
- var ListTableRecordsOptionsSchemaDeprecated = ListTableRecordsBase.extend({
6873
+ }).merge(ListTableRecordsBase).describe(ListTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6874
+ var ListTableRecordsOptionsSchemaDeprecated = zod.z.object({
6875
6875
  tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6876
- });
6876
+ }).merge(ListTableRecordsBase);
6877
6877
  var ListTableRecordsOptionsInputSchema = zod.z.union([
6878
6878
  ListTableRecordsOptionsSchema,
6879
6879
  ListTableRecordsOptionsSchemaDeprecated
@@ -7003,14 +7003,12 @@ var CreateTableRecordsBase = zod.z.object({
7003
7003
  records: zod.z.array(NewRecordSchema).min(1).max(100).describe("Array of records to create (max 100)"),
7004
7004
  keyMode: KeyModeSchema
7005
7005
  });
7006
- var CreateTableRecordsOptionsSchema = CreateTableRecordsBase.extend({
7006
+ var CreateTableRecordsOptionsSchema = zod.z.object({
7007
7007
  table: TablePropertySchema
7008
- }).describe(CreateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7009
- var CreateTableRecordsOptionsSchemaDeprecated = CreateTableRecordsBase.extend(
7010
- {
7011
- tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7012
- }
7013
- );
7008
+ }).merge(CreateTableRecordsBase).describe(CreateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7009
+ var CreateTableRecordsOptionsSchemaDeprecated = zod.z.object({
7010
+ tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7011
+ }).merge(CreateTableRecordsBase);
7014
7012
  var CreateTableRecordsOptionsInputSchema = zod.z.union([
7015
7013
  CreateTableRecordsOptionsSchema,
7016
7014
  CreateTableRecordsOptionsSchemaDeprecated
@@ -7187,14 +7185,12 @@ var UpdateTableRecordsBase = zod.z.object({
7187
7185
  records: zod.z.array(UpdateRecordSchema).min(1).max(100).describe("Array of records to update (max 100)"),
7188
7186
  keyMode: KeyModeSchema
7189
7187
  });
7190
- var UpdateTableRecordsOptionsSchema = UpdateTableRecordsBase.extend({
7188
+ var UpdateTableRecordsOptionsSchema = zod.z.object({
7191
7189
  table: TablePropertySchema
7192
- }).describe(UpdateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7193
- var UpdateTableRecordsOptionsSchemaDeprecated = UpdateTableRecordsBase.extend(
7194
- {
7195
- tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7196
- }
7197
- );
7190
+ }).merge(UpdateTableRecordsBase).describe(UpdateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7191
+ var UpdateTableRecordsOptionsSchemaDeprecated = zod.z.object({
7192
+ tableId: zod.z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7193
+ }).merge(UpdateTableRecordsBase);
7198
7194
  var UpdateTableRecordsOptionsInputSchema = zod.z.union([
7199
7195
  UpdateTableRecordsOptionsSchema,
7200
7196
  UpdateTableRecordsOptionsSchemaDeprecated
@@ -7926,7 +7922,7 @@ function getCpuTime() {
7926
7922
  }
7927
7923
 
7928
7924
  // src/plugins/eventEmission/builders.ts
7929
- var SDK_VERSION = "0.40.0";
7925
+ var SDK_VERSION = "0.40.2";
7930
7926
  function createBaseEvent(context = {}) {
7931
7927
  return {
7932
7928
  event_id: generateEventId(),
package/dist/index.d.mts CHANGED
@@ -2542,16 +2542,16 @@ declare const FieldItemSchema: z.ZodObject<{
2542
2542
  }, z.core.$strip>;
2543
2543
  type FieldItem = z.infer<typeof FieldItemSchema>;
2544
2544
  declare const ListTableFieldsOptionsSchema: z.ZodObject<{
2545
- fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2546
- fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2547
2545
  table: z.ZodString & {
2548
2546
  _def: z.core.$ZodStringDef & PositionalMetadata;
2549
2547
  };
2548
+ fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2549
+ fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2550
2550
  }, z.core.$strip>;
2551
2551
  declare const ListTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
2552
+ tableId: z.ZodString;
2552
2553
  fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2553
2554
  fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
2554
- tableId: z.ZodString;
2555
2555
  }, z.core.$strip>;
2556
2556
  type ListTableFieldsOptions = (z.infer<typeof ListTableFieldsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof ListTableFieldsOptionsSchemaDeprecated>, "tableId" | "fieldKeys"> & {
2557
2557
  /** @deprecated Use `table` instead. */
@@ -2578,6 +2578,9 @@ declare const listTableFieldsPlugin: Plugin<{}, {
2578
2578
  } & EventEmissionContext, ListTableFieldsPluginProvides>;
2579
2579
 
2580
2580
  declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
2581
+ table: z.ZodString & {
2582
+ _def: z.core.$ZodStringDef & PositionalMetadata;
2583
+ };
2581
2584
  fields: z.ZodArray<z.ZodObject<{
2582
2585
  type: z.ZodEnum<{
2583
2586
  string: "string";
@@ -2615,11 +2618,9 @@ declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
2615
2618
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2616
2619
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2617
2620
  }, z.core.$strip>>;
2618
- table: z.ZodString & {
2619
- _def: z.core.$ZodStringDef & PositionalMetadata;
2620
- };
2621
2621
  }, z.core.$strip>;
2622
2622
  declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
2623
+ tableId: z.ZodString;
2623
2624
  fields: z.ZodArray<z.ZodObject<{
2624
2625
  type: z.ZodEnum<{
2625
2626
  string: "string";
@@ -2657,7 +2658,6 @@ declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
2657
2658
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2658
2659
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2659
2660
  }, z.core.$strip>>;
2660
- tableId: z.ZodString;
2661
2661
  }, z.core.$strip>;
2662
2662
  type CreateTableFieldsOptions = (z.infer<typeof CreateTableFieldsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof CreateTableFieldsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
2663
2663
  /** @deprecated Use `table` instead. */
@@ -2723,24 +2723,24 @@ declare const RecordItemSchema: z.ZodObject<{
2723
2723
  }, z.core.$strip>;
2724
2724
  type RecordItem = z.infer<typeof RecordItemSchema>;
2725
2725
  declare const GetTableRecordOptionsSchema: z.ZodObject<{
2726
- keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
2727
- names: "names";
2728
- ids: "ids";
2729
- }>>>;
2730
2726
  table: z.ZodString & {
2731
2727
  _def: z.core.$ZodStringDef & PositionalMetadata;
2732
2728
  };
2733
2729
  record: z.ZodString & {
2734
2730
  _def: z.core.$ZodStringDef & PositionalMetadata;
2735
2731
  };
2736
- }, z.core.$strip>;
2737
- declare const GetTableRecordOptionsSchemaDeprecated: z.ZodObject<{
2738
2732
  keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
2739
2733
  names: "names";
2740
2734
  ids: "ids";
2741
2735
  }>>>;
2736
+ }, z.core.$strip>;
2737
+ declare const GetTableRecordOptionsSchemaDeprecated: z.ZodObject<{
2742
2738
  tableId: z.ZodString;
2743
2739
  recordId: z.ZodString;
2740
+ keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
2741
+ names: "names";
2742
+ ids: "ids";
2743
+ }>>>;
2744
2744
  }, z.core.$strip>;
2745
2745
  type GetTableRecordOptions = (z.infer<typeof GetTableRecordOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof GetTableRecordOptionsSchemaDeprecated>, "tableId" | "recordId"> & {
2746
2746
  /** @deprecated Use `table` instead. */
@@ -2767,6 +2767,9 @@ declare const getTableRecordPlugin: Plugin<{}, {
2767
2767
  } & EventEmissionContext, GetTableRecordPluginProvides>;
2768
2768
 
2769
2769
  declare const ListTableRecordsOptionsSchema: z.ZodObject<{
2770
+ table: z.ZodString & {
2771
+ _def: z.core.$ZodStringDef & PositionalMetadata;
2772
+ };
2770
2773
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
2771
2774
  fieldKey: z.ZodString;
2772
2775
  operator: z.ZodEnum<{
@@ -2801,11 +2804,9 @@ declare const ListTableRecordsOptionsSchema: z.ZodObject<{
2801
2804
  names: "names";
2802
2805
  ids: "ids";
2803
2806
  }>>>;
2804
- table: z.ZodString & {
2805
- _def: z.core.$ZodStringDef & PositionalMetadata;
2806
- };
2807
2807
  }, z.core.$strip>;
2808
2808
  declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2809
+ tableId: z.ZodString;
2809
2810
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
2810
2811
  fieldKey: z.ZodString;
2811
2812
  operator: z.ZodEnum<{
@@ -2840,7 +2841,6 @@ declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2840
2841
  names: "names";
2841
2842
  ids: "ids";
2842
2843
  }>>>;
2843
- tableId: z.ZodString;
2844
2844
  }, z.core.$strip>;
2845
2845
  type ListTableRecordsOptions = z.infer<typeof ListTableRecordsOptionsSchema> | (Omit<z.infer<typeof ListTableRecordsOptionsSchemaDeprecated>, "tableId"> & {
2846
2846
  /** @deprecated Use `table` instead. */
@@ -2868,6 +2868,9 @@ interface ListTableRecordsPluginProvides {
2868
2868
  declare const listTableRecordsPlugin: Plugin<{}, GetContextType<ApiPluginProvides> & EventEmissionContext, ListTableRecordsPluginProvides>;
2869
2869
 
2870
2870
  declare const CreateTableRecordsOptionsSchema: z.ZodObject<{
2871
+ table: z.ZodString & {
2872
+ _def: z.core.$ZodStringDef & PositionalMetadata;
2873
+ };
2871
2874
  records: z.ZodArray<z.ZodObject<{
2872
2875
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2873
2876
  }, z.core.$strip>>;
@@ -2875,11 +2878,9 @@ declare const CreateTableRecordsOptionsSchema: z.ZodObject<{
2875
2878
  names: "names";
2876
2879
  ids: "ids";
2877
2880
  }>>>;
2878
- table: z.ZodString & {
2879
- _def: z.core.$ZodStringDef & PositionalMetadata;
2880
- };
2881
2881
  }, z.core.$strip>;
2882
2882
  declare const CreateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2883
+ tableId: z.ZodString;
2883
2884
  records: z.ZodArray<z.ZodObject<{
2884
2885
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2885
2886
  }, z.core.$strip>>;
@@ -2887,7 +2888,6 @@ declare const CreateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2887
2888
  names: "names";
2888
2889
  ids: "ids";
2889
2890
  }>>>;
2890
- tableId: z.ZodString;
2891
2891
  }, z.core.$strip>;
2892
2892
  type CreateTableRecordsOptions = (z.infer<typeof CreateTableRecordsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof CreateTableRecordsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
2893
2893
  /** @deprecated Use `table` instead. */
@@ -2946,6 +2946,9 @@ declare const deleteTableRecordsPlugin: Plugin<{}, {
2946
2946
  } & EventEmissionContext, DeleteTableRecordsPluginProvides>;
2947
2947
 
2948
2948
  declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
2949
+ table: z.ZodString & {
2950
+ _def: z.core.$ZodStringDef & PositionalMetadata;
2951
+ };
2949
2952
  records: z.ZodArray<z.ZodObject<{
2950
2953
  id: z.ZodString;
2951
2954
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -2954,11 +2957,9 @@ declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
2954
2957
  names: "names";
2955
2958
  ids: "ids";
2956
2959
  }>>>;
2957
- table: z.ZodString & {
2958
- _def: z.core.$ZodStringDef & PositionalMetadata;
2959
- };
2960
2960
  }, z.core.$strip>;
2961
2961
  declare const UpdateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2962
+ tableId: z.ZodString;
2962
2963
  records: z.ZodArray<z.ZodObject<{
2963
2964
  id: z.ZodString;
2964
2965
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -2967,7 +2968,6 @@ declare const UpdateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
2967
2968
  names: "names";
2968
2969
  ids: "ids";
2969
2970
  }>>>;
2970
- tableId: z.ZodString;
2971
2971
  }, z.core.$strip>;
2972
2972
  type UpdateTableRecordsOptions = (z.infer<typeof UpdateTableRecordsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof UpdateTableRecordsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
2973
2973
  /** @deprecated Use `table` instead. */
package/dist/index.mjs CHANGED
@@ -2445,12 +2445,12 @@ var ListTableFieldsOptionsBaseSchema = z.object({
2445
2445
  'Filter by specific fields. Accepts field names (e.g., "Email") or IDs (e.g., "f6", "6", or 6).'
2446
2446
  ).meta({ deprecated: true })
2447
2447
  });
2448
- var ListTableFieldsOptionsSchema = ListTableFieldsOptionsBaseSchema.extend({
2448
+ var ListTableFieldsOptionsSchema = z.object({
2449
2449
  table: TablePropertySchema
2450
- }).describe(ListTableFieldsDescription).meta({ aliases: { tableId: "table", fieldKeys: "fields" } });
2451
- var ListTableFieldsOptionsSchemaDeprecated = ListTableFieldsOptionsBaseSchema.extend({
2450
+ }).merge(ListTableFieldsOptionsBaseSchema).describe(ListTableFieldsDescription).meta({ aliases: { tableId: "table", fieldKeys: "fields" } });
2451
+ var ListTableFieldsOptionsSchemaDeprecated = z.object({
2452
2452
  tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
2453
- });
2453
+ }).merge(ListTableFieldsOptionsBaseSchema);
2454
2454
  var ListTableFieldsOptionsInputSchema = z.union([ListTableFieldsOptionsSchema, ListTableFieldsOptionsSchemaDeprecated]).describe(ListTableFieldsDescription);
2455
2455
 
2456
2456
  // src/resolvers/tableFields.ts
@@ -6514,12 +6514,12 @@ var CreateTableFieldsDescription = "Create one or more fields in a table";
6514
6514
  var CreateTableFieldsBase = z.object({
6515
6515
  fields: z.array(NewFieldSchema).min(1).describe("Array of field definitions to create")
6516
6516
  });
6517
- var CreateTableFieldsOptionsSchema = CreateTableFieldsBase.extend({
6517
+ var CreateTableFieldsOptionsSchema = z.object({
6518
6518
  table: TablePropertySchema
6519
- }).describe(CreateTableFieldsDescription).meta({ aliases: { tableId: "table" } });
6520
- var CreateTableFieldsOptionsSchemaDeprecated = CreateTableFieldsBase.extend({
6519
+ }).merge(CreateTableFieldsBase).describe(CreateTableFieldsDescription).meta({ aliases: { tableId: "table" } });
6520
+ var CreateTableFieldsOptionsSchemaDeprecated = z.object({
6521
6521
  tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6522
- });
6522
+ }).merge(CreateTableFieldsBase);
6523
6523
  var CreateTableFieldsOptionsInputSchema = z.union([
6524
6524
  CreateTableFieldsOptionsSchema,
6525
6525
  CreateTableFieldsOptionsSchemaDeprecated
@@ -6697,14 +6697,14 @@ var GetTableRecordDescription = "Get a single record from a table by ID";
6697
6697
  var GetTableRecordOptionsBaseSchema = z.object({
6698
6698
  keyMode: KeyModeSchema
6699
6699
  });
6700
- var GetTableRecordOptionsSchema = GetTableRecordOptionsBaseSchema.extend({
6700
+ var GetTableRecordOptionsSchema = z.object({
6701
6701
  table: TablePropertySchema,
6702
6702
  record: RecordPropertySchema
6703
- }).describe(GetTableRecordDescription).meta({ aliases: { tableId: "table", recordId: "record" } });
6704
- var GetTableRecordOptionsSchemaDeprecated = GetTableRecordOptionsBaseSchema.extend({
6703
+ }).merge(GetTableRecordOptionsBaseSchema).describe(GetTableRecordDescription).meta({ aliases: { tableId: "table", recordId: "record" } });
6704
+ var GetTableRecordOptionsSchemaDeprecated = z.object({
6705
6705
  tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table"),
6706
6706
  recordId: z.string().regex(/^[A-Z0-9]{26}$/, "Record ID must be a valid ULID").describe("The unique identifier of the record")
6707
- });
6707
+ }).merge(GetTableRecordOptionsBaseSchema);
6708
6708
  var GetTableRecordOptionsInputSchema = z.union([GetTableRecordOptionsSchema, GetTableRecordOptionsSchemaDeprecated]).describe(GetTableRecordDescription);
6709
6709
 
6710
6710
  // src/formatters/tableRecord.ts
@@ -6846,12 +6846,12 @@ var ListTableRecordsBase = z.object({
6846
6846
  cursor: z.string().optional().describe("Cursor to start from"),
6847
6847
  keyMode: KeyModeSchema
6848
6848
  });
6849
- var ListTableRecordsOptionsSchema = ListTableRecordsBase.extend({
6849
+ var ListTableRecordsOptionsSchema = z.object({
6850
6850
  table: TablePropertySchema
6851
- }).describe(ListTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6852
- var ListTableRecordsOptionsSchemaDeprecated = ListTableRecordsBase.extend({
6851
+ }).merge(ListTableRecordsBase).describe(ListTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6852
+ var ListTableRecordsOptionsSchemaDeprecated = z.object({
6853
6853
  tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6854
- });
6854
+ }).merge(ListTableRecordsBase);
6855
6855
  var ListTableRecordsOptionsInputSchema = z.union([
6856
6856
  ListTableRecordsOptionsSchema,
6857
6857
  ListTableRecordsOptionsSchemaDeprecated
@@ -6981,14 +6981,12 @@ var CreateTableRecordsBase = z.object({
6981
6981
  records: z.array(NewRecordSchema).min(1).max(100).describe("Array of records to create (max 100)"),
6982
6982
  keyMode: KeyModeSchema
6983
6983
  });
6984
- var CreateTableRecordsOptionsSchema = CreateTableRecordsBase.extend({
6984
+ var CreateTableRecordsOptionsSchema = z.object({
6985
6985
  table: TablePropertySchema
6986
- }).describe(CreateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6987
- var CreateTableRecordsOptionsSchemaDeprecated = CreateTableRecordsBase.extend(
6988
- {
6989
- tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6990
- }
6991
- );
6986
+ }).merge(CreateTableRecordsBase).describe(CreateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
6987
+ var CreateTableRecordsOptionsSchemaDeprecated = z.object({
6988
+ tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
6989
+ }).merge(CreateTableRecordsBase);
6992
6990
  var CreateTableRecordsOptionsInputSchema = z.union([
6993
6991
  CreateTableRecordsOptionsSchema,
6994
6992
  CreateTableRecordsOptionsSchemaDeprecated
@@ -7165,14 +7163,12 @@ var UpdateTableRecordsBase = z.object({
7165
7163
  records: z.array(UpdateRecordSchema).min(1).max(100).describe("Array of records to update (max 100)"),
7166
7164
  keyMode: KeyModeSchema
7167
7165
  });
7168
- var UpdateTableRecordsOptionsSchema = UpdateTableRecordsBase.extend({
7166
+ var UpdateTableRecordsOptionsSchema = z.object({
7169
7167
  table: TablePropertySchema
7170
- }).describe(UpdateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7171
- var UpdateTableRecordsOptionsSchemaDeprecated = UpdateTableRecordsBase.extend(
7172
- {
7173
- tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7174
- }
7175
- );
7168
+ }).merge(UpdateTableRecordsBase).describe(UpdateTableRecordsDescription).meta({ aliases: { tableId: "table" } });
7169
+ var UpdateTableRecordsOptionsSchemaDeprecated = z.object({
7170
+ tableId: z.string().regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID").describe("The unique identifier of the table")
7171
+ }).merge(UpdateTableRecordsBase);
7176
7172
  var UpdateTableRecordsOptionsInputSchema = z.union([
7177
7173
  UpdateTableRecordsOptionsSchema,
7178
7174
  UpdateTableRecordsOptionsSchemaDeprecated
@@ -7904,7 +7900,7 @@ function getCpuTime() {
7904
7900
  }
7905
7901
 
7906
7902
  // src/plugins/eventEmission/builders.ts
7907
- var SDK_VERSION = "0.40.0";
7903
+ var SDK_VERSION = "0.40.2";
7908
7904
  function createBaseEvent(context = {}) {
7909
7905
  return {
7910
7906
  event_id: generateEventId(),
@@ -142,6 +142,9 @@ export declare const NewFieldSchema: z.ZodObject<{
142
142
  }, z.core.$strip>;
143
143
  export type NewField = z.infer<typeof NewFieldSchema>;
144
144
  export declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
145
+ table: z.ZodString & {
146
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
147
+ };
145
148
  fields: z.ZodArray<z.ZodObject<{
146
149
  type: z.ZodEnum<{
147
150
  string: "string";
@@ -179,11 +182,9 @@ export declare const CreateTableFieldsOptionsSchema: z.ZodObject<{
179
182
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
180
183
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
181
184
  }, z.core.$strip>>;
182
- table: z.ZodString & {
183
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
184
- };
185
185
  }, z.core.$strip>;
186
186
  declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
187
+ tableId: z.ZodString;
187
188
  fields: z.ZodArray<z.ZodObject<{
188
189
  type: z.ZodEnum<{
189
190
  string: "string";
@@ -221,9 +222,11 @@ declare const CreateTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
221
222
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
222
223
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
223
224
  }, z.core.$strip>>;
224
- tableId: z.ZodString;
225
225
  }, z.core.$strip>;
226
226
  export declare const CreateTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
227
+ table: z.ZodString & {
228
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
229
+ };
227
230
  fields: z.ZodArray<z.ZodObject<{
228
231
  type: z.ZodEnum<{
229
232
  string: "string";
@@ -261,10 +264,8 @@ export declare const CreateTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z
261
264
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
262
265
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
263
266
  }, z.core.$strip>>;
264
- table: z.ZodString & {
265
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
266
- };
267
267
  }, z.core.$strip>, z.ZodObject<{
268
+ tableId: z.ZodString;
268
269
  fields: z.ZodArray<z.ZodObject<{
269
270
  type: z.ZodEnum<{
270
271
  string: "string";
@@ -302,7 +303,6 @@ export declare const CreateTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z
302
303
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
303
304
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
304
305
  }, z.core.$strip>>;
305
- tableId: z.ZodString;
306
306
  }, z.core.$strip>]>;
307
307
  export type CreateTableFieldsOptions = (z.infer<typeof CreateTableFieldsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof CreateTableFieldsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
308
308
  /** @deprecated Use `table` instead. */
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableFields/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EAEf,eAAe,EACf,KAAK,SAAS,EACf,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,CAAC;AAS1B,eAAO,MAAM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AAC;AAG1C,MAAM,MAAM,wBAAwB,GAChC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,GAAG,eAAe,CAAC,GAClE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,wCAAwC,CAAC,EAAE,SAAS,CAAC,GACxE,eAAe,GAAG;IAChB,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,wCAAwC,CAChD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAGT,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,SAAS,EAAE,CAAC;CACnB;AAGD,MAAM,MAAM,sBAAsB,GAC9B,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAGvB,MAAM,WAAW,4BAA4B;IAC3C,iBAAiB,EAAE,CACjB,OAAO,EAAE,wBAAwB,KAC9B,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACvC"}
@@ -37,18 +37,22 @@ const CreateTableFieldsBase = z.object({
37
37
  .describe("Array of field definitions to create"),
38
38
  });
39
39
  // Schema for docs/registry (new param names only)
40
- export const CreateTableFieldsOptionsSchema = CreateTableFieldsBase.extend({
40
+ export const CreateTableFieldsOptionsSchema = z
41
+ .object({
41
42
  table: TablePropertySchema,
42
43
  })
44
+ .merge(CreateTableFieldsBase)
43
45
  .describe(CreateTableFieldsDescription)
44
46
  .meta({ aliases: { tableId: "table" } });
45
47
  // Deprecated schema (backward compat)
46
- const CreateTableFieldsOptionsSchemaDeprecated = CreateTableFieldsBase.extend({
48
+ const CreateTableFieldsOptionsSchemaDeprecated = z
49
+ .object({
47
50
  tableId: z
48
51
  .string()
49
52
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
50
53
  .describe("The unique identifier of the table"),
51
- });
54
+ })
55
+ .merge(CreateTableFieldsBase);
52
56
  // Union for runtime validation
53
57
  export const CreateTableFieldsOptionsInputSchema = z
54
58
  .union([
@@ -37,6 +37,9 @@ export declare const NewRecordSchema: z.ZodObject<{
37
37
  }, z.core.$strip>;
38
38
  export type NewRecord = z.infer<typeof NewRecordSchema>;
39
39
  export declare const CreateTableRecordsOptionsSchema: z.ZodObject<{
40
+ table: z.ZodString & {
41
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
42
+ };
40
43
  records: z.ZodArray<z.ZodObject<{
41
44
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
42
45
  }, z.core.$strip>>;
@@ -44,11 +47,9 @@ export declare const CreateTableRecordsOptionsSchema: z.ZodObject<{
44
47
  names: "names";
45
48
  ids: "ids";
46
49
  }>>>;
47
- table: z.ZodString & {
48
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
49
- };
50
50
  }, z.core.$strip>;
51
51
  declare const CreateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
52
+ tableId: z.ZodString;
52
53
  records: z.ZodArray<z.ZodObject<{
53
54
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
54
55
  }, z.core.$strip>>;
@@ -56,9 +57,11 @@ declare const CreateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
56
57
  names: "names";
57
58
  ids: "ids";
58
59
  }>>>;
59
- tableId: z.ZodString;
60
60
  }, z.core.$strip>;
61
61
  export declare const CreateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
62
+ table: z.ZodString & {
63
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
64
+ };
62
65
  records: z.ZodArray<z.ZodObject<{
63
66
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
64
67
  }, z.core.$strip>>;
@@ -66,10 +69,8 @@ export declare const CreateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [
66
69
  names: "names";
67
70
  ids: "ids";
68
71
  }>>>;
69
- table: z.ZodString & {
70
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
71
- };
72
72
  }, z.core.$strip>, z.ZodObject<{
73
+ tableId: z.ZodString;
73
74
  records: z.ZodArray<z.ZodObject<{
74
75
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
75
76
  }, z.core.$strip>>;
@@ -77,7 +78,6 @@ export declare const CreateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [
77
78
  names: "names";
78
79
  ids: "ids";
79
80
  }>>>;
80
- tableId: z.ZodString;
81
81
  }, z.core.$strip>]>;
82
82
  export type CreateTableRecordsOptions = (z.infer<typeof CreateTableRecordsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof CreateTableRecordsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
83
83
  /** @deprecated Use `table` instead. */
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAW3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,eAAe;;iBAI1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAcxD,eAAO,MAAM,+BAA+B;;;;;;;;;;;iBAIF,CAAC;AAG3C,QAAA,MAAM,yCAAyC;;;;;;;;;iBAO9C,CAAC;AAGF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;mBAKP,CAAC;AAG3C,MAAM,MAAM,yBAAyB,GACjC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GAAG,eAAe,CAAC,GACnE,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,EACzD,SAAS,CACV,GACC,eAAe,GAAG;IAChB,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,yCAAyC,CACjD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAET,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,uBAAuB,GAC/B,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/createTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,gBAAgB,EAChB,KAAK,UAAU,EAChB,MAAM,2BAA2B,CAAC;AAInC,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,YAAY,EAAE,UAAU,EAAE,CAAC;AAW3B,eAAO,MAAM,mCAAmC;;;;;;;;;;;;;;;;;;;;;;;;;;iBAE9C,CAAC;AAEH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CACjD,OAAO,mCAAmC,CAC3C,CAAC;AAEF,eAAO,MAAM,eAAe;;iBAI1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAcxD,eAAO,MAAM,+BAA+B;;;;;;;;;;;iBAMF,CAAC;AAG3C,QAAA,MAAM,yCAAyC;;;;;;;;;iBAOf,CAAC;AAGjC,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;mBAKP,CAAC;AAG3C,MAAM,MAAM,yBAAyB,GACjC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,GAAG,eAAe,CAAC,GACnE,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,EACzD,SAAS,CACV,GACC,eAAe,GAAG;IAChB,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,yCAAyC,CACjD,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAET,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,uBAAuB,GAC/B,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
@@ -30,18 +30,22 @@ const CreateTableRecordsBase = z.object({
30
30
  keyMode: KeyModeSchema,
31
31
  });
32
32
  // Schema for docs/registry (new param names only)
33
- export const CreateTableRecordsOptionsSchema = CreateTableRecordsBase.extend({
33
+ export const CreateTableRecordsOptionsSchema = z
34
+ .object({
34
35
  table: TablePropertySchema,
35
36
  })
37
+ .merge(CreateTableRecordsBase)
36
38
  .describe(CreateTableRecordsDescription)
37
39
  .meta({ aliases: { tableId: "table" } });
38
40
  // Deprecated schema (backward compat)
39
- const CreateTableRecordsOptionsSchemaDeprecated = CreateTableRecordsBase.extend({
41
+ const CreateTableRecordsOptionsSchemaDeprecated = z
42
+ .object({
40
43
  tableId: z
41
44
  .string()
42
45
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
43
46
  .describe("The unique identifier of the table"),
44
- });
47
+ })
48
+ .merge(CreateTableRecordsBase);
45
49
  // Union for runtime validation
46
50
  export const CreateTableRecordsOptionsInputSchema = z
47
51
  .union([
@@ -33,43 +33,43 @@ export declare const GetTableRecordApiResponseSchema: z.ZodObject<{
33
33
  }, z.core.$strip>;
34
34
  export type GetTableRecordApiResponse = z.infer<typeof GetTableRecordApiResponseSchema>;
35
35
  export declare const GetTableRecordOptionsSchema: z.ZodObject<{
36
- keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
37
- names: "names";
38
- ids: "ids";
39
- }>>>;
40
36
  table: z.ZodString & {
41
37
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
42
38
  };
43
39
  record: z.ZodString & {
44
40
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
45
41
  };
46
- }, z.core.$strip>;
47
- declare const GetTableRecordOptionsSchemaDeprecated: z.ZodObject<{
48
42
  keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
49
43
  names: "names";
50
44
  ids: "ids";
51
45
  }>>>;
46
+ }, z.core.$strip>;
47
+ declare const GetTableRecordOptionsSchemaDeprecated: z.ZodObject<{
52
48
  tableId: z.ZodString;
53
49
  recordId: z.ZodString;
54
- }, z.core.$strip>;
55
- export declare const GetTableRecordOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
56
50
  keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
57
51
  names: "names";
58
52
  ids: "ids";
59
53
  }>>>;
54
+ }, z.core.$strip>;
55
+ export declare const GetTableRecordOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
60
56
  table: z.ZodString & {
61
57
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
62
58
  };
63
59
  record: z.ZodString & {
64
60
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
65
61
  };
66
- }, z.core.$strip>, z.ZodObject<{
67
62
  keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
68
63
  names: "names";
69
64
  ids: "ids";
70
65
  }>>>;
66
+ }, z.core.$strip>, z.ZodObject<{
71
67
  tableId: z.ZodString;
72
68
  recordId: z.ZodString;
69
+ keyMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
70
+ names: "names";
71
+ ids: "ids";
72
+ }>>>;
73
73
  }, z.core.$strip>]>;
74
74
  export type GetTableRecordOptions = (z.infer<typeof GetTableRecordOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof GetTableRecordOptionsSchemaDeprecated>, "tableId" | "recordId"> & {
75
75
  /** @deprecated Use `table` instead. */
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/getTableRecord/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAQ/B,eAAO,MAAM,mBAAmB;;;;;;;;;iBAS9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAUhE,eAAO,MAAM,gBAAgB;;;;;iBAO3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,+BAA+B;;;;;;;;;;;iBAE1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,C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C"}
@@ -36,14 +36,17 @@ const GetTableRecordOptionsBaseSchema = z.object({
36
36
  keyMode: KeyModeSchema,
37
37
  });
38
38
  // Schema for docs/registry (new param names only)
39
- export const GetTableRecordOptionsSchema = GetTableRecordOptionsBaseSchema.extend({
39
+ export const GetTableRecordOptionsSchema = z
40
+ .object({
40
41
  table: TablePropertySchema,
41
42
  record: RecordPropertySchema,
42
43
  })
44
+ .merge(GetTableRecordOptionsBaseSchema)
43
45
  .describe(GetTableRecordDescription)
44
46
  .meta({ aliases: { tableId: "table", recordId: "record" } });
45
47
  // Deprecated schema (backward compat)
46
- const GetTableRecordOptionsSchemaDeprecated = GetTableRecordOptionsBaseSchema.extend({
48
+ const GetTableRecordOptionsSchemaDeprecated = z
49
+ .object({
47
50
  tableId: z
48
51
  .string()
49
52
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
@@ -52,7 +55,8 @@ const GetTableRecordOptionsSchemaDeprecated = GetTableRecordOptionsBaseSchema.ex
52
55
  .string()
53
56
  .regex(/^[A-Z0-9]{26}$/, "Record ID must be a valid ULID")
54
57
  .describe("The unique identifier of the record"),
55
- });
58
+ })
59
+ .merge(GetTableRecordOptionsBaseSchema);
56
60
  // Union for runtime validation
57
61
  export const GetTableRecordOptionsInputSchema = z
58
62
  .union([GetTableRecordOptionsSchema, GetTableRecordOptionsSchemaDeprecated])
@@ -166,27 +166,27 @@ export declare const FieldItemSchema: z.ZodObject<{
166
166
  }, z.core.$strip>;
167
167
  export type FieldItem = z.infer<typeof FieldItemSchema>;
168
168
  export declare const ListTableFieldsOptionsSchema: z.ZodObject<{
169
- fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
170
- fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
171
169
  table: z.ZodString & {
172
170
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
173
171
  };
172
+ fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
173
+ fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
174
174
  }, z.core.$strip>;
175
175
  declare const ListTableFieldsOptionsSchemaDeprecated: z.ZodObject<{
176
+ tableId: z.ZodString;
176
177
  fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
177
178
  fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
178
- tableId: z.ZodString;
179
179
  }, z.core.$strip>;
180
180
  export declare const ListTableFieldsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
181
- fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
182
- fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
183
181
  table: z.ZodString & {
184
182
  _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
185
183
  };
186
- }, z.core.$strip>, z.ZodObject<{
187
184
  fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
188
185
  fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
186
+ }, z.core.$strip>, z.ZodObject<{
189
187
  tableId: z.ZodString;
188
+ fields: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
189
+ fieldKeys: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>>;
190
190
  }, z.core.$strip>]>;
191
191
  export type ListTableFieldsOptions = (z.infer<typeof ListTableFieldsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof ListTableFieldsOptionsSchemaDeprecated>, "tableId" | "fieldKeys"> & {
192
192
  /** @deprecated Use `table` instead. */
@@ -1 +1 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
75
75
  .meta({ deprecated: true }),
76
76
  });
77
77
  // Schema for docs/registry (new param names only)
78
- export const ListTableFieldsOptionsSchema = ListTableFieldsOptionsBaseSchema.extend({
78
+ export const ListTableFieldsOptionsSchema = z
79
+ .object({
79
80
  table: TablePropertySchema,
80
81
  })
82
+ .merge(ListTableFieldsOptionsBaseSchema)
81
83
  .describe(ListTableFieldsDescription)
82
84
  .meta({ aliases: { tableId: "table", fieldKeys: "fields" } });
83
85
  // Deprecated schema (backward compat)
84
- const ListTableFieldsOptionsSchemaDeprecated = ListTableFieldsOptionsBaseSchema.extend({
86
+ const ListTableFieldsOptionsSchemaDeprecated = z
87
+ .object({
85
88
  tableId: z
86
89
  .string()
87
90
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
88
91
  .describe("The unique identifier of the table"),
89
- });
92
+ })
93
+ .merge(ListTableFieldsOptionsBaseSchema);
90
94
  // Union for runtime validation
91
95
  export const ListTableFieldsOptionsInputSchema = z
92
96
  .union([ListTableFieldsOptionsSchema, ListTableFieldsOptionsSchemaDeprecated])
@@ -72,6 +72,9 @@ export declare const SortConditionSchema: z.ZodObject<{
72
72
  }, z.core.$strip>;
73
73
  export type SortCondition = z.infer<typeof SortConditionSchema>;
74
74
  export declare const ListTableRecordsOptionsSchema: z.ZodObject<{
75
+ table: z.ZodString & {
76
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
77
+ };
75
78
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
76
79
  fieldKey: z.ZodString;
77
80
  operator: z.ZodEnum<{
@@ -106,11 +109,9 @@ export declare const ListTableRecordsOptionsSchema: z.ZodObject<{
106
109
  names: "names";
107
110
  ids: "ids";
108
111
  }>>>;
109
- table: z.ZodString & {
110
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
111
- };
112
112
  }, z.core.$strip>;
113
113
  declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
114
+ tableId: z.ZodString;
114
115
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
115
116
  fieldKey: z.ZodString;
116
117
  operator: z.ZodEnum<{
@@ -145,9 +146,11 @@ declare const ListTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
145
146
  names: "names";
146
147
  ids: "ids";
147
148
  }>>>;
148
- tableId: z.ZodString;
149
149
  }, z.core.$strip>;
150
150
  export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
151
+ table: z.ZodString & {
152
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
153
+ };
151
154
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
152
155
  fieldKey: z.ZodString;
153
156
  operator: z.ZodEnum<{
@@ -182,10 +185,8 @@ export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.
182
185
  names: "names";
183
186
  ids: "ids";
184
187
  }>>>;
185
- table: z.ZodString & {
186
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
187
- };
188
188
  }, z.core.$strip>, z.ZodObject<{
189
+ tableId: z.ZodString;
189
190
  filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
191
  fieldKey: z.ZodString;
191
192
  operator: z.ZodEnum<{
@@ -220,7 +221,6 @@ export declare const ListTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.
220
221
  names: "names";
221
222
  ids: "ids";
222
223
  }>>>;
223
- tableId: z.ZodString;
224
224
  }, z.core.$strip>]>;
225
225
  export type ListTableRecordsOptions = z.infer<typeof ListTableRecordsOptionsSchema> | (Omit<z.infer<typeof ListTableRecordsOptionsSchemaDeprecated>, "tableId"> & {
226
226
  /** @deprecated Use `table` instead. */
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/listTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAA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AIzB,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAIpE,eAAO,MAAM,mBAAmB;;;;;;iBAK9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AA2BhE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMA,CAAC;AAG3C,QAAA,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAOf,CAAC;AAG/B,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAKP,CAAC;AAGzC,MAAM,MAAM,uBAAuB,GAC/B,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,GAC7C,CAAC,IAAI,CACH,CAAC,CAAC,KAAK,CAAC,OAAO,uCAAuC,CAAC,EACvD,SAAS,CACV,GAAG;IACF,uCAAuC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,OAAO,uCAAuC,CAC/C,CAAC,SAAS,CAAC,CAAC;CACd,CAAC,CAAC;AAEP,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,EAAE,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,qBAAqB,GAC7B,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,2BAA2B;IAC1C,gBAAgB,EAAE,oBAAoB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;CAC7E"}
@@ -69,18 +69,22 @@ const ListTableRecordsBase = z.object({
69
69
  keyMode: KeyModeSchema,
70
70
  });
71
71
  // Schema for docs/registry (new param names only)
72
- export const ListTableRecordsOptionsSchema = ListTableRecordsBase.extend({
72
+ export const ListTableRecordsOptionsSchema = z
73
+ .object({
73
74
  table: TablePropertySchema,
74
75
  })
76
+ .merge(ListTableRecordsBase)
75
77
  .describe(ListTableRecordsDescription)
76
78
  .meta({ aliases: { tableId: "table" } });
77
79
  // Deprecated schema (backward compat)
78
- const ListTableRecordsOptionsSchemaDeprecated = ListTableRecordsBase.extend({
80
+ const ListTableRecordsOptionsSchemaDeprecated = z
81
+ .object({
79
82
  tableId: z
80
83
  .string()
81
84
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
82
85
  .describe("The unique identifier of the table"),
83
- });
86
+ })
87
+ .merge(ListTableRecordsBase);
84
88
  // Union for runtime validation
85
89
  export const ListTableRecordsOptionsInputSchema = z
86
90
  .union([
@@ -38,6 +38,9 @@ export declare const UpdateRecordSchema: z.ZodObject<{
38
38
  }, z.core.$strip>;
39
39
  export type UpdateRecord = z.infer<typeof UpdateRecordSchema>;
40
40
  export declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
41
+ table: z.ZodString & {
42
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
43
+ };
41
44
  records: z.ZodArray<z.ZodObject<{
42
45
  id: z.ZodString;
43
46
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -46,11 +49,9 @@ export declare const UpdateTableRecordsOptionsSchema: z.ZodObject<{
46
49
  names: "names";
47
50
  ids: "ids";
48
51
  }>>>;
49
- table: z.ZodString & {
50
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
51
- };
52
52
  }, z.core.$strip>;
53
53
  declare const UpdateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
54
+ tableId: z.ZodString;
54
55
  records: z.ZodArray<z.ZodObject<{
55
56
  id: z.ZodString;
56
57
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -59,9 +60,11 @@ declare const UpdateTableRecordsOptionsSchemaDeprecated: z.ZodObject<{
59
60
  names: "names";
60
61
  ids: "ids";
61
62
  }>>>;
62
- tableId: z.ZodString;
63
63
  }, z.core.$strip>;
64
64
  export declare const UpdateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [z.ZodObject<{
65
+ table: z.ZodString & {
66
+ _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
67
+ };
65
68
  records: z.ZodArray<z.ZodObject<{
66
69
  id: z.ZodString;
67
70
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -70,10 +73,8 @@ export declare const UpdateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [
70
73
  names: "names";
71
74
  ids: "ids";
72
75
  }>>>;
73
- table: z.ZodString & {
74
- _def: z.core.$ZodStringDef & import("../../..").PositionalMetadata;
75
- };
76
76
  }, z.core.$strip>, z.ZodObject<{
77
+ tableId: z.ZodString;
77
78
  records: z.ZodArray<z.ZodObject<{
78
79
  id: z.ZodString;
79
80
  data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
@@ -82,7 +83,6 @@ export declare const UpdateTableRecordsOptionsInputSchema: z.ZodUnion<readonly [
82
83
  names: "names";
83
84
  ids: "ids";
84
85
  }>>>;
85
- tableId: z.ZodString;
86
86
  }, z.core.$strip>]>;
87
87
  export type UpdateTableRecordsOptions = (z.infer<typeof UpdateTableRecordsOptionsSchema> & FunctionOptions) | (Omit<z.infer<typeof UpdateTableRecordsOptionsSchemaDeprecated>, "tableId"> & FunctionOptions & {
88
88
  /** @deprecated Use `table` instead. */
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../../src/plugins/tables/updateTableRecords/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EACV,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,gBAAgB,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MAAM,uBAAuB,GAC/B,yBAAyB,GACzB,cAAc,GACd,qBAAqB,GACrB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,6BAA6B;IAC5C,kBAAkB,EAAE,CAClB,OAAO,EAAE,yBAAyB,KAC/B,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACxC"}
@@ -30,18 +30,22 @@ const UpdateTableRecordsBase = z.object({
30
30
  keyMode: KeyModeSchema,
31
31
  });
32
32
  // Schema for docs/registry (new param names only)
33
- export const UpdateTableRecordsOptionsSchema = UpdateTableRecordsBase.extend({
33
+ export const UpdateTableRecordsOptionsSchema = z
34
+ .object({
34
35
  table: TablePropertySchema,
35
36
  })
37
+ .merge(UpdateTableRecordsBase)
36
38
  .describe(UpdateTableRecordsDescription)
37
39
  .meta({ aliases: { tableId: "table" } });
38
40
  // Deprecated schema (backward compat)
39
- const UpdateTableRecordsOptionsSchemaDeprecated = UpdateTableRecordsBase.extend({
41
+ const UpdateTableRecordsOptionsSchemaDeprecated = z
42
+ .object({
40
43
  tableId: z
41
44
  .string()
42
45
  .regex(/^[A-Z0-9]{26}$/, "Table ID must be a valid ULID")
43
46
  .describe("The unique identifier of the table"),
44
- });
47
+ })
48
+ .merge(UpdateTableRecordsBase);
45
49
  // Union for runtime validation
46
50
  export const UpdateTableRecordsOptionsInputSchema = z
47
51
  .union([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zapier/zapier-sdk",
3
- "version": "0.40.0",
3
+ "version": "0.40.2",
4
4
  "description": "Complete Zapier SDK - combines all Zapier SDK packages",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",