@objectstack/spec 0.1.1 → 0.1.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.
Files changed (136) hide show
  1. package/README.md +73 -1
  2. package/dist/api/contract.zod.d.ts +1733 -0
  3. package/dist/api/contract.zod.d.ts.map +1 -0
  4. package/dist/api/contract.zod.js +138 -0
  5. package/dist/data/dataset.zod.d.ts +2 -2
  6. package/dist/data/field.zod.d.ts +1648 -10
  7. package/dist/data/field.zod.d.ts.map +1 -1
  8. package/dist/data/field.zod.js +149 -8
  9. package/dist/data/mapping.zod.d.ts +215 -2
  10. package/dist/data/mapping.zod.d.ts.map +1 -1
  11. package/dist/data/object.zod.d.ts +505 -25
  12. package/dist/data/object.zod.d.ts.map +1 -1
  13. package/dist/data/object.zod.js +32 -5
  14. package/dist/data/query.zod.d.ts +349 -0
  15. package/dist/data/query.zod.d.ts.map +1 -1
  16. package/dist/data/query.zod.js +77 -1
  17. package/dist/data/trigger.zod.d.ts +354 -0
  18. package/dist/data/trigger.zod.d.ts.map +1 -0
  19. package/dist/data/trigger.zod.js +195 -0
  20. package/dist/data/validation.zod.d.ts +83 -43
  21. package/dist/data/validation.zod.d.ts.map +1 -1
  22. package/dist/data/validation.zod.js +51 -5
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +9 -0
  26. package/dist/system/api.zod.d.ts +130 -4
  27. package/dist/system/api.zod.d.ts.map +1 -1
  28. package/dist/system/api.zod.js +4 -1
  29. package/dist/system/datasource.zod.d.ts +89 -6
  30. package/dist/system/datasource.zod.d.ts.map +1 -1
  31. package/dist/system/datasource.zod.js +33 -5
  32. package/dist/system/discovery.zod.d.ts +174 -0
  33. package/dist/system/discovery.zod.d.ts.map +1 -0
  34. package/dist/system/discovery.zod.js +53 -0
  35. package/dist/system/driver.zod.d.ts +1525 -0
  36. package/dist/system/driver.zod.d.ts.map +1 -0
  37. package/dist/system/driver.zod.js +290 -0
  38. package/dist/system/license.zod.d.ts +2 -2
  39. package/dist/system/manifest.zod.d.ts +323 -52
  40. package/dist/system/manifest.zod.d.ts.map +1 -1
  41. package/dist/system/manifest.zod.js +91 -17
  42. package/dist/system/plugin.zod.d.ts +3516 -0
  43. package/dist/system/plugin.zod.d.ts.map +1 -0
  44. package/dist/system/plugin.zod.js +226 -0
  45. package/dist/system/territory.zod.d.ts +1 -1
  46. package/dist/system/webhook.zod.d.ts +3 -3
  47. package/dist/ui/action.zod.d.ts +19 -12
  48. package/dist/ui/action.zod.d.ts.map +1 -1
  49. package/dist/ui/action.zod.js +7 -1
  50. package/dist/ui/app.zod.d.ts +109 -3
  51. package/dist/ui/app.zod.d.ts.map +1 -1
  52. package/dist/ui/app.zod.js +13 -2
  53. package/dist/ui/dashboard.zod.d.ts +9 -3
  54. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  55. package/dist/ui/dashboard.zod.js +7 -1
  56. package/dist/ui/page.zod.d.ts +6 -6
  57. package/dist/ui/report.zod.d.ts +9 -0
  58. package/dist/ui/report.zod.d.ts.map +1 -1
  59. package/dist/ui/report.zod.js +7 -1
  60. package/dist/ui/theme.zod.d.ts +1221 -0
  61. package/dist/ui/theme.zod.d.ts.map +1 -0
  62. package/dist/ui/theme.zod.js +202 -0
  63. package/dist/ui/widget.zod.d.ts +350 -0
  64. package/dist/ui/widget.zod.d.ts.map +1 -0
  65. package/dist/ui/widget.zod.js +66 -0
  66. package/json-schema/Action.json +8 -2
  67. package/json-schema/ActionParam.json +8 -2
  68. package/json-schema/Address.json +40 -0
  69. package/json-schema/AggregationFunction.json +19 -0
  70. package/json-schema/AggregationNode.json +42 -0
  71. package/json-schema/Animation.json +56 -0
  72. package/json-schema/ApiCapabilities.json +28 -0
  73. package/json-schema/ApiError.json +27 -0
  74. package/json-schema/ApiRoutes.json +41 -0
  75. package/json-schema/App.json +13 -2
  76. package/json-schema/AsyncValidation.json +70 -0
  77. package/json-schema/BaseResponse.json +63 -0
  78. package/json-schema/BorderRadius.json +44 -0
  79. package/json-schema/Breakpoints.json +36 -0
  80. package/json-schema/BulkRequest.json +29 -0
  81. package/json-schema/BulkResponse.json +108 -0
  82. package/json-schema/ColorPalette.json +83 -0
  83. package/json-schema/ConditionalValidation.json +793 -0
  84. package/json-schema/CreateRequest.json +20 -0
  85. package/json-schema/CrossFieldValidation.json +56 -0
  86. package/json-schema/CustomValidator.json +57 -0
  87. package/json-schema/Datasource.json +0 -18
  88. package/json-schema/DeleteResponse.json +68 -0
  89. package/json-schema/Discovery.json +114 -0
  90. package/json-schema/DriverCapabilities.json +39 -0
  91. package/json-schema/DriverDefinition.json +66 -0
  92. package/json-schema/DriverInterface.json +58 -0
  93. package/json-schema/DriverOptions.json +23 -0
  94. package/json-schema/DriverType.json +1 -18
  95. package/json-schema/ExportRequest.json +786 -0
  96. package/json-schema/Field.json +75 -4
  97. package/json-schema/FieldType.json +8 -2
  98. package/json-schema/FieldWidgetProps.json +327 -0
  99. package/json-schema/I18nContext.json +12 -0
  100. package/json-schema/JoinNode.json +455 -0
  101. package/json-schema/JoinType.json +15 -0
  102. package/json-schema/ListRecordResponse.json +103 -0
  103. package/json-schema/LocationCoordinates.json +36 -0
  104. package/json-schema/Logger.json +25 -0
  105. package/json-schema/Manifest.json +243 -18
  106. package/json-schema/Mapping.json +328 -0
  107. package/json-schema/ModificationResult.json +46 -0
  108. package/json-schema/Object.json +103 -6
  109. package/json-schema/ObjectCapabilities.json +26 -0
  110. package/json-schema/ObjectQLClient.json +12 -0
  111. package/json-schema/Plugin.json +20 -0
  112. package/json-schema/PluginContext.json +91 -0
  113. package/json-schema/PluginLifecycle.json +11 -0
  114. package/json-schema/Query.json +328 -0
  115. package/json-schema/RecordData.json +11 -0
  116. package/json-schema/Router.json +12 -0
  117. package/json-schema/Scheduler.json +12 -0
  118. package/json-schema/ScopedStorage.json +12 -0
  119. package/json-schema/Shadow.json +44 -0
  120. package/json-schema/SingleRecordResponse.json +69 -0
  121. package/json-schema/Spacing.json +64 -0
  122. package/json-schema/SystemAPI.json +12 -0
  123. package/json-schema/Theme.json +543 -0
  124. package/json-schema/ThemeMode.json +14 -0
  125. package/json-schema/Trigger.json +73 -0
  126. package/json-schema/TriggerAction.json +14 -0
  127. package/json-schema/TriggerContext.json +61 -0
  128. package/json-schema/TriggerTiming.json +13 -0
  129. package/json-schema/Typography.json +142 -0
  130. package/json-schema/UpdateRequest.json +20 -0
  131. package/json-schema/ValidationRule.json +583 -0
  132. package/json-schema/WindowFunction.json +24 -0
  133. package/json-schema/WindowFunctionNode.json +104 -0
  134. package/json-schema/WindowSpec.json +65 -0
  135. package/json-schema/ZIndex.json +44 -0
  136. package/package.json +8 -3
@@ -0,0 +1,1525 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Common Driver Options
4
+ * Passed to most driver methods to control behavior (transactions, timeouts, etc.)
5
+ */
6
+ export declare const DriverOptionsSchema: z.ZodObject<{
7
+ /**
8
+ * Transaction handle/identifier.
9
+ * If provided, the operation must run within this transaction.
10
+ */
11
+ transaction: z.ZodOptional<z.ZodAny>;
12
+ /**
13
+ * Operation timeout in milliseconds.
14
+ */
15
+ timeout: z.ZodOptional<z.ZodNumber>;
16
+ /**
17
+ * Whether to bypass cache and force a fresh read.
18
+ */
19
+ skipCache: z.ZodOptional<z.ZodBoolean>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ timeout?: number | undefined;
22
+ transaction?: any;
23
+ skipCache?: boolean | undefined;
24
+ }, {
25
+ timeout?: number | undefined;
26
+ transaction?: any;
27
+ skipCache?: boolean | undefined;
28
+ }>;
29
+ /**
30
+ * Driver Capabilities Schema
31
+ *
32
+ * Defines what features a database driver supports.
33
+ * This allows ObjectQL to adapt its behavior based on underlying database capabilities.
34
+ */
35
+ export declare const DriverCapabilitiesSchema: z.ZodObject<{
36
+ /**
37
+ * Whether the driver supports database transactions.
38
+ * If true, beginTransaction, commit, and rollback must be implemented.
39
+ */
40
+ transactions: z.ZodBoolean;
41
+ /**
42
+ * Whether the driver supports SQL-style joins.
43
+ * If false, ObjectQL will fetch related data separately and join in memory.
44
+ */
45
+ joins: z.ZodBoolean;
46
+ /**
47
+ * Whether the driver supports full-text search.
48
+ * If true, text search queries can be pushed to the database.
49
+ */
50
+ fullTextSearch: z.ZodBoolean;
51
+ /**
52
+ * Whether the driver supports JSON field types.
53
+ * If false, JSON data will be serialized as strings.
54
+ */
55
+ jsonFields: z.ZodBoolean;
56
+ /**
57
+ * Whether the driver supports array field types.
58
+ * If false, arrays will be stored as JSON strings or in separate tables.
59
+ */
60
+ arrayFields: z.ZodBoolean;
61
+ }, "strip", z.ZodTypeAny, {
62
+ joins: boolean;
63
+ transactions: boolean;
64
+ fullTextSearch: boolean;
65
+ jsonFields: boolean;
66
+ arrayFields: boolean;
67
+ }, {
68
+ joins: boolean;
69
+ transactions: boolean;
70
+ fullTextSearch: boolean;
71
+ jsonFields: boolean;
72
+ arrayFields: boolean;
73
+ }>;
74
+ /**
75
+ * Unified Database Driver Interface
76
+ *
77
+ * This is the contract that all storage adapters (Postgres, Mongo, Excel, Salesforce) must implement.
78
+ * It abstracts the underlying engine, enabling ObjectStack to be "Database Agnostic".
79
+ */
80
+ export declare const DriverInterfaceSchema: z.ZodObject<{
81
+ /**
82
+ * Driver name (e.g., 'postgresql', 'mongodb', 'rest_api').
83
+ */
84
+ name: z.ZodString;
85
+ /**
86
+ * Driver version.
87
+ */
88
+ version: z.ZodString;
89
+ /**
90
+ * Capabilities descriptor.
91
+ */
92
+ supports: z.ZodObject<{
93
+ /**
94
+ * Whether the driver supports database transactions.
95
+ * If true, beginTransaction, commit, and rollback must be implemented.
96
+ */
97
+ transactions: z.ZodBoolean;
98
+ /**
99
+ * Whether the driver supports SQL-style joins.
100
+ * If false, ObjectQL will fetch related data separately and join in memory.
101
+ */
102
+ joins: z.ZodBoolean;
103
+ /**
104
+ * Whether the driver supports full-text search.
105
+ * If true, text search queries can be pushed to the database.
106
+ */
107
+ fullTextSearch: z.ZodBoolean;
108
+ /**
109
+ * Whether the driver supports JSON field types.
110
+ * If false, JSON data will be serialized as strings.
111
+ */
112
+ jsonFields: z.ZodBoolean;
113
+ /**
114
+ * Whether the driver supports array field types.
115
+ * If false, arrays will be stored as JSON strings or in separate tables.
116
+ */
117
+ arrayFields: z.ZodBoolean;
118
+ }, "strip", z.ZodTypeAny, {
119
+ joins: boolean;
120
+ transactions: boolean;
121
+ fullTextSearch: boolean;
122
+ jsonFields: boolean;
123
+ arrayFields: boolean;
124
+ }, {
125
+ joins: boolean;
126
+ transactions: boolean;
127
+ fullTextSearch: boolean;
128
+ jsonFields: boolean;
129
+ arrayFields: boolean;
130
+ }>;
131
+ /**
132
+ * Initialize connection pool or authenticate.
133
+ */
134
+ connect: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
135
+ /**
136
+ * Close connections and cleanup resources.
137
+ */
138
+ disconnect: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
139
+ /**
140
+ * Check connection health.
141
+ * @returns true if healthy, false otherwise.
142
+ */
143
+ checkHealth: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
144
+ /**
145
+ * Execute a raw command/query native to the driver.
146
+ * Useful for complex reports, stored procedures, or DDL not covered by standard sync.
147
+ *
148
+ * @param command - The raw command (e.g., SQL string, shell command, or remote API payload).
149
+ * @param parameters - Optional array of bound parameters for safe execution (prevention of injection).
150
+ * @param options - Driver options (transaction context, timeout).
151
+ * @returns Promise resolving to the raw result from the driver.
152
+ *
153
+ * @example
154
+ * // SQL Driver
155
+ * await driver.execute('SELECT * FROM complex_view WHERE id = ?', [123]);
156
+ *
157
+ * // Mongo Driver
158
+ * await driver.execute({ aggregate: 'orders', pipeline: [...] });
159
+ */
160
+ execute: z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodOptional<z.ZodArray<z.ZodAny, "many">>, z.ZodOptional<z.ZodObject<{
161
+ /**
162
+ * Transaction handle/identifier.
163
+ * If provided, the operation must run within this transaction.
164
+ */
165
+ transaction: z.ZodOptional<z.ZodAny>;
166
+ /**
167
+ * Operation timeout in milliseconds.
168
+ */
169
+ timeout: z.ZodOptional<z.ZodNumber>;
170
+ /**
171
+ * Whether to bypass cache and force a fresh read.
172
+ */
173
+ skipCache: z.ZodOptional<z.ZodBoolean>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ timeout?: number | undefined;
176
+ transaction?: any;
177
+ skipCache?: boolean | undefined;
178
+ }, {
179
+ timeout?: number | undefined;
180
+ transaction?: any;
181
+ skipCache?: boolean | undefined;
182
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
183
+ /**
184
+ * Find multiple records matching the structured query.
185
+ * Parsing the QueryAST is the responsibility of the driver implementation.
186
+ *
187
+ * @param object - The name of the object/table to query (e.g. 'account').
188
+ * @param query - The structured QueryAST (filters, sorts, joins, pagination).
189
+ * @param options - Driver options.
190
+ * @returns Array of records.
191
+ *
192
+ * @example
193
+ * await driver.find('account', {
194
+ * filters: [['status', '=', 'active'], 'and', ['amount', '>', 500]],
195
+ * sort: [{ field: 'created_at', order: 'desc' }],
196
+ * top: 10
197
+ * });
198
+ */
199
+ find: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
200
+ object: z.ZodString;
201
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
202
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
203
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
204
+ field: z.ZodOptional<z.ZodString>;
205
+ alias: z.ZodString;
206
+ distinct: z.ZodOptional<z.ZodBoolean>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
209
+ alias: string;
210
+ field?: string | undefined;
211
+ distinct?: boolean | undefined;
212
+ }, {
213
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
214
+ alias: string;
215
+ field?: string | undefined;
216
+ distinct?: boolean | undefined;
217
+ }>, "many">>;
218
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
219
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
220
+ field: z.ZodOptional<z.ZodString>;
221
+ alias: z.ZodString;
222
+ over: z.ZodObject<{
223
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
224
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
+ field: z.ZodString;
226
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
227
+ }, "strip", z.ZodTypeAny, {
228
+ field: string;
229
+ order: "asc" | "desc";
230
+ }, {
231
+ field: string;
232
+ order?: "asc" | "desc" | undefined;
233
+ }>, "many">>;
234
+ frame: z.ZodOptional<z.ZodObject<{
235
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
236
+ start: z.ZodOptional<z.ZodString>;
237
+ end: z.ZodOptional<z.ZodString>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ type?: "rows" | "range" | undefined;
240
+ start?: string | undefined;
241
+ end?: string | undefined;
242
+ }, {
243
+ type?: "rows" | "range" | undefined;
244
+ start?: string | undefined;
245
+ end?: string | undefined;
246
+ }>>;
247
+ }, "strip", z.ZodTypeAny, {
248
+ partitionBy?: string[] | undefined;
249
+ orderBy?: {
250
+ field: string;
251
+ order: "asc" | "desc";
252
+ }[] | undefined;
253
+ frame?: {
254
+ type?: "rows" | "range" | undefined;
255
+ start?: string | undefined;
256
+ end?: string | undefined;
257
+ } | undefined;
258
+ }, {
259
+ partitionBy?: string[] | undefined;
260
+ orderBy?: {
261
+ field: string;
262
+ order?: "asc" | "desc" | undefined;
263
+ }[] | undefined;
264
+ frame?: {
265
+ type?: "rows" | "range" | undefined;
266
+ start?: string | undefined;
267
+ end?: string | undefined;
268
+ } | undefined;
269
+ }>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
272
+ alias: string;
273
+ over: {
274
+ partitionBy?: string[] | undefined;
275
+ orderBy?: {
276
+ field: string;
277
+ order: "asc" | "desc";
278
+ }[] | undefined;
279
+ frame?: {
280
+ type?: "rows" | "range" | undefined;
281
+ start?: string | undefined;
282
+ end?: string | undefined;
283
+ } | undefined;
284
+ };
285
+ field?: string | undefined;
286
+ }, {
287
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
288
+ alias: string;
289
+ over: {
290
+ partitionBy?: string[] | undefined;
291
+ orderBy?: {
292
+ field: string;
293
+ order?: "asc" | "desc" | undefined;
294
+ }[] | undefined;
295
+ frame?: {
296
+ type?: "rows" | "range" | undefined;
297
+ start?: string | undefined;
298
+ end?: string | undefined;
299
+ } | undefined;
300
+ };
301
+ field?: string | undefined;
302
+ }>, "many">>;
303
+ filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
304
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
305
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
306
+ having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
307
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
308
+ field: z.ZodString;
309
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
310
+ }, "strip", z.ZodTypeAny, {
311
+ field: string;
312
+ order: "asc" | "desc";
313
+ }, {
314
+ field: string;
315
+ order?: "asc" | "desc" | undefined;
316
+ }>, "many">>;
317
+ top: z.ZodOptional<z.ZodNumber>;
318
+ skip: z.ZodOptional<z.ZodNumber>;
319
+ distinct: z.ZodOptional<z.ZodBoolean>;
320
+ }, "strip", z.ZodTypeAny, {
321
+ object: string;
322
+ sort?: {
323
+ field: string;
324
+ order: "asc" | "desc";
325
+ }[] | undefined;
326
+ fields?: any[] | undefined;
327
+ distinct?: boolean | undefined;
328
+ aggregations?: {
329
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
330
+ alias: string;
331
+ field?: string | undefined;
332
+ distinct?: boolean | undefined;
333
+ }[] | undefined;
334
+ windowFunctions?: {
335
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
336
+ alias: string;
337
+ over: {
338
+ partitionBy?: string[] | undefined;
339
+ orderBy?: {
340
+ field: string;
341
+ order: "asc" | "desc";
342
+ }[] | undefined;
343
+ frame?: {
344
+ type?: "rows" | "range" | undefined;
345
+ start?: string | undefined;
346
+ end?: string | undefined;
347
+ } | undefined;
348
+ };
349
+ field?: string | undefined;
350
+ }[] | undefined;
351
+ filters?: any;
352
+ joins?: any[] | undefined;
353
+ groupBy?: string[] | undefined;
354
+ having?: any;
355
+ top?: number | undefined;
356
+ skip?: number | undefined;
357
+ }, {
358
+ object: string;
359
+ sort?: {
360
+ field: string;
361
+ order?: "asc" | "desc" | undefined;
362
+ }[] | undefined;
363
+ fields?: any[] | undefined;
364
+ distinct?: boolean | undefined;
365
+ aggregations?: {
366
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
367
+ alias: string;
368
+ field?: string | undefined;
369
+ distinct?: boolean | undefined;
370
+ }[] | undefined;
371
+ windowFunctions?: {
372
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
373
+ alias: string;
374
+ over: {
375
+ partitionBy?: string[] | undefined;
376
+ orderBy?: {
377
+ field: string;
378
+ order?: "asc" | "desc" | undefined;
379
+ }[] | undefined;
380
+ frame?: {
381
+ type?: "rows" | "range" | undefined;
382
+ start?: string | undefined;
383
+ end?: string | undefined;
384
+ } | undefined;
385
+ };
386
+ field?: string | undefined;
387
+ }[] | undefined;
388
+ filters?: any;
389
+ joins?: any[] | undefined;
390
+ groupBy?: string[] | undefined;
391
+ having?: any;
392
+ top?: number | undefined;
393
+ skip?: number | undefined;
394
+ }>, z.ZodOptional<z.ZodObject<{
395
+ /**
396
+ * Transaction handle/identifier.
397
+ * If provided, the operation must run within this transaction.
398
+ */
399
+ transaction: z.ZodOptional<z.ZodAny>;
400
+ /**
401
+ * Operation timeout in milliseconds.
402
+ */
403
+ timeout: z.ZodOptional<z.ZodNumber>;
404
+ /**
405
+ * Whether to bypass cache and force a fresh read.
406
+ */
407
+ skipCache: z.ZodOptional<z.ZodBoolean>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ timeout?: number | undefined;
410
+ transaction?: any;
411
+ skipCache?: boolean | undefined;
412
+ }, {
413
+ timeout?: number | undefined;
414
+ transaction?: any;
415
+ skipCache?: boolean | undefined;
416
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
417
+ /**
418
+ * Find a single record by query.
419
+ * Similar to find(), but returns only the first match or null.
420
+ *
421
+ * @param object - The name of the object.
422
+ * @param query - QueryAST.
423
+ * @param options - Driver options.
424
+ */
425
+ findOne: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
426
+ object: z.ZodString;
427
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
428
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
429
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
430
+ field: z.ZodOptional<z.ZodString>;
431
+ alias: z.ZodString;
432
+ distinct: z.ZodOptional<z.ZodBoolean>;
433
+ }, "strip", z.ZodTypeAny, {
434
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
435
+ alias: string;
436
+ field?: string | undefined;
437
+ distinct?: boolean | undefined;
438
+ }, {
439
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
440
+ alias: string;
441
+ field?: string | undefined;
442
+ distinct?: boolean | undefined;
443
+ }>, "many">>;
444
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
445
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
446
+ field: z.ZodOptional<z.ZodString>;
447
+ alias: z.ZodString;
448
+ over: z.ZodObject<{
449
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
450
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
+ field: z.ZodString;
452
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ field: string;
455
+ order: "asc" | "desc";
456
+ }, {
457
+ field: string;
458
+ order?: "asc" | "desc" | undefined;
459
+ }>, "many">>;
460
+ frame: z.ZodOptional<z.ZodObject<{
461
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
462
+ start: z.ZodOptional<z.ZodString>;
463
+ end: z.ZodOptional<z.ZodString>;
464
+ }, "strip", z.ZodTypeAny, {
465
+ type?: "rows" | "range" | undefined;
466
+ start?: string | undefined;
467
+ end?: string | undefined;
468
+ }, {
469
+ type?: "rows" | "range" | undefined;
470
+ start?: string | undefined;
471
+ end?: string | undefined;
472
+ }>>;
473
+ }, "strip", z.ZodTypeAny, {
474
+ partitionBy?: string[] | undefined;
475
+ orderBy?: {
476
+ field: string;
477
+ order: "asc" | "desc";
478
+ }[] | undefined;
479
+ frame?: {
480
+ type?: "rows" | "range" | undefined;
481
+ start?: string | undefined;
482
+ end?: string | undefined;
483
+ } | undefined;
484
+ }, {
485
+ partitionBy?: string[] | undefined;
486
+ orderBy?: {
487
+ field: string;
488
+ order?: "asc" | "desc" | undefined;
489
+ }[] | undefined;
490
+ frame?: {
491
+ type?: "rows" | "range" | undefined;
492
+ start?: string | undefined;
493
+ end?: string | undefined;
494
+ } | undefined;
495
+ }>;
496
+ }, "strip", z.ZodTypeAny, {
497
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
498
+ alias: string;
499
+ over: {
500
+ partitionBy?: string[] | undefined;
501
+ orderBy?: {
502
+ field: string;
503
+ order: "asc" | "desc";
504
+ }[] | undefined;
505
+ frame?: {
506
+ type?: "rows" | "range" | undefined;
507
+ start?: string | undefined;
508
+ end?: string | undefined;
509
+ } | undefined;
510
+ };
511
+ field?: string | undefined;
512
+ }, {
513
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
514
+ alias: string;
515
+ over: {
516
+ partitionBy?: string[] | undefined;
517
+ orderBy?: {
518
+ field: string;
519
+ order?: "asc" | "desc" | undefined;
520
+ }[] | undefined;
521
+ frame?: {
522
+ type?: "rows" | "range" | undefined;
523
+ start?: string | undefined;
524
+ end?: string | undefined;
525
+ } | undefined;
526
+ };
527
+ field?: string | undefined;
528
+ }>, "many">>;
529
+ filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
530
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
531
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
532
+ having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
533
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
+ field: z.ZodString;
535
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
536
+ }, "strip", z.ZodTypeAny, {
537
+ field: string;
538
+ order: "asc" | "desc";
539
+ }, {
540
+ field: string;
541
+ order?: "asc" | "desc" | undefined;
542
+ }>, "many">>;
543
+ top: z.ZodOptional<z.ZodNumber>;
544
+ skip: z.ZodOptional<z.ZodNumber>;
545
+ distinct: z.ZodOptional<z.ZodBoolean>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ object: string;
548
+ sort?: {
549
+ field: string;
550
+ order: "asc" | "desc";
551
+ }[] | undefined;
552
+ fields?: any[] | undefined;
553
+ distinct?: boolean | undefined;
554
+ aggregations?: {
555
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
556
+ alias: string;
557
+ field?: string | undefined;
558
+ distinct?: boolean | undefined;
559
+ }[] | undefined;
560
+ windowFunctions?: {
561
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
562
+ alias: string;
563
+ over: {
564
+ partitionBy?: string[] | undefined;
565
+ orderBy?: {
566
+ field: string;
567
+ order: "asc" | "desc";
568
+ }[] | undefined;
569
+ frame?: {
570
+ type?: "rows" | "range" | undefined;
571
+ start?: string | undefined;
572
+ end?: string | undefined;
573
+ } | undefined;
574
+ };
575
+ field?: string | undefined;
576
+ }[] | undefined;
577
+ filters?: any;
578
+ joins?: any[] | undefined;
579
+ groupBy?: string[] | undefined;
580
+ having?: any;
581
+ top?: number | undefined;
582
+ skip?: number | undefined;
583
+ }, {
584
+ object: string;
585
+ sort?: {
586
+ field: string;
587
+ order?: "asc" | "desc" | undefined;
588
+ }[] | undefined;
589
+ fields?: any[] | undefined;
590
+ distinct?: boolean | undefined;
591
+ aggregations?: {
592
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
593
+ alias: string;
594
+ field?: string | undefined;
595
+ distinct?: boolean | undefined;
596
+ }[] | undefined;
597
+ windowFunctions?: {
598
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
599
+ alias: string;
600
+ over: {
601
+ partitionBy?: string[] | undefined;
602
+ orderBy?: {
603
+ field: string;
604
+ order?: "asc" | "desc" | undefined;
605
+ }[] | undefined;
606
+ frame?: {
607
+ type?: "rows" | "range" | undefined;
608
+ start?: string | undefined;
609
+ end?: string | undefined;
610
+ } | undefined;
611
+ };
612
+ field?: string | undefined;
613
+ }[] | undefined;
614
+ filters?: any;
615
+ joins?: any[] | undefined;
616
+ groupBy?: string[] | undefined;
617
+ having?: any;
618
+ top?: number | undefined;
619
+ skip?: number | undefined;
620
+ }>, z.ZodOptional<z.ZodObject<{
621
+ /**
622
+ * Transaction handle/identifier.
623
+ * If provided, the operation must run within this transaction.
624
+ */
625
+ transaction: z.ZodOptional<z.ZodAny>;
626
+ /**
627
+ * Operation timeout in milliseconds.
628
+ */
629
+ timeout: z.ZodOptional<z.ZodNumber>;
630
+ /**
631
+ * Whether to bypass cache and force a fresh read.
632
+ */
633
+ skipCache: z.ZodOptional<z.ZodBoolean>;
634
+ }, "strip", z.ZodTypeAny, {
635
+ timeout?: number | undefined;
636
+ transaction?: any;
637
+ skipCache?: boolean | undefined;
638
+ }, {
639
+ timeout?: number | undefined;
640
+ transaction?: any;
641
+ skipCache?: boolean | undefined;
642
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
643
+ /**
644
+ * Create a new record.
645
+ *
646
+ * @param object - The object name.
647
+ * @param data - Key-value map of field data.
648
+ * @param options - Driver options.
649
+ * @returns The created record, including server-generated fields (id, created_at, etc.).
650
+ */
651
+ create: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
652
+ /**
653
+ * Transaction handle/identifier.
654
+ * If provided, the operation must run within this transaction.
655
+ */
656
+ transaction: z.ZodOptional<z.ZodAny>;
657
+ /**
658
+ * Operation timeout in milliseconds.
659
+ */
660
+ timeout: z.ZodOptional<z.ZodNumber>;
661
+ /**
662
+ * Whether to bypass cache and force a fresh read.
663
+ */
664
+ skipCache: z.ZodOptional<z.ZodBoolean>;
665
+ }, "strip", z.ZodTypeAny, {
666
+ timeout?: number | undefined;
667
+ transaction?: any;
668
+ skipCache?: boolean | undefined;
669
+ }, {
670
+ timeout?: number | undefined;
671
+ transaction?: any;
672
+ skipCache?: boolean | undefined;
673
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
674
+ /**
675
+ * Update an existing record by ID.
676
+ *
677
+ * @param object - The object name.
678
+ * @param id - The unique identifier of the record.
679
+ * @param data - The fields to update.
680
+ * @param options - Driver options.
681
+ * @returns The updated record.
682
+ */
683
+ update: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
684
+ /**
685
+ * Transaction handle/identifier.
686
+ * If provided, the operation must run within this transaction.
687
+ */
688
+ transaction: z.ZodOptional<z.ZodAny>;
689
+ /**
690
+ * Operation timeout in milliseconds.
691
+ */
692
+ timeout: z.ZodOptional<z.ZodNumber>;
693
+ /**
694
+ * Whether to bypass cache and force a fresh read.
695
+ */
696
+ skipCache: z.ZodOptional<z.ZodBoolean>;
697
+ }, "strip", z.ZodTypeAny, {
698
+ timeout?: number | undefined;
699
+ transaction?: any;
700
+ skipCache?: boolean | undefined;
701
+ }, {
702
+ timeout?: number | undefined;
703
+ transaction?: any;
704
+ skipCache?: boolean | undefined;
705
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
706
+ /**
707
+ * Delete a record by ID.
708
+ *
709
+ * @param object - The object name.
710
+ * @param id - The unique identifier of the record.
711
+ * @param options - Driver options.
712
+ * @returns True if deleted, false if not found.
713
+ */
714
+ delete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodOptional<z.ZodObject<{
715
+ /**
716
+ * Transaction handle/identifier.
717
+ * If provided, the operation must run within this transaction.
718
+ */
719
+ transaction: z.ZodOptional<z.ZodAny>;
720
+ /**
721
+ * Operation timeout in milliseconds.
722
+ */
723
+ timeout: z.ZodOptional<z.ZodNumber>;
724
+ /**
725
+ * Whether to bypass cache and force a fresh read.
726
+ */
727
+ skipCache: z.ZodOptional<z.ZodBoolean>;
728
+ }, "strip", z.ZodTypeAny, {
729
+ timeout?: number | undefined;
730
+ transaction?: any;
731
+ skipCache?: boolean | undefined;
732
+ }, {
733
+ timeout?: number | undefined;
734
+ transaction?: any;
735
+ skipCache?: boolean | undefined;
736
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
737
+ /**
738
+ * Count records matching a query.
739
+ *
740
+ * @param object - The object name.
741
+ * @param query - Optional filtering criteria.
742
+ * @param options - Driver options.
743
+ * @returns Total count.
744
+ */
745
+ count: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
746
+ object: z.ZodString;
747
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
748
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
749
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
750
+ field: z.ZodOptional<z.ZodString>;
751
+ alias: z.ZodString;
752
+ distinct: z.ZodOptional<z.ZodBoolean>;
753
+ }, "strip", z.ZodTypeAny, {
754
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
755
+ alias: string;
756
+ field?: string | undefined;
757
+ distinct?: boolean | undefined;
758
+ }, {
759
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
760
+ alias: string;
761
+ field?: string | undefined;
762
+ distinct?: boolean | undefined;
763
+ }>, "many">>;
764
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
765
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
766
+ field: z.ZodOptional<z.ZodString>;
767
+ alias: z.ZodString;
768
+ over: z.ZodObject<{
769
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
770
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
771
+ field: z.ZodString;
772
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
773
+ }, "strip", z.ZodTypeAny, {
774
+ field: string;
775
+ order: "asc" | "desc";
776
+ }, {
777
+ field: string;
778
+ order?: "asc" | "desc" | undefined;
779
+ }>, "many">>;
780
+ frame: z.ZodOptional<z.ZodObject<{
781
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
782
+ start: z.ZodOptional<z.ZodString>;
783
+ end: z.ZodOptional<z.ZodString>;
784
+ }, "strip", z.ZodTypeAny, {
785
+ type?: "rows" | "range" | undefined;
786
+ start?: string | undefined;
787
+ end?: string | undefined;
788
+ }, {
789
+ type?: "rows" | "range" | undefined;
790
+ start?: string | undefined;
791
+ end?: string | undefined;
792
+ }>>;
793
+ }, "strip", z.ZodTypeAny, {
794
+ partitionBy?: string[] | undefined;
795
+ orderBy?: {
796
+ field: string;
797
+ order: "asc" | "desc";
798
+ }[] | undefined;
799
+ frame?: {
800
+ type?: "rows" | "range" | undefined;
801
+ start?: string | undefined;
802
+ end?: string | undefined;
803
+ } | undefined;
804
+ }, {
805
+ partitionBy?: string[] | undefined;
806
+ orderBy?: {
807
+ field: string;
808
+ order?: "asc" | "desc" | undefined;
809
+ }[] | undefined;
810
+ frame?: {
811
+ type?: "rows" | "range" | undefined;
812
+ start?: string | undefined;
813
+ end?: string | undefined;
814
+ } | undefined;
815
+ }>;
816
+ }, "strip", z.ZodTypeAny, {
817
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
818
+ alias: string;
819
+ over: {
820
+ partitionBy?: string[] | undefined;
821
+ orderBy?: {
822
+ field: string;
823
+ order: "asc" | "desc";
824
+ }[] | undefined;
825
+ frame?: {
826
+ type?: "rows" | "range" | undefined;
827
+ start?: string | undefined;
828
+ end?: string | undefined;
829
+ } | undefined;
830
+ };
831
+ field?: string | undefined;
832
+ }, {
833
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
834
+ alias: string;
835
+ over: {
836
+ partitionBy?: string[] | undefined;
837
+ orderBy?: {
838
+ field: string;
839
+ order?: "asc" | "desc" | undefined;
840
+ }[] | undefined;
841
+ frame?: {
842
+ type?: "rows" | "range" | undefined;
843
+ start?: string | undefined;
844
+ end?: string | undefined;
845
+ } | undefined;
846
+ };
847
+ field?: string | undefined;
848
+ }>, "many">>;
849
+ filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
850
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
851
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
852
+ having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
853
+ sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
854
+ field: z.ZodString;
855
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
856
+ }, "strip", z.ZodTypeAny, {
857
+ field: string;
858
+ order: "asc" | "desc";
859
+ }, {
860
+ field: string;
861
+ order?: "asc" | "desc" | undefined;
862
+ }>, "many">>;
863
+ top: z.ZodOptional<z.ZodNumber>;
864
+ skip: z.ZodOptional<z.ZodNumber>;
865
+ distinct: z.ZodOptional<z.ZodBoolean>;
866
+ }, "strip", z.ZodTypeAny, {
867
+ object: string;
868
+ sort?: {
869
+ field: string;
870
+ order: "asc" | "desc";
871
+ }[] | undefined;
872
+ fields?: any[] | undefined;
873
+ distinct?: boolean | undefined;
874
+ aggregations?: {
875
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
876
+ alias: string;
877
+ field?: string | undefined;
878
+ distinct?: boolean | undefined;
879
+ }[] | undefined;
880
+ windowFunctions?: {
881
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
882
+ alias: string;
883
+ over: {
884
+ partitionBy?: string[] | undefined;
885
+ orderBy?: {
886
+ field: string;
887
+ order: "asc" | "desc";
888
+ }[] | undefined;
889
+ frame?: {
890
+ type?: "rows" | "range" | undefined;
891
+ start?: string | undefined;
892
+ end?: string | undefined;
893
+ } | undefined;
894
+ };
895
+ field?: string | undefined;
896
+ }[] | undefined;
897
+ filters?: any;
898
+ joins?: any[] | undefined;
899
+ groupBy?: string[] | undefined;
900
+ having?: any;
901
+ top?: number | undefined;
902
+ skip?: number | undefined;
903
+ }, {
904
+ object: string;
905
+ sort?: {
906
+ field: string;
907
+ order?: "asc" | "desc" | undefined;
908
+ }[] | undefined;
909
+ fields?: any[] | undefined;
910
+ distinct?: boolean | undefined;
911
+ aggregations?: {
912
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
913
+ alias: string;
914
+ field?: string | undefined;
915
+ distinct?: boolean | undefined;
916
+ }[] | undefined;
917
+ windowFunctions?: {
918
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
919
+ alias: string;
920
+ over: {
921
+ partitionBy?: string[] | undefined;
922
+ orderBy?: {
923
+ field: string;
924
+ order?: "asc" | "desc" | undefined;
925
+ }[] | undefined;
926
+ frame?: {
927
+ type?: "rows" | "range" | undefined;
928
+ start?: string | undefined;
929
+ end?: string | undefined;
930
+ } | undefined;
931
+ };
932
+ field?: string | undefined;
933
+ }[] | undefined;
934
+ filters?: any;
935
+ joins?: any[] | undefined;
936
+ groupBy?: string[] | undefined;
937
+ having?: any;
938
+ top?: number | undefined;
939
+ skip?: number | undefined;
940
+ }>>, z.ZodOptional<z.ZodObject<{
941
+ /**
942
+ * Transaction handle/identifier.
943
+ * If provided, the operation must run within this transaction.
944
+ */
945
+ transaction: z.ZodOptional<z.ZodAny>;
946
+ /**
947
+ * Operation timeout in milliseconds.
948
+ */
949
+ timeout: z.ZodOptional<z.ZodNumber>;
950
+ /**
951
+ * Whether to bypass cache and force a fresh read.
952
+ */
953
+ skipCache: z.ZodOptional<z.ZodBoolean>;
954
+ }, "strip", z.ZodTypeAny, {
955
+ timeout?: number | undefined;
956
+ transaction?: any;
957
+ skipCache?: boolean | undefined;
958
+ }, {
959
+ timeout?: number | undefined;
960
+ transaction?: any;
961
+ skipCache?: boolean | undefined;
962
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNumber>>;
963
+ /**
964
+ * Create multiple records in a single batch.
965
+ * Optimized for performance.
966
+ *
967
+ * @param object - The object name.
968
+ * @param dataArray - Array of record data.
969
+ * @returns Array of created records.
970
+ */
971
+ bulkCreate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">, z.ZodOptional<z.ZodObject<{
972
+ /**
973
+ * Transaction handle/identifier.
974
+ * If provided, the operation must run within this transaction.
975
+ */
976
+ transaction: z.ZodOptional<z.ZodAny>;
977
+ /**
978
+ * Operation timeout in milliseconds.
979
+ */
980
+ timeout: z.ZodOptional<z.ZodNumber>;
981
+ /**
982
+ * Whether to bypass cache and force a fresh read.
983
+ */
984
+ skipCache: z.ZodOptional<z.ZodBoolean>;
985
+ }, "strip", z.ZodTypeAny, {
986
+ timeout?: number | undefined;
987
+ transaction?: any;
988
+ skipCache?: boolean | undefined;
989
+ }, {
990
+ timeout?: number | undefined;
991
+ transaction?: any;
992
+ skipCache?: boolean | undefined;
993
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
994
+ /**
995
+ * Update multiple records in a single batch.
996
+ *
997
+ * @param object - The object name.
998
+ * @param updates - Array of objects containing {id, data}.
999
+ * @returns Array of updated records.
1000
+ */
1001
+ bulkUpdate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodObject<{
1002
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1003
+ data: z.ZodRecord<z.ZodString, z.ZodAny>;
1004
+ }, "strip", z.ZodTypeAny, {
1005
+ id: string | number;
1006
+ data: Record<string, any>;
1007
+ }, {
1008
+ id: string | number;
1009
+ data: Record<string, any>;
1010
+ }>, "many">, z.ZodOptional<z.ZodObject<{
1011
+ /**
1012
+ * Transaction handle/identifier.
1013
+ * If provided, the operation must run within this transaction.
1014
+ */
1015
+ transaction: z.ZodOptional<z.ZodAny>;
1016
+ /**
1017
+ * Operation timeout in milliseconds.
1018
+ */
1019
+ timeout: z.ZodOptional<z.ZodNumber>;
1020
+ /**
1021
+ * Whether to bypass cache and force a fresh read.
1022
+ */
1023
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1024
+ }, "strip", z.ZodTypeAny, {
1025
+ timeout?: number | undefined;
1026
+ transaction?: any;
1027
+ skipCache?: boolean | undefined;
1028
+ }, {
1029
+ timeout?: number | undefined;
1030
+ transaction?: any;
1031
+ skipCache?: boolean | undefined;
1032
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
1033
+ /**
1034
+ * Delete multiple records in a single batch.
1035
+ *
1036
+ * @param object - The object name.
1037
+ * @param ids - Array of record IDs.
1038
+ */
1039
+ bulkDelete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, z.ZodOptional<z.ZodObject<{
1040
+ /**
1041
+ * Transaction handle/identifier.
1042
+ * If provided, the operation must run within this transaction.
1043
+ */
1044
+ transaction: z.ZodOptional<z.ZodAny>;
1045
+ /**
1046
+ * Operation timeout in milliseconds.
1047
+ */
1048
+ timeout: z.ZodOptional<z.ZodNumber>;
1049
+ /**
1050
+ * Whether to bypass cache and force a fresh read.
1051
+ */
1052
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1053
+ }, "strip", z.ZodTypeAny, {
1054
+ timeout?: number | undefined;
1055
+ transaction?: any;
1056
+ skipCache?: boolean | undefined;
1057
+ }, {
1058
+ timeout?: number | undefined;
1059
+ transaction?: any;
1060
+ skipCache?: boolean | undefined;
1061
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1062
+ /**
1063
+ * Begin a new database transaction.
1064
+ * @returns A transaction handle to be passed to subsequent operations via `options.transaction`.
1065
+ */
1066
+ beginTransaction: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
1067
+ /**
1068
+ * Commit the transaction.
1069
+ * @param transaction - The transaction handle.
1070
+ */
1071
+ commit: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1072
+ /**
1073
+ * Rollback the transaction.
1074
+ * @param transaction - The transaction handle.
1075
+ */
1076
+ rollback: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1077
+ /**
1078
+ * Synchronize the database schema with the Object definition.
1079
+ * This is an idempotent operation: it should create tables if missing,
1080
+ * add columns if missing, and update indexes.
1081
+ *
1082
+ * @param object - The object name.
1083
+ * @param schema - The full Object Schema (fields, indexes, etc).
1084
+ * @param options - Driver options.
1085
+ */
1086
+ syncSchema: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny, z.ZodOptional<z.ZodObject<{
1087
+ /**
1088
+ * Transaction handle/identifier.
1089
+ * If provided, the operation must run within this transaction.
1090
+ */
1091
+ transaction: z.ZodOptional<z.ZodAny>;
1092
+ /**
1093
+ * Operation timeout in milliseconds.
1094
+ */
1095
+ timeout: z.ZodOptional<z.ZodNumber>;
1096
+ /**
1097
+ * Whether to bypass cache and force a fresh read.
1098
+ */
1099
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1100
+ }, "strip", z.ZodTypeAny, {
1101
+ timeout?: number | undefined;
1102
+ transaction?: any;
1103
+ skipCache?: boolean | undefined;
1104
+ }, {
1105
+ timeout?: number | undefined;
1106
+ transaction?: any;
1107
+ skipCache?: boolean | undefined;
1108
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1109
+ /**
1110
+ * Drop the underlying table or collection for an object.
1111
+ * WARNING: Destructive operation.
1112
+ *
1113
+ * @param object - The object name.
1114
+ */
1115
+ dropTable: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
1116
+ /**
1117
+ * Transaction handle/identifier.
1118
+ * If provided, the operation must run within this transaction.
1119
+ */
1120
+ transaction: z.ZodOptional<z.ZodAny>;
1121
+ /**
1122
+ * Operation timeout in milliseconds.
1123
+ */
1124
+ timeout: z.ZodOptional<z.ZodNumber>;
1125
+ /**
1126
+ * Whether to bypass cache and force a fresh read.
1127
+ */
1128
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1129
+ }, "strip", z.ZodTypeAny, {
1130
+ timeout?: number | undefined;
1131
+ transaction?: any;
1132
+ skipCache?: boolean | undefined;
1133
+ }, {
1134
+ timeout?: number | undefined;
1135
+ transaction?: any;
1136
+ skipCache?: boolean | undefined;
1137
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1138
+ }, "strip", z.ZodTypeAny, {
1139
+ find: (args_0: string, args_1: {
1140
+ object: string;
1141
+ sort?: {
1142
+ field: string;
1143
+ order?: "asc" | "desc" | undefined;
1144
+ }[] | undefined;
1145
+ fields?: any[] | undefined;
1146
+ distinct?: boolean | undefined;
1147
+ aggregations?: {
1148
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1149
+ alias: string;
1150
+ field?: string | undefined;
1151
+ distinct?: boolean | undefined;
1152
+ }[] | undefined;
1153
+ windowFunctions?: {
1154
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1155
+ alias: string;
1156
+ over: {
1157
+ partitionBy?: string[] | undefined;
1158
+ orderBy?: {
1159
+ field: string;
1160
+ order?: "asc" | "desc" | undefined;
1161
+ }[] | undefined;
1162
+ frame?: {
1163
+ type?: "rows" | "range" | undefined;
1164
+ start?: string | undefined;
1165
+ end?: string | undefined;
1166
+ } | undefined;
1167
+ };
1168
+ field?: string | undefined;
1169
+ }[] | undefined;
1170
+ filters?: any;
1171
+ joins?: any[] | undefined;
1172
+ groupBy?: string[] | undefined;
1173
+ having?: any;
1174
+ top?: number | undefined;
1175
+ skip?: number | undefined;
1176
+ }, args_2: {
1177
+ timeout?: number | undefined;
1178
+ transaction?: any;
1179
+ skipCache?: boolean | undefined;
1180
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1181
+ name: string;
1182
+ count: (args_0: string, args_1: {
1183
+ object: string;
1184
+ sort?: {
1185
+ field: string;
1186
+ order?: "asc" | "desc" | undefined;
1187
+ }[] | undefined;
1188
+ fields?: any[] | undefined;
1189
+ distinct?: boolean | undefined;
1190
+ aggregations?: {
1191
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1192
+ alias: string;
1193
+ field?: string | undefined;
1194
+ distinct?: boolean | undefined;
1195
+ }[] | undefined;
1196
+ windowFunctions?: {
1197
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1198
+ alias: string;
1199
+ over: {
1200
+ partitionBy?: string[] | undefined;
1201
+ orderBy?: {
1202
+ field: string;
1203
+ order?: "asc" | "desc" | undefined;
1204
+ }[] | undefined;
1205
+ frame?: {
1206
+ type?: "rows" | "range" | undefined;
1207
+ start?: string | undefined;
1208
+ end?: string | undefined;
1209
+ } | undefined;
1210
+ };
1211
+ field?: string | undefined;
1212
+ }[] | undefined;
1213
+ filters?: any;
1214
+ joins?: any[] | undefined;
1215
+ groupBy?: string[] | undefined;
1216
+ having?: any;
1217
+ top?: number | undefined;
1218
+ skip?: number | undefined;
1219
+ } | undefined, args_2: {
1220
+ timeout?: number | undefined;
1221
+ transaction?: any;
1222
+ skipCache?: boolean | undefined;
1223
+ } | undefined, ...args: unknown[]) => Promise<number>;
1224
+ create: (args_0: string, args_1: Record<string, any>, args_2: {
1225
+ timeout?: number | undefined;
1226
+ transaction?: any;
1227
+ skipCache?: boolean | undefined;
1228
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1229
+ update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
1230
+ timeout?: number | undefined;
1231
+ transaction?: any;
1232
+ skipCache?: boolean | undefined;
1233
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1234
+ delete: (args_0: string, args_1: string | number, args_2: {
1235
+ timeout?: number | undefined;
1236
+ transaction?: any;
1237
+ skipCache?: boolean | undefined;
1238
+ } | undefined, ...args: unknown[]) => Promise<boolean>;
1239
+ bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
1240
+ timeout?: number | undefined;
1241
+ transaction?: any;
1242
+ skipCache?: boolean | undefined;
1243
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1244
+ bulkUpdate: (args_0: string, args_1: {
1245
+ id: string | number;
1246
+ data: Record<string, any>;
1247
+ }[], args_2: {
1248
+ timeout?: number | undefined;
1249
+ transaction?: any;
1250
+ skipCache?: boolean | undefined;
1251
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1252
+ bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
1253
+ timeout?: number | undefined;
1254
+ transaction?: any;
1255
+ skipCache?: boolean | undefined;
1256
+ } | undefined, ...args: unknown[]) => Promise<void>;
1257
+ execute: (args_0: any, args_1: any[] | undefined, args_2: {
1258
+ timeout?: number | undefined;
1259
+ transaction?: any;
1260
+ skipCache?: boolean | undefined;
1261
+ } | undefined, ...args: unknown[]) => Promise<any>;
1262
+ version: string;
1263
+ supports: {
1264
+ joins: boolean;
1265
+ transactions: boolean;
1266
+ fullTextSearch: boolean;
1267
+ jsonFields: boolean;
1268
+ arrayFields: boolean;
1269
+ };
1270
+ connect: (...args: unknown[]) => Promise<void>;
1271
+ disconnect: (...args: unknown[]) => Promise<void>;
1272
+ checkHealth: (...args: unknown[]) => Promise<boolean>;
1273
+ findOne: (args_0: string, args_1: {
1274
+ object: string;
1275
+ sort?: {
1276
+ field: string;
1277
+ order?: "asc" | "desc" | undefined;
1278
+ }[] | undefined;
1279
+ fields?: any[] | undefined;
1280
+ distinct?: boolean | undefined;
1281
+ aggregations?: {
1282
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1283
+ alias: string;
1284
+ field?: string | undefined;
1285
+ distinct?: boolean | undefined;
1286
+ }[] | undefined;
1287
+ windowFunctions?: {
1288
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1289
+ alias: string;
1290
+ over: {
1291
+ partitionBy?: string[] | undefined;
1292
+ orderBy?: {
1293
+ field: string;
1294
+ order?: "asc" | "desc" | undefined;
1295
+ }[] | undefined;
1296
+ frame?: {
1297
+ type?: "rows" | "range" | undefined;
1298
+ start?: string | undefined;
1299
+ end?: string | undefined;
1300
+ } | undefined;
1301
+ };
1302
+ field?: string | undefined;
1303
+ }[] | undefined;
1304
+ filters?: any;
1305
+ joins?: any[] | undefined;
1306
+ groupBy?: string[] | undefined;
1307
+ having?: any;
1308
+ top?: number | undefined;
1309
+ skip?: number | undefined;
1310
+ }, args_2: {
1311
+ timeout?: number | undefined;
1312
+ transaction?: any;
1313
+ skipCache?: boolean | undefined;
1314
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
1315
+ beginTransaction: (...args: unknown[]) => Promise<any>;
1316
+ commit: (args_0: any, ...args: unknown[]) => Promise<void>;
1317
+ rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
1318
+ syncSchema: (args_0: string, args_1: any, args_2: {
1319
+ timeout?: number | undefined;
1320
+ transaction?: any;
1321
+ skipCache?: boolean | undefined;
1322
+ } | undefined, ...args: unknown[]) => Promise<void>;
1323
+ dropTable: (args_0: string, args_1: {
1324
+ timeout?: number | undefined;
1325
+ transaction?: any;
1326
+ skipCache?: boolean | undefined;
1327
+ } | undefined, ...args: unknown[]) => Promise<void>;
1328
+ }, {
1329
+ find: (args_0: string, args_1: {
1330
+ object: string;
1331
+ sort?: {
1332
+ field: string;
1333
+ order: "asc" | "desc";
1334
+ }[] | undefined;
1335
+ fields?: any[] | undefined;
1336
+ distinct?: boolean | undefined;
1337
+ aggregations?: {
1338
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1339
+ alias: string;
1340
+ field?: string | undefined;
1341
+ distinct?: boolean | undefined;
1342
+ }[] | undefined;
1343
+ windowFunctions?: {
1344
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1345
+ alias: string;
1346
+ over: {
1347
+ partitionBy?: string[] | undefined;
1348
+ orderBy?: {
1349
+ field: string;
1350
+ order: "asc" | "desc";
1351
+ }[] | undefined;
1352
+ frame?: {
1353
+ type?: "rows" | "range" | undefined;
1354
+ start?: string | undefined;
1355
+ end?: string | undefined;
1356
+ } | undefined;
1357
+ };
1358
+ field?: string | undefined;
1359
+ }[] | undefined;
1360
+ filters?: any;
1361
+ joins?: any[] | undefined;
1362
+ groupBy?: string[] | undefined;
1363
+ having?: any;
1364
+ top?: number | undefined;
1365
+ skip?: number | undefined;
1366
+ }, args_2: {
1367
+ timeout?: number | undefined;
1368
+ transaction?: any;
1369
+ skipCache?: boolean | undefined;
1370
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1371
+ name: string;
1372
+ count: (args_0: string, args_1: {
1373
+ object: string;
1374
+ sort?: {
1375
+ field: string;
1376
+ order: "asc" | "desc";
1377
+ }[] | undefined;
1378
+ fields?: any[] | undefined;
1379
+ distinct?: boolean | undefined;
1380
+ aggregations?: {
1381
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1382
+ alias: string;
1383
+ field?: string | undefined;
1384
+ distinct?: boolean | undefined;
1385
+ }[] | undefined;
1386
+ windowFunctions?: {
1387
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1388
+ alias: string;
1389
+ over: {
1390
+ partitionBy?: string[] | undefined;
1391
+ orderBy?: {
1392
+ field: string;
1393
+ order: "asc" | "desc";
1394
+ }[] | undefined;
1395
+ frame?: {
1396
+ type?: "rows" | "range" | undefined;
1397
+ start?: string | undefined;
1398
+ end?: string | undefined;
1399
+ } | undefined;
1400
+ };
1401
+ field?: string | undefined;
1402
+ }[] | undefined;
1403
+ filters?: any;
1404
+ joins?: any[] | undefined;
1405
+ groupBy?: string[] | undefined;
1406
+ having?: any;
1407
+ top?: number | undefined;
1408
+ skip?: number | undefined;
1409
+ } | undefined, args_2: {
1410
+ timeout?: number | undefined;
1411
+ transaction?: any;
1412
+ skipCache?: boolean | undefined;
1413
+ } | undefined, ...args: unknown[]) => Promise<number>;
1414
+ create: (args_0: string, args_1: Record<string, any>, args_2: {
1415
+ timeout?: number | undefined;
1416
+ transaction?: any;
1417
+ skipCache?: boolean | undefined;
1418
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1419
+ update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
1420
+ timeout?: number | undefined;
1421
+ transaction?: any;
1422
+ skipCache?: boolean | undefined;
1423
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1424
+ delete: (args_0: string, args_1: string | number, args_2: {
1425
+ timeout?: number | undefined;
1426
+ transaction?: any;
1427
+ skipCache?: boolean | undefined;
1428
+ } | undefined, ...args: unknown[]) => Promise<boolean>;
1429
+ bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
1430
+ timeout?: number | undefined;
1431
+ transaction?: any;
1432
+ skipCache?: boolean | undefined;
1433
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1434
+ bulkUpdate: (args_0: string, args_1: {
1435
+ id: string | number;
1436
+ data: Record<string, any>;
1437
+ }[], args_2: {
1438
+ timeout?: number | undefined;
1439
+ transaction?: any;
1440
+ skipCache?: boolean | undefined;
1441
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1442
+ bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
1443
+ timeout?: number | undefined;
1444
+ transaction?: any;
1445
+ skipCache?: boolean | undefined;
1446
+ } | undefined, ...args: unknown[]) => Promise<void>;
1447
+ execute: (args_0: any, args_1: any[] | undefined, args_2: {
1448
+ timeout?: number | undefined;
1449
+ transaction?: any;
1450
+ skipCache?: boolean | undefined;
1451
+ } | undefined, ...args: unknown[]) => Promise<any>;
1452
+ version: string;
1453
+ supports: {
1454
+ joins: boolean;
1455
+ transactions: boolean;
1456
+ fullTextSearch: boolean;
1457
+ jsonFields: boolean;
1458
+ arrayFields: boolean;
1459
+ };
1460
+ connect: (...args: unknown[]) => Promise<void>;
1461
+ disconnect: (...args: unknown[]) => Promise<void>;
1462
+ checkHealth: (...args: unknown[]) => Promise<boolean>;
1463
+ findOne: (args_0: string, args_1: {
1464
+ object: string;
1465
+ sort?: {
1466
+ field: string;
1467
+ order: "asc" | "desc";
1468
+ }[] | undefined;
1469
+ fields?: any[] | undefined;
1470
+ distinct?: boolean | undefined;
1471
+ aggregations?: {
1472
+ function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1473
+ alias: string;
1474
+ field?: string | undefined;
1475
+ distinct?: boolean | undefined;
1476
+ }[] | undefined;
1477
+ windowFunctions?: {
1478
+ function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1479
+ alias: string;
1480
+ over: {
1481
+ partitionBy?: string[] | undefined;
1482
+ orderBy?: {
1483
+ field: string;
1484
+ order: "asc" | "desc";
1485
+ }[] | undefined;
1486
+ frame?: {
1487
+ type?: "rows" | "range" | undefined;
1488
+ start?: string | undefined;
1489
+ end?: string | undefined;
1490
+ } | undefined;
1491
+ };
1492
+ field?: string | undefined;
1493
+ }[] | undefined;
1494
+ filters?: any;
1495
+ joins?: any[] | undefined;
1496
+ groupBy?: string[] | undefined;
1497
+ having?: any;
1498
+ top?: number | undefined;
1499
+ skip?: number | undefined;
1500
+ }, args_2: {
1501
+ timeout?: number | undefined;
1502
+ transaction?: any;
1503
+ skipCache?: boolean | undefined;
1504
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
1505
+ beginTransaction: (...args: unknown[]) => Promise<any>;
1506
+ commit: (args_0: any, ...args: unknown[]) => Promise<void>;
1507
+ rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
1508
+ syncSchema: (args_0: string, args_1: any, args_2: {
1509
+ timeout?: number | undefined;
1510
+ transaction?: any;
1511
+ skipCache?: boolean | undefined;
1512
+ } | undefined, ...args: unknown[]) => Promise<void>;
1513
+ dropTable: (args_0: string, args_1: {
1514
+ timeout?: number | undefined;
1515
+ transaction?: any;
1516
+ skipCache?: boolean | undefined;
1517
+ } | undefined, ...args: unknown[]) => Promise<void>;
1518
+ }>;
1519
+ /**
1520
+ * TypeScript types
1521
+ */
1522
+ export type DriverOptions = z.infer<typeof DriverOptionsSchema>;
1523
+ export type DriverCapabilities = z.infer<typeof DriverCapabilitiesSchema>;
1524
+ export type DriverInterface = z.infer<typeof DriverInterfaceSchema>;
1525
+ //# sourceMappingURL=driver.zod.d.ts.map