@rashidazarang/airtable-mcp 3.2.5 → 3.2.8

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.
Files changed (59) hide show
  1. package/README.md +198 -360
  2. package/dist/typescript/airtable-mcp-server.js +2 -2
  3. package/dist/typescript/airtable-mcp-server.js.map +1 -1
  4. package/dist/typescript/app/airtable-client.js +24 -22
  5. package/dist/typescript/app/airtable-client.js.map +1 -1
  6. package/dist/typescript/app/config.js +11 -1
  7. package/dist/typescript/app/config.js.map +1 -1
  8. package/dist/typescript/app/logger.js +2 -2
  9. package/dist/typescript/app/logger.js.map +1 -1
  10. package/dist/typescript/app/sanitize.js +95 -0
  11. package/dist/typescript/app/sanitize.js.map +1 -0
  12. package/dist/typescript/app/tools/create.js +3 -2
  13. package/dist/typescript/app/tools/create.js.map +1 -1
  14. package/dist/typescript/app/tools/describe.js +65 -21
  15. package/dist/typescript/app/tools/describe.js.map +1 -1
  16. package/dist/typescript/app/tools/handleError.js +161 -10
  17. package/dist/typescript/app/tools/handleError.js.map +1 -1
  18. package/dist/typescript/app/tools/listBases.js +3 -8
  19. package/dist/typescript/app/tools/listBases.js.map +1 -1
  20. package/dist/typescript/app/tools/listExceptions.js +2 -4
  21. package/dist/typescript/app/tools/listExceptions.js.map +1 -1
  22. package/dist/typescript/app/tools/listGovernance.js +2 -4
  23. package/dist/typescript/app/tools/listGovernance.js.map +1 -1
  24. package/dist/typescript/app/tools/query.js +11 -4
  25. package/dist/typescript/app/tools/query.js.map +1 -1
  26. package/dist/typescript/app/tools/response.js +21 -0
  27. package/dist/typescript/app/tools/response.js.map +1 -0
  28. package/dist/typescript/app/tools/update.js +3 -2
  29. package/dist/typescript/app/tools/update.js.map +1 -1
  30. package/dist/typescript/app/tools/upsert.js +3 -2
  31. package/dist/typescript/app/tools/upsert.js.map +1 -1
  32. package/dist/typescript/app/tools/webhooks.js +4 -3
  33. package/dist/typescript/app/tools/webhooks.js.map +1 -1
  34. package/dist/typescript/app/types.js +18 -9
  35. package/dist/typescript/app/types.js.map +1 -1
  36. package/dist/typescript/app/validateApiKey.js +75 -0
  37. package/dist/typescript/app/validateApiKey.js.map +1 -0
  38. package/dist/typescript/errors.js.map +1 -1
  39. package/package.json +4 -5
  40. package/types/typescript/app/airtable-client.d.ts +2 -1
  41. package/types/typescript/app/config.d.ts +1 -0
  42. package/types/typescript/app/sanitize.d.ts +50 -0
  43. package/types/typescript/app/tools/create.d.ts +1 -1
  44. package/types/typescript/app/tools/describe.d.ts +1 -1
  45. package/types/typescript/app/tools/index.d.ts +1 -1
  46. package/types/typescript/app/tools/listBases.d.ts +3 -23
  47. package/types/typescript/app/tools/listExceptions.d.ts +1 -1
  48. package/types/typescript/app/tools/listGovernance.d.ts +1 -1
  49. package/types/typescript/app/tools/query.d.ts +1 -1
  50. package/types/typescript/app/tools/response.d.ts +20 -0
  51. package/types/typescript/app/tools/update.d.ts +1 -1
  52. package/types/typescript/app/tools/upsert.d.ts +1 -1
  53. package/types/typescript/app/tools/webhooks.d.ts +1 -1
  54. package/types/typescript/app/types.d.ts +149 -661
  55. package/types/typescript/app/validateApiKey.d.ts +25 -0
  56. package/types/typescript/errors.d.ts +2 -0
  57. package/dist/typescript/apps-sdk/mappers.js +0 -70
  58. package/dist/typescript/apps-sdk/mappers.js.map +0 -1
  59. package/types/typescript/apps-sdk/mappers.d.ts +0 -53
@@ -1,39 +1,47 @@
1
1
  import { z } from 'zod';
2
- export declare const describeInputSchema: z.ZodEffects<z.ZodObject<{
3
- scope: z.ZodEnum<["base", "table"]>;
2
+ /**
3
+ * Shared Zod schemas and TypeScript types for Airtable Brain tools.
4
+ * Keep these aligned with the JSON Schemas under docs/prd/schemas.
5
+ */
6
+ /**
7
+ * Detail level for schema operations to optimize LLM context usage.
8
+ * - tableIdentifiersOnly: Only table IDs and names
9
+ * - identifiersOnly: Table, field, and view IDs and names
10
+ * - full: Complete details including field types, options, descriptions
11
+ */
12
+ export declare const detailLevelSchema: z.ZodEnum<{
13
+ tableIdentifiersOnly: "tableIdentifiersOnly";
14
+ identifiersOnly: "identifiersOnly";
15
+ full: "full";
16
+ }>;
17
+ export type DetailLevel = z.infer<typeof detailLevelSchema>;
18
+ export declare const describeInputSchema: z.ZodObject<{
19
+ scope: z.ZodEnum<{
20
+ base: "base";
21
+ table: "table";
22
+ }>;
4
23
  baseId: z.ZodString;
5
24
  table: z.ZodOptional<z.ZodString>;
25
+ detailLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
26
+ tableIdentifiersOnly: "tableIdentifiersOnly";
27
+ identifiersOnly: "identifiersOnly";
28
+ full: "full";
29
+ }>>>;
6
30
  includeFields: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
7
31
  includeViews: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
8
- }, "strict", z.ZodTypeAny, {
9
- scope: "base" | "table";
10
- baseId: string;
11
- includeFields: boolean;
12
- includeViews: boolean;
13
- table?: string | undefined;
14
- }, {
15
- scope: "base" | "table";
16
- baseId: string;
17
- table?: string | undefined;
18
- includeFields?: boolean | undefined;
19
- includeViews?: boolean | undefined;
20
- }>, {
21
- scope: "base" | "table";
22
- baseId: string;
23
- includeFields: boolean;
24
- includeViews: boolean;
25
- table?: string | undefined;
26
- }, {
27
- scope: "base" | "table";
28
- baseId: string;
29
- table?: string | undefined;
30
- includeFields?: boolean | undefined;
31
- includeViews?: boolean | undefined;
32
- }>;
32
+ }, z.core.$strict>;
33
33
  export declare const describeInputShape: {
34
- scope: z.ZodEnum<["base", "table"]>;
34
+ scope: z.ZodEnum<{
35
+ base: "base";
36
+ table: "table";
37
+ }>;
35
38
  baseId: z.ZodString;
36
39
  table: z.ZodOptional<z.ZodString>;
40
+ detailLevel: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
41
+ tableIdentifiersOnly: "tableIdentifiersOnly";
42
+ identifiersOnly: "identifiersOnly";
43
+ full: "full";
44
+ }>>>;
37
45
  includeFields: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
46
  includeViews: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
39
47
  };
@@ -41,13 +49,7 @@ export declare const describeOutputSchema: z.ZodObject<{
41
49
  base: z.ZodObject<{
42
50
  id: z.ZodString;
43
51
  name: z.ZodString;
44
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
45
- id: z.ZodString;
46
- name: z.ZodString;
47
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
48
- id: z.ZodString;
49
- name: z.ZodString;
50
- }, z.ZodTypeAny, "passthrough">>;
52
+ }, z.core.$loose>;
51
53
  tables: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
54
  id: z.ZodString;
53
55
  name: z.ZodString;
@@ -58,192 +60,42 @@ export declare const describeOutputSchema: z.ZodObject<{
58
60
  name: z.ZodString;
59
61
  type: z.ZodString;
60
62
  options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
61
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
62
- id: z.ZodString;
63
- name: z.ZodString;
64
- type: z.ZodString;
65
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
66
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
67
- id: z.ZodString;
68
- name: z.ZodString;
69
- type: z.ZodString;
70
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
71
- }, z.ZodTypeAny, "passthrough">>, "many">>;
72
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
73
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
74
- id: z.ZodString;
75
- name: z.ZodString;
76
- description: z.ZodOptional<z.ZodString>;
77
- primaryFieldId: z.ZodOptional<z.ZodString>;
78
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
79
- id: z.ZodString;
80
- name: z.ZodString;
81
- type: z.ZodString;
82
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
83
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
84
- id: z.ZodString;
85
- name: z.ZodString;
86
- type: z.ZodString;
87
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
88
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
89
- id: z.ZodString;
90
- name: z.ZodString;
91
- type: z.ZodString;
92
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
93
- }, z.ZodTypeAny, "passthrough">>, "many">>;
94
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
95
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
96
- id: z.ZodString;
97
- name: z.ZodString;
98
- description: z.ZodOptional<z.ZodString>;
99
- primaryFieldId: z.ZodOptional<z.ZodString>;
100
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
101
- id: z.ZodString;
102
- name: z.ZodString;
103
- type: z.ZodString;
104
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
105
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
106
- id: z.ZodString;
107
- name: z.ZodString;
108
- type: z.ZodString;
109
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
110
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
111
- id: z.ZodString;
112
- name: z.ZodString;
113
- type: z.ZodString;
114
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
115
- }, z.ZodTypeAny, "passthrough">>, "many">>;
116
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
117
- }, z.ZodTypeAny, "passthrough">>, "many">>;
118
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
119
- }, "strict", z.ZodTypeAny, {
120
- base: {
121
- id: string;
122
- name: string;
123
- } & {
124
- [k: string]: unknown;
125
- };
126
- views?: Record<string, unknown>[] | undefined;
127
- tables?: z.objectOutputType<{
128
- id: z.ZodString;
129
- name: z.ZodString;
130
- description: z.ZodOptional<z.ZodString>;
131
- primaryFieldId: z.ZodOptional<z.ZodString>;
132
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
133
- id: z.ZodString;
134
- name: z.ZodString;
135
- type: z.ZodString;
136
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
137
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
138
- id: z.ZodString;
139
- name: z.ZodString;
140
- type: z.ZodString;
141
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
142
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
143
- id: z.ZodString;
144
- name: z.ZodString;
145
- type: z.ZodString;
146
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
147
- }, z.ZodTypeAny, "passthrough">>, "many">>;
148
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
149
- }, z.ZodTypeAny, "passthrough">[] | undefined;
150
- }, {
151
- base: {
152
- id: string;
153
- name: string;
154
- } & {
155
- [k: string]: unknown;
156
- };
157
- views?: Record<string, unknown>[] | undefined;
158
- tables?: z.objectInputType<{
159
- id: z.ZodString;
160
- name: z.ZodString;
161
- description: z.ZodOptional<z.ZodString>;
162
- primaryFieldId: z.ZodOptional<z.ZodString>;
163
- fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
- id: z.ZodString;
165
- name: z.ZodString;
166
- type: z.ZodString;
167
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
168
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
169
- id: z.ZodString;
170
- name: z.ZodString;
171
- type: z.ZodString;
172
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
173
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
174
- id: z.ZodString;
175
- name: z.ZodString;
176
- type: z.ZodString;
177
- options: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
178
- }, z.ZodTypeAny, "passthrough">>, "many">>;
179
- views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>;
180
- }, z.ZodTypeAny, "passthrough">[] | undefined;
181
- }>;
63
+ }, z.core.$loose>>>;
64
+ views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
65
+ }, z.core.$loose>>>;
66
+ views: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
67
+ }, z.core.$strict>;
182
68
  export declare const queryInputSchema: z.ZodObject<{
183
69
  baseId: z.ZodString;
184
70
  table: z.ZodString;
185
- fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
71
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
72
  filterByFormula: z.ZodOptional<z.ZodString>;
187
73
  view: z.ZodOptional<z.ZodString>;
188
74
  sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
189
75
  field: z.ZodString;
190
- direction: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
191
- }, "strict", z.ZodTypeAny, {
192
- field: string;
193
- direction: "asc" | "desc";
194
- }, {
195
- field: string;
196
- direction?: "asc" | "desc" | undefined;
197
- }>, "many">>;
76
+ direction: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
77
+ asc: "asc";
78
+ desc: "desc";
79
+ }>>>;
80
+ }, z.core.$strict>>>;
198
81
  pageSize: z.ZodOptional<z.ZodNumber>;
199
82
  maxRecords: z.ZodOptional<z.ZodNumber>;
200
83
  offset: z.ZodOptional<z.ZodString>;
201
84
  returnFieldsByFieldId: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
202
- }, "strict", z.ZodTypeAny, {
203
- table: string;
204
- baseId: string;
205
- returnFieldsByFieldId: boolean;
206
- fields?: string[] | undefined;
207
- filterByFormula?: string | undefined;
208
- view?: string | undefined;
209
- sorts?: {
210
- field: string;
211
- direction: "asc" | "desc";
212
- }[] | undefined;
213
- pageSize?: number | undefined;
214
- maxRecords?: number | undefined;
215
- offset?: string | undefined;
216
- }, {
217
- table: string;
218
- baseId: string;
219
- fields?: string[] | undefined;
220
- filterByFormula?: string | undefined;
221
- view?: string | undefined;
222
- sorts?: {
223
- field: string;
224
- direction?: "asc" | "desc" | undefined;
225
- }[] | undefined;
226
- pageSize?: number | undefined;
227
- maxRecords?: number | undefined;
228
- offset?: string | undefined;
229
- returnFieldsByFieldId?: boolean | undefined;
230
- }>;
85
+ }, z.core.$strict>;
231
86
  export declare const queryInputShape: {
232
87
  baseId: z.ZodString;
233
88
  table: z.ZodString;
234
- fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
89
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
235
90
  filterByFormula: z.ZodOptional<z.ZodString>;
236
91
  view: z.ZodOptional<z.ZodString>;
237
92
  sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
93
  field: z.ZodString;
239
- direction: z.ZodDefault<z.ZodOptional<z.ZodEnum<["asc", "desc"]>>>;
240
- }, "strict", z.ZodTypeAny, {
241
- field: string;
242
- direction: "asc" | "desc";
243
- }, {
244
- field: string;
245
- direction?: "asc" | "desc" | undefined;
246
- }>, "many">>;
94
+ direction: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
95
+ asc: "asc";
96
+ desc: "desc";
97
+ }>>>;
98
+ }, z.core.$strict>>>;
247
99
  pageSize: z.ZodOptional<z.ZodNumber>;
248
100
  maxRecords: z.ZodOptional<z.ZodNumber>;
249
101
  offset: z.ZodOptional<z.ZodString>;
@@ -254,167 +106,49 @@ export declare const queryOutputSchema: z.ZodObject<{
254
106
  id: z.ZodString;
255
107
  createdTime: z.ZodOptional<z.ZodString>;
256
108
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
257
- }, "strict", z.ZodTypeAny, {
258
- id: string;
259
- fields: Record<string, unknown>;
260
- createdTime?: string | undefined;
261
- }, {
262
- id: string;
263
- fields: Record<string, unknown>;
264
- createdTime?: string | undefined;
265
- }>, "many">;
109
+ }, z.core.$strict>>;
266
110
  offset: z.ZodOptional<z.ZodString>;
267
111
  summary: z.ZodOptional<z.ZodObject<{
268
112
  returned: z.ZodNumber;
269
113
  hasMore: z.ZodBoolean;
270
- }, "strict", z.ZodTypeAny, {
271
- returned: number;
272
- hasMore: boolean;
273
- }, {
274
- returned: number;
275
- hasMore: boolean;
276
- }>>;
277
- }, "strict", z.ZodTypeAny, {
278
- records: {
279
- id: string;
280
- fields: Record<string, unknown>;
281
- createdTime?: string | undefined;
282
- }[];
283
- offset?: string | undefined;
284
- summary?: {
285
- returned: number;
286
- hasMore: boolean;
287
- } | undefined;
288
- }, {
289
- records: {
290
- id: string;
291
- fields: Record<string, unknown>;
292
- createdTime?: string | undefined;
293
- }[];
294
- offset?: string | undefined;
295
- summary?: {
296
- returned: number;
297
- hasMore: boolean;
298
- } | undefined;
299
- }>;
114
+ }, z.core.$strict>>;
115
+ }, z.core.$strict>;
300
116
  export declare const createInputSchema: z.ZodObject<{
301
117
  baseId: z.ZodString;
302
118
  table: z.ZodString;
303
119
  records: z.ZodArray<z.ZodObject<{
304
120
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
305
- }, "strict", z.ZodTypeAny, {
306
- fields: Record<string, unknown>;
307
- }, {
308
- fields: Record<string, unknown>;
309
- }>, "many">;
121
+ }, z.core.$strict>>;
310
122
  typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
311
123
  idempotencyKey: z.ZodOptional<z.ZodString>;
312
124
  dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
313
- }, "strict", z.ZodTypeAny, {
314
- table: string;
315
- baseId: string;
316
- records: {
317
- fields: Record<string, unknown>;
318
- }[];
319
- typecast: boolean;
320
- dryRun: boolean;
321
- idempotencyKey?: string | undefined;
322
- }, {
323
- table: string;
324
- baseId: string;
325
- records: {
326
- fields: Record<string, unknown>;
327
- }[];
328
- typecast?: boolean | undefined;
329
- idempotencyKey?: string | undefined;
330
- dryRun?: boolean | undefined;
331
- }>;
125
+ }, z.core.$strict>;
332
126
  export declare const createOutputSchema: z.ZodObject<{
333
127
  diff: z.ZodObject<{
334
128
  added: z.ZodNumber;
335
129
  updated: z.ZodNumber;
336
130
  unchanged: z.ZodNumber;
337
- }, "strict", z.ZodTypeAny, {
338
- added: number;
339
- updated: number;
340
- unchanged: number;
341
- }, {
342
- added: number;
343
- updated: number;
344
- unchanged: number;
345
- }>;
131
+ }, z.core.$strict>;
346
132
  records: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
133
  id: z.ZodString;
348
134
  createdTime: z.ZodOptional<z.ZodString>;
349
135
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
350
- }, "strict", z.ZodTypeAny, {
351
- id: string;
352
- fields: Record<string, unknown>;
353
- createdTime?: string | undefined;
354
- }, {
355
- id: string;
356
- fields: Record<string, unknown>;
357
- createdTime?: string | undefined;
358
- }>, "many">>;
136
+ }, z.core.$strict>>>;
359
137
  dryRun: z.ZodBoolean;
360
- warnings: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
361
- }, "strict", z.ZodTypeAny, {
362
- dryRun: boolean;
363
- diff: {
364
- added: number;
365
- updated: number;
366
- unchanged: number;
367
- };
368
- records?: {
369
- id: string;
370
- fields: Record<string, unknown>;
371
- createdTime?: string | undefined;
372
- }[] | undefined;
373
- warnings?: string[] | undefined;
374
- }, {
375
- dryRun: boolean;
376
- diff: {
377
- added: number;
378
- updated: number;
379
- unchanged: number;
380
- };
381
- records?: {
382
- id: string;
383
- fields: Record<string, unknown>;
384
- createdTime?: string | undefined;
385
- }[] | undefined;
386
- warnings?: string[] | undefined;
387
- }>;
138
+ warnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
139
+ }, z.core.$strict>;
388
140
  export declare const updateOutputSchema: z.ZodObject<{
389
141
  diff: z.ZodObject<{
390
142
  added: z.ZodNumber;
391
143
  updated: z.ZodNumber;
392
144
  unchanged: z.ZodNumber;
393
145
  conflicts: z.ZodNumber;
394
- }, "strict", z.ZodTypeAny, {
395
- added: number;
396
- updated: number;
397
- unchanged: number;
398
- conflicts: number;
399
- }, {
400
- added: number;
401
- updated: number;
402
- unchanged: number;
403
- conflicts: number;
404
- }>;
146
+ }, z.core.$strict>;
405
147
  records: z.ZodOptional<z.ZodArray<z.ZodObject<{
406
148
  id: z.ZodString;
407
149
  createdTime: z.ZodOptional<z.ZodString>;
408
150
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
409
- }, "strict", z.ZodTypeAny, {
410
- id: string;
411
- fields: Record<string, unknown>;
412
- createdTime?: string | undefined;
413
- }, {
414
- id: string;
415
- fields: Record<string, unknown>;
416
- createdTime?: string | undefined;
417
- }>, "many">>;
151
+ }, z.core.$strict>>>;
418
152
  dryRun: z.ZodBoolean;
419
153
  conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
420
154
  id: z.ZodString;
@@ -422,181 +156,55 @@ export declare const updateOutputSchema: z.ZodObject<{
422
156
  before: z.ZodOptional<z.ZodUnknown>;
423
157
  after: z.ZodOptional<z.ZodUnknown>;
424
158
  current: z.ZodUnknown;
425
- }, "strict", z.ZodTypeAny, {
426
- id: string;
427
- field: string;
428
- before?: unknown;
429
- after?: unknown;
430
- current?: unknown;
431
- }, {
432
- id: string;
433
- field: string;
434
- before?: unknown;
435
- after?: unknown;
436
- current?: unknown;
437
- }>, "many">>;
438
- }, "strict", z.ZodTypeAny, {
439
- dryRun: boolean;
440
- diff: {
441
- added: number;
442
- updated: number;
443
- unchanged: number;
444
- conflicts: number;
445
- };
446
- records?: {
447
- id: string;
448
- fields: Record<string, unknown>;
449
- createdTime?: string | undefined;
450
- }[] | undefined;
451
- conflicts?: {
452
- id: string;
453
- field: string;
454
- before?: unknown;
455
- after?: unknown;
456
- current?: unknown;
457
- }[] | undefined;
458
- }, {
459
- dryRun: boolean;
460
- diff: {
461
- added: number;
462
- updated: number;
463
- unchanged: number;
464
- conflicts: number;
465
- };
466
- records?: {
467
- id: string;
468
- fields: Record<string, unknown>;
469
- createdTime?: string | undefined;
470
- }[] | undefined;
471
- conflicts?: {
472
- id: string;
473
- field: string;
474
- before?: unknown;
475
- after?: unknown;
476
- current?: unknown;
477
- }[] | undefined;
478
- }>;
159
+ }, z.core.$strict>>>;
160
+ }, z.core.$strict>;
479
161
  export declare const updateInputSchema: z.ZodObject<{
480
162
  baseId: z.ZodString;
481
163
  table: z.ZodString;
482
164
  records: z.ZodArray<z.ZodObject<{
483
165
  id: z.ZodString;
484
166
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
485
- }, "strict", z.ZodTypeAny, {
486
- id: string;
487
- fields: Record<string, unknown>;
488
- }, {
489
- id: string;
490
- fields: Record<string, unknown>;
491
- }>, "many">;
167
+ }, z.core.$strict>>;
492
168
  typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
493
169
  idempotencyKey: z.ZodOptional<z.ZodString>;
494
170
  dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
495
- conflictStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fail_on_conflict", "server_merge", "client_merge"]>>>;
171
+ conflictStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
172
+ fail_on_conflict: "fail_on_conflict";
173
+ server_merge: "server_merge";
174
+ client_merge: "client_merge";
175
+ }>>>;
496
176
  ifUnchangedHash: z.ZodOptional<z.ZodString>;
497
- }, "strict", z.ZodTypeAny, {
498
- table: string;
499
- baseId: string;
500
- records: {
501
- id: string;
502
- fields: Record<string, unknown>;
503
- }[];
504
- typecast: boolean;
505
- dryRun: boolean;
506
- conflictStrategy: "fail_on_conflict" | "server_merge" | "client_merge";
507
- idempotencyKey?: string | undefined;
508
- ifUnchangedHash?: string | undefined;
509
- }, {
510
- table: string;
511
- baseId: string;
512
- records: {
513
- id: string;
514
- fields: Record<string, unknown>;
515
- }[];
516
- typecast?: boolean | undefined;
517
- idempotencyKey?: string | undefined;
518
- dryRun?: boolean | undefined;
519
- conflictStrategy?: "fail_on_conflict" | "server_merge" | "client_merge" | undefined;
520
- ifUnchangedHash?: string | undefined;
521
- }>;
177
+ }, z.core.$strict>;
522
178
  export declare const upsertInputSchema: z.ZodObject<{
523
179
  baseId: z.ZodString;
524
180
  table: z.ZodString;
525
181
  records: z.ZodArray<z.ZodObject<{
526
182
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
527
- }, "strict", z.ZodTypeAny, {
528
- fields: Record<string, unknown>;
529
- }, {
530
- fields: Record<string, unknown>;
531
- }>, "many">;
183
+ }, z.core.$strict>>;
532
184
  performUpsert: z.ZodObject<{
533
- fieldsToMergeOn: z.ZodArray<z.ZodString, "many">;
534
- }, "strict", z.ZodTypeAny, {
535
- fieldsToMergeOn: string[];
536
- }, {
537
- fieldsToMergeOn: string[];
538
- }>;
185
+ fieldsToMergeOn: z.ZodArray<z.ZodString>;
186
+ }, z.core.$strict>;
539
187
  typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
540
188
  idempotencyKey: z.ZodOptional<z.ZodString>;
541
189
  dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
542
- conflictStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fail_on_conflict", "server_merge", "client_merge"]>>>;
543
- }, "strict", z.ZodTypeAny, {
544
- table: string;
545
- baseId: string;
546
- records: {
547
- fields: Record<string, unknown>;
548
- }[];
549
- typecast: boolean;
550
- dryRun: boolean;
551
- conflictStrategy: "fail_on_conflict" | "server_merge" | "client_merge";
552
- performUpsert: {
553
- fieldsToMergeOn: string[];
554
- };
555
- idempotencyKey?: string | undefined;
556
- }, {
557
- table: string;
558
- baseId: string;
559
- records: {
560
- fields: Record<string, unknown>;
561
- }[];
562
- performUpsert: {
563
- fieldsToMergeOn: string[];
564
- };
565
- typecast?: boolean | undefined;
566
- idempotencyKey?: string | undefined;
567
- dryRun?: boolean | undefined;
568
- conflictStrategy?: "fail_on_conflict" | "server_merge" | "client_merge" | undefined;
569
- }>;
190
+ conflictStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
191
+ fail_on_conflict: "fail_on_conflict";
192
+ server_merge: "server_merge";
193
+ client_merge: "client_merge";
194
+ }>>>;
195
+ }, z.core.$strict>;
570
196
  export declare const upsertOutputSchema: z.ZodObject<{
571
197
  diff: z.ZodObject<{
572
198
  added: z.ZodNumber;
573
199
  updated: z.ZodNumber;
574
200
  unchanged: z.ZodNumber;
575
201
  conflicts: z.ZodNumber;
576
- }, "strict", z.ZodTypeAny, {
577
- added: number;
578
- updated: number;
579
- unchanged: number;
580
- conflicts: number;
581
- }, {
582
- added: number;
583
- updated: number;
584
- unchanged: number;
585
- conflicts: number;
586
- }>;
202
+ }, z.core.$strict>;
587
203
  records: z.ZodOptional<z.ZodArray<z.ZodObject<{
588
204
  id: z.ZodString;
589
205
  createdTime: z.ZodOptional<z.ZodString>;
590
206
  fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
591
- }, "strict", z.ZodTypeAny, {
592
- id: string;
593
- fields: Record<string, unknown>;
594
- createdTime?: string | undefined;
595
- }, {
596
- id: string;
597
- fields: Record<string, unknown>;
598
- createdTime?: string | undefined;
599
- }>, "many">>;
207
+ }, z.core.$strict>>>;
600
208
  dryRun: z.ZodBoolean;
601
209
  conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
210
  id: z.ZodString;
@@ -604,216 +212,96 @@ export declare const upsertOutputSchema: z.ZodObject<{
604
212
  before: z.ZodOptional<z.ZodUnknown>;
605
213
  after: z.ZodOptional<z.ZodUnknown>;
606
214
  current: z.ZodUnknown;
607
- }, "strict", z.ZodTypeAny, {
608
- id: string;
609
- field: string;
610
- before?: unknown;
611
- after?: unknown;
612
- current?: unknown;
613
- }, {
614
- id: string;
615
- field: string;
616
- before?: unknown;
617
- after?: unknown;
618
- current?: unknown;
619
- }>, "many">>;
620
- }, "strict", z.ZodTypeAny, {
621
- dryRun: boolean;
622
- diff: {
623
- added: number;
624
- updated: number;
625
- unchanged: number;
626
- conflicts: number;
627
- };
628
- records?: {
629
- id: string;
630
- fields: Record<string, unknown>;
631
- createdTime?: string | undefined;
632
- }[] | undefined;
633
- conflicts?: {
634
- id: string;
635
- field: string;
636
- before?: unknown;
637
- after?: unknown;
638
- current?: unknown;
639
- }[] | undefined;
640
- }, {
641
- dryRun: boolean;
642
- diff: {
643
- added: number;
644
- updated: number;
645
- unchanged: number;
646
- conflicts: number;
647
- };
648
- records?: {
649
- id: string;
650
- fields: Record<string, unknown>;
651
- createdTime?: string | undefined;
652
- }[] | undefined;
653
- conflicts?: {
654
- id: string;
655
- field: string;
656
- before?: unknown;
657
- after?: unknown;
658
- current?: unknown;
659
- }[] | undefined;
660
- }>;
215
+ }, z.core.$strict>>>;
216
+ }, z.core.$strict>;
661
217
  export declare const listExceptionsInputSchema: z.ZodObject<{
662
218
  since: z.ZodOptional<z.ZodString>;
663
- severity: z.ZodOptional<z.ZodEnum<["info", "warning", "error"]>>;
219
+ severity: z.ZodOptional<z.ZodEnum<{
220
+ error: "error";
221
+ info: "info";
222
+ warning: "warning";
223
+ }>>;
664
224
  limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
665
225
  cursor: z.ZodOptional<z.ZodString>;
666
- }, "strict", z.ZodTypeAny, {
667
- limit: number;
668
- since?: string | undefined;
669
- severity?: "info" | "warning" | "error" | undefined;
670
- cursor?: string | undefined;
671
- }, {
672
- since?: string | undefined;
673
- severity?: "info" | "warning" | "error" | undefined;
674
- limit?: number | undefined;
675
- cursor?: string | undefined;
676
- }>;
226
+ }, z.core.$strict>;
677
227
  export declare const exceptionItemSchema: z.ZodObject<{
678
228
  id: z.ZodString;
679
229
  timestamp: z.ZodString;
680
- severity: z.ZodEnum<["info", "warning", "error"]>;
681
- category: z.ZodEnum<["rate_limit", "validation", "auth", "conflict", "schema_drift", "other"]>;
230
+ severity: z.ZodEnum<{
231
+ error: "error";
232
+ info: "info";
233
+ warning: "warning";
234
+ }>;
235
+ category: z.ZodEnum<{
236
+ rate_limit: "rate_limit";
237
+ validation: "validation";
238
+ auth: "auth";
239
+ conflict: "conflict";
240
+ schema_drift: "schema_drift";
241
+ other: "other";
242
+ }>;
682
243
  summary: z.ZodString;
683
244
  details: z.ZodOptional<z.ZodString>;
684
245
  proposedFix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
685
- }, "strict", z.ZodTypeAny, {
686
- id: string;
687
- summary: string;
688
- severity: "info" | "warning" | "error";
689
- timestamp: string;
690
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
691
- details?: string | undefined;
692
- proposedFix?: Record<string, unknown> | undefined;
693
- }, {
694
- id: string;
695
- summary: string;
696
- severity: "info" | "warning" | "error";
697
- timestamp: string;
698
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
699
- details?: string | undefined;
700
- proposedFix?: Record<string, unknown> | undefined;
701
- }>;
246
+ }, z.core.$strict>;
702
247
  export declare const listExceptionsOutputSchema: z.ZodObject<{
703
248
  items: z.ZodArray<z.ZodObject<{
704
249
  id: z.ZodString;
705
250
  timestamp: z.ZodString;
706
- severity: z.ZodEnum<["info", "warning", "error"]>;
707
- category: z.ZodEnum<["rate_limit", "validation", "auth", "conflict", "schema_drift", "other"]>;
251
+ severity: z.ZodEnum<{
252
+ error: "error";
253
+ info: "info";
254
+ warning: "warning";
255
+ }>;
256
+ category: z.ZodEnum<{
257
+ rate_limit: "rate_limit";
258
+ validation: "validation";
259
+ auth: "auth";
260
+ conflict: "conflict";
261
+ schema_drift: "schema_drift";
262
+ other: "other";
263
+ }>;
708
264
  summary: z.ZodString;
709
265
  details: z.ZodOptional<z.ZodString>;
710
266
  proposedFix: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
711
- }, "strict", z.ZodTypeAny, {
712
- id: string;
713
- summary: string;
714
- severity: "info" | "warning" | "error";
715
- timestamp: string;
716
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
717
- details?: string | undefined;
718
- proposedFix?: Record<string, unknown> | undefined;
719
- }, {
720
- id: string;
721
- summary: string;
722
- severity: "info" | "warning" | "error";
723
- timestamp: string;
724
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
725
- details?: string | undefined;
726
- proposedFix?: Record<string, unknown> | undefined;
727
- }>, "many">;
267
+ }, z.core.$strict>>;
728
268
  cursor: z.ZodOptional<z.ZodString>;
729
- }, "strict", z.ZodTypeAny, {
730
- items: {
731
- id: string;
732
- summary: string;
733
- severity: "info" | "warning" | "error";
734
- timestamp: string;
735
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
736
- details?: string | undefined;
737
- proposedFix?: Record<string, unknown> | undefined;
738
- }[];
739
- cursor?: string | undefined;
740
- }, {
741
- items: {
742
- id: string;
743
- summary: string;
744
- severity: "info" | "warning" | "error";
745
- timestamp: string;
746
- category: "validation" | "rate_limit" | "auth" | "conflict" | "schema_drift" | "other";
747
- details?: string | undefined;
748
- proposedFix?: Record<string, unknown> | undefined;
749
- }[];
750
- cursor?: string | undefined;
751
- }>;
269
+ }, z.core.$strict>;
752
270
  export declare const governanceOutputSchema: z.ZodObject<{
753
- allowedBases: z.ZodArray<z.ZodString, "many">;
271
+ allowedBases: z.ZodArray<z.ZodString>;
754
272
  allowedTables: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
755
273
  baseId: z.ZodString;
756
274
  table: z.ZodString;
757
- }, "strict", z.ZodTypeAny, {
758
- table: string;
759
- baseId: string;
760
- }, {
761
- table: string;
762
- baseId: string;
763
- }>, "many">>>;
764
- allowedOperations: z.ZodDefault<z.ZodArray<z.ZodEnum<["describe", "query", "create", "update", "upsert"]>, "many">>;
275
+ }, z.core.$strict>>>>;
276
+ allowedOperations: z.ZodDefault<z.ZodArray<z.ZodEnum<{
277
+ describe: "describe";
278
+ query: "query";
279
+ create: "create";
280
+ update: "update";
281
+ upsert: "upsert";
282
+ }>>>;
765
283
  piiFields: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
766
284
  baseId: z.ZodString;
767
285
  table: z.ZodString;
768
286
  field: z.ZodString;
769
- policy: z.ZodEnum<["mask", "hash", "drop"]>;
770
- }, "strict", z.ZodTypeAny, {
771
- table: string;
772
- baseId: string;
773
- field: string;
774
- policy: "mask" | "hash" | "drop";
775
- }, {
776
- table: string;
777
- baseId: string;
778
- field: string;
779
- policy: "mask" | "hash" | "drop";
780
- }>, "many">>>;
781
- redactionPolicy: z.ZodDefault<z.ZodEnum<["mask_all_pii", "mask_on_inline", "none"]>>;
782
- loggingPolicy: z.ZodDefault<z.ZodEnum<["errors_only", "minimal", "verbose"]>>;
287
+ policy: z.ZodEnum<{
288
+ mask: "mask";
289
+ hash: "hash";
290
+ drop: "drop";
291
+ }>;
292
+ }, z.core.$strict>>>>;
293
+ redactionPolicy: z.ZodDefault<z.ZodEnum<{
294
+ mask_all_pii: "mask_all_pii";
295
+ mask_on_inline: "mask_on_inline";
296
+ none: "none";
297
+ }>>;
298
+ loggingPolicy: z.ZodDefault<z.ZodEnum<{
299
+ errors_only: "errors_only";
300
+ minimal: "minimal";
301
+ verbose: "verbose";
302
+ }>>;
783
303
  retentionDays: z.ZodDefault<z.ZodNumber>;
784
- }, "strict", z.ZodTypeAny, {
785
- allowedBases: string[];
786
- allowedTables: {
787
- table: string;
788
- baseId: string;
789
- }[];
790
- allowedOperations: ("describe" | "query" | "create" | "update" | "upsert")[];
791
- piiFields: {
792
- table: string;
793
- baseId: string;
794
- field: string;
795
- policy: "mask" | "hash" | "drop";
796
- }[];
797
- redactionPolicy: "mask_all_pii" | "mask_on_inline" | "none";
798
- loggingPolicy: "errors_only" | "minimal" | "verbose";
799
- retentionDays: number;
800
- }, {
801
- allowedBases: string[];
802
- allowedTables?: {
803
- table: string;
804
- baseId: string;
805
- }[] | undefined;
806
- allowedOperations?: ("describe" | "query" | "create" | "update" | "upsert")[] | undefined;
807
- piiFields?: {
808
- table: string;
809
- baseId: string;
810
- field: string;
811
- policy: "mask" | "hash" | "drop";
812
- }[] | undefined;
813
- redactionPolicy?: "mask_all_pii" | "mask_on_inline" | "none" | undefined;
814
- loggingPolicy?: "errors_only" | "minimal" | "verbose" | undefined;
815
- retentionDays?: number | undefined;
816
- }>;
304
+ }, z.core.$strict>;
817
305
  export type DescribeInput = z.infer<typeof describeInputSchema>;
818
306
  export type DescribeOutput = z.infer<typeof describeOutputSchema>;
819
307
  export type QueryInput = z.infer<typeof queryInputSchema>;