@objectstack/spec 0.3.1 → 0.3.3

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 (409) hide show
  1. package/README.md +32 -10
  2. package/dist/ai/agent.zod.d.ts +12 -12
  3. package/dist/ai/conversation.zod.d.ts +65 -65
  4. package/dist/ai/cost.zod.d.ts +125 -125
  5. package/dist/ai/index.d.ts +1 -1
  6. package/dist/ai/index.d.ts.map +1 -1
  7. package/dist/ai/index.js +1 -1
  8. package/dist/ai/model-registry.zod.d.ts +94 -94
  9. package/dist/ai/nlq.zod.d.ts +70 -70
  10. package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +50 -49
  11. package/dist/ai/orchestration.zod.d.ts.map +1 -0
  12. package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
  13. package/dist/ai/predictive.zod.d.ts +31 -31
  14. package/dist/ai/rag-pipeline.zod.d.ts +86 -86
  15. package/dist/api/contract.zod.d.ts +125 -109
  16. package/dist/api/contract.zod.d.ts.map +1 -1
  17. package/dist/{system → api}/discovery.zod.d.ts +26 -26
  18. package/dist/api/discovery.zod.d.ts.map +1 -0
  19. package/dist/{system → api}/discovery.zod.js +9 -9
  20. package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
  21. package/dist/api/endpoint.zod.d.ts.map +1 -0
  22. package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
  23. package/dist/api/index.d.ts +4 -0
  24. package/dist/api/index.d.ts.map +1 -1
  25. package/dist/api/index.js +4 -0
  26. package/dist/{system → api}/realtime.zod.d.ts +4 -4
  27. package/dist/api/realtime.zod.d.ts.map +1 -0
  28. package/dist/api/router.zod.d.ts +182 -0
  29. package/dist/api/router.zod.d.ts.map +1 -0
  30. package/dist/api/router.zod.js +103 -0
  31. package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +191 -191
  32. package/dist/auth/config.zod.d.ts.map +1 -0
  33. package/dist/{system → auth}/identity.zod.d.ts +8 -8
  34. package/dist/auth/identity.zod.d.ts.map +1 -0
  35. package/dist/auth/index.d.ts +7 -0
  36. package/dist/auth/index.d.ts.map +1 -0
  37. package/dist/auth/index.js +22 -0
  38. package/dist/{system → auth}/organization.zod.d.ts +5 -5
  39. package/dist/auth/organization.zod.d.ts.map +1 -0
  40. package/dist/{system → auth}/policy.zod.d.ts +3 -3
  41. package/dist/auth/policy.zod.d.ts.map +1 -0
  42. package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
  43. package/dist/auth/protocol.d.ts.map +1 -0
  44. package/dist/auth/role.zod.d.ts.map +1 -0
  45. package/dist/{data → automation}/flow.zod.d.ts +34 -16
  46. package/dist/automation/flow.zod.d.ts.map +1 -0
  47. package/dist/{data → automation}/flow.zod.js +6 -1
  48. package/dist/automation/index.d.ts +4 -0
  49. package/dist/automation/index.d.ts.map +1 -0
  50. package/dist/automation/index.js +19 -0
  51. package/dist/{system → automation}/webhook.zod.d.ts +2 -2
  52. package/dist/automation/webhook.zod.d.ts.map +1 -0
  53. package/dist/automation/workflow.zod.d.ts +2045 -0
  54. package/dist/automation/workflow.zod.d.ts.map +1 -0
  55. package/dist/{data → automation}/workflow.zod.js +24 -1
  56. package/dist/data/dataset.zod.d.ts +2 -2
  57. package/dist/data/field.zod.d.ts +443 -213
  58. package/dist/data/field.zod.d.ts.map +1 -1
  59. package/dist/data/field.zod.js +29 -1
  60. package/dist/data/filter.zod.d.ts +167 -30
  61. package/dist/data/filter.zod.d.ts.map +1 -1
  62. package/dist/data/filter.zod.js +25 -13
  63. package/dist/data/hook.zod.d.ts +191 -0
  64. package/dist/data/hook.zod.d.ts.map +1 -0
  65. package/dist/data/hook.zod.js +144 -0
  66. package/dist/data/index.d.ts +4 -17
  67. package/dist/data/index.d.ts.map +1 -1
  68. package/dist/data/index.js +4 -17
  69. package/dist/data/mapping.zod.d.ts +103 -91
  70. package/dist/data/mapping.zod.d.ts.map +1 -1
  71. package/dist/data/object.zod.d.ts +387 -127
  72. package/dist/data/object.zod.d.ts.map +1 -1
  73. package/dist/data/object.zod.js +87 -42
  74. package/dist/data/query.zod.d.ts +98 -169
  75. package/dist/data/query.zod.d.ts.map +1 -1
  76. package/dist/data/query.zod.js +42 -130
  77. package/dist/data/validation.zod.d.ts +166 -26
  78. package/dist/data/validation.zod.d.ts.map +1 -1
  79. package/dist/data/validation.zod.js +38 -16
  80. package/dist/{system → driver}/datasource.zod.d.ts +42 -8
  81. package/dist/driver/datasource.zod.d.ts.map +1 -0
  82. package/dist/{system → driver}/datasource.zod.js +17 -13
  83. package/dist/driver/driver.zod.d.ts +3392 -0
  84. package/dist/driver/driver.zod.d.ts.map +1 -0
  85. package/dist/{system → driver}/driver.zod.js +99 -0
  86. package/dist/driver/index.d.ts +5 -0
  87. package/dist/driver/index.d.ts.map +1 -0
  88. package/dist/driver/index.js +20 -0
  89. package/dist/driver/mongo.zod.d.ts +107 -0
  90. package/dist/driver/mongo.zod.d.ts.map +1 -0
  91. package/dist/driver/mongo.zod.js +80 -0
  92. package/dist/driver/postgres.zod.d.ts +134 -0
  93. package/dist/driver/postgres.zod.d.ts.map +1 -0
  94. package/dist/driver/postgres.zod.js +88 -0
  95. package/dist/hub/composer.zod.d.ts +2768 -0
  96. package/dist/hub/composer.zod.d.ts.map +1 -0
  97. package/dist/hub/composer.zod.js +111 -0
  98. package/dist/hub/index.d.ts +6 -0
  99. package/dist/hub/index.d.ts.map +1 -0
  100. package/dist/hub/index.js +22 -0
  101. package/dist/{system → hub}/license.zod.d.ts +11 -7
  102. package/dist/hub/license.zod.d.ts.map +1 -0
  103. package/dist/{system → hub}/license.zod.js +5 -3
  104. package/dist/hub/marketplace.zod.d.ts +191 -0
  105. package/dist/hub/marketplace.zod.d.ts.map +1 -0
  106. package/dist/hub/marketplace.zod.js +85 -0
  107. package/dist/hub/space.zod.d.ts +383 -0
  108. package/dist/hub/space.zod.d.ts.map +1 -0
  109. package/dist/hub/space.zod.js +103 -0
  110. package/dist/{system → hub}/tenant.zod.d.ts +73 -47
  111. package/dist/hub/tenant.zod.d.ts.map +1 -0
  112. package/dist/{system → hub}/tenant.zod.js +36 -10
  113. package/dist/index.d.ts +11 -4
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +12 -5
  116. package/dist/kernel/context.zod.d.ts +56 -0
  117. package/dist/kernel/context.zod.d.ts.map +1 -0
  118. package/dist/kernel/context.zod.js +43 -0
  119. package/dist/kernel/index.d.ts +12 -0
  120. package/dist/kernel/index.d.ts.map +1 -0
  121. package/dist/kernel/index.js +27 -0
  122. package/dist/kernel/logger.zod.d.ts +111 -0
  123. package/dist/kernel/logger.zod.d.ts.map +1 -0
  124. package/dist/kernel/logger.zod.js +75 -0
  125. package/dist/kernel/manifest.zod.d.ts +2153 -0
  126. package/dist/kernel/manifest.zod.d.ts.map +1 -0
  127. package/dist/{system → kernel}/manifest.zod.js +40 -0
  128. package/dist/{system → kernel}/plugin.zod.d.ts +598 -318
  129. package/dist/kernel/plugin.zod.d.ts.map +1 -0
  130. package/dist/{system → kernel}/plugin.zod.js +13 -0
  131. package/dist/kernel/scoped-storage.zod.d.ts +81 -0
  132. package/dist/kernel/scoped-storage.zod.d.ts.map +1 -0
  133. package/dist/kernel/scoped-storage.zod.js +66 -0
  134. package/dist/permission/index.d.ts +12 -0
  135. package/dist/permission/index.d.ts.map +1 -0
  136. package/dist/permission/index.js +27 -0
  137. package/dist/{data → permission}/permission.zod.d.ts +34 -3
  138. package/dist/permission/permission.zod.d.ts.map +1 -0
  139. package/dist/{data → permission}/permission.zod.js +10 -1
  140. package/dist/permission/sharing.zod.d.ts +146 -0
  141. package/dist/permission/sharing.zod.d.ts.map +1 -0
  142. package/dist/permission/sharing.zod.js +88 -0
  143. package/dist/permission/territory.zod.d.ts.map +1 -0
  144. package/dist/system/audit.zod.d.ts +52 -52
  145. package/dist/system/events.zod.d.ts +17 -17
  146. package/dist/system/index.d.ts +1 -20
  147. package/dist/system/index.d.ts.map +1 -1
  148. package/dist/system/index.js +3 -20
  149. package/dist/system/job.zod.d.ts +13 -13
  150. package/dist/ui/action.zod.d.ts +13 -13
  151. package/dist/ui/app.zod.d.ts +11 -11
  152. package/dist/ui/dashboard.zod.d.ts +12 -12
  153. package/dist/ui/page.zod.d.ts +2 -2
  154. package/dist/ui/report.zod.d.ts +7 -7
  155. package/dist/ui/theme.zod.d.ts +42 -42
  156. package/dist/ui/view.zod.d.ts +2320 -59
  157. package/dist/ui/view.zod.d.ts.map +1 -1
  158. package/dist/ui/view.zod.js +102 -3
  159. package/dist/ui/widget.zod.d.ts +61 -28
  160. package/dist/ui/widget.zod.d.ts.map +1 -1
  161. package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
  162. package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
  163. package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
  164. package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
  165. package/json-schema/{system → api}/ApiEndpoint.json +3 -1
  166. package/json-schema/{system → api}/ApiRoutes.json +7 -7
  167. package/json-schema/{system → api}/Discovery.json +7 -7
  168. package/json-schema/api/ExportRequest.json +402 -438
  169. package/json-schema/api/HttpMethod.json +18 -0
  170. package/json-schema/api/RouteCategory.json +17 -0
  171. package/json-schema/api/RouteDefinition.json +77 -0
  172. package/json-schema/api/RouterConfig.json +117 -0
  173. package/json-schema/{data → automation}/Flow.json +31 -1
  174. package/json-schema/{data → automation}/FlowEdge.json +9 -0
  175. package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
  176. package/json-schema/automation/WorkflowRule.json +1031 -0
  177. package/json-schema/data/AggregationNode.json +23 -0
  178. package/json-schema/data/AsyncValidation.json +49 -2
  179. package/json-schema/data/ComparisonOperator.json +52 -0
  180. package/json-schema/data/ConditionalValidation.json +693 -46
  181. package/json-schema/data/CrossFieldValidation.json +33 -2
  182. package/json-schema/data/CurrencyConfig.json +35 -0
  183. package/json-schema/data/CurrencyValue.json +26 -0
  184. package/json-schema/data/CustomValidator.json +37 -10
  185. package/json-schema/data/Field.json +30 -0
  186. package/json-schema/data/FieldOperators.json +78 -0
  187. package/json-schema/data/FieldReference.json +19 -0
  188. package/json-schema/data/FormatValidation.json +33 -2
  189. package/json-schema/data/Hook.json +95 -0
  190. package/json-schema/data/HookContext.json +88 -0
  191. package/json-schema/data/HookEvent.json +29 -0
  192. package/json-schema/data/Index.json +10 -0
  193. package/json-schema/data/JSONValidation.json +85 -0
  194. package/json-schema/data/JoinNode.json +197 -213
  195. package/json-schema/data/{TriggerAction.json → JoinStrategy.json} +6 -5
  196. package/json-schema/data/NormalizedFilter.json +234 -0
  197. package/json-schema/data/Object.json +1580 -28
  198. package/json-schema/data/ObjectCapabilities.json +30 -12
  199. package/json-schema/data/Query.json +246 -262
  200. package/json-schema/data/RangeOperator.json +26 -0
  201. package/json-schema/data/ScriptValidation.json +33 -2
  202. package/json-schema/data/SearchConfig.json +36 -0
  203. package/json-schema/data/StateMachineValidation.json +33 -2
  204. package/json-schema/data/UniquenessValidation.json +33 -2
  205. package/json-schema/data/ValidationRule.json +693 -46
  206. package/json-schema/{system → driver}/Datasource.json +35 -0
  207. package/json-schema/{system → driver}/DriverCapabilities.json +10 -0
  208. package/json-schema/{system → driver}/DriverInterface.json +10 -0
  209. package/json-schema/{system → driver}/DriverOptions.json +11 -0
  210. package/json-schema/driver/MongoConfig.json +82 -0
  211. package/json-schema/driver/PostgresConfig.json +98 -0
  212. package/json-schema/hub/BillOfMaterials.json +70 -0
  213. package/json-schema/hub/ComposerRequest.json +86 -0
  214. package/json-schema/hub/ComposerResponse.json +2645 -0
  215. package/json-schema/hub/ConflictReport.json +53 -0
  216. package/json-schema/hub/DependencyRequirement.json +36 -0
  217. package/json-schema/hub/DeploymentTarget.json +38 -0
  218. package/json-schema/hub/HubSpace.json +279 -0
  219. package/json-schema/{system → hub}/License.json +11 -3
  220. package/json-schema/hub/MarketplacePlugin.json +141 -0
  221. package/json-schema/hub/PluginAuthor.json +26 -0
  222. package/json-schema/hub/PluginPricing.json +43 -0
  223. package/json-schema/hub/SpaceSubscription.json +77 -0
  224. package/json-schema/hub/SubscriptionStatus.json +16 -0
  225. package/json-schema/{system → hub}/Tenant.json +3 -5
  226. package/json-schema/kernel/FileMetadata.json +43 -0
  227. package/json-schema/kernel/KernelContext.json +62 -0
  228. package/json-schema/kernel/LogEntry.json +63 -0
  229. package/json-schema/kernel/LogFormat.json +15 -0
  230. package/json-schema/kernel/LogLevel.json +17 -0
  231. package/json-schema/kernel/LoggerConfig.json +70 -0
  232. package/json-schema/kernel/Manifest.json +2557 -0
  233. package/json-schema/{system → kernel}/PluginContext.json +8 -1
  234. package/json-schema/kernel/RuntimeMode.json +16 -0
  235. package/json-schema/kernel/ScopedStorageConfig.json +54 -0
  236. package/json-schema/kernel/StorageAdapterType.json +17 -0
  237. package/json-schema/kernel/StorageScope.json +18 -0
  238. package/json-schema/permission/CriteriaSharingRule.json +82 -0
  239. package/json-schema/{data → permission}/OWDModel.json +2 -1
  240. package/json-schema/{data → permission}/ObjectPermission.json +15 -0
  241. package/json-schema/permission/OwnerSharingRule.json +102 -0
  242. package/json-schema/{data → permission}/PermissionSet.json +15 -0
  243. package/json-schema/permission/ShareRecipientType.json +16 -0
  244. package/json-schema/{data → permission}/SharingLevel.json +2 -1
  245. package/json-schema/permission/SharingRule.json +182 -0
  246. package/json-schema/{data → permission}/SharingRuleType.json +1 -3
  247. package/json-schema/ui/FieldWidgetProps.json +30 -0
  248. package/json-schema/ui/FormField.json +61 -0
  249. package/json-schema/ui/FormSection.json +60 -1
  250. package/json-schema/ui/FormView.json +257 -2
  251. package/json-schema/{system → ui}/HttpMethod.json +2 -2
  252. package/json-schema/ui/HttpRequest.json +46 -0
  253. package/json-schema/ui/ListColumn.json +57 -0
  254. package/json-schema/ui/ListView.json +249 -4
  255. package/json-schema/ui/PaginationConfig.json +26 -0
  256. package/json-schema/ui/SelectionConfig.json +22 -0
  257. package/json-schema/ui/View.json +1012 -12
  258. package/json-schema/ui/ViewData.json +142 -0
  259. package/llms.txt +182 -0
  260. package/package.json +38 -16
  261. package/prompts/README.md +18 -0
  262. package/prompts/architecture.md +81 -0
  263. package/prompts/implement-objectai.md +39 -0
  264. package/prompts/implement-objectos.md +48 -0
  265. package/prompts/implement-objectql.md +39 -0
  266. package/prompts/implement-objectui.md +46 -0
  267. package/prompts/instructions.md +91 -0
  268. package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
  269. package/dist/data/flow.zod.d.ts.map +0 -1
  270. package/dist/data/permission.zod.d.ts.map +0 -1
  271. package/dist/data/sharing.zod.d.ts +0 -63
  272. package/dist/data/sharing.zod.d.ts.map +0 -1
  273. package/dist/data/sharing.zod.js +0 -57
  274. package/dist/data/trigger.zod.d.ts +0 -354
  275. package/dist/data/trigger.zod.d.ts.map +0 -1
  276. package/dist/data/trigger.zod.js +0 -195
  277. package/dist/data/workflow.zod.d.ts +0 -986
  278. package/dist/data/workflow.zod.d.ts.map +0 -1
  279. package/dist/system/api.zod.d.ts.map +0 -1
  280. package/dist/system/auth-protocol.d.ts.map +0 -1
  281. package/dist/system/auth.zod.d.ts.map +0 -1
  282. package/dist/system/datasource.zod.d.ts.map +0 -1
  283. package/dist/system/discovery.zod.d.ts.map +0 -1
  284. package/dist/system/driver.zod.d.ts +0 -1631
  285. package/dist/system/driver.zod.d.ts.map +0 -1
  286. package/dist/system/identity.zod.d.ts.map +0 -1
  287. package/dist/system/license.zod.d.ts.map +0 -1
  288. package/dist/system/manifest.zod.d.ts +0 -397
  289. package/dist/system/manifest.zod.d.ts.map +0 -1
  290. package/dist/system/organization.zod.d.ts.map +0 -1
  291. package/dist/system/plugin.zod.d.ts.map +0 -1
  292. package/dist/system/policy.zod.d.ts.map +0 -1
  293. package/dist/system/realtime.zod.d.ts.map +0 -1
  294. package/dist/system/role.zod.d.ts.map +0 -1
  295. package/dist/system/tenant.zod.d.ts.map +0 -1
  296. package/dist/system/territory.zod.d.ts.map +0 -1
  297. package/dist/system/webhook.zod.d.ts.map +0 -1
  298. package/json-schema/README.md +0 -127
  299. package/json-schema/data/FieldMapping.json +0 -83
  300. package/json-schema/data/FilterNode.json +0 -52
  301. package/json-schema/data/FilterOperator.json +0 -26
  302. package/json-schema/data/LogicOperator.json +0 -14
  303. package/json-schema/data/Mapping.json +0 -598
  304. package/json-schema/data/SharingRule.json +0 -58
  305. package/json-schema/data/TransformType.json +0 -18
  306. package/json-schema/data/Trigger.json +0 -73
  307. package/json-schema/data/TriggerContext.json +0 -61
  308. package/json-schema/data/TriggerTiming.json +0 -13
  309. package/json-schema/system/Manifest.json +0 -315
  310. /package/dist/{system → api}/realtime.zod.js +0 -0
  311. /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
  312. /package/dist/{system → auth}/identity.zod.js +0 -0
  313. /package/dist/{system → auth}/organization.zod.js +0 -0
  314. /package/dist/{system → auth}/policy.zod.js +0 -0
  315. /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
  316. /package/dist/{system → auth}/role.zod.d.ts +0 -0
  317. /package/dist/{system → auth}/role.zod.js +0 -0
  318. /package/dist/{system → automation}/webhook.zod.js +0 -0
  319. /package/dist/{system → permission}/territory.zod.d.ts +0 -0
  320. /package/dist/{system → permission}/territory.zod.js +0 -0
  321. /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
  322. /package/json-schema/{system → api}/ApiMapping.json +0 -0
  323. /package/json-schema/{system → api}/Presence.json +0 -0
  324. /package/json-schema/{system → api}/PresenceStatus.json +0 -0
  325. /package/json-schema/{system → api}/RateLimit.json +0 -0
  326. /package/json-schema/{system → api}/RealtimeAction.json +0 -0
  327. /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
  328. /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
  329. /package/json-schema/{system → api}/Subscription.json +0 -0
  330. /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
  331. /package/json-schema/{system → api}/TransportProtocol.json +0 -0
  332. /package/json-schema/{system → auth}/Account.json +0 -0
  333. /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
  334. /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
  335. /package/json-schema/{system → auth}/AuthConfig.json +0 -0
  336. /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
  337. /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
  338. /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
  339. /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
  340. /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
  341. /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
  342. /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
  343. /package/json-schema/{system → auth}/Invitation.json +0 -0
  344. /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
  345. /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
  346. /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
  347. /package/json-schema/{system → auth}/Member.json +0 -0
  348. /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
  349. /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
  350. /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
  351. /package/json-schema/{system → auth}/Organization.json +0 -0
  352. /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
  353. /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
  354. /package/json-schema/{system → auth}/Policy.json +0 -0
  355. /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
  356. /package/json-schema/{system → auth}/Role.json +0 -0
  357. /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
  358. /package/json-schema/{system → auth}/Session.json +0 -0
  359. /package/json-schema/{system → auth}/SessionConfig.json +0 -0
  360. /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
  361. /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
  362. /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
  363. /package/json-schema/{system → auth}/User.json +0 -0
  364. /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
  365. /package/json-schema/{system → auth}/VerificationToken.json +0 -0
  366. /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
  367. /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
  368. /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
  369. /package/json-schema/{data → automation}/FlowNode.json +0 -0
  370. /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
  371. /package/json-schema/{data → automation}/FlowVariable.json +0 -0
  372. /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
  373. /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
  374. /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
  375. /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
  376. /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
  377. /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
  378. /package/json-schema/{system → automation}/Webhook.json +0 -0
  379. /package/json-schema/{system → automation}/WebhookReceiver.json +0 -0
  380. /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
  381. /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
  382. /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
  383. /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
  384. /package/json-schema/{system → driver}/DatasourceCapabilities.json +0 -0
  385. /package/json-schema/{system → driver}/DriverDefinition.json +0 -0
  386. /package/json-schema/{system → driver}/DriverType.json +0 -0
  387. /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
  388. /package/json-schema/{system → hub}/Feature.json +0 -0
  389. /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
  390. /package/json-schema/{system → hub}/MetricType.json +0 -0
  391. /package/json-schema/{system → hub}/Plan.json +0 -0
  392. /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
  393. /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
  394. /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
  395. /package/json-schema/{system → hub}/TenantQuota.json +0 -0
  396. /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
  397. /package/json-schema/{system → kernel}/I18nContext.json +0 -0
  398. /package/json-schema/{system → kernel}/Logger.json +0 -0
  399. /package/json-schema/{system → kernel}/ObjectQLClient.json +0 -0
  400. /package/json-schema/{system → kernel}/Plugin.json +0 -0
  401. /package/json-schema/{system → kernel}/PluginLifecycle.json +0 -0
  402. /package/json-schema/{system → kernel}/Router.json +0 -0
  403. /package/json-schema/{system → kernel}/Scheduler.json +0 -0
  404. /package/json-schema/{system → kernel}/ScopedStorage.json +0 -0
  405. /package/json-schema/{system → kernel}/SystemAPI.json +0 -0
  406. /package/json-schema/{data → permission}/FieldPermission.json +0 -0
  407. /package/json-schema/{system → permission}/Territory.json +0 -0
  408. /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
  409. /package/json-schema/{system → permission}/TerritoryType.json +0 -0
@@ -0,0 +1,3392 @@
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
+ /**
21
+ * Distributed Tracing Context.
22
+ * Used for passing OpenTelemetry span context or request IDs for observability.
23
+ */
24
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
25
+ /**
26
+ * Tenant Identifier.
27
+ * For multi-tenant databases (row-level security or schema-per-tenant).
28
+ */
29
+ tenantId: z.ZodOptional<z.ZodString>;
30
+ }, "strip", z.ZodTypeAny, {
31
+ timeout?: number | undefined;
32
+ tenantId?: string | undefined;
33
+ transaction?: any;
34
+ skipCache?: boolean | undefined;
35
+ traceContext?: Record<string, string> | undefined;
36
+ }, {
37
+ timeout?: number | undefined;
38
+ tenantId?: string | undefined;
39
+ transaction?: any;
40
+ skipCache?: boolean | undefined;
41
+ traceContext?: Record<string, string> | undefined;
42
+ }>;
43
+ /**
44
+ * Driver Capabilities Schema
45
+ *
46
+ * Defines what features a database driver supports.
47
+ * This allows ObjectQL to adapt its behavior based on underlying database capabilities.
48
+ */
49
+ export declare const DriverCapabilitiesSchema: z.ZodObject<{
50
+ /**
51
+ * Whether the driver supports database transactions.
52
+ * If true, beginTransaction, commit, and rollback must be implemented.
53
+ */
54
+ transactions: z.ZodBoolean;
55
+ /**
56
+ * Whether the driver supports WHERE clause filters.
57
+ * If false, ObjectQL will fetch all records and filter in memory.
58
+ *
59
+ * Example: Memory driver might not support complex filter conditions.
60
+ */
61
+ queryFilters: z.ZodBoolean;
62
+ /**
63
+ * Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
64
+ * If false, ObjectQL will compute aggregations in memory.
65
+ */
66
+ queryAggregations: z.ZodBoolean;
67
+ /**
68
+ * Whether the driver supports ORDER BY sorting.
69
+ * If false, ObjectQL will sort results in memory.
70
+ */
71
+ querySorting: z.ZodBoolean;
72
+ /**
73
+ * Whether the driver supports LIMIT/OFFSET pagination.
74
+ * If false, ObjectQL will fetch all records and paginate in memory.
75
+ */
76
+ queryPagination: z.ZodBoolean;
77
+ /**
78
+ * Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
79
+ * If false, ObjectQL will compute window functions in memory.
80
+ */
81
+ queryWindowFunctions: z.ZodBoolean;
82
+ /**
83
+ * Whether the driver supports subqueries (nested SELECT statements).
84
+ * If false, ObjectQL will execute queries separately and combine results.
85
+ */
86
+ querySubqueries: z.ZodBoolean;
87
+ /**
88
+ * Whether the driver supports SQL-style joins.
89
+ * If false, ObjectQL will fetch related data separately and join in memory.
90
+ */
91
+ joins: z.ZodBoolean;
92
+ /**
93
+ * Whether the driver supports full-text search.
94
+ * If true, text search queries can be pushed to the database.
95
+ */
96
+ fullTextSearch: z.ZodBoolean;
97
+ /**
98
+ * Whether the driver supports JSON field types.
99
+ * If false, JSON data will be serialized as strings.
100
+ */
101
+ jsonFields: z.ZodBoolean;
102
+ /**
103
+ * Whether the driver supports array field types.
104
+ * If false, arrays will be stored as JSON strings or in separate tables.
105
+ */
106
+ arrayFields: z.ZodBoolean;
107
+ /**
108
+ * Whether the driver supports vector embeddings and similarity search.
109
+ * Required for RAG (Retrieval-Augmented Generation) and AI features.
110
+ */
111
+ vectorSearch: z.ZodDefault<z.ZodBoolean>;
112
+ /**
113
+ * Whether the driver supports geospatial queries.
114
+ */
115
+ geoSpatial: z.ZodDefault<z.ZodBoolean>;
116
+ }, "strip", z.ZodTypeAny, {
117
+ joins: boolean;
118
+ transactions: boolean;
119
+ queryFilters: boolean;
120
+ queryAggregations: boolean;
121
+ querySorting: boolean;
122
+ queryPagination: boolean;
123
+ queryWindowFunctions: boolean;
124
+ querySubqueries: boolean;
125
+ fullTextSearch: boolean;
126
+ jsonFields: boolean;
127
+ arrayFields: boolean;
128
+ vectorSearch: boolean;
129
+ geoSpatial: boolean;
130
+ }, {
131
+ joins: boolean;
132
+ transactions: boolean;
133
+ queryFilters: boolean;
134
+ queryAggregations: boolean;
135
+ querySorting: boolean;
136
+ queryPagination: boolean;
137
+ queryWindowFunctions: boolean;
138
+ querySubqueries: boolean;
139
+ fullTextSearch: boolean;
140
+ jsonFields: boolean;
141
+ arrayFields: boolean;
142
+ vectorSearch?: boolean | undefined;
143
+ geoSpatial?: boolean | undefined;
144
+ }>;
145
+ /**
146
+ * Unified Database Driver Interface
147
+ *
148
+ * This is the contract that all storage adapters (Postgres, Mongo, Excel, Salesforce) must implement.
149
+ * It abstracts the underlying engine, enabling ObjectStack to be "Database Agnostic".
150
+ */
151
+ export declare const DriverInterfaceSchema: z.ZodObject<{
152
+ /**
153
+ * Driver name (e.g., 'postgresql', 'mongodb', 'rest_api').
154
+ */
155
+ name: z.ZodString;
156
+ /**
157
+ * Driver version.
158
+ */
159
+ version: z.ZodString;
160
+ /**
161
+ * Capabilities descriptor.
162
+ */
163
+ supports: z.ZodObject<{
164
+ /**
165
+ * Whether the driver supports database transactions.
166
+ * If true, beginTransaction, commit, and rollback must be implemented.
167
+ */
168
+ transactions: z.ZodBoolean;
169
+ /**
170
+ * Whether the driver supports WHERE clause filters.
171
+ * If false, ObjectQL will fetch all records and filter in memory.
172
+ *
173
+ * Example: Memory driver might not support complex filter conditions.
174
+ */
175
+ queryFilters: z.ZodBoolean;
176
+ /**
177
+ * Whether the driver supports aggregation functions (COUNT, SUM, AVG, etc.).
178
+ * If false, ObjectQL will compute aggregations in memory.
179
+ */
180
+ queryAggregations: z.ZodBoolean;
181
+ /**
182
+ * Whether the driver supports ORDER BY sorting.
183
+ * If false, ObjectQL will sort results in memory.
184
+ */
185
+ querySorting: z.ZodBoolean;
186
+ /**
187
+ * Whether the driver supports LIMIT/OFFSET pagination.
188
+ * If false, ObjectQL will fetch all records and paginate in memory.
189
+ */
190
+ queryPagination: z.ZodBoolean;
191
+ /**
192
+ * Whether the driver supports window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.).
193
+ * If false, ObjectQL will compute window functions in memory.
194
+ */
195
+ queryWindowFunctions: z.ZodBoolean;
196
+ /**
197
+ * Whether the driver supports subqueries (nested SELECT statements).
198
+ * If false, ObjectQL will execute queries separately and combine results.
199
+ */
200
+ querySubqueries: z.ZodBoolean;
201
+ /**
202
+ * Whether the driver supports SQL-style joins.
203
+ * If false, ObjectQL will fetch related data separately and join in memory.
204
+ */
205
+ joins: z.ZodBoolean;
206
+ /**
207
+ * Whether the driver supports full-text search.
208
+ * If true, text search queries can be pushed to the database.
209
+ */
210
+ fullTextSearch: z.ZodBoolean;
211
+ /**
212
+ * Whether the driver supports JSON field types.
213
+ * If false, JSON data will be serialized as strings.
214
+ */
215
+ jsonFields: z.ZodBoolean;
216
+ /**
217
+ * Whether the driver supports array field types.
218
+ * If false, arrays will be stored as JSON strings or in separate tables.
219
+ */
220
+ arrayFields: z.ZodBoolean;
221
+ /**
222
+ * Whether the driver supports vector embeddings and similarity search.
223
+ * Required for RAG (Retrieval-Augmented Generation) and AI features.
224
+ */
225
+ vectorSearch: z.ZodDefault<z.ZodBoolean>;
226
+ /**
227
+ * Whether the driver supports geospatial queries.
228
+ */
229
+ geoSpatial: z.ZodDefault<z.ZodBoolean>;
230
+ }, "strip", z.ZodTypeAny, {
231
+ joins: boolean;
232
+ transactions: boolean;
233
+ queryFilters: boolean;
234
+ queryAggregations: boolean;
235
+ querySorting: boolean;
236
+ queryPagination: boolean;
237
+ queryWindowFunctions: boolean;
238
+ querySubqueries: boolean;
239
+ fullTextSearch: boolean;
240
+ jsonFields: boolean;
241
+ arrayFields: boolean;
242
+ vectorSearch: boolean;
243
+ geoSpatial: boolean;
244
+ }, {
245
+ joins: boolean;
246
+ transactions: boolean;
247
+ queryFilters: boolean;
248
+ queryAggregations: boolean;
249
+ querySorting: boolean;
250
+ queryPagination: boolean;
251
+ queryWindowFunctions: boolean;
252
+ querySubqueries: boolean;
253
+ fullTextSearch: boolean;
254
+ jsonFields: boolean;
255
+ arrayFields: boolean;
256
+ vectorSearch?: boolean | undefined;
257
+ geoSpatial?: boolean | undefined;
258
+ }>;
259
+ /**
260
+ * Initialize connection pool or authenticate.
261
+ */
262
+ connect: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
263
+ /**
264
+ * Close connections and cleanup resources.
265
+ */
266
+ disconnect: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
267
+ /**
268
+ * Check connection health.
269
+ * @returns true if healthy, false otherwise.
270
+ */
271
+ checkHealth: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
272
+ /**
273
+ * Get Connection Pool Statistics.
274
+ * Useful for monitoring database load.
275
+ */
276
+ getPoolStats: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodOptional<z.ZodObject<{
277
+ total: z.ZodNumber;
278
+ idle: z.ZodNumber;
279
+ active: z.ZodNumber;
280
+ waiting: z.ZodNumber;
281
+ }, "strip", z.ZodTypeAny, {
282
+ active: number;
283
+ total: number;
284
+ idle: number;
285
+ waiting: number;
286
+ }, {
287
+ active: number;
288
+ total: number;
289
+ idle: number;
290
+ waiting: number;
291
+ }>>>>;
292
+ /**
293
+ * Execute a raw command/query native to the driver.
294
+ * Useful for complex reports, stored procedures, or DDL not covered by standard sync.
295
+ *
296
+ * @param command - The raw command (e.g., SQL string, shell command, or remote API payload).
297
+ * @param parameters - Optional array of bound parameters for safe execution (prevention of injection).
298
+ * @param options - Driver options (transaction context, timeout).
299
+ * @returns Promise resolving to the raw result from the driver.
300
+ *
301
+ * @example
302
+ * // SQL Driver
303
+ * await driver.execute('SELECT * FROM complex_view WHERE id = ?', [123]);
304
+ *
305
+ * // Mongo Driver
306
+ * await driver.execute({ aggregate: 'orders', pipeline: [...] });
307
+ */
308
+ execute: z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodOptional<z.ZodArray<z.ZodAny, "many">>, z.ZodOptional<z.ZodObject<{
309
+ /**
310
+ * Transaction handle/identifier.
311
+ * If provided, the operation must run within this transaction.
312
+ */
313
+ transaction: z.ZodOptional<z.ZodAny>;
314
+ /**
315
+ * Operation timeout in milliseconds.
316
+ */
317
+ timeout: z.ZodOptional<z.ZodNumber>;
318
+ /**
319
+ * Whether to bypass cache and force a fresh read.
320
+ */
321
+ skipCache: z.ZodOptional<z.ZodBoolean>;
322
+ /**
323
+ * Distributed Tracing Context.
324
+ * Used for passing OpenTelemetry span context or request IDs for observability.
325
+ */
326
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
327
+ /**
328
+ * Tenant Identifier.
329
+ * For multi-tenant databases (row-level security or schema-per-tenant).
330
+ */
331
+ tenantId: z.ZodOptional<z.ZodString>;
332
+ }, "strip", z.ZodTypeAny, {
333
+ timeout?: number | undefined;
334
+ tenantId?: string | undefined;
335
+ transaction?: any;
336
+ skipCache?: boolean | undefined;
337
+ traceContext?: Record<string, string> | undefined;
338
+ }, {
339
+ timeout?: number | undefined;
340
+ tenantId?: string | undefined;
341
+ transaction?: any;
342
+ skipCache?: boolean | undefined;
343
+ traceContext?: Record<string, string> | undefined;
344
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
345
+ /**
346
+ * Find multiple records matching the structured query.
347
+ * Parsing the QueryAST is the responsibility of the driver implementation.
348
+ *
349
+ * @param object - The name of the object/table to query (e.g. 'account').
350
+ * @param query - The structured QueryAST (filters, sorts, joins, pagination).
351
+ * @param options - Driver options.
352
+ * @returns Array of records.
353
+ *
354
+ * @example
355
+ * await driver.find('account', {
356
+ * filters: [['status', '=', 'active'], 'and', ['amount', '>', 500]],
357
+ * sort: [{ field: 'created_at', order: 'desc' }],
358
+ * top: 10
359
+ * });
360
+ * @returns Array of records.
361
+ * MUST return `id` as string. MUST NOT return implementation details like `_id`.
362
+ */
363
+ find: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
364
+ object: z.ZodString;
365
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
366
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
367
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
368
+ field: z.ZodString;
369
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ field: string;
372
+ order: "asc" | "desc";
373
+ }, {
374
+ field: string;
375
+ order?: "asc" | "desc" | undefined;
376
+ }>, "many">>;
377
+ limit: z.ZodOptional<z.ZodNumber>;
378
+ offset: z.ZodOptional<z.ZodNumber>;
379
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
380
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
381
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
382
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
383
+ field: z.ZodOptional<z.ZodString>;
384
+ alias: z.ZodString;
385
+ distinct: z.ZodOptional<z.ZodBoolean>;
386
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
387
+ }, "strip", z.ZodTypeAny, {
388
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
389
+ alias: string;
390
+ filter?: import("../data").FilterCondition | undefined;
391
+ field?: string | undefined;
392
+ distinct?: boolean | undefined;
393
+ }, {
394
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
395
+ alias: string;
396
+ filter?: import("../data").FilterCondition | undefined;
397
+ field?: string | undefined;
398
+ distinct?: boolean | undefined;
399
+ }>, "many">>;
400
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
401
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
402
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
403
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
404
+ field: z.ZodOptional<z.ZodString>;
405
+ alias: z.ZodString;
406
+ over: z.ZodObject<{
407
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
408
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
409
+ field: z.ZodString;
410
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
411
+ }, "strip", z.ZodTypeAny, {
412
+ field: string;
413
+ order: "asc" | "desc";
414
+ }, {
415
+ field: string;
416
+ order?: "asc" | "desc" | undefined;
417
+ }>, "many">>;
418
+ frame: z.ZodOptional<z.ZodObject<{
419
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
420
+ start: z.ZodOptional<z.ZodString>;
421
+ end: z.ZodOptional<z.ZodString>;
422
+ }, "strip", z.ZodTypeAny, {
423
+ type?: "rows" | "range" | undefined;
424
+ start?: string | undefined;
425
+ end?: string | undefined;
426
+ }, {
427
+ type?: "rows" | "range" | undefined;
428
+ start?: string | undefined;
429
+ end?: string | undefined;
430
+ }>>;
431
+ }, "strip", z.ZodTypeAny, {
432
+ orderBy?: {
433
+ field: string;
434
+ order: "asc" | "desc";
435
+ }[] | undefined;
436
+ partitionBy?: string[] | undefined;
437
+ frame?: {
438
+ type?: "rows" | "range" | undefined;
439
+ start?: string | undefined;
440
+ end?: string | undefined;
441
+ } | undefined;
442
+ }, {
443
+ orderBy?: {
444
+ field: string;
445
+ order?: "asc" | "desc" | undefined;
446
+ }[] | undefined;
447
+ partitionBy?: string[] | undefined;
448
+ frame?: {
449
+ type?: "rows" | "range" | undefined;
450
+ start?: string | undefined;
451
+ end?: string | undefined;
452
+ } | undefined;
453
+ }>;
454
+ }, "strip", z.ZodTypeAny, {
455
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
456
+ alias: string;
457
+ over: {
458
+ orderBy?: {
459
+ field: string;
460
+ order: "asc" | "desc";
461
+ }[] | undefined;
462
+ partitionBy?: string[] | undefined;
463
+ frame?: {
464
+ type?: "rows" | "range" | undefined;
465
+ start?: string | undefined;
466
+ end?: string | undefined;
467
+ } | undefined;
468
+ };
469
+ field?: string | undefined;
470
+ }, {
471
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
472
+ alias: string;
473
+ over: {
474
+ orderBy?: {
475
+ field: string;
476
+ order?: "asc" | "desc" | undefined;
477
+ }[] | undefined;
478
+ partitionBy?: string[] | undefined;
479
+ frame?: {
480
+ type?: "rows" | "range" | undefined;
481
+ start?: string | undefined;
482
+ end?: string | undefined;
483
+ } | undefined;
484
+ };
485
+ field?: string | undefined;
486
+ }>, "many">>;
487
+ distinct: z.ZodOptional<z.ZodBoolean>;
488
+ }, "strip", z.ZodTypeAny, {
489
+ object: string;
490
+ where?: import("../data").FilterCondition | undefined;
491
+ distinct?: boolean | undefined;
492
+ fields?: any[] | undefined;
493
+ orderBy?: {
494
+ field: string;
495
+ order: "asc" | "desc";
496
+ }[] | undefined;
497
+ limit?: number | undefined;
498
+ offset?: number | undefined;
499
+ cursor?: Record<string, any> | undefined;
500
+ joins?: any[] | undefined;
501
+ aggregations?: {
502
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
503
+ alias: string;
504
+ filter?: import("../data").FilterCondition | undefined;
505
+ field?: string | undefined;
506
+ distinct?: boolean | undefined;
507
+ }[] | undefined;
508
+ groupBy?: string[] | undefined;
509
+ having?: import("../data").FilterCondition | undefined;
510
+ windowFunctions?: {
511
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
512
+ alias: string;
513
+ over: {
514
+ orderBy?: {
515
+ field: string;
516
+ order: "asc" | "desc";
517
+ }[] | undefined;
518
+ partitionBy?: string[] | undefined;
519
+ frame?: {
520
+ type?: "rows" | "range" | undefined;
521
+ start?: string | undefined;
522
+ end?: string | undefined;
523
+ } | undefined;
524
+ };
525
+ field?: string | undefined;
526
+ }[] | undefined;
527
+ }, {
528
+ object: string;
529
+ where?: import("../data").FilterCondition | undefined;
530
+ distinct?: boolean | undefined;
531
+ fields?: any[] | undefined;
532
+ orderBy?: {
533
+ field: string;
534
+ order?: "asc" | "desc" | undefined;
535
+ }[] | undefined;
536
+ limit?: number | undefined;
537
+ offset?: number | undefined;
538
+ cursor?: Record<string, any> | undefined;
539
+ joins?: any[] | undefined;
540
+ aggregations?: {
541
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
542
+ alias: string;
543
+ filter?: import("../data").FilterCondition | undefined;
544
+ field?: string | undefined;
545
+ distinct?: boolean | undefined;
546
+ }[] | undefined;
547
+ groupBy?: string[] | undefined;
548
+ having?: import("../data").FilterCondition | undefined;
549
+ windowFunctions?: {
550
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
551
+ alias: string;
552
+ over: {
553
+ orderBy?: {
554
+ field: string;
555
+ order?: "asc" | "desc" | undefined;
556
+ }[] | undefined;
557
+ partitionBy?: string[] | undefined;
558
+ frame?: {
559
+ type?: "rows" | "range" | undefined;
560
+ start?: string | undefined;
561
+ end?: string | undefined;
562
+ } | undefined;
563
+ };
564
+ field?: string | undefined;
565
+ }[] | undefined;
566
+ }>, z.ZodOptional<z.ZodObject<{
567
+ /**
568
+ * Transaction handle/identifier.
569
+ * If provided, the operation must run within this transaction.
570
+ */
571
+ transaction: z.ZodOptional<z.ZodAny>;
572
+ /**
573
+ * Operation timeout in milliseconds.
574
+ */
575
+ timeout: z.ZodOptional<z.ZodNumber>;
576
+ /**
577
+ * Whether to bypass cache and force a fresh read.
578
+ */
579
+ skipCache: z.ZodOptional<z.ZodBoolean>;
580
+ /**
581
+ * Distributed Tracing Context.
582
+ * Used for passing OpenTelemetry span context or request IDs for observability.
583
+ */
584
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
585
+ /**
586
+ * Tenant Identifier.
587
+ * For multi-tenant databases (row-level security or schema-per-tenant).
588
+ */
589
+ tenantId: z.ZodOptional<z.ZodString>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ timeout?: number | undefined;
592
+ tenantId?: string | undefined;
593
+ transaction?: any;
594
+ skipCache?: boolean | undefined;
595
+ traceContext?: Record<string, string> | undefined;
596
+ }, {
597
+ timeout?: number | undefined;
598
+ tenantId?: string | undefined;
599
+ transaction?: any;
600
+ skipCache?: boolean | undefined;
601
+ traceContext?: Record<string, string> | undefined;
602
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
603
+ /**
604
+ * Stream records matching the structured query.
605
+ * Optimized for large datasets to avoid memory overflow.
606
+ *
607
+ * @param object - The name of the object.
608
+ * @param query - The structured QueryAST.
609
+ * @param options - Driver options.
610
+ * @returns AsyncIterable/ReadableStream of records.
611
+ */
612
+ findStream: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
613
+ object: z.ZodString;
614
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
615
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
616
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
617
+ field: z.ZodString;
618
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ field: string;
621
+ order: "asc" | "desc";
622
+ }, {
623
+ field: string;
624
+ order?: "asc" | "desc" | undefined;
625
+ }>, "many">>;
626
+ limit: z.ZodOptional<z.ZodNumber>;
627
+ offset: z.ZodOptional<z.ZodNumber>;
628
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
629
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
630
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
631
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
632
+ field: z.ZodOptional<z.ZodString>;
633
+ alias: z.ZodString;
634
+ distinct: z.ZodOptional<z.ZodBoolean>;
635
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
636
+ }, "strip", z.ZodTypeAny, {
637
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
638
+ alias: string;
639
+ filter?: import("../data").FilterCondition | undefined;
640
+ field?: string | undefined;
641
+ distinct?: boolean | undefined;
642
+ }, {
643
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
644
+ alias: string;
645
+ filter?: import("../data").FilterCondition | undefined;
646
+ field?: string | undefined;
647
+ distinct?: boolean | undefined;
648
+ }>, "many">>;
649
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
650
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
651
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
652
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
653
+ field: z.ZodOptional<z.ZodString>;
654
+ alias: z.ZodString;
655
+ over: z.ZodObject<{
656
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
657
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
658
+ field: z.ZodString;
659
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
660
+ }, "strip", z.ZodTypeAny, {
661
+ field: string;
662
+ order: "asc" | "desc";
663
+ }, {
664
+ field: string;
665
+ order?: "asc" | "desc" | undefined;
666
+ }>, "many">>;
667
+ frame: z.ZodOptional<z.ZodObject<{
668
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
669
+ start: z.ZodOptional<z.ZodString>;
670
+ end: z.ZodOptional<z.ZodString>;
671
+ }, "strip", z.ZodTypeAny, {
672
+ type?: "rows" | "range" | undefined;
673
+ start?: string | undefined;
674
+ end?: string | undefined;
675
+ }, {
676
+ type?: "rows" | "range" | undefined;
677
+ start?: string | undefined;
678
+ end?: string | undefined;
679
+ }>>;
680
+ }, "strip", z.ZodTypeAny, {
681
+ orderBy?: {
682
+ field: string;
683
+ order: "asc" | "desc";
684
+ }[] | undefined;
685
+ partitionBy?: string[] | undefined;
686
+ frame?: {
687
+ type?: "rows" | "range" | undefined;
688
+ start?: string | undefined;
689
+ end?: string | undefined;
690
+ } | undefined;
691
+ }, {
692
+ orderBy?: {
693
+ field: string;
694
+ order?: "asc" | "desc" | undefined;
695
+ }[] | undefined;
696
+ partitionBy?: string[] | undefined;
697
+ frame?: {
698
+ type?: "rows" | "range" | undefined;
699
+ start?: string | undefined;
700
+ end?: string | undefined;
701
+ } | undefined;
702
+ }>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
705
+ alias: string;
706
+ over: {
707
+ orderBy?: {
708
+ field: string;
709
+ order: "asc" | "desc";
710
+ }[] | undefined;
711
+ partitionBy?: string[] | undefined;
712
+ frame?: {
713
+ type?: "rows" | "range" | undefined;
714
+ start?: string | undefined;
715
+ end?: string | undefined;
716
+ } | undefined;
717
+ };
718
+ field?: string | undefined;
719
+ }, {
720
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
721
+ alias: string;
722
+ over: {
723
+ orderBy?: {
724
+ field: string;
725
+ order?: "asc" | "desc" | undefined;
726
+ }[] | undefined;
727
+ partitionBy?: string[] | undefined;
728
+ frame?: {
729
+ type?: "rows" | "range" | undefined;
730
+ start?: string | undefined;
731
+ end?: string | undefined;
732
+ } | undefined;
733
+ };
734
+ field?: string | undefined;
735
+ }>, "many">>;
736
+ distinct: z.ZodOptional<z.ZodBoolean>;
737
+ }, "strip", z.ZodTypeAny, {
738
+ object: string;
739
+ where?: import("../data").FilterCondition | undefined;
740
+ distinct?: boolean | undefined;
741
+ fields?: any[] | undefined;
742
+ orderBy?: {
743
+ field: string;
744
+ order: "asc" | "desc";
745
+ }[] | undefined;
746
+ limit?: number | undefined;
747
+ offset?: number | undefined;
748
+ cursor?: Record<string, any> | undefined;
749
+ joins?: any[] | undefined;
750
+ aggregations?: {
751
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
752
+ alias: string;
753
+ filter?: import("../data").FilterCondition | undefined;
754
+ field?: string | undefined;
755
+ distinct?: boolean | undefined;
756
+ }[] | undefined;
757
+ groupBy?: string[] | undefined;
758
+ having?: import("../data").FilterCondition | undefined;
759
+ windowFunctions?: {
760
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
761
+ alias: string;
762
+ over: {
763
+ orderBy?: {
764
+ field: string;
765
+ order: "asc" | "desc";
766
+ }[] | undefined;
767
+ partitionBy?: string[] | undefined;
768
+ frame?: {
769
+ type?: "rows" | "range" | undefined;
770
+ start?: string | undefined;
771
+ end?: string | undefined;
772
+ } | undefined;
773
+ };
774
+ field?: string | undefined;
775
+ }[] | undefined;
776
+ }, {
777
+ object: string;
778
+ where?: import("../data").FilterCondition | undefined;
779
+ distinct?: boolean | undefined;
780
+ fields?: any[] | undefined;
781
+ orderBy?: {
782
+ field: string;
783
+ order?: "asc" | "desc" | undefined;
784
+ }[] | undefined;
785
+ limit?: number | undefined;
786
+ offset?: number | undefined;
787
+ cursor?: Record<string, any> | undefined;
788
+ joins?: any[] | undefined;
789
+ aggregations?: {
790
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
791
+ alias: string;
792
+ filter?: import("../data").FilterCondition | undefined;
793
+ field?: string | undefined;
794
+ distinct?: boolean | undefined;
795
+ }[] | undefined;
796
+ groupBy?: string[] | undefined;
797
+ having?: import("../data").FilterCondition | undefined;
798
+ windowFunctions?: {
799
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
800
+ alias: string;
801
+ over: {
802
+ orderBy?: {
803
+ field: string;
804
+ order?: "asc" | "desc" | undefined;
805
+ }[] | undefined;
806
+ partitionBy?: string[] | undefined;
807
+ frame?: {
808
+ type?: "rows" | "range" | undefined;
809
+ start?: string | undefined;
810
+ end?: string | undefined;
811
+ } | undefined;
812
+ };
813
+ field?: string | undefined;
814
+ }[] | undefined;
815
+ }>, z.ZodOptional<z.ZodObject<{
816
+ /**
817
+ * Transaction handle/identifier.
818
+ * If provided, the operation must run within this transaction.
819
+ */
820
+ transaction: z.ZodOptional<z.ZodAny>;
821
+ /**
822
+ * Operation timeout in milliseconds.
823
+ */
824
+ timeout: z.ZodOptional<z.ZodNumber>;
825
+ /**
826
+ * Whether to bypass cache and force a fresh read.
827
+ */
828
+ skipCache: z.ZodOptional<z.ZodBoolean>;
829
+ /**
830
+ * Distributed Tracing Context.
831
+ * Used for passing OpenTelemetry span context or request IDs for observability.
832
+ */
833
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
834
+ /**
835
+ * Tenant Identifier.
836
+ * For multi-tenant databases (row-level security or schema-per-tenant).
837
+ */
838
+ tenantId: z.ZodOptional<z.ZodString>;
839
+ }, "strip", z.ZodTypeAny, {
840
+ timeout?: number | undefined;
841
+ tenantId?: string | undefined;
842
+ transaction?: any;
843
+ skipCache?: boolean | undefined;
844
+ traceContext?: Record<string, string> | undefined;
845
+ }, {
846
+ timeout?: number | undefined;
847
+ tenantId?: string | undefined;
848
+ transaction?: any;
849
+ skipCache?: boolean | undefined;
850
+ traceContext?: Record<string, string> | undefined;
851
+ }>>], z.ZodUnknown>, z.ZodAny>;
852
+ /**
853
+ * Find a single record by query.
854
+ * Similar to find(), but returns only the first match or null.
855
+ *
856
+ * @param object - The name of the object.
857
+ * @param query - QueryAST.
858
+ * @param options - Driver options.
859
+ * @returns The record or null.
860
+ * MUST return `id` as string. MUST NOT return implementation details like `_id`.
861
+ */
862
+ findOne: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
863
+ object: z.ZodString;
864
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
865
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
866
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
867
+ field: z.ZodString;
868
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
869
+ }, "strip", z.ZodTypeAny, {
870
+ field: string;
871
+ order: "asc" | "desc";
872
+ }, {
873
+ field: string;
874
+ order?: "asc" | "desc" | undefined;
875
+ }>, "many">>;
876
+ limit: z.ZodOptional<z.ZodNumber>;
877
+ offset: z.ZodOptional<z.ZodNumber>;
878
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
879
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
880
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
881
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
882
+ field: z.ZodOptional<z.ZodString>;
883
+ alias: z.ZodString;
884
+ distinct: z.ZodOptional<z.ZodBoolean>;
885
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
886
+ }, "strip", z.ZodTypeAny, {
887
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
888
+ alias: string;
889
+ filter?: import("../data").FilterCondition | undefined;
890
+ field?: string | undefined;
891
+ distinct?: boolean | undefined;
892
+ }, {
893
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
894
+ alias: string;
895
+ filter?: import("../data").FilterCondition | undefined;
896
+ field?: string | undefined;
897
+ distinct?: boolean | undefined;
898
+ }>, "many">>;
899
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
900
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
901
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
902
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
903
+ field: z.ZodOptional<z.ZodString>;
904
+ alias: z.ZodString;
905
+ over: z.ZodObject<{
906
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
907
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
908
+ field: z.ZodString;
909
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
910
+ }, "strip", z.ZodTypeAny, {
911
+ field: string;
912
+ order: "asc" | "desc";
913
+ }, {
914
+ field: string;
915
+ order?: "asc" | "desc" | undefined;
916
+ }>, "many">>;
917
+ frame: z.ZodOptional<z.ZodObject<{
918
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
919
+ start: z.ZodOptional<z.ZodString>;
920
+ end: z.ZodOptional<z.ZodString>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ type?: "rows" | "range" | undefined;
923
+ start?: string | undefined;
924
+ end?: string | undefined;
925
+ }, {
926
+ type?: "rows" | "range" | undefined;
927
+ start?: string | undefined;
928
+ end?: string | undefined;
929
+ }>>;
930
+ }, "strip", z.ZodTypeAny, {
931
+ orderBy?: {
932
+ field: string;
933
+ order: "asc" | "desc";
934
+ }[] | undefined;
935
+ partitionBy?: string[] | undefined;
936
+ frame?: {
937
+ type?: "rows" | "range" | undefined;
938
+ start?: string | undefined;
939
+ end?: string | undefined;
940
+ } | undefined;
941
+ }, {
942
+ orderBy?: {
943
+ field: string;
944
+ order?: "asc" | "desc" | undefined;
945
+ }[] | undefined;
946
+ partitionBy?: string[] | undefined;
947
+ frame?: {
948
+ type?: "rows" | "range" | undefined;
949
+ start?: string | undefined;
950
+ end?: string | undefined;
951
+ } | undefined;
952
+ }>;
953
+ }, "strip", z.ZodTypeAny, {
954
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
955
+ alias: string;
956
+ over: {
957
+ orderBy?: {
958
+ field: string;
959
+ order: "asc" | "desc";
960
+ }[] | undefined;
961
+ partitionBy?: string[] | undefined;
962
+ frame?: {
963
+ type?: "rows" | "range" | undefined;
964
+ start?: string | undefined;
965
+ end?: string | undefined;
966
+ } | undefined;
967
+ };
968
+ field?: string | undefined;
969
+ }, {
970
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
971
+ alias: string;
972
+ over: {
973
+ orderBy?: {
974
+ field: string;
975
+ order?: "asc" | "desc" | undefined;
976
+ }[] | undefined;
977
+ partitionBy?: string[] | undefined;
978
+ frame?: {
979
+ type?: "rows" | "range" | undefined;
980
+ start?: string | undefined;
981
+ end?: string | undefined;
982
+ } | undefined;
983
+ };
984
+ field?: string | undefined;
985
+ }>, "many">>;
986
+ distinct: z.ZodOptional<z.ZodBoolean>;
987
+ }, "strip", z.ZodTypeAny, {
988
+ object: string;
989
+ where?: import("../data").FilterCondition | undefined;
990
+ distinct?: boolean | undefined;
991
+ fields?: any[] | undefined;
992
+ orderBy?: {
993
+ field: string;
994
+ order: "asc" | "desc";
995
+ }[] | undefined;
996
+ limit?: number | undefined;
997
+ offset?: number | undefined;
998
+ cursor?: Record<string, any> | undefined;
999
+ joins?: any[] | undefined;
1000
+ aggregations?: {
1001
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1002
+ alias: string;
1003
+ filter?: import("../data").FilterCondition | undefined;
1004
+ field?: string | undefined;
1005
+ distinct?: boolean | undefined;
1006
+ }[] | undefined;
1007
+ groupBy?: string[] | undefined;
1008
+ having?: import("../data").FilterCondition | undefined;
1009
+ windowFunctions?: {
1010
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1011
+ alias: string;
1012
+ over: {
1013
+ orderBy?: {
1014
+ field: string;
1015
+ order: "asc" | "desc";
1016
+ }[] | undefined;
1017
+ partitionBy?: string[] | undefined;
1018
+ frame?: {
1019
+ type?: "rows" | "range" | undefined;
1020
+ start?: string | undefined;
1021
+ end?: string | undefined;
1022
+ } | undefined;
1023
+ };
1024
+ field?: string | undefined;
1025
+ }[] | undefined;
1026
+ }, {
1027
+ object: string;
1028
+ where?: import("../data").FilterCondition | undefined;
1029
+ distinct?: boolean | undefined;
1030
+ fields?: any[] | undefined;
1031
+ orderBy?: {
1032
+ field: string;
1033
+ order?: "asc" | "desc" | undefined;
1034
+ }[] | undefined;
1035
+ limit?: number | undefined;
1036
+ offset?: number | undefined;
1037
+ cursor?: Record<string, any> | undefined;
1038
+ joins?: any[] | undefined;
1039
+ aggregations?: {
1040
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1041
+ alias: string;
1042
+ filter?: import("../data").FilterCondition | undefined;
1043
+ field?: string | undefined;
1044
+ distinct?: boolean | undefined;
1045
+ }[] | undefined;
1046
+ groupBy?: string[] | undefined;
1047
+ having?: import("../data").FilterCondition | undefined;
1048
+ windowFunctions?: {
1049
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1050
+ alias: string;
1051
+ over: {
1052
+ orderBy?: {
1053
+ field: string;
1054
+ order?: "asc" | "desc" | undefined;
1055
+ }[] | undefined;
1056
+ partitionBy?: string[] | undefined;
1057
+ frame?: {
1058
+ type?: "rows" | "range" | undefined;
1059
+ start?: string | undefined;
1060
+ end?: string | undefined;
1061
+ } | undefined;
1062
+ };
1063
+ field?: string | undefined;
1064
+ }[] | undefined;
1065
+ }>, z.ZodOptional<z.ZodObject<{
1066
+ /**
1067
+ * Transaction handle/identifier.
1068
+ * If provided, the operation must run within this transaction.
1069
+ */
1070
+ transaction: z.ZodOptional<z.ZodAny>;
1071
+ /**
1072
+ * Operation timeout in milliseconds.
1073
+ */
1074
+ timeout: z.ZodOptional<z.ZodNumber>;
1075
+ /**
1076
+ * Whether to bypass cache and force a fresh read.
1077
+ */
1078
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1079
+ /**
1080
+ * Distributed Tracing Context.
1081
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1082
+ */
1083
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1084
+ /**
1085
+ * Tenant Identifier.
1086
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1087
+ */
1088
+ tenantId: z.ZodOptional<z.ZodString>;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ timeout?: number | undefined;
1091
+ tenantId?: string | undefined;
1092
+ transaction?: any;
1093
+ skipCache?: boolean | undefined;
1094
+ traceContext?: Record<string, string> | undefined;
1095
+ }, {
1096
+ timeout?: number | undefined;
1097
+ tenantId?: string | undefined;
1098
+ transaction?: any;
1099
+ skipCache?: boolean | undefined;
1100
+ traceContext?: Record<string, string> | undefined;
1101
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1102
+ /**
1103
+ * Create a new record.
1104
+ *
1105
+ * @param object - The object name.
1106
+ * @param data - Key-value map of field data.
1107
+ * @param options - Driver options.
1108
+ * @returns The created record, including server-generated fields (id, created_at, etc.).
1109
+ * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1110
+ */
1111
+ create: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
1112
+ /**
1113
+ * Transaction handle/identifier.
1114
+ * If provided, the operation must run within this transaction.
1115
+ */
1116
+ transaction: z.ZodOptional<z.ZodAny>;
1117
+ /**
1118
+ * Operation timeout in milliseconds.
1119
+ */
1120
+ timeout: z.ZodOptional<z.ZodNumber>;
1121
+ /**
1122
+ * Whether to bypass cache and force a fresh read.
1123
+ */
1124
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1125
+ /**
1126
+ * Distributed Tracing Context.
1127
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1128
+ */
1129
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1130
+ /**
1131
+ * Tenant Identifier.
1132
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1133
+ */
1134
+ tenantId: z.ZodOptional<z.ZodString>;
1135
+ }, "strip", z.ZodTypeAny, {
1136
+ timeout?: number | undefined;
1137
+ tenantId?: string | undefined;
1138
+ transaction?: any;
1139
+ skipCache?: boolean | undefined;
1140
+ traceContext?: Record<string, string> | undefined;
1141
+ }, {
1142
+ timeout?: number | undefined;
1143
+ tenantId?: string | undefined;
1144
+ transaction?: any;
1145
+ skipCache?: boolean | undefined;
1146
+ traceContext?: Record<string, string> | undefined;
1147
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1148
+ /**
1149
+ * Update an existing record by ID.
1150
+ *
1151
+ * @param object - The object name.
1152
+ * @param id - The unique identifier of the record.
1153
+ * @param data - The fields to update.
1154
+ * @param options - Driver options.
1155
+ * @returns The updated record.
1156
+ * MUST return `id` as string. MUST NOT return implementation details like `_id`.
1157
+ */
1158
+ update: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
1159
+ /**
1160
+ * Transaction handle/identifier.
1161
+ * If provided, the operation must run within this transaction.
1162
+ */
1163
+ transaction: z.ZodOptional<z.ZodAny>;
1164
+ /**
1165
+ * Operation timeout in milliseconds.
1166
+ */
1167
+ timeout: z.ZodOptional<z.ZodNumber>;
1168
+ /**
1169
+ * Whether to bypass cache and force a fresh read.
1170
+ */
1171
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1172
+ /**
1173
+ * Distributed Tracing Context.
1174
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1175
+ */
1176
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1177
+ /**
1178
+ * Tenant Identifier.
1179
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1180
+ */
1181
+ tenantId: z.ZodOptional<z.ZodString>;
1182
+ }, "strip", z.ZodTypeAny, {
1183
+ timeout?: number | undefined;
1184
+ tenantId?: string | undefined;
1185
+ transaction?: any;
1186
+ skipCache?: boolean | undefined;
1187
+ traceContext?: Record<string, string> | undefined;
1188
+ }, {
1189
+ timeout?: number | undefined;
1190
+ tenantId?: string | undefined;
1191
+ transaction?: any;
1192
+ skipCache?: boolean | undefined;
1193
+ traceContext?: Record<string, string> | undefined;
1194
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1195
+ /**
1196
+ * Upsert (Update or Insert) a record.
1197
+ *
1198
+ * @param object - The object name.
1199
+ * @param data - The data to upsert.
1200
+ * @param conflictKeys - Fields to check for conflict (uniqueness).
1201
+ * @param options - Driver options.
1202
+ * @returns The created or updated record.
1203
+ */
1204
+ upsert: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodArray<z.ZodString, "many">>, z.ZodOptional<z.ZodObject<{
1205
+ /**
1206
+ * Transaction handle/identifier.
1207
+ * If provided, the operation must run within this transaction.
1208
+ */
1209
+ transaction: z.ZodOptional<z.ZodAny>;
1210
+ /**
1211
+ * Operation timeout in milliseconds.
1212
+ */
1213
+ timeout: z.ZodOptional<z.ZodNumber>;
1214
+ /**
1215
+ * Whether to bypass cache and force a fresh read.
1216
+ */
1217
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1218
+ /**
1219
+ * Distributed Tracing Context.
1220
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1221
+ */
1222
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1223
+ /**
1224
+ * Tenant Identifier.
1225
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1226
+ */
1227
+ tenantId: z.ZodOptional<z.ZodString>;
1228
+ }, "strip", z.ZodTypeAny, {
1229
+ timeout?: number | undefined;
1230
+ tenantId?: string | undefined;
1231
+ transaction?: any;
1232
+ skipCache?: boolean | undefined;
1233
+ traceContext?: Record<string, string> | undefined;
1234
+ }, {
1235
+ timeout?: number | undefined;
1236
+ tenantId?: string | undefined;
1237
+ transaction?: any;
1238
+ skipCache?: boolean | undefined;
1239
+ traceContext?: Record<string, string> | undefined;
1240
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1241
+ /**
1242
+ * Delete a record by ID.
1243
+ *
1244
+ * @param object - The object name.
1245
+ * @param id - The unique identifier of the record.
1246
+ * @param options - Driver options.
1247
+ * @returns True if deleted, false if not found.
1248
+ */
1249
+ delete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodOptional<z.ZodObject<{
1250
+ /**
1251
+ * Transaction handle/identifier.
1252
+ * If provided, the operation must run within this transaction.
1253
+ */
1254
+ transaction: z.ZodOptional<z.ZodAny>;
1255
+ /**
1256
+ * Operation timeout in milliseconds.
1257
+ */
1258
+ timeout: z.ZodOptional<z.ZodNumber>;
1259
+ /**
1260
+ * Whether to bypass cache and force a fresh read.
1261
+ */
1262
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1263
+ /**
1264
+ * Distributed Tracing Context.
1265
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1266
+ */
1267
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1268
+ /**
1269
+ * Tenant Identifier.
1270
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1271
+ */
1272
+ tenantId: z.ZodOptional<z.ZodString>;
1273
+ }, "strip", z.ZodTypeAny, {
1274
+ timeout?: number | undefined;
1275
+ tenantId?: string | undefined;
1276
+ transaction?: any;
1277
+ skipCache?: boolean | undefined;
1278
+ traceContext?: Record<string, string> | undefined;
1279
+ }, {
1280
+ timeout?: number | undefined;
1281
+ tenantId?: string | undefined;
1282
+ transaction?: any;
1283
+ skipCache?: boolean | undefined;
1284
+ traceContext?: Record<string, string> | undefined;
1285
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
1286
+ /**
1287
+ * Count records matching a query.
1288
+ *
1289
+ * @param object - The object name.
1290
+ * @param query - Optional filtering criteria.
1291
+ * @param options - Driver options.
1292
+ * @returns Total count.
1293
+ */
1294
+ count: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
1295
+ object: z.ZodString;
1296
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1297
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1298
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1299
+ field: z.ZodString;
1300
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1301
+ }, "strip", z.ZodTypeAny, {
1302
+ field: string;
1303
+ order: "asc" | "desc";
1304
+ }, {
1305
+ field: string;
1306
+ order?: "asc" | "desc" | undefined;
1307
+ }>, "many">>;
1308
+ limit: z.ZodOptional<z.ZodNumber>;
1309
+ offset: z.ZodOptional<z.ZodNumber>;
1310
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1311
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1312
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1313
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
1314
+ field: z.ZodOptional<z.ZodString>;
1315
+ alias: z.ZodString;
1316
+ distinct: z.ZodOptional<z.ZodBoolean>;
1317
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1318
+ }, "strip", z.ZodTypeAny, {
1319
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1320
+ alias: string;
1321
+ filter?: import("../data").FilterCondition | undefined;
1322
+ field?: string | undefined;
1323
+ distinct?: boolean | undefined;
1324
+ }, {
1325
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1326
+ alias: string;
1327
+ filter?: import("../data").FilterCondition | undefined;
1328
+ field?: string | undefined;
1329
+ distinct?: boolean | undefined;
1330
+ }>, "many">>;
1331
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1332
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1333
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1334
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
1335
+ field: z.ZodOptional<z.ZodString>;
1336
+ alias: z.ZodString;
1337
+ over: z.ZodObject<{
1338
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1339
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1340
+ field: z.ZodString;
1341
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1342
+ }, "strip", z.ZodTypeAny, {
1343
+ field: string;
1344
+ order: "asc" | "desc";
1345
+ }, {
1346
+ field: string;
1347
+ order?: "asc" | "desc" | undefined;
1348
+ }>, "many">>;
1349
+ frame: z.ZodOptional<z.ZodObject<{
1350
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
1351
+ start: z.ZodOptional<z.ZodString>;
1352
+ end: z.ZodOptional<z.ZodString>;
1353
+ }, "strip", z.ZodTypeAny, {
1354
+ type?: "rows" | "range" | undefined;
1355
+ start?: string | undefined;
1356
+ end?: string | undefined;
1357
+ }, {
1358
+ type?: "rows" | "range" | undefined;
1359
+ start?: string | undefined;
1360
+ end?: string | undefined;
1361
+ }>>;
1362
+ }, "strip", z.ZodTypeAny, {
1363
+ orderBy?: {
1364
+ field: string;
1365
+ order: "asc" | "desc";
1366
+ }[] | undefined;
1367
+ partitionBy?: string[] | undefined;
1368
+ frame?: {
1369
+ type?: "rows" | "range" | undefined;
1370
+ start?: string | undefined;
1371
+ end?: string | undefined;
1372
+ } | undefined;
1373
+ }, {
1374
+ orderBy?: {
1375
+ field: string;
1376
+ order?: "asc" | "desc" | undefined;
1377
+ }[] | undefined;
1378
+ partitionBy?: string[] | undefined;
1379
+ frame?: {
1380
+ type?: "rows" | "range" | undefined;
1381
+ start?: string | undefined;
1382
+ end?: string | undefined;
1383
+ } | undefined;
1384
+ }>;
1385
+ }, "strip", z.ZodTypeAny, {
1386
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1387
+ alias: string;
1388
+ over: {
1389
+ orderBy?: {
1390
+ field: string;
1391
+ order: "asc" | "desc";
1392
+ }[] | undefined;
1393
+ partitionBy?: string[] | undefined;
1394
+ frame?: {
1395
+ type?: "rows" | "range" | undefined;
1396
+ start?: string | undefined;
1397
+ end?: string | undefined;
1398
+ } | undefined;
1399
+ };
1400
+ field?: string | undefined;
1401
+ }, {
1402
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1403
+ alias: string;
1404
+ over: {
1405
+ orderBy?: {
1406
+ field: string;
1407
+ order?: "asc" | "desc" | undefined;
1408
+ }[] | undefined;
1409
+ partitionBy?: string[] | undefined;
1410
+ frame?: {
1411
+ type?: "rows" | "range" | undefined;
1412
+ start?: string | undefined;
1413
+ end?: string | undefined;
1414
+ } | undefined;
1415
+ };
1416
+ field?: string | undefined;
1417
+ }>, "many">>;
1418
+ distinct: z.ZodOptional<z.ZodBoolean>;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ object: string;
1421
+ where?: import("../data").FilterCondition | undefined;
1422
+ distinct?: boolean | undefined;
1423
+ fields?: any[] | undefined;
1424
+ orderBy?: {
1425
+ field: string;
1426
+ order: "asc" | "desc";
1427
+ }[] | undefined;
1428
+ limit?: number | undefined;
1429
+ offset?: number | undefined;
1430
+ cursor?: Record<string, any> | undefined;
1431
+ joins?: any[] | undefined;
1432
+ aggregations?: {
1433
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1434
+ alias: string;
1435
+ filter?: import("../data").FilterCondition | undefined;
1436
+ field?: string | undefined;
1437
+ distinct?: boolean | undefined;
1438
+ }[] | undefined;
1439
+ groupBy?: string[] | undefined;
1440
+ having?: import("../data").FilterCondition | undefined;
1441
+ windowFunctions?: {
1442
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1443
+ alias: string;
1444
+ over: {
1445
+ orderBy?: {
1446
+ field: string;
1447
+ order: "asc" | "desc";
1448
+ }[] | undefined;
1449
+ partitionBy?: string[] | undefined;
1450
+ frame?: {
1451
+ type?: "rows" | "range" | undefined;
1452
+ start?: string | undefined;
1453
+ end?: string | undefined;
1454
+ } | undefined;
1455
+ };
1456
+ field?: string | undefined;
1457
+ }[] | undefined;
1458
+ }, {
1459
+ object: string;
1460
+ where?: import("../data").FilterCondition | undefined;
1461
+ distinct?: boolean | undefined;
1462
+ fields?: any[] | undefined;
1463
+ orderBy?: {
1464
+ field: string;
1465
+ order?: "asc" | "desc" | undefined;
1466
+ }[] | undefined;
1467
+ limit?: number | undefined;
1468
+ offset?: number | undefined;
1469
+ cursor?: Record<string, any> | undefined;
1470
+ joins?: any[] | undefined;
1471
+ aggregations?: {
1472
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1473
+ alias: string;
1474
+ filter?: import("../data").FilterCondition | undefined;
1475
+ field?: string | undefined;
1476
+ distinct?: boolean | undefined;
1477
+ }[] | undefined;
1478
+ groupBy?: string[] | undefined;
1479
+ having?: import("../data").FilterCondition | undefined;
1480
+ windowFunctions?: {
1481
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1482
+ alias: string;
1483
+ over: {
1484
+ orderBy?: {
1485
+ field: string;
1486
+ order?: "asc" | "desc" | undefined;
1487
+ }[] | undefined;
1488
+ partitionBy?: string[] | undefined;
1489
+ frame?: {
1490
+ type?: "rows" | "range" | undefined;
1491
+ start?: string | undefined;
1492
+ end?: string | undefined;
1493
+ } | undefined;
1494
+ };
1495
+ field?: string | undefined;
1496
+ }[] | undefined;
1497
+ }>>, z.ZodOptional<z.ZodObject<{
1498
+ /**
1499
+ * Transaction handle/identifier.
1500
+ * If provided, the operation must run within this transaction.
1501
+ */
1502
+ transaction: z.ZodOptional<z.ZodAny>;
1503
+ /**
1504
+ * Operation timeout in milliseconds.
1505
+ */
1506
+ timeout: z.ZodOptional<z.ZodNumber>;
1507
+ /**
1508
+ * Whether to bypass cache and force a fresh read.
1509
+ */
1510
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1511
+ /**
1512
+ * Distributed Tracing Context.
1513
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1514
+ */
1515
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1516
+ /**
1517
+ * Tenant Identifier.
1518
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1519
+ */
1520
+ tenantId: z.ZodOptional<z.ZodString>;
1521
+ }, "strip", z.ZodTypeAny, {
1522
+ timeout?: number | undefined;
1523
+ tenantId?: string | undefined;
1524
+ transaction?: any;
1525
+ skipCache?: boolean | undefined;
1526
+ traceContext?: Record<string, string> | undefined;
1527
+ }, {
1528
+ timeout?: number | undefined;
1529
+ tenantId?: string | undefined;
1530
+ transaction?: any;
1531
+ skipCache?: boolean | undefined;
1532
+ traceContext?: Record<string, string> | undefined;
1533
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNumber>>;
1534
+ /**
1535
+ * Create multiple records in a single batch.
1536
+ * Optimized for performance.
1537
+ *
1538
+ * @param object - The object name.
1539
+ * @param dataArray - Array of record data.
1540
+ * @returns Array of created records.
1541
+ */
1542
+ bulkCreate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">, z.ZodOptional<z.ZodObject<{
1543
+ /**
1544
+ * Transaction handle/identifier.
1545
+ * If provided, the operation must run within this transaction.
1546
+ */
1547
+ transaction: z.ZodOptional<z.ZodAny>;
1548
+ /**
1549
+ * Operation timeout in milliseconds.
1550
+ */
1551
+ timeout: z.ZodOptional<z.ZodNumber>;
1552
+ /**
1553
+ * Whether to bypass cache and force a fresh read.
1554
+ */
1555
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1556
+ /**
1557
+ * Distributed Tracing Context.
1558
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1559
+ */
1560
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1561
+ /**
1562
+ * Tenant Identifier.
1563
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1564
+ */
1565
+ tenantId: z.ZodOptional<z.ZodString>;
1566
+ }, "strip", z.ZodTypeAny, {
1567
+ timeout?: number | undefined;
1568
+ tenantId?: string | undefined;
1569
+ transaction?: any;
1570
+ skipCache?: boolean | undefined;
1571
+ traceContext?: Record<string, string> | undefined;
1572
+ }, {
1573
+ timeout?: number | undefined;
1574
+ tenantId?: string | undefined;
1575
+ transaction?: any;
1576
+ skipCache?: boolean | undefined;
1577
+ traceContext?: Record<string, string> | undefined;
1578
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
1579
+ /**
1580
+ * Update multiple records in a single batch.
1581
+ *
1582
+ * @param object - The object name.
1583
+ * @param updates - Array of objects containing {id, data}.
1584
+ * @returns Array of updated records.
1585
+ */
1586
+ bulkUpdate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodObject<{
1587
+ id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1588
+ data: z.ZodRecord<z.ZodString, z.ZodAny>;
1589
+ }, "strip", z.ZodTypeAny, {
1590
+ id: string | number;
1591
+ data: Record<string, any>;
1592
+ }, {
1593
+ id: string | number;
1594
+ data: Record<string, any>;
1595
+ }>, "many">, z.ZodOptional<z.ZodObject<{
1596
+ /**
1597
+ * Transaction handle/identifier.
1598
+ * If provided, the operation must run within this transaction.
1599
+ */
1600
+ transaction: z.ZodOptional<z.ZodAny>;
1601
+ /**
1602
+ * Operation timeout in milliseconds.
1603
+ */
1604
+ timeout: z.ZodOptional<z.ZodNumber>;
1605
+ /**
1606
+ * Whether to bypass cache and force a fresh read.
1607
+ */
1608
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1609
+ /**
1610
+ * Distributed Tracing Context.
1611
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1612
+ */
1613
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1614
+ /**
1615
+ * Tenant Identifier.
1616
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1617
+ */
1618
+ tenantId: z.ZodOptional<z.ZodString>;
1619
+ }, "strip", z.ZodTypeAny, {
1620
+ timeout?: number | undefined;
1621
+ tenantId?: string | undefined;
1622
+ transaction?: any;
1623
+ skipCache?: boolean | undefined;
1624
+ traceContext?: Record<string, string> | undefined;
1625
+ }, {
1626
+ timeout?: number | undefined;
1627
+ tenantId?: string | undefined;
1628
+ transaction?: any;
1629
+ skipCache?: boolean | undefined;
1630
+ traceContext?: Record<string, string> | undefined;
1631
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
1632
+ /**
1633
+ * Delete multiple records in a single batch.
1634
+ *
1635
+ * @param object - The object name.
1636
+ * @param ids - Array of record IDs.
1637
+ */
1638
+ bulkDelete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, z.ZodOptional<z.ZodObject<{
1639
+ /**
1640
+ * Transaction handle/identifier.
1641
+ * If provided, the operation must run within this transaction.
1642
+ */
1643
+ transaction: z.ZodOptional<z.ZodAny>;
1644
+ /**
1645
+ * Operation timeout in milliseconds.
1646
+ */
1647
+ timeout: z.ZodOptional<z.ZodNumber>;
1648
+ /**
1649
+ * Whether to bypass cache and force a fresh read.
1650
+ */
1651
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1652
+ /**
1653
+ * Distributed Tracing Context.
1654
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1655
+ */
1656
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1657
+ /**
1658
+ * Tenant Identifier.
1659
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1660
+ */
1661
+ tenantId: z.ZodOptional<z.ZodString>;
1662
+ }, "strip", z.ZodTypeAny, {
1663
+ timeout?: number | undefined;
1664
+ tenantId?: string | undefined;
1665
+ transaction?: any;
1666
+ skipCache?: boolean | undefined;
1667
+ traceContext?: Record<string, string> | undefined;
1668
+ }, {
1669
+ timeout?: number | undefined;
1670
+ tenantId?: string | undefined;
1671
+ transaction?: any;
1672
+ skipCache?: boolean | undefined;
1673
+ traceContext?: Record<string, string> | undefined;
1674
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1675
+ /**
1676
+ * Update multiple records matching a query.
1677
+ * Direct database push-down. DOES NOT trigger per-record hooks.
1678
+ *
1679
+ * @param object - The object name.
1680
+ * @param query - The filtering criteria.
1681
+ * @param data - The data to update.
1682
+ * @returns Count of modified records.
1683
+ */
1684
+ updateMany: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
1685
+ object: z.ZodString;
1686
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1687
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1688
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1689
+ field: z.ZodString;
1690
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1691
+ }, "strip", z.ZodTypeAny, {
1692
+ field: string;
1693
+ order: "asc" | "desc";
1694
+ }, {
1695
+ field: string;
1696
+ order?: "asc" | "desc" | undefined;
1697
+ }>, "many">>;
1698
+ limit: z.ZodOptional<z.ZodNumber>;
1699
+ offset: z.ZodOptional<z.ZodNumber>;
1700
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1701
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1702
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1703
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
1704
+ field: z.ZodOptional<z.ZodString>;
1705
+ alias: z.ZodString;
1706
+ distinct: z.ZodOptional<z.ZodBoolean>;
1707
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1708
+ }, "strip", z.ZodTypeAny, {
1709
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1710
+ alias: string;
1711
+ filter?: import("../data").FilterCondition | undefined;
1712
+ field?: string | undefined;
1713
+ distinct?: boolean | undefined;
1714
+ }, {
1715
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1716
+ alias: string;
1717
+ filter?: import("../data").FilterCondition | undefined;
1718
+ field?: string | undefined;
1719
+ distinct?: boolean | undefined;
1720
+ }>, "many">>;
1721
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1722
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1723
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1724
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
1725
+ field: z.ZodOptional<z.ZodString>;
1726
+ alias: z.ZodString;
1727
+ over: z.ZodObject<{
1728
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1729
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1730
+ field: z.ZodString;
1731
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1732
+ }, "strip", z.ZodTypeAny, {
1733
+ field: string;
1734
+ order: "asc" | "desc";
1735
+ }, {
1736
+ field: string;
1737
+ order?: "asc" | "desc" | undefined;
1738
+ }>, "many">>;
1739
+ frame: z.ZodOptional<z.ZodObject<{
1740
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
1741
+ start: z.ZodOptional<z.ZodString>;
1742
+ end: z.ZodOptional<z.ZodString>;
1743
+ }, "strip", z.ZodTypeAny, {
1744
+ type?: "rows" | "range" | undefined;
1745
+ start?: string | undefined;
1746
+ end?: string | undefined;
1747
+ }, {
1748
+ type?: "rows" | "range" | undefined;
1749
+ start?: string | undefined;
1750
+ end?: string | undefined;
1751
+ }>>;
1752
+ }, "strip", z.ZodTypeAny, {
1753
+ orderBy?: {
1754
+ field: string;
1755
+ order: "asc" | "desc";
1756
+ }[] | undefined;
1757
+ partitionBy?: string[] | undefined;
1758
+ frame?: {
1759
+ type?: "rows" | "range" | undefined;
1760
+ start?: string | undefined;
1761
+ end?: string | undefined;
1762
+ } | undefined;
1763
+ }, {
1764
+ orderBy?: {
1765
+ field: string;
1766
+ order?: "asc" | "desc" | undefined;
1767
+ }[] | undefined;
1768
+ partitionBy?: string[] | undefined;
1769
+ frame?: {
1770
+ type?: "rows" | "range" | undefined;
1771
+ start?: string | undefined;
1772
+ end?: string | undefined;
1773
+ } | undefined;
1774
+ }>;
1775
+ }, "strip", z.ZodTypeAny, {
1776
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1777
+ alias: string;
1778
+ over: {
1779
+ orderBy?: {
1780
+ field: string;
1781
+ order: "asc" | "desc";
1782
+ }[] | undefined;
1783
+ partitionBy?: string[] | undefined;
1784
+ frame?: {
1785
+ type?: "rows" | "range" | undefined;
1786
+ start?: string | undefined;
1787
+ end?: string | undefined;
1788
+ } | undefined;
1789
+ };
1790
+ field?: string | undefined;
1791
+ }, {
1792
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1793
+ alias: string;
1794
+ over: {
1795
+ orderBy?: {
1796
+ field: string;
1797
+ order?: "asc" | "desc" | undefined;
1798
+ }[] | undefined;
1799
+ partitionBy?: string[] | undefined;
1800
+ frame?: {
1801
+ type?: "rows" | "range" | undefined;
1802
+ start?: string | undefined;
1803
+ end?: string | undefined;
1804
+ } | undefined;
1805
+ };
1806
+ field?: string | undefined;
1807
+ }>, "many">>;
1808
+ distinct: z.ZodOptional<z.ZodBoolean>;
1809
+ }, "strip", z.ZodTypeAny, {
1810
+ object: string;
1811
+ where?: import("../data").FilterCondition | undefined;
1812
+ distinct?: boolean | undefined;
1813
+ fields?: any[] | undefined;
1814
+ orderBy?: {
1815
+ field: string;
1816
+ order: "asc" | "desc";
1817
+ }[] | undefined;
1818
+ limit?: number | undefined;
1819
+ offset?: number | undefined;
1820
+ cursor?: Record<string, any> | undefined;
1821
+ joins?: any[] | undefined;
1822
+ aggregations?: {
1823
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1824
+ alias: string;
1825
+ filter?: import("../data").FilterCondition | undefined;
1826
+ field?: string | undefined;
1827
+ distinct?: boolean | undefined;
1828
+ }[] | undefined;
1829
+ groupBy?: string[] | undefined;
1830
+ having?: import("../data").FilterCondition | undefined;
1831
+ windowFunctions?: {
1832
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1833
+ alias: string;
1834
+ over: {
1835
+ orderBy?: {
1836
+ field: string;
1837
+ order: "asc" | "desc";
1838
+ }[] | undefined;
1839
+ partitionBy?: string[] | undefined;
1840
+ frame?: {
1841
+ type?: "rows" | "range" | undefined;
1842
+ start?: string | undefined;
1843
+ end?: string | undefined;
1844
+ } | undefined;
1845
+ };
1846
+ field?: string | undefined;
1847
+ }[] | undefined;
1848
+ }, {
1849
+ object: string;
1850
+ where?: import("../data").FilterCondition | undefined;
1851
+ distinct?: boolean | undefined;
1852
+ fields?: any[] | undefined;
1853
+ orderBy?: {
1854
+ field: string;
1855
+ order?: "asc" | "desc" | undefined;
1856
+ }[] | undefined;
1857
+ limit?: number | undefined;
1858
+ offset?: number | undefined;
1859
+ cursor?: Record<string, any> | undefined;
1860
+ joins?: any[] | undefined;
1861
+ aggregations?: {
1862
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1863
+ alias: string;
1864
+ filter?: import("../data").FilterCondition | undefined;
1865
+ field?: string | undefined;
1866
+ distinct?: boolean | undefined;
1867
+ }[] | undefined;
1868
+ groupBy?: string[] | undefined;
1869
+ having?: import("../data").FilterCondition | undefined;
1870
+ windowFunctions?: {
1871
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1872
+ alias: string;
1873
+ over: {
1874
+ orderBy?: {
1875
+ field: string;
1876
+ order?: "asc" | "desc" | undefined;
1877
+ }[] | undefined;
1878
+ partitionBy?: string[] | undefined;
1879
+ frame?: {
1880
+ type?: "rows" | "range" | undefined;
1881
+ start?: string | undefined;
1882
+ end?: string | undefined;
1883
+ } | undefined;
1884
+ };
1885
+ field?: string | undefined;
1886
+ }[] | undefined;
1887
+ }>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
1888
+ /**
1889
+ * Transaction handle/identifier.
1890
+ * If provided, the operation must run within this transaction.
1891
+ */
1892
+ transaction: z.ZodOptional<z.ZodAny>;
1893
+ /**
1894
+ * Operation timeout in milliseconds.
1895
+ */
1896
+ timeout: z.ZodOptional<z.ZodNumber>;
1897
+ /**
1898
+ * Whether to bypass cache and force a fresh read.
1899
+ */
1900
+ skipCache: z.ZodOptional<z.ZodBoolean>;
1901
+ /**
1902
+ * Distributed Tracing Context.
1903
+ * Used for passing OpenTelemetry span context or request IDs for observability.
1904
+ */
1905
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1906
+ /**
1907
+ * Tenant Identifier.
1908
+ * For multi-tenant databases (row-level security or schema-per-tenant).
1909
+ */
1910
+ tenantId: z.ZodOptional<z.ZodString>;
1911
+ }, "strip", z.ZodTypeAny, {
1912
+ timeout?: number | undefined;
1913
+ tenantId?: string | undefined;
1914
+ transaction?: any;
1915
+ skipCache?: boolean | undefined;
1916
+ traceContext?: Record<string, string> | undefined;
1917
+ }, {
1918
+ timeout?: number | undefined;
1919
+ tenantId?: string | undefined;
1920
+ transaction?: any;
1921
+ skipCache?: boolean | undefined;
1922
+ traceContext?: Record<string, string> | undefined;
1923
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNumber>>>;
1924
+ /**
1925
+ * Delete multiple records matching a query.
1926
+ * Direct database push-down. DOES NOT trigger per-record hooks.
1927
+ *
1928
+ * @param object - The object name.
1929
+ * @param query - The filtering criteria.
1930
+ * @returns Count of deleted records.
1931
+ */
1932
+ deleteMany: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
1933
+ object: z.ZodString;
1934
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1935
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1936
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1937
+ field: z.ZodString;
1938
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1939
+ }, "strip", z.ZodTypeAny, {
1940
+ field: string;
1941
+ order: "asc" | "desc";
1942
+ }, {
1943
+ field: string;
1944
+ order?: "asc" | "desc" | undefined;
1945
+ }>, "many">>;
1946
+ limit: z.ZodOptional<z.ZodNumber>;
1947
+ offset: z.ZodOptional<z.ZodNumber>;
1948
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
1949
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
1950
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
1951
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
1952
+ field: z.ZodOptional<z.ZodString>;
1953
+ alias: z.ZodString;
1954
+ distinct: z.ZodOptional<z.ZodBoolean>;
1955
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1956
+ }, "strip", z.ZodTypeAny, {
1957
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1958
+ alias: string;
1959
+ filter?: import("../data").FilterCondition | undefined;
1960
+ field?: string | undefined;
1961
+ distinct?: boolean | undefined;
1962
+ }, {
1963
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1964
+ alias: string;
1965
+ filter?: import("../data").FilterCondition | undefined;
1966
+ field?: string | undefined;
1967
+ distinct?: boolean | undefined;
1968
+ }>, "many">>;
1969
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1970
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
1971
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1972
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
1973
+ field: z.ZodOptional<z.ZodString>;
1974
+ alias: z.ZodString;
1975
+ over: z.ZodObject<{
1976
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1977
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
1978
+ field: z.ZodString;
1979
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
1980
+ }, "strip", z.ZodTypeAny, {
1981
+ field: string;
1982
+ order: "asc" | "desc";
1983
+ }, {
1984
+ field: string;
1985
+ order?: "asc" | "desc" | undefined;
1986
+ }>, "many">>;
1987
+ frame: z.ZodOptional<z.ZodObject<{
1988
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
1989
+ start: z.ZodOptional<z.ZodString>;
1990
+ end: z.ZodOptional<z.ZodString>;
1991
+ }, "strip", z.ZodTypeAny, {
1992
+ type?: "rows" | "range" | undefined;
1993
+ start?: string | undefined;
1994
+ end?: string | undefined;
1995
+ }, {
1996
+ type?: "rows" | "range" | undefined;
1997
+ start?: string | undefined;
1998
+ end?: string | undefined;
1999
+ }>>;
2000
+ }, "strip", z.ZodTypeAny, {
2001
+ orderBy?: {
2002
+ field: string;
2003
+ order: "asc" | "desc";
2004
+ }[] | undefined;
2005
+ partitionBy?: string[] | undefined;
2006
+ frame?: {
2007
+ type?: "rows" | "range" | undefined;
2008
+ start?: string | undefined;
2009
+ end?: string | undefined;
2010
+ } | undefined;
2011
+ }, {
2012
+ orderBy?: {
2013
+ field: string;
2014
+ order?: "asc" | "desc" | undefined;
2015
+ }[] | undefined;
2016
+ partitionBy?: string[] | undefined;
2017
+ frame?: {
2018
+ type?: "rows" | "range" | undefined;
2019
+ start?: string | undefined;
2020
+ end?: string | undefined;
2021
+ } | undefined;
2022
+ }>;
2023
+ }, "strip", z.ZodTypeAny, {
2024
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2025
+ alias: string;
2026
+ over: {
2027
+ orderBy?: {
2028
+ field: string;
2029
+ order: "asc" | "desc";
2030
+ }[] | undefined;
2031
+ partitionBy?: string[] | undefined;
2032
+ frame?: {
2033
+ type?: "rows" | "range" | undefined;
2034
+ start?: string | undefined;
2035
+ end?: string | undefined;
2036
+ } | undefined;
2037
+ };
2038
+ field?: string | undefined;
2039
+ }, {
2040
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2041
+ alias: string;
2042
+ over: {
2043
+ orderBy?: {
2044
+ field: string;
2045
+ order?: "asc" | "desc" | undefined;
2046
+ }[] | undefined;
2047
+ partitionBy?: string[] | undefined;
2048
+ frame?: {
2049
+ type?: "rows" | "range" | undefined;
2050
+ start?: string | undefined;
2051
+ end?: string | undefined;
2052
+ } | undefined;
2053
+ };
2054
+ field?: string | undefined;
2055
+ }>, "many">>;
2056
+ distinct: z.ZodOptional<z.ZodBoolean>;
2057
+ }, "strip", z.ZodTypeAny, {
2058
+ object: string;
2059
+ where?: import("../data").FilterCondition | undefined;
2060
+ distinct?: boolean | undefined;
2061
+ fields?: any[] | undefined;
2062
+ orderBy?: {
2063
+ field: string;
2064
+ order: "asc" | "desc";
2065
+ }[] | undefined;
2066
+ limit?: number | undefined;
2067
+ offset?: number | undefined;
2068
+ cursor?: Record<string, any> | undefined;
2069
+ joins?: any[] | undefined;
2070
+ aggregations?: {
2071
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2072
+ alias: string;
2073
+ filter?: import("../data").FilterCondition | undefined;
2074
+ field?: string | undefined;
2075
+ distinct?: boolean | undefined;
2076
+ }[] | undefined;
2077
+ groupBy?: string[] | undefined;
2078
+ having?: import("../data").FilterCondition | undefined;
2079
+ windowFunctions?: {
2080
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2081
+ alias: string;
2082
+ over: {
2083
+ orderBy?: {
2084
+ field: string;
2085
+ order: "asc" | "desc";
2086
+ }[] | undefined;
2087
+ partitionBy?: string[] | undefined;
2088
+ frame?: {
2089
+ type?: "rows" | "range" | undefined;
2090
+ start?: string | undefined;
2091
+ end?: string | undefined;
2092
+ } | undefined;
2093
+ };
2094
+ field?: string | undefined;
2095
+ }[] | undefined;
2096
+ }, {
2097
+ object: string;
2098
+ where?: import("../data").FilterCondition | undefined;
2099
+ distinct?: boolean | undefined;
2100
+ fields?: any[] | undefined;
2101
+ orderBy?: {
2102
+ field: string;
2103
+ order?: "asc" | "desc" | undefined;
2104
+ }[] | undefined;
2105
+ limit?: number | undefined;
2106
+ offset?: number | undefined;
2107
+ cursor?: Record<string, any> | undefined;
2108
+ joins?: any[] | undefined;
2109
+ aggregations?: {
2110
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2111
+ alias: string;
2112
+ filter?: import("../data").FilterCondition | undefined;
2113
+ field?: string | undefined;
2114
+ distinct?: boolean | undefined;
2115
+ }[] | undefined;
2116
+ groupBy?: string[] | undefined;
2117
+ having?: import("../data").FilterCondition | undefined;
2118
+ windowFunctions?: {
2119
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2120
+ alias: string;
2121
+ over: {
2122
+ orderBy?: {
2123
+ field: string;
2124
+ order?: "asc" | "desc" | undefined;
2125
+ }[] | undefined;
2126
+ partitionBy?: string[] | undefined;
2127
+ frame?: {
2128
+ type?: "rows" | "range" | undefined;
2129
+ start?: string | undefined;
2130
+ end?: string | undefined;
2131
+ } | undefined;
2132
+ };
2133
+ field?: string | undefined;
2134
+ }[] | undefined;
2135
+ }>, z.ZodOptional<z.ZodObject<{
2136
+ /**
2137
+ * Transaction handle/identifier.
2138
+ * If provided, the operation must run within this transaction.
2139
+ */
2140
+ transaction: z.ZodOptional<z.ZodAny>;
2141
+ /**
2142
+ * Operation timeout in milliseconds.
2143
+ */
2144
+ timeout: z.ZodOptional<z.ZodNumber>;
2145
+ /**
2146
+ * Whether to bypass cache and force a fresh read.
2147
+ */
2148
+ skipCache: z.ZodOptional<z.ZodBoolean>;
2149
+ /**
2150
+ * Distributed Tracing Context.
2151
+ * Used for passing OpenTelemetry span context or request IDs for observability.
2152
+ */
2153
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2154
+ /**
2155
+ * Tenant Identifier.
2156
+ * For multi-tenant databases (row-level security or schema-per-tenant).
2157
+ */
2158
+ tenantId: z.ZodOptional<z.ZodString>;
2159
+ }, "strip", z.ZodTypeAny, {
2160
+ timeout?: number | undefined;
2161
+ tenantId?: string | undefined;
2162
+ transaction?: any;
2163
+ skipCache?: boolean | undefined;
2164
+ traceContext?: Record<string, string> | undefined;
2165
+ }, {
2166
+ timeout?: number | undefined;
2167
+ tenantId?: string | undefined;
2168
+ transaction?: any;
2169
+ skipCache?: boolean | undefined;
2170
+ traceContext?: Record<string, string> | undefined;
2171
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNumber>>>;
2172
+ /**
2173
+ * Begin a new database transaction.
2174
+ * @param options - Isolation level and other settings.
2175
+ * @returns A transaction handle to be passed to subsequent operations via `options.transaction`.
2176
+ */
2177
+ beginTransaction: z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodObject<{
2178
+ isolationLevel: z.ZodOptional<z.ZodEnum<["READ UNCOMMITTED", "READ COMMITTED", "REPEATABLE READ", "SERIALIZABLE", "SNAPSHOT"]>>;
2179
+ }, "strip", z.ZodTypeAny, {
2180
+ isolationLevel?: "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE" | "SNAPSHOT" | undefined;
2181
+ }, {
2182
+ isolationLevel?: "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE" | "SNAPSHOT" | undefined;
2183
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
2184
+ /**
2185
+ * Commit the transaction.
2186
+ * @param transaction - The transaction handle.
2187
+ */
2188
+ commit: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
2189
+ /**
2190
+ * Rollback the transaction.
2191
+ * @param transaction - The transaction handle.
2192
+ */
2193
+ rollback: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
2194
+ /**
2195
+ * Synchronize the database schema with the Object definition.
2196
+ * This is an idempotent operation: it should create tables if missing,
2197
+ * add columns if missing, and update indexes.
2198
+ *
2199
+ * @param object - The object name.
2200
+ * @param schema - The full Object Schema (fields, indexes, etc).
2201
+ * @param options - Driver options.
2202
+ */
2203
+ syncSchema: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny, z.ZodOptional<z.ZodObject<{
2204
+ /**
2205
+ * Transaction handle/identifier.
2206
+ * If provided, the operation must run within this transaction.
2207
+ */
2208
+ transaction: z.ZodOptional<z.ZodAny>;
2209
+ /**
2210
+ * Operation timeout in milliseconds.
2211
+ */
2212
+ timeout: z.ZodOptional<z.ZodNumber>;
2213
+ /**
2214
+ * Whether to bypass cache and force a fresh read.
2215
+ */
2216
+ skipCache: z.ZodOptional<z.ZodBoolean>;
2217
+ /**
2218
+ * Distributed Tracing Context.
2219
+ * Used for passing OpenTelemetry span context or request IDs for observability.
2220
+ */
2221
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2222
+ /**
2223
+ * Tenant Identifier.
2224
+ * For multi-tenant databases (row-level security or schema-per-tenant).
2225
+ */
2226
+ tenantId: z.ZodOptional<z.ZodString>;
2227
+ }, "strip", z.ZodTypeAny, {
2228
+ timeout?: number | undefined;
2229
+ tenantId?: string | undefined;
2230
+ transaction?: any;
2231
+ skipCache?: boolean | undefined;
2232
+ traceContext?: Record<string, string> | undefined;
2233
+ }, {
2234
+ timeout?: number | undefined;
2235
+ tenantId?: string | undefined;
2236
+ transaction?: any;
2237
+ skipCache?: boolean | undefined;
2238
+ traceContext?: Record<string, string> | undefined;
2239
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
2240
+ /**
2241
+ * Drop the underlying table or collection for an object.
2242
+ * WARNING: Destructive operation.
2243
+ *
2244
+ * @param object - The object name.
2245
+ */
2246
+ dropTable: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
2247
+ /**
2248
+ * Transaction handle/identifier.
2249
+ * If provided, the operation must run within this transaction.
2250
+ */
2251
+ transaction: z.ZodOptional<z.ZodAny>;
2252
+ /**
2253
+ * Operation timeout in milliseconds.
2254
+ */
2255
+ timeout: z.ZodOptional<z.ZodNumber>;
2256
+ /**
2257
+ * Whether to bypass cache and force a fresh read.
2258
+ */
2259
+ skipCache: z.ZodOptional<z.ZodBoolean>;
2260
+ /**
2261
+ * Distributed Tracing Context.
2262
+ * Used for passing OpenTelemetry span context or request IDs for observability.
2263
+ */
2264
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2265
+ /**
2266
+ * Tenant Identifier.
2267
+ * For multi-tenant databases (row-level security or schema-per-tenant).
2268
+ */
2269
+ tenantId: z.ZodOptional<z.ZodString>;
2270
+ }, "strip", z.ZodTypeAny, {
2271
+ timeout?: number | undefined;
2272
+ tenantId?: string | undefined;
2273
+ transaction?: any;
2274
+ skipCache?: boolean | undefined;
2275
+ traceContext?: Record<string, string> | undefined;
2276
+ }, {
2277
+ timeout?: number | undefined;
2278
+ tenantId?: string | undefined;
2279
+ transaction?: any;
2280
+ skipCache?: boolean | undefined;
2281
+ traceContext?: Record<string, string> | undefined;
2282
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
2283
+ /**
2284
+ * Analyze query performance.
2285
+ * Returns execution plan without executing the query (where possible).
2286
+ *
2287
+ * @param object - The object name.
2288
+ * @param query - The query to explain.
2289
+ * @returns The execution plan details.
2290
+ */
2291
+ explain: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
2292
+ object: z.ZodString;
2293
+ fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
2294
+ where: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
2295
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
2296
+ field: z.ZodString;
2297
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
2298
+ }, "strip", z.ZodTypeAny, {
2299
+ field: string;
2300
+ order: "asc" | "desc";
2301
+ }, {
2302
+ field: string;
2303
+ order?: "asc" | "desc" | undefined;
2304
+ }>, "many">>;
2305
+ limit: z.ZodOptional<z.ZodNumber>;
2306
+ offset: z.ZodOptional<z.ZodNumber>;
2307
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
2308
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
2309
+ aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
2310
+ function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
2311
+ field: z.ZodOptional<z.ZodString>;
2312
+ alias: z.ZodString;
2313
+ distinct: z.ZodOptional<z.ZodBoolean>;
2314
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
2315
+ }, "strip", z.ZodTypeAny, {
2316
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2317
+ alias: string;
2318
+ filter?: import("../data").FilterCondition | undefined;
2319
+ field?: string | undefined;
2320
+ distinct?: boolean | undefined;
2321
+ }, {
2322
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2323
+ alias: string;
2324
+ filter?: import("../data").FilterCondition | undefined;
2325
+ field?: string | undefined;
2326
+ distinct?: boolean | undefined;
2327
+ }>, "many">>;
2328
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2329
+ having: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
2330
+ windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2331
+ function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
2332
+ field: z.ZodOptional<z.ZodString>;
2333
+ alias: z.ZodString;
2334
+ over: z.ZodObject<{
2335
+ partitionBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2336
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
2337
+ field: z.ZodString;
2338
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
2339
+ }, "strip", z.ZodTypeAny, {
2340
+ field: string;
2341
+ order: "asc" | "desc";
2342
+ }, {
2343
+ field: string;
2344
+ order?: "asc" | "desc" | undefined;
2345
+ }>, "many">>;
2346
+ frame: z.ZodOptional<z.ZodObject<{
2347
+ type: z.ZodOptional<z.ZodEnum<["rows", "range"]>>;
2348
+ start: z.ZodOptional<z.ZodString>;
2349
+ end: z.ZodOptional<z.ZodString>;
2350
+ }, "strip", z.ZodTypeAny, {
2351
+ type?: "rows" | "range" | undefined;
2352
+ start?: string | undefined;
2353
+ end?: string | undefined;
2354
+ }, {
2355
+ type?: "rows" | "range" | undefined;
2356
+ start?: string | undefined;
2357
+ end?: string | undefined;
2358
+ }>>;
2359
+ }, "strip", z.ZodTypeAny, {
2360
+ orderBy?: {
2361
+ field: string;
2362
+ order: "asc" | "desc";
2363
+ }[] | undefined;
2364
+ partitionBy?: string[] | undefined;
2365
+ frame?: {
2366
+ type?: "rows" | "range" | undefined;
2367
+ start?: string | undefined;
2368
+ end?: string | undefined;
2369
+ } | undefined;
2370
+ }, {
2371
+ orderBy?: {
2372
+ field: string;
2373
+ order?: "asc" | "desc" | undefined;
2374
+ }[] | undefined;
2375
+ partitionBy?: string[] | undefined;
2376
+ frame?: {
2377
+ type?: "rows" | "range" | undefined;
2378
+ start?: string | undefined;
2379
+ end?: string | undefined;
2380
+ } | undefined;
2381
+ }>;
2382
+ }, "strip", z.ZodTypeAny, {
2383
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2384
+ alias: string;
2385
+ over: {
2386
+ orderBy?: {
2387
+ field: string;
2388
+ order: "asc" | "desc";
2389
+ }[] | undefined;
2390
+ partitionBy?: string[] | undefined;
2391
+ frame?: {
2392
+ type?: "rows" | "range" | undefined;
2393
+ start?: string | undefined;
2394
+ end?: string | undefined;
2395
+ } | undefined;
2396
+ };
2397
+ field?: string | undefined;
2398
+ }, {
2399
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2400
+ alias: string;
2401
+ over: {
2402
+ orderBy?: {
2403
+ field: string;
2404
+ order?: "asc" | "desc" | undefined;
2405
+ }[] | undefined;
2406
+ partitionBy?: string[] | undefined;
2407
+ frame?: {
2408
+ type?: "rows" | "range" | undefined;
2409
+ start?: string | undefined;
2410
+ end?: string | undefined;
2411
+ } | undefined;
2412
+ };
2413
+ field?: string | undefined;
2414
+ }>, "many">>;
2415
+ distinct: z.ZodOptional<z.ZodBoolean>;
2416
+ }, "strip", z.ZodTypeAny, {
2417
+ object: string;
2418
+ where?: import("../data").FilterCondition | undefined;
2419
+ distinct?: boolean | undefined;
2420
+ fields?: any[] | undefined;
2421
+ orderBy?: {
2422
+ field: string;
2423
+ order: "asc" | "desc";
2424
+ }[] | undefined;
2425
+ limit?: number | undefined;
2426
+ offset?: number | undefined;
2427
+ cursor?: Record<string, any> | undefined;
2428
+ joins?: any[] | undefined;
2429
+ aggregations?: {
2430
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2431
+ alias: string;
2432
+ filter?: import("../data").FilterCondition | undefined;
2433
+ field?: string | undefined;
2434
+ distinct?: boolean | undefined;
2435
+ }[] | undefined;
2436
+ groupBy?: string[] | undefined;
2437
+ having?: import("../data").FilterCondition | undefined;
2438
+ windowFunctions?: {
2439
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2440
+ alias: string;
2441
+ over: {
2442
+ orderBy?: {
2443
+ field: string;
2444
+ order: "asc" | "desc";
2445
+ }[] | undefined;
2446
+ partitionBy?: string[] | undefined;
2447
+ frame?: {
2448
+ type?: "rows" | "range" | undefined;
2449
+ start?: string | undefined;
2450
+ end?: string | undefined;
2451
+ } | undefined;
2452
+ };
2453
+ field?: string | undefined;
2454
+ }[] | undefined;
2455
+ }, {
2456
+ object: string;
2457
+ where?: import("../data").FilterCondition | undefined;
2458
+ distinct?: boolean | undefined;
2459
+ fields?: any[] | undefined;
2460
+ orderBy?: {
2461
+ field: string;
2462
+ order?: "asc" | "desc" | undefined;
2463
+ }[] | undefined;
2464
+ limit?: number | undefined;
2465
+ offset?: number | undefined;
2466
+ cursor?: Record<string, any> | undefined;
2467
+ joins?: any[] | undefined;
2468
+ aggregations?: {
2469
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2470
+ alias: string;
2471
+ filter?: import("../data").FilterCondition | undefined;
2472
+ field?: string | undefined;
2473
+ distinct?: boolean | undefined;
2474
+ }[] | undefined;
2475
+ groupBy?: string[] | undefined;
2476
+ having?: import("../data").FilterCondition | undefined;
2477
+ windowFunctions?: {
2478
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2479
+ alias: string;
2480
+ over: {
2481
+ orderBy?: {
2482
+ field: string;
2483
+ order?: "asc" | "desc" | undefined;
2484
+ }[] | undefined;
2485
+ partitionBy?: string[] | undefined;
2486
+ frame?: {
2487
+ type?: "rows" | "range" | undefined;
2488
+ start?: string | undefined;
2489
+ end?: string | undefined;
2490
+ } | undefined;
2491
+ };
2492
+ field?: string | undefined;
2493
+ }[] | undefined;
2494
+ }>, z.ZodOptional<z.ZodObject<{
2495
+ /**
2496
+ * Transaction handle/identifier.
2497
+ * If provided, the operation must run within this transaction.
2498
+ */
2499
+ transaction: z.ZodOptional<z.ZodAny>;
2500
+ /**
2501
+ * Operation timeout in milliseconds.
2502
+ */
2503
+ timeout: z.ZodOptional<z.ZodNumber>;
2504
+ /**
2505
+ * Whether to bypass cache and force a fresh read.
2506
+ */
2507
+ skipCache: z.ZodOptional<z.ZodBoolean>;
2508
+ /**
2509
+ * Distributed Tracing Context.
2510
+ * Used for passing OpenTelemetry span context or request IDs for observability.
2511
+ */
2512
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2513
+ /**
2514
+ * Tenant Identifier.
2515
+ * For multi-tenant databases (row-level security or schema-per-tenant).
2516
+ */
2517
+ tenantId: z.ZodOptional<z.ZodString>;
2518
+ }, "strip", z.ZodTypeAny, {
2519
+ timeout?: number | undefined;
2520
+ tenantId?: string | undefined;
2521
+ transaction?: any;
2522
+ skipCache?: boolean | undefined;
2523
+ traceContext?: Record<string, string> | undefined;
2524
+ }, {
2525
+ timeout?: number | undefined;
2526
+ tenantId?: string | undefined;
2527
+ transaction?: any;
2528
+ skipCache?: boolean | undefined;
2529
+ traceContext?: Record<string, string> | undefined;
2530
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>>;
2531
+ }, "strip", z.ZodTypeAny, {
2532
+ find: (args_0: string, args_1: {
2533
+ object: string;
2534
+ where?: import("../data").FilterCondition | undefined;
2535
+ distinct?: boolean | undefined;
2536
+ fields?: any[] | undefined;
2537
+ orderBy?: {
2538
+ field: string;
2539
+ order?: "asc" | "desc" | undefined;
2540
+ }[] | undefined;
2541
+ limit?: number | undefined;
2542
+ offset?: number | undefined;
2543
+ cursor?: Record<string, any> | undefined;
2544
+ joins?: any[] | undefined;
2545
+ aggregations?: {
2546
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2547
+ alias: string;
2548
+ filter?: import("../data").FilterCondition | undefined;
2549
+ field?: string | undefined;
2550
+ distinct?: boolean | undefined;
2551
+ }[] | undefined;
2552
+ groupBy?: string[] | undefined;
2553
+ having?: import("../data").FilterCondition | undefined;
2554
+ windowFunctions?: {
2555
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2556
+ alias: string;
2557
+ over: {
2558
+ orderBy?: {
2559
+ field: string;
2560
+ order?: "asc" | "desc" | undefined;
2561
+ }[] | undefined;
2562
+ partitionBy?: string[] | undefined;
2563
+ frame?: {
2564
+ type?: "rows" | "range" | undefined;
2565
+ start?: string | undefined;
2566
+ end?: string | undefined;
2567
+ } | undefined;
2568
+ };
2569
+ field?: string | undefined;
2570
+ }[] | undefined;
2571
+ }, args_2: {
2572
+ timeout?: number | undefined;
2573
+ tenantId?: string | undefined;
2574
+ transaction?: any;
2575
+ skipCache?: boolean | undefined;
2576
+ traceContext?: Record<string, string> | undefined;
2577
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
2578
+ count: (args_0: string, args_1: {
2579
+ object: string;
2580
+ where?: import("../data").FilterCondition | undefined;
2581
+ distinct?: boolean | undefined;
2582
+ fields?: any[] | undefined;
2583
+ orderBy?: {
2584
+ field: string;
2585
+ order?: "asc" | "desc" | undefined;
2586
+ }[] | undefined;
2587
+ limit?: number | undefined;
2588
+ offset?: number | undefined;
2589
+ cursor?: Record<string, any> | undefined;
2590
+ joins?: any[] | undefined;
2591
+ aggregations?: {
2592
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2593
+ alias: string;
2594
+ filter?: import("../data").FilterCondition | undefined;
2595
+ field?: string | undefined;
2596
+ distinct?: boolean | undefined;
2597
+ }[] | undefined;
2598
+ groupBy?: string[] | undefined;
2599
+ having?: import("../data").FilterCondition | undefined;
2600
+ windowFunctions?: {
2601
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2602
+ alias: string;
2603
+ over: {
2604
+ orderBy?: {
2605
+ field: string;
2606
+ order?: "asc" | "desc" | undefined;
2607
+ }[] | undefined;
2608
+ partitionBy?: string[] | undefined;
2609
+ frame?: {
2610
+ type?: "rows" | "range" | undefined;
2611
+ start?: string | undefined;
2612
+ end?: string | undefined;
2613
+ } | undefined;
2614
+ };
2615
+ field?: string | undefined;
2616
+ }[] | undefined;
2617
+ } | undefined, args_2: {
2618
+ timeout?: number | undefined;
2619
+ tenantId?: string | undefined;
2620
+ transaction?: any;
2621
+ skipCache?: boolean | undefined;
2622
+ traceContext?: Record<string, string> | undefined;
2623
+ } | undefined, ...args: unknown[]) => Promise<number>;
2624
+ name: string;
2625
+ update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
2626
+ timeout?: number | undefined;
2627
+ tenantId?: string | undefined;
2628
+ transaction?: any;
2629
+ skipCache?: boolean | undefined;
2630
+ traceContext?: Record<string, string> | undefined;
2631
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
2632
+ delete: (args_0: string, args_1: string | number, args_2: {
2633
+ timeout?: number | undefined;
2634
+ tenantId?: string | undefined;
2635
+ transaction?: any;
2636
+ skipCache?: boolean | undefined;
2637
+ traceContext?: Record<string, string> | undefined;
2638
+ } | undefined, ...args: unknown[]) => Promise<boolean>;
2639
+ create: (args_0: string, args_1: Record<string, any>, args_2: {
2640
+ timeout?: number | undefined;
2641
+ tenantId?: string | undefined;
2642
+ transaction?: any;
2643
+ skipCache?: boolean | undefined;
2644
+ traceContext?: Record<string, string> | undefined;
2645
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
2646
+ upsert: (args_0: string, args_1: Record<string, any>, args_2: string[] | undefined, args_3: {
2647
+ timeout?: number | undefined;
2648
+ tenantId?: string | undefined;
2649
+ transaction?: any;
2650
+ skipCache?: boolean | undefined;
2651
+ traceContext?: Record<string, string> | undefined;
2652
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
2653
+ version: string;
2654
+ supports: {
2655
+ joins: boolean;
2656
+ transactions: boolean;
2657
+ queryFilters: boolean;
2658
+ queryAggregations: boolean;
2659
+ querySorting: boolean;
2660
+ queryPagination: boolean;
2661
+ queryWindowFunctions: boolean;
2662
+ querySubqueries: boolean;
2663
+ fullTextSearch: boolean;
2664
+ jsonFields: boolean;
2665
+ arrayFields: boolean;
2666
+ vectorSearch: boolean;
2667
+ geoSpatial: boolean;
2668
+ };
2669
+ connect: (...args: unknown[]) => Promise<void>;
2670
+ disconnect: (...args: unknown[]) => Promise<void>;
2671
+ checkHealth: (...args: unknown[]) => Promise<boolean>;
2672
+ execute: (args_0: any, args_1: any[] | undefined, args_2: {
2673
+ timeout?: number | undefined;
2674
+ tenantId?: string | undefined;
2675
+ transaction?: any;
2676
+ skipCache?: boolean | undefined;
2677
+ traceContext?: Record<string, string> | undefined;
2678
+ } | undefined, ...args: unknown[]) => Promise<any>;
2679
+ findStream: (args_0: string, args_1: {
2680
+ object: string;
2681
+ where?: import("../data").FilterCondition | undefined;
2682
+ distinct?: boolean | undefined;
2683
+ fields?: any[] | undefined;
2684
+ orderBy?: {
2685
+ field: string;
2686
+ order?: "asc" | "desc" | undefined;
2687
+ }[] | undefined;
2688
+ limit?: number | undefined;
2689
+ offset?: number | undefined;
2690
+ cursor?: Record<string, any> | undefined;
2691
+ joins?: any[] | undefined;
2692
+ aggregations?: {
2693
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2694
+ alias: string;
2695
+ filter?: import("../data").FilterCondition | undefined;
2696
+ field?: string | undefined;
2697
+ distinct?: boolean | undefined;
2698
+ }[] | undefined;
2699
+ groupBy?: string[] | undefined;
2700
+ having?: import("../data").FilterCondition | undefined;
2701
+ windowFunctions?: {
2702
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2703
+ alias: string;
2704
+ over: {
2705
+ orderBy?: {
2706
+ field: string;
2707
+ order?: "asc" | "desc" | undefined;
2708
+ }[] | undefined;
2709
+ partitionBy?: string[] | undefined;
2710
+ frame?: {
2711
+ type?: "rows" | "range" | undefined;
2712
+ start?: string | undefined;
2713
+ end?: string | undefined;
2714
+ } | undefined;
2715
+ };
2716
+ field?: string | undefined;
2717
+ }[] | undefined;
2718
+ }, args_2: {
2719
+ timeout?: number | undefined;
2720
+ tenantId?: string | undefined;
2721
+ transaction?: any;
2722
+ skipCache?: boolean | undefined;
2723
+ traceContext?: Record<string, string> | undefined;
2724
+ } | undefined, ...args: unknown[]) => any;
2725
+ findOne: (args_0: string, args_1: {
2726
+ object: string;
2727
+ where?: import("../data").FilterCondition | undefined;
2728
+ distinct?: boolean | undefined;
2729
+ fields?: any[] | undefined;
2730
+ orderBy?: {
2731
+ field: string;
2732
+ order?: "asc" | "desc" | undefined;
2733
+ }[] | undefined;
2734
+ limit?: number | undefined;
2735
+ offset?: number | undefined;
2736
+ cursor?: Record<string, any> | undefined;
2737
+ joins?: any[] | undefined;
2738
+ aggregations?: {
2739
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2740
+ alias: string;
2741
+ filter?: import("../data").FilterCondition | undefined;
2742
+ field?: string | undefined;
2743
+ distinct?: boolean | undefined;
2744
+ }[] | undefined;
2745
+ groupBy?: string[] | undefined;
2746
+ having?: import("../data").FilterCondition | undefined;
2747
+ windowFunctions?: {
2748
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2749
+ alias: string;
2750
+ over: {
2751
+ orderBy?: {
2752
+ field: string;
2753
+ order?: "asc" | "desc" | undefined;
2754
+ }[] | undefined;
2755
+ partitionBy?: string[] | undefined;
2756
+ frame?: {
2757
+ type?: "rows" | "range" | undefined;
2758
+ start?: string | undefined;
2759
+ end?: string | undefined;
2760
+ } | undefined;
2761
+ };
2762
+ field?: string | undefined;
2763
+ }[] | undefined;
2764
+ }, args_2: {
2765
+ timeout?: number | undefined;
2766
+ tenantId?: string | undefined;
2767
+ transaction?: any;
2768
+ skipCache?: boolean | undefined;
2769
+ traceContext?: Record<string, string> | undefined;
2770
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
2771
+ bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
2772
+ timeout?: number | undefined;
2773
+ tenantId?: string | undefined;
2774
+ transaction?: any;
2775
+ skipCache?: boolean | undefined;
2776
+ traceContext?: Record<string, string> | undefined;
2777
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
2778
+ bulkUpdate: (args_0: string, args_1: {
2779
+ id: string | number;
2780
+ data: Record<string, any>;
2781
+ }[], args_2: {
2782
+ timeout?: number | undefined;
2783
+ tenantId?: string | undefined;
2784
+ transaction?: any;
2785
+ skipCache?: boolean | undefined;
2786
+ traceContext?: Record<string, string> | undefined;
2787
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
2788
+ bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
2789
+ timeout?: number | undefined;
2790
+ tenantId?: string | undefined;
2791
+ transaction?: any;
2792
+ skipCache?: boolean | undefined;
2793
+ traceContext?: Record<string, string> | undefined;
2794
+ } | undefined, ...args: unknown[]) => Promise<void>;
2795
+ beginTransaction: (args_0: {
2796
+ isolationLevel?: "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE" | "SNAPSHOT" | undefined;
2797
+ } | undefined, ...args: unknown[]) => Promise<any>;
2798
+ commit: (args_0: any, ...args: unknown[]) => Promise<void>;
2799
+ rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
2800
+ syncSchema: (args_0: string, args_1: any, args_2: {
2801
+ timeout?: number | undefined;
2802
+ tenantId?: string | undefined;
2803
+ transaction?: any;
2804
+ skipCache?: boolean | undefined;
2805
+ traceContext?: Record<string, string> | undefined;
2806
+ } | undefined, ...args: unknown[]) => Promise<void>;
2807
+ dropTable: (args_0: string, args_1: {
2808
+ timeout?: number | undefined;
2809
+ tenantId?: string | undefined;
2810
+ transaction?: any;
2811
+ skipCache?: boolean | undefined;
2812
+ traceContext?: Record<string, string> | undefined;
2813
+ } | undefined, ...args: unknown[]) => Promise<void>;
2814
+ getPoolStats?: ((...args: unknown[]) => {
2815
+ active: number;
2816
+ total: number;
2817
+ idle: number;
2818
+ waiting: number;
2819
+ } | undefined) | undefined;
2820
+ updateMany?: ((args_0: string, args_1: {
2821
+ object: string;
2822
+ where?: import("../data").FilterCondition | undefined;
2823
+ distinct?: boolean | undefined;
2824
+ fields?: any[] | undefined;
2825
+ orderBy?: {
2826
+ field: string;
2827
+ order?: "asc" | "desc" | undefined;
2828
+ }[] | undefined;
2829
+ limit?: number | undefined;
2830
+ offset?: number | undefined;
2831
+ cursor?: Record<string, any> | undefined;
2832
+ joins?: any[] | undefined;
2833
+ aggregations?: {
2834
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2835
+ alias: string;
2836
+ filter?: import("../data").FilterCondition | undefined;
2837
+ field?: string | undefined;
2838
+ distinct?: boolean | undefined;
2839
+ }[] | undefined;
2840
+ groupBy?: string[] | undefined;
2841
+ having?: import("../data").FilterCondition | undefined;
2842
+ windowFunctions?: {
2843
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2844
+ alias: string;
2845
+ over: {
2846
+ orderBy?: {
2847
+ field: string;
2848
+ order?: "asc" | "desc" | undefined;
2849
+ }[] | undefined;
2850
+ partitionBy?: string[] | undefined;
2851
+ frame?: {
2852
+ type?: "rows" | "range" | undefined;
2853
+ start?: string | undefined;
2854
+ end?: string | undefined;
2855
+ } | undefined;
2856
+ };
2857
+ field?: string | undefined;
2858
+ }[] | undefined;
2859
+ }, args_2: Record<string, any>, args_3: {
2860
+ timeout?: number | undefined;
2861
+ tenantId?: string | undefined;
2862
+ transaction?: any;
2863
+ skipCache?: boolean | undefined;
2864
+ traceContext?: Record<string, string> | undefined;
2865
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
2866
+ deleteMany?: ((args_0: string, args_1: {
2867
+ object: string;
2868
+ where?: import("../data").FilterCondition | undefined;
2869
+ distinct?: boolean | undefined;
2870
+ fields?: any[] | undefined;
2871
+ orderBy?: {
2872
+ field: string;
2873
+ order?: "asc" | "desc" | undefined;
2874
+ }[] | undefined;
2875
+ limit?: number | undefined;
2876
+ offset?: number | undefined;
2877
+ cursor?: Record<string, any> | undefined;
2878
+ joins?: any[] | undefined;
2879
+ aggregations?: {
2880
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2881
+ alias: string;
2882
+ filter?: import("../data").FilterCondition | undefined;
2883
+ field?: string | undefined;
2884
+ distinct?: boolean | undefined;
2885
+ }[] | undefined;
2886
+ groupBy?: string[] | undefined;
2887
+ having?: import("../data").FilterCondition | undefined;
2888
+ windowFunctions?: {
2889
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2890
+ alias: string;
2891
+ over: {
2892
+ orderBy?: {
2893
+ field: string;
2894
+ order?: "asc" | "desc" | undefined;
2895
+ }[] | undefined;
2896
+ partitionBy?: string[] | undefined;
2897
+ frame?: {
2898
+ type?: "rows" | "range" | undefined;
2899
+ start?: string | undefined;
2900
+ end?: string | undefined;
2901
+ } | undefined;
2902
+ };
2903
+ field?: string | undefined;
2904
+ }[] | undefined;
2905
+ }, args_2: {
2906
+ timeout?: number | undefined;
2907
+ tenantId?: string | undefined;
2908
+ transaction?: any;
2909
+ skipCache?: boolean | undefined;
2910
+ traceContext?: Record<string, string> | undefined;
2911
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
2912
+ explain?: ((args_0: string, args_1: {
2913
+ object: string;
2914
+ where?: import("../data").FilterCondition | undefined;
2915
+ distinct?: boolean | undefined;
2916
+ fields?: any[] | undefined;
2917
+ orderBy?: {
2918
+ field: string;
2919
+ order?: "asc" | "desc" | undefined;
2920
+ }[] | undefined;
2921
+ limit?: number | undefined;
2922
+ offset?: number | undefined;
2923
+ cursor?: Record<string, any> | undefined;
2924
+ joins?: any[] | undefined;
2925
+ aggregations?: {
2926
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2927
+ alias: string;
2928
+ filter?: import("../data").FilterCondition | undefined;
2929
+ field?: string | undefined;
2930
+ distinct?: boolean | undefined;
2931
+ }[] | undefined;
2932
+ groupBy?: string[] | undefined;
2933
+ having?: import("../data").FilterCondition | undefined;
2934
+ windowFunctions?: {
2935
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2936
+ alias: string;
2937
+ over: {
2938
+ orderBy?: {
2939
+ field: string;
2940
+ order?: "asc" | "desc" | undefined;
2941
+ }[] | undefined;
2942
+ partitionBy?: string[] | undefined;
2943
+ frame?: {
2944
+ type?: "rows" | "range" | undefined;
2945
+ start?: string | undefined;
2946
+ end?: string | undefined;
2947
+ } | undefined;
2948
+ };
2949
+ field?: string | undefined;
2950
+ }[] | undefined;
2951
+ }, args_2: {
2952
+ timeout?: number | undefined;
2953
+ tenantId?: string | undefined;
2954
+ transaction?: any;
2955
+ skipCache?: boolean | undefined;
2956
+ traceContext?: Record<string, string> | undefined;
2957
+ } | undefined, ...args: unknown[]) => Promise<any>) | undefined;
2958
+ }, {
2959
+ find: (args_0: string, args_1: {
2960
+ object: string;
2961
+ where?: import("../data").FilterCondition | undefined;
2962
+ distinct?: boolean | undefined;
2963
+ fields?: any[] | undefined;
2964
+ orderBy?: {
2965
+ field: string;
2966
+ order: "asc" | "desc";
2967
+ }[] | undefined;
2968
+ limit?: number | undefined;
2969
+ offset?: number | undefined;
2970
+ cursor?: Record<string, any> | undefined;
2971
+ joins?: any[] | undefined;
2972
+ aggregations?: {
2973
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
2974
+ alias: string;
2975
+ filter?: import("../data").FilterCondition | undefined;
2976
+ field?: string | undefined;
2977
+ distinct?: boolean | undefined;
2978
+ }[] | undefined;
2979
+ groupBy?: string[] | undefined;
2980
+ having?: import("../data").FilterCondition | undefined;
2981
+ windowFunctions?: {
2982
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2983
+ alias: string;
2984
+ over: {
2985
+ orderBy?: {
2986
+ field: string;
2987
+ order: "asc" | "desc";
2988
+ }[] | undefined;
2989
+ partitionBy?: string[] | undefined;
2990
+ frame?: {
2991
+ type?: "rows" | "range" | undefined;
2992
+ start?: string | undefined;
2993
+ end?: string | undefined;
2994
+ } | undefined;
2995
+ };
2996
+ field?: string | undefined;
2997
+ }[] | undefined;
2998
+ }, args_2: {
2999
+ timeout?: number | undefined;
3000
+ tenantId?: string | undefined;
3001
+ transaction?: any;
3002
+ skipCache?: boolean | undefined;
3003
+ traceContext?: Record<string, string> | undefined;
3004
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
3005
+ count: (args_0: string, args_1: {
3006
+ object: string;
3007
+ where?: import("../data").FilterCondition | undefined;
3008
+ distinct?: boolean | undefined;
3009
+ fields?: any[] | undefined;
3010
+ orderBy?: {
3011
+ field: string;
3012
+ order: "asc" | "desc";
3013
+ }[] | undefined;
3014
+ limit?: number | undefined;
3015
+ offset?: number | undefined;
3016
+ cursor?: Record<string, any> | undefined;
3017
+ joins?: any[] | undefined;
3018
+ aggregations?: {
3019
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3020
+ alias: string;
3021
+ filter?: import("../data").FilterCondition | undefined;
3022
+ field?: string | undefined;
3023
+ distinct?: boolean | undefined;
3024
+ }[] | undefined;
3025
+ groupBy?: string[] | undefined;
3026
+ having?: import("../data").FilterCondition | undefined;
3027
+ windowFunctions?: {
3028
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3029
+ alias: string;
3030
+ over: {
3031
+ orderBy?: {
3032
+ field: string;
3033
+ order: "asc" | "desc";
3034
+ }[] | undefined;
3035
+ partitionBy?: string[] | undefined;
3036
+ frame?: {
3037
+ type?: "rows" | "range" | undefined;
3038
+ start?: string | undefined;
3039
+ end?: string | undefined;
3040
+ } | undefined;
3041
+ };
3042
+ field?: string | undefined;
3043
+ }[] | undefined;
3044
+ } | undefined, args_2: {
3045
+ timeout?: number | undefined;
3046
+ tenantId?: string | undefined;
3047
+ transaction?: any;
3048
+ skipCache?: boolean | undefined;
3049
+ traceContext?: Record<string, string> | undefined;
3050
+ } | undefined, ...args: unknown[]) => Promise<number>;
3051
+ name: string;
3052
+ update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
3053
+ timeout?: number | undefined;
3054
+ tenantId?: string | undefined;
3055
+ transaction?: any;
3056
+ skipCache?: boolean | undefined;
3057
+ traceContext?: Record<string, string> | undefined;
3058
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
3059
+ delete: (args_0: string, args_1: string | number, args_2: {
3060
+ timeout?: number | undefined;
3061
+ tenantId?: string | undefined;
3062
+ transaction?: any;
3063
+ skipCache?: boolean | undefined;
3064
+ traceContext?: Record<string, string> | undefined;
3065
+ } | undefined, ...args: unknown[]) => Promise<boolean>;
3066
+ create: (args_0: string, args_1: Record<string, any>, args_2: {
3067
+ timeout?: number | undefined;
3068
+ tenantId?: string | undefined;
3069
+ transaction?: any;
3070
+ skipCache?: boolean | undefined;
3071
+ traceContext?: Record<string, string> | undefined;
3072
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
3073
+ upsert: (args_0: string, args_1: Record<string, any>, args_2: string[] | undefined, args_3: {
3074
+ timeout?: number | undefined;
3075
+ tenantId?: string | undefined;
3076
+ transaction?: any;
3077
+ skipCache?: boolean | undefined;
3078
+ traceContext?: Record<string, string> | undefined;
3079
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
3080
+ version: string;
3081
+ supports: {
3082
+ joins: boolean;
3083
+ transactions: boolean;
3084
+ queryFilters: boolean;
3085
+ queryAggregations: boolean;
3086
+ querySorting: boolean;
3087
+ queryPagination: boolean;
3088
+ queryWindowFunctions: boolean;
3089
+ querySubqueries: boolean;
3090
+ fullTextSearch: boolean;
3091
+ jsonFields: boolean;
3092
+ arrayFields: boolean;
3093
+ vectorSearch?: boolean | undefined;
3094
+ geoSpatial?: boolean | undefined;
3095
+ };
3096
+ connect: (...args: unknown[]) => Promise<void>;
3097
+ disconnect: (...args: unknown[]) => Promise<void>;
3098
+ checkHealth: (...args: unknown[]) => Promise<boolean>;
3099
+ execute: (args_0: any, args_1: any[] | undefined, args_2: {
3100
+ timeout?: number | undefined;
3101
+ tenantId?: string | undefined;
3102
+ transaction?: any;
3103
+ skipCache?: boolean | undefined;
3104
+ traceContext?: Record<string, string> | undefined;
3105
+ } | undefined, ...args: unknown[]) => Promise<any>;
3106
+ findStream: (args_0: string, args_1: {
3107
+ object: string;
3108
+ where?: import("../data").FilterCondition | undefined;
3109
+ distinct?: boolean | undefined;
3110
+ fields?: any[] | undefined;
3111
+ orderBy?: {
3112
+ field: string;
3113
+ order: "asc" | "desc";
3114
+ }[] | undefined;
3115
+ limit?: number | undefined;
3116
+ offset?: number | undefined;
3117
+ cursor?: Record<string, any> | undefined;
3118
+ joins?: any[] | undefined;
3119
+ aggregations?: {
3120
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3121
+ alias: string;
3122
+ filter?: import("../data").FilterCondition | undefined;
3123
+ field?: string | undefined;
3124
+ distinct?: boolean | undefined;
3125
+ }[] | undefined;
3126
+ groupBy?: string[] | undefined;
3127
+ having?: import("../data").FilterCondition | undefined;
3128
+ windowFunctions?: {
3129
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3130
+ alias: string;
3131
+ over: {
3132
+ orderBy?: {
3133
+ field: string;
3134
+ order: "asc" | "desc";
3135
+ }[] | undefined;
3136
+ partitionBy?: string[] | undefined;
3137
+ frame?: {
3138
+ type?: "rows" | "range" | undefined;
3139
+ start?: string | undefined;
3140
+ end?: string | undefined;
3141
+ } | undefined;
3142
+ };
3143
+ field?: string | undefined;
3144
+ }[] | undefined;
3145
+ }, args_2: {
3146
+ timeout?: number | undefined;
3147
+ tenantId?: string | undefined;
3148
+ transaction?: any;
3149
+ skipCache?: boolean | undefined;
3150
+ traceContext?: Record<string, string> | undefined;
3151
+ } | undefined, ...args: unknown[]) => any;
3152
+ findOne: (args_0: string, args_1: {
3153
+ object: string;
3154
+ where?: import("../data").FilterCondition | undefined;
3155
+ distinct?: boolean | undefined;
3156
+ fields?: any[] | undefined;
3157
+ orderBy?: {
3158
+ field: string;
3159
+ order: "asc" | "desc";
3160
+ }[] | undefined;
3161
+ limit?: number | undefined;
3162
+ offset?: number | undefined;
3163
+ cursor?: Record<string, any> | undefined;
3164
+ joins?: any[] | undefined;
3165
+ aggregations?: {
3166
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3167
+ alias: string;
3168
+ filter?: import("../data").FilterCondition | undefined;
3169
+ field?: string | undefined;
3170
+ distinct?: boolean | undefined;
3171
+ }[] | undefined;
3172
+ groupBy?: string[] | undefined;
3173
+ having?: import("../data").FilterCondition | undefined;
3174
+ windowFunctions?: {
3175
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3176
+ alias: string;
3177
+ over: {
3178
+ orderBy?: {
3179
+ field: string;
3180
+ order: "asc" | "desc";
3181
+ }[] | undefined;
3182
+ partitionBy?: string[] | undefined;
3183
+ frame?: {
3184
+ type?: "rows" | "range" | undefined;
3185
+ start?: string | undefined;
3186
+ end?: string | undefined;
3187
+ } | undefined;
3188
+ };
3189
+ field?: string | undefined;
3190
+ }[] | undefined;
3191
+ }, args_2: {
3192
+ timeout?: number | undefined;
3193
+ tenantId?: string | undefined;
3194
+ transaction?: any;
3195
+ skipCache?: boolean | undefined;
3196
+ traceContext?: Record<string, string> | undefined;
3197
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
3198
+ bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
3199
+ timeout?: number | undefined;
3200
+ tenantId?: string | undefined;
3201
+ transaction?: any;
3202
+ skipCache?: boolean | undefined;
3203
+ traceContext?: Record<string, string> | undefined;
3204
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
3205
+ bulkUpdate: (args_0: string, args_1: {
3206
+ id: string | number;
3207
+ data: Record<string, any>;
3208
+ }[], args_2: {
3209
+ timeout?: number | undefined;
3210
+ tenantId?: string | undefined;
3211
+ transaction?: any;
3212
+ skipCache?: boolean | undefined;
3213
+ traceContext?: Record<string, string> | undefined;
3214
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
3215
+ bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
3216
+ timeout?: number | undefined;
3217
+ tenantId?: string | undefined;
3218
+ transaction?: any;
3219
+ skipCache?: boolean | undefined;
3220
+ traceContext?: Record<string, string> | undefined;
3221
+ } | undefined, ...args: unknown[]) => Promise<void>;
3222
+ beginTransaction: (args_0: {
3223
+ isolationLevel?: "READ UNCOMMITTED" | "READ COMMITTED" | "REPEATABLE READ" | "SERIALIZABLE" | "SNAPSHOT" | undefined;
3224
+ } | undefined, ...args: unknown[]) => Promise<any>;
3225
+ commit: (args_0: any, ...args: unknown[]) => Promise<void>;
3226
+ rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
3227
+ syncSchema: (args_0: string, args_1: any, args_2: {
3228
+ timeout?: number | undefined;
3229
+ tenantId?: string | undefined;
3230
+ transaction?: any;
3231
+ skipCache?: boolean | undefined;
3232
+ traceContext?: Record<string, string> | undefined;
3233
+ } | undefined, ...args: unknown[]) => Promise<void>;
3234
+ dropTable: (args_0: string, args_1: {
3235
+ timeout?: number | undefined;
3236
+ tenantId?: string | undefined;
3237
+ transaction?: any;
3238
+ skipCache?: boolean | undefined;
3239
+ traceContext?: Record<string, string> | undefined;
3240
+ } | undefined, ...args: unknown[]) => Promise<void>;
3241
+ getPoolStats?: ((...args: unknown[]) => {
3242
+ active: number;
3243
+ total: number;
3244
+ idle: number;
3245
+ waiting: number;
3246
+ } | undefined) | undefined;
3247
+ updateMany?: ((args_0: string, args_1: {
3248
+ object: string;
3249
+ where?: import("../data").FilterCondition | undefined;
3250
+ distinct?: boolean | undefined;
3251
+ fields?: any[] | undefined;
3252
+ orderBy?: {
3253
+ field: string;
3254
+ order: "asc" | "desc";
3255
+ }[] | undefined;
3256
+ limit?: number | undefined;
3257
+ offset?: number | undefined;
3258
+ cursor?: Record<string, any> | undefined;
3259
+ joins?: any[] | undefined;
3260
+ aggregations?: {
3261
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3262
+ alias: string;
3263
+ filter?: import("../data").FilterCondition | undefined;
3264
+ field?: string | undefined;
3265
+ distinct?: boolean | undefined;
3266
+ }[] | undefined;
3267
+ groupBy?: string[] | undefined;
3268
+ having?: import("../data").FilterCondition | undefined;
3269
+ windowFunctions?: {
3270
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3271
+ alias: string;
3272
+ over: {
3273
+ orderBy?: {
3274
+ field: string;
3275
+ order: "asc" | "desc";
3276
+ }[] | undefined;
3277
+ partitionBy?: string[] | undefined;
3278
+ frame?: {
3279
+ type?: "rows" | "range" | undefined;
3280
+ start?: string | undefined;
3281
+ end?: string | undefined;
3282
+ } | undefined;
3283
+ };
3284
+ field?: string | undefined;
3285
+ }[] | undefined;
3286
+ }, args_2: Record<string, any>, args_3: {
3287
+ timeout?: number | undefined;
3288
+ tenantId?: string | undefined;
3289
+ transaction?: any;
3290
+ skipCache?: boolean | undefined;
3291
+ traceContext?: Record<string, string> | undefined;
3292
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
3293
+ deleteMany?: ((args_0: string, args_1: {
3294
+ object: string;
3295
+ where?: import("../data").FilterCondition | undefined;
3296
+ distinct?: boolean | undefined;
3297
+ fields?: any[] | undefined;
3298
+ orderBy?: {
3299
+ field: string;
3300
+ order: "asc" | "desc";
3301
+ }[] | undefined;
3302
+ limit?: number | undefined;
3303
+ offset?: number | undefined;
3304
+ cursor?: Record<string, any> | undefined;
3305
+ joins?: any[] | undefined;
3306
+ aggregations?: {
3307
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3308
+ alias: string;
3309
+ filter?: import("../data").FilterCondition | undefined;
3310
+ field?: string | undefined;
3311
+ distinct?: boolean | undefined;
3312
+ }[] | undefined;
3313
+ groupBy?: string[] | undefined;
3314
+ having?: import("../data").FilterCondition | undefined;
3315
+ windowFunctions?: {
3316
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3317
+ alias: string;
3318
+ over: {
3319
+ orderBy?: {
3320
+ field: string;
3321
+ order: "asc" | "desc";
3322
+ }[] | undefined;
3323
+ partitionBy?: string[] | undefined;
3324
+ frame?: {
3325
+ type?: "rows" | "range" | undefined;
3326
+ start?: string | undefined;
3327
+ end?: string | undefined;
3328
+ } | undefined;
3329
+ };
3330
+ field?: string | undefined;
3331
+ }[] | undefined;
3332
+ }, args_2: {
3333
+ timeout?: number | undefined;
3334
+ tenantId?: string | undefined;
3335
+ transaction?: any;
3336
+ skipCache?: boolean | undefined;
3337
+ traceContext?: Record<string, string> | undefined;
3338
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
3339
+ explain?: ((args_0: string, args_1: {
3340
+ object: string;
3341
+ where?: import("../data").FilterCondition | undefined;
3342
+ distinct?: boolean | undefined;
3343
+ fields?: any[] | undefined;
3344
+ orderBy?: {
3345
+ field: string;
3346
+ order: "asc" | "desc";
3347
+ }[] | undefined;
3348
+ limit?: number | undefined;
3349
+ offset?: number | undefined;
3350
+ cursor?: Record<string, any> | undefined;
3351
+ joins?: any[] | undefined;
3352
+ aggregations?: {
3353
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
3354
+ alias: string;
3355
+ filter?: import("../data").FilterCondition | undefined;
3356
+ field?: string | undefined;
3357
+ distinct?: boolean | undefined;
3358
+ }[] | undefined;
3359
+ groupBy?: string[] | undefined;
3360
+ having?: import("../data").FilterCondition | undefined;
3361
+ windowFunctions?: {
3362
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3363
+ alias: string;
3364
+ over: {
3365
+ orderBy?: {
3366
+ field: string;
3367
+ order: "asc" | "desc";
3368
+ }[] | undefined;
3369
+ partitionBy?: string[] | undefined;
3370
+ frame?: {
3371
+ type?: "rows" | "range" | undefined;
3372
+ start?: string | undefined;
3373
+ end?: string | undefined;
3374
+ } | undefined;
3375
+ };
3376
+ field?: string | undefined;
3377
+ }[] | undefined;
3378
+ }, args_2: {
3379
+ timeout?: number | undefined;
3380
+ tenantId?: string | undefined;
3381
+ transaction?: any;
3382
+ skipCache?: boolean | undefined;
3383
+ traceContext?: Record<string, string> | undefined;
3384
+ } | undefined, ...args: unknown[]) => Promise<any>) | undefined;
3385
+ }>;
3386
+ /**
3387
+ * TypeScript types
3388
+ */
3389
+ export type DriverOptions = z.infer<typeof DriverOptionsSchema>;
3390
+ export type DriverCapabilities = z.infer<typeof DriverCapabilitiesSchema>;
3391
+ export type DriverInterface = z.infer<typeof DriverInterfaceSchema>;
3392
+ //# sourceMappingURL=driver.zod.d.ts.map