@rashidazarang/airtable-mcp 3.1.0 → 3.2.5

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 (100) hide show
  1. package/README.md +62 -25
  2. package/bin/airtable-mcp.js +12 -32
  3. package/dist/typescript/airtable-mcp-server.js +77 -0
  4. package/dist/typescript/airtable-mcp-server.js.map +1 -0
  5. package/dist/typescript/app/airtable-client.js +325 -0
  6. package/dist/typescript/app/airtable-client.js.map +1 -0
  7. package/dist/typescript/app/config.js +141 -0
  8. package/dist/typescript/app/config.js.map +1 -0
  9. package/dist/typescript/app/context.js +3 -0
  10. package/dist/typescript/app/context.js.map +1 -0
  11. package/dist/typescript/app/exceptions.js +85 -0
  12. package/dist/typescript/app/exceptions.js.map +1 -0
  13. package/dist/typescript/app/governance.js +58 -0
  14. package/dist/typescript/app/governance.js.map +1 -0
  15. package/dist/typescript/app/logger.js +47 -0
  16. package/dist/typescript/app/logger.js.map +1 -0
  17. package/dist/typescript/app/rateLimiter.js +37 -0
  18. package/dist/typescript/app/rateLimiter.js.map +1 -0
  19. package/dist/typescript/app/tools/create.js +54 -0
  20. package/dist/typescript/app/tools/create.js.map +1 -0
  21. package/dist/typescript/app/tools/describe.js +146 -0
  22. package/dist/typescript/app/tools/describe.js.map +1 -0
  23. package/dist/typescript/app/tools/handleError.js +54 -0
  24. package/dist/typescript/app/tools/handleError.js.map +1 -0
  25. package/dist/typescript/app/tools/index.js +24 -0
  26. package/dist/typescript/app/tools/index.js.map +1 -0
  27. package/dist/typescript/app/tools/listBases.js +52 -0
  28. package/dist/typescript/app/tools/listBases.js.map +1 -0
  29. package/dist/typescript/app/tools/listExceptions.js +18 -0
  30. package/dist/typescript/app/tools/listExceptions.js.map +1 -0
  31. package/dist/typescript/app/tools/listGovernance.js +17 -0
  32. package/dist/typescript/app/tools/listGovernance.js.map +1 -0
  33. package/dist/typescript/app/tools/query.js +126 -0
  34. package/dist/typescript/app/tools/query.js.map +1 -0
  35. package/dist/typescript/app/tools/update.js +56 -0
  36. package/dist/typescript/app/tools/update.js.map +1 -0
  37. package/dist/typescript/app/tools/upsert.js +65 -0
  38. package/dist/typescript/app/tools/upsert.js.map +1 -0
  39. package/dist/typescript/app/tools/webhooks.js +44 -0
  40. package/dist/typescript/app/tools/webhooks.js.map +1 -0
  41. package/dist/typescript/app/types.js +282 -0
  42. package/dist/typescript/app/types.js.map +1 -0
  43. package/dist/typescript/apps-sdk/mappers.js +70 -0
  44. package/dist/typescript/apps-sdk/mappers.js.map +1 -0
  45. package/dist/typescript/errors.js +75 -0
  46. package/dist/typescript/errors.js.map +1 -0
  47. package/dist/typescript/index.js +27 -0
  48. package/dist/typescript/index.js.map +1 -0
  49. package/package.json +49 -30
  50. package/tsconfig.json +10 -4
  51. package/types/typescript/airtable-mcp-server.d.ts +2 -0
  52. package/types/typescript/app/airtable-client.d.ts +49 -0
  53. package/types/typescript/app/config.d.ts +16 -0
  54. package/types/typescript/app/context.d.ts +12 -0
  55. package/types/typescript/app/exceptions.d.ts +12 -0
  56. package/types/typescript/app/governance.d.ts +18 -0
  57. package/types/typescript/app/logger.d.ts +13 -0
  58. package/types/typescript/app/rateLimiter.d.ts +13 -0
  59. package/types/typescript/app/tools/create.d.ts +3 -0
  60. package/types/typescript/app/tools/describe.d.ts +3 -0
  61. package/types/typescript/app/tools/handleError.d.ts +8 -0
  62. package/types/typescript/app/tools/index.d.ts +3 -0
  63. package/types/typescript/app/tools/listBases.d.ts +33 -0
  64. package/types/typescript/app/tools/listExceptions.d.ts +3 -0
  65. package/types/typescript/app/tools/listGovernance.d.ts +3 -0
  66. package/types/typescript/app/tools/query.d.ts +3 -0
  67. package/types/typescript/app/tools/update.d.ts +3 -0
  68. package/types/typescript/app/tools/upsert.d.ts +3 -0
  69. package/types/typescript/app/tools/webhooks.d.ts +3 -0
  70. package/types/typescript/app/types.d.ts +830 -0
  71. package/types/typescript/apps-sdk/mappers.d.ts +53 -0
  72. package/types/typescript/errors.d.ts +55 -0
  73. package/types/typescript/index.d.ts +10 -0
  74. package/types/typescript/prompt-templates.d.ts +5 -0
  75. package/types/typescript/tools-schemas.d.ts +5 -0
  76. package/airtable_simple.js +0 -1561
  77. package/airtable_simple_production.js +0 -1564
  78. package/dist/airtable-mcp-server.js +0 -660
  79. package/dist/airtable-mcp-server.js.map +0 -1
  80. package/dist/test-suite.js +0 -421
  81. package/dist/test-suite.js.map +0 -1
  82. package/examples/airtable-crud-example.js +0 -203
  83. package/examples/building-mcp.md +0 -6666
  84. package/examples/claude_config.json +0 -4
  85. package/examples/claude_simple_config.json +0 -7
  86. package/examples/env-demo.js +0 -172
  87. package/examples/example-tasks-update.json +0 -23
  88. package/examples/example-tasks.json +0 -26
  89. package/examples/example_usage.md +0 -124
  90. package/examples/python_debug_patch.txt +0 -27
  91. package/examples/sample-transform.js +0 -76
  92. package/examples/typescript/advanced-ai-prompts.ts +0 -447
  93. package/examples/typescript/basic-usage.ts +0 -174
  94. package/examples/typescript/claude-desktop-config.json +0 -29
  95. package/examples/windsurf_mcp_config.json +0 -17
  96. package/types/ai-prompts.d.ts +0 -321
  97. package/types/airtable-mcp-server.d.ts +0 -52
  98. package/types/index.d.ts +0 -357
  99. package/types/tools.d.ts +0 -514
  100. /package/types/{test-suite.d.ts → typescript/test-suite.d.ts} +0 -0
@@ -0,0 +1,830 @@
1
+ import { z } from 'zod';
2
+ export declare const describeInputSchema: z.ZodEffects<z.ZodObject<{
3
+ scope: z.ZodEnum<["base", "table"]>;
4
+ baseId: z.ZodString;
5
+ table: z.ZodOptional<z.ZodString>;
6
+ includeFields: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
7
+ 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
+ }>;
33
+ export declare const describeInputShape: {
34
+ scope: z.ZodEnum<["base", "table"]>;
35
+ baseId: z.ZodString;
36
+ table: z.ZodOptional<z.ZodString>;
37
+ includeFields: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
+ includeViews: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
39
+ };
40
+ export declare const describeOutputSchema: z.ZodObject<{
41
+ base: z.ZodObject<{
42
+ id: z.ZodString;
43
+ 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">>;
51
+ tables: z.ZodOptional<z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ name: z.ZodString;
54
+ description: z.ZodOptional<z.ZodString>;
55
+ primaryFieldId: z.ZodOptional<z.ZodString>;
56
+ fields: z.ZodOptional<z.ZodArray<z.ZodObject<{
57
+ id: z.ZodString;
58
+ name: z.ZodString;
59
+ type: z.ZodString;
60
+ 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
+ }>;
182
+ export declare const queryInputSchema: z.ZodObject<{
183
+ baseId: z.ZodString;
184
+ table: z.ZodString;
185
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
186
+ filterByFormula: z.ZodOptional<z.ZodString>;
187
+ view: z.ZodOptional<z.ZodString>;
188
+ sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
189
+ 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">>;
198
+ pageSize: z.ZodOptional<z.ZodNumber>;
199
+ maxRecords: z.ZodOptional<z.ZodNumber>;
200
+ offset: z.ZodOptional<z.ZodString>;
201
+ 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
+ }>;
231
+ export declare const queryInputShape: {
232
+ baseId: z.ZodString;
233
+ table: z.ZodString;
234
+ fields: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
235
+ filterByFormula: z.ZodOptional<z.ZodString>;
236
+ view: z.ZodOptional<z.ZodString>;
237
+ sorts: z.ZodOptional<z.ZodArray<z.ZodObject<{
238
+ 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">>;
247
+ pageSize: z.ZodOptional<z.ZodNumber>;
248
+ maxRecords: z.ZodOptional<z.ZodNumber>;
249
+ offset: z.ZodOptional<z.ZodString>;
250
+ returnFieldsByFieldId: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
251
+ };
252
+ export declare const queryOutputSchema: z.ZodObject<{
253
+ records: z.ZodArray<z.ZodObject<{
254
+ id: z.ZodString;
255
+ createdTime: z.ZodOptional<z.ZodString>;
256
+ 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">;
266
+ offset: z.ZodOptional<z.ZodString>;
267
+ summary: z.ZodOptional<z.ZodObject<{
268
+ returned: z.ZodNumber;
269
+ 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
+ }>;
300
+ export declare const createInputSchema: z.ZodObject<{
301
+ baseId: z.ZodString;
302
+ table: z.ZodString;
303
+ records: z.ZodArray<z.ZodObject<{
304
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
305
+ }, "strict", z.ZodTypeAny, {
306
+ fields: Record<string, unknown>;
307
+ }, {
308
+ fields: Record<string, unknown>;
309
+ }>, "many">;
310
+ typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
311
+ idempotencyKey: z.ZodOptional<z.ZodString>;
312
+ 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
+ }>;
332
+ export declare const createOutputSchema: z.ZodObject<{
333
+ diff: z.ZodObject<{
334
+ added: z.ZodNumber;
335
+ updated: z.ZodNumber;
336
+ 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
+ }>;
346
+ records: z.ZodOptional<z.ZodArray<z.ZodObject<{
347
+ id: z.ZodString;
348
+ createdTime: z.ZodOptional<z.ZodString>;
349
+ 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">>;
359
+ 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
+ }>;
388
+ export declare const updateOutputSchema: z.ZodObject<{
389
+ diff: z.ZodObject<{
390
+ added: z.ZodNumber;
391
+ updated: z.ZodNumber;
392
+ unchanged: z.ZodNumber;
393
+ 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
+ }>;
405
+ records: z.ZodOptional<z.ZodArray<z.ZodObject<{
406
+ id: z.ZodString;
407
+ createdTime: z.ZodOptional<z.ZodString>;
408
+ 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">>;
418
+ dryRun: z.ZodBoolean;
419
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
420
+ id: z.ZodString;
421
+ field: z.ZodString;
422
+ before: z.ZodOptional<z.ZodUnknown>;
423
+ after: z.ZodOptional<z.ZodUnknown>;
424
+ 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
+ }>;
479
+ export declare const updateInputSchema: z.ZodObject<{
480
+ baseId: z.ZodString;
481
+ table: z.ZodString;
482
+ records: z.ZodArray<z.ZodObject<{
483
+ id: z.ZodString;
484
+ 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">;
492
+ typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
493
+ idempotencyKey: z.ZodOptional<z.ZodString>;
494
+ dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
495
+ conflictStrategy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["fail_on_conflict", "server_merge", "client_merge"]>>>;
496
+ 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
+ }>;
522
+ export declare const upsertInputSchema: z.ZodObject<{
523
+ baseId: z.ZodString;
524
+ table: z.ZodString;
525
+ records: z.ZodArray<z.ZodObject<{
526
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
527
+ }, "strict", z.ZodTypeAny, {
528
+ fields: Record<string, unknown>;
529
+ }, {
530
+ fields: Record<string, unknown>;
531
+ }>, "many">;
532
+ performUpsert: z.ZodObject<{
533
+ fieldsToMergeOn: z.ZodArray<z.ZodString, "many">;
534
+ }, "strict", z.ZodTypeAny, {
535
+ fieldsToMergeOn: string[];
536
+ }, {
537
+ fieldsToMergeOn: string[];
538
+ }>;
539
+ typecast: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
540
+ idempotencyKey: z.ZodOptional<z.ZodString>;
541
+ 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
+ }>;
570
+ export declare const upsertOutputSchema: z.ZodObject<{
571
+ diff: z.ZodObject<{
572
+ added: z.ZodNumber;
573
+ updated: z.ZodNumber;
574
+ unchanged: z.ZodNumber;
575
+ 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
+ }>;
587
+ records: z.ZodOptional<z.ZodArray<z.ZodObject<{
588
+ id: z.ZodString;
589
+ createdTime: z.ZodOptional<z.ZodString>;
590
+ 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">>;
600
+ dryRun: z.ZodBoolean;
601
+ conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
602
+ id: z.ZodString;
603
+ field: z.ZodString;
604
+ before: z.ZodOptional<z.ZodUnknown>;
605
+ after: z.ZodOptional<z.ZodUnknown>;
606
+ 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
+ }>;
661
+ export declare const listExceptionsInputSchema: z.ZodObject<{
662
+ since: z.ZodOptional<z.ZodString>;
663
+ severity: z.ZodOptional<z.ZodEnum<["info", "warning", "error"]>>;
664
+ limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
665
+ 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
+ }>;
677
+ export declare const exceptionItemSchema: z.ZodObject<{
678
+ id: z.ZodString;
679
+ timestamp: z.ZodString;
680
+ severity: z.ZodEnum<["info", "warning", "error"]>;
681
+ category: z.ZodEnum<["rate_limit", "validation", "auth", "conflict", "schema_drift", "other"]>;
682
+ summary: z.ZodString;
683
+ details: z.ZodOptional<z.ZodString>;
684
+ 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
+ }>;
702
+ export declare const listExceptionsOutputSchema: z.ZodObject<{
703
+ items: z.ZodArray<z.ZodObject<{
704
+ id: z.ZodString;
705
+ timestamp: z.ZodString;
706
+ severity: z.ZodEnum<["info", "warning", "error"]>;
707
+ category: z.ZodEnum<["rate_limit", "validation", "auth", "conflict", "schema_drift", "other"]>;
708
+ summary: z.ZodString;
709
+ details: z.ZodOptional<z.ZodString>;
710
+ 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">;
728
+ 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
+ }>;
752
+ export declare const governanceOutputSchema: z.ZodObject<{
753
+ allowedBases: z.ZodArray<z.ZodString, "many">;
754
+ allowedTables: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
755
+ baseId: z.ZodString;
756
+ 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">>;
765
+ piiFields: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodObject<{
766
+ baseId: z.ZodString;
767
+ table: z.ZodString;
768
+ 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"]>>;
783
+ 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
+ }>;
817
+ export type DescribeInput = z.infer<typeof describeInputSchema>;
818
+ export type DescribeOutput = z.infer<typeof describeOutputSchema>;
819
+ export type QueryInput = z.infer<typeof queryInputSchema>;
820
+ export type QueryOutput = z.infer<typeof queryOutputSchema>;
821
+ export type CreateInput = z.infer<typeof createInputSchema>;
822
+ export type CreateOutput = z.infer<typeof createOutputSchema>;
823
+ export type UpdateInput = z.infer<typeof updateInputSchema>;
824
+ export type UpdateOutput = z.infer<typeof updateOutputSchema>;
825
+ export type UpsertInput = z.infer<typeof upsertInputSchema>;
826
+ export type UpsertOutput = z.infer<typeof upsertOutputSchema>;
827
+ export type ListExceptionsInput = z.infer<typeof listExceptionsInputSchema>;
828
+ export type ExceptionItem = z.infer<typeof exceptionItemSchema>;
829
+ export type ListExceptionsOutput = z.infer<typeof listExceptionsOutputSchema>;
830
+ export type GovernanceSnapshot = z.infer<typeof governanceOutputSchema>;