@objectstack/spec 0.3.2 → 0.4.1

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 (523) 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 +54 -54
  4. package/dist/ai/cost.zod.d.ts +135 -135
  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 +91 -91
  9. package/dist/ai/nlq.zod.d.ts +72 -72
  10. package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +51 -50
  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 +27 -27
  14. package/dist/ai/rag-pipeline.zod.d.ts +102 -102
  15. package/dist/api/contract.zod.d.ts +213 -197
  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 +6 -0
  24. package/dist/api/index.d.ts.map +1 -1
  25. package/dist/api/index.js +6 -0
  26. package/dist/api/odata.zod.d.ts +482 -0
  27. package/dist/api/odata.zod.d.ts.map +1 -0
  28. package/dist/api/odata.zod.js +401 -0
  29. package/dist/{system → api}/realtime.zod.d.ts +4 -4
  30. package/dist/api/realtime.zod.d.ts.map +1 -0
  31. package/dist/api/router.zod.d.ts +182 -0
  32. package/dist/api/router.zod.d.ts.map +1 -0
  33. package/dist/api/router.zod.js +103 -0
  34. package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +199 -199
  35. package/dist/auth/config.zod.d.ts.map +1 -0
  36. package/dist/{system → auth}/identity.zod.d.ts +8 -8
  37. package/dist/auth/identity.zod.d.ts.map +1 -0
  38. package/dist/auth/index.d.ts +8 -0
  39. package/dist/auth/index.d.ts.map +1 -0
  40. package/dist/auth/index.js +23 -0
  41. package/dist/{system → auth}/organization.zod.d.ts +7 -7
  42. package/dist/auth/organization.zod.d.ts.map +1 -0
  43. package/dist/{system → auth}/policy.zod.d.ts +3 -3
  44. package/dist/auth/policy.zod.d.ts.map +1 -0
  45. package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
  46. package/dist/auth/protocol.d.ts.map +1 -0
  47. package/dist/{system → auth}/role.zod.d.ts +14 -0
  48. package/dist/auth/role.zod.d.ts.map +1 -0
  49. package/dist/{system → auth}/role.zod.js +16 -1
  50. package/dist/auth/scim.zod.d.ts +2732 -0
  51. package/dist/auth/scim.zod.d.ts.map +1 -0
  52. package/dist/auth/scim.zod.js +811 -0
  53. package/dist/automation/approval.zod.d.ts +643 -0
  54. package/dist/automation/approval.zod.d.ts.map +1 -0
  55. package/dist/automation/approval.zod.js +84 -0
  56. package/dist/automation/connector.zod.d.ts +1284 -0
  57. package/dist/automation/connector.zod.d.ts.map +1 -0
  58. package/dist/automation/connector.zod.js +500 -0
  59. package/dist/automation/etl.zod.d.ts +623 -0
  60. package/dist/automation/etl.zod.d.ts.map +1 -0
  61. package/dist/automation/etl.zod.js +359 -0
  62. package/dist/{data → automation}/flow.zod.d.ts +40 -22
  63. package/dist/automation/flow.zod.d.ts.map +1 -0
  64. package/dist/{data → automation}/flow.zod.js +6 -1
  65. package/dist/automation/index.d.ts +8 -0
  66. package/dist/automation/index.d.ts.map +1 -0
  67. package/dist/automation/index.js +23 -0
  68. package/dist/automation/sync.zod.d.ts +854 -0
  69. package/dist/automation/sync.zod.d.ts.map +1 -0
  70. package/dist/automation/sync.zod.js +444 -0
  71. package/dist/{system → automation}/webhook.zod.d.ts +26 -3
  72. package/dist/automation/webhook.zod.d.ts.map +1 -0
  73. package/dist/{system → automation}/webhook.zod.js +27 -3
  74. package/dist/automation/workflow.zod.d.ts +2059 -0
  75. package/dist/automation/workflow.zod.d.ts.map +1 -0
  76. package/dist/{data → automation}/workflow.zod.js +40 -2
  77. package/dist/data/dataset.zod.d.ts +2 -2
  78. package/dist/data/field.zod.d.ts +779 -219
  79. package/dist/data/field.zod.d.ts.map +1 -1
  80. package/dist/data/field.zod.js +128 -16
  81. package/dist/data/filter.zod.d.ts +167 -30
  82. package/dist/data/filter.zod.d.ts.map +1 -1
  83. package/dist/data/filter.zod.js +25 -13
  84. package/dist/data/hook.zod.d.ts +191 -0
  85. package/dist/data/hook.zod.d.ts.map +1 -0
  86. package/dist/data/hook.zod.js +144 -0
  87. package/dist/data/index.d.ts +4 -17
  88. package/dist/data/index.d.ts.map +1 -1
  89. package/dist/data/index.js +4 -17
  90. package/dist/data/mapping.zod.d.ts +117 -93
  91. package/dist/data/mapping.zod.d.ts.map +1 -1
  92. package/dist/data/mapping.zod.js +16 -3
  93. package/dist/data/object.zod.d.ts +485 -131
  94. package/dist/data/object.zod.d.ts.map +1 -1
  95. package/dist/data/object.zod.js +87 -42
  96. package/dist/data/query.zod.d.ts +98 -169
  97. package/dist/data/query.zod.d.ts.map +1 -1
  98. package/dist/data/query.zod.js +42 -130
  99. package/dist/data/validation.zod.d.ts +166 -26
  100. package/dist/data/validation.zod.d.ts.map +1 -1
  101. package/dist/data/validation.zod.js +38 -16
  102. package/dist/hub/composer.zod.d.ts +871 -0
  103. package/dist/hub/composer.zod.d.ts.map +1 -0
  104. package/dist/hub/composer.zod.js +111 -0
  105. package/dist/hub/index.d.ts +6 -0
  106. package/dist/hub/index.d.ts.map +1 -0
  107. package/dist/hub/index.js +22 -0
  108. package/dist/{system → hub}/license.zod.d.ts +13 -9
  109. package/dist/hub/license.zod.d.ts.map +1 -0
  110. package/dist/{system → hub}/license.zod.js +5 -3
  111. package/dist/hub/marketplace.zod.d.ts +191 -0
  112. package/dist/hub/marketplace.zod.d.ts.map +1 -0
  113. package/dist/hub/marketplace.zod.js +85 -0
  114. package/dist/hub/space.zod.d.ts +383 -0
  115. package/dist/hub/space.zod.d.ts.map +1 -0
  116. package/dist/hub/space.zod.js +103 -0
  117. package/dist/{system → hub}/tenant.zod.d.ts +73 -47
  118. package/dist/hub/tenant.zod.d.ts.map +1 -0
  119. package/dist/{system → hub}/tenant.zod.js +36 -10
  120. package/dist/index.d.ts +11 -4
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +15 -5
  123. package/dist/permission/index.d.ts +14 -0
  124. package/dist/permission/index.d.ts.map +1 -0
  125. package/dist/permission/index.js +29 -0
  126. package/dist/{data → permission}/permission.zod.d.ts +48 -3
  127. package/dist/permission/permission.zod.d.ts.map +1 -0
  128. package/dist/{data → permission}/permission.zod.js +26 -2
  129. package/dist/permission/rls.zod.d.ts +605 -0
  130. package/dist/permission/rls.zod.d.ts.map +1 -0
  131. package/dist/permission/rls.zod.js +615 -0
  132. package/dist/permission/sharing.zod.d.ts +146 -0
  133. package/dist/permission/sharing.zod.d.ts.map +1 -0
  134. package/dist/permission/sharing.zod.js +88 -0
  135. package/dist/{system → permission}/territory.zod.d.ts +13 -0
  136. package/dist/permission/territory.zod.d.ts.map +1 -0
  137. package/dist/{system → permission}/territory.zod.js +15 -1
  138. package/dist/shared/identifiers.zod.d.ts +87 -0
  139. package/dist/shared/identifiers.zod.d.ts.map +1 -0
  140. package/dist/shared/identifiers.zod.js +101 -0
  141. package/dist/shared/index.d.ts +6 -0
  142. package/dist/shared/index.d.ts.map +1 -0
  143. package/dist/shared/index.js +21 -0
  144. package/dist/stack.zod.d.ts +19869 -0
  145. package/dist/stack.zod.d.ts.map +1 -0
  146. package/dist/stack.zod.js +248 -0
  147. package/dist/system/audit.zod.d.ts +58 -58
  148. package/dist/system/context.zod.d.ts +56 -0
  149. package/dist/system/context.zod.d.ts.map +1 -0
  150. package/dist/system/context.zod.js +43 -0
  151. package/dist/system/datasource.zod.d.ts +40 -6
  152. package/dist/system/datasource.zod.d.ts.map +1 -1
  153. package/dist/system/datasource.zod.js +17 -13
  154. package/dist/system/driver/mongo.zod.d.ts +107 -0
  155. package/dist/system/driver/mongo.zod.d.ts.map +1 -0
  156. package/dist/system/driver/mongo.zod.js +80 -0
  157. package/dist/system/driver/postgres.zod.d.ts +134 -0
  158. package/dist/system/driver/postgres.zod.d.ts.map +1 -0
  159. package/dist/system/driver/postgres.zod.js +88 -0
  160. package/dist/system/driver.zod.d.ts +2249 -488
  161. package/dist/system/driver.zod.d.ts.map +1 -1
  162. package/dist/system/driver.zod.js +99 -0
  163. package/dist/system/events.zod.d.ts +8 -5
  164. package/dist/system/events.zod.d.ts.map +1 -1
  165. package/dist/system/events.zod.js +5 -1
  166. package/dist/system/feature.zod.d.ts +131 -0
  167. package/dist/system/feature.zod.d.ts.map +1 -0
  168. package/dist/system/feature.zod.js +45 -0
  169. package/dist/system/index.d.ts +11 -20
  170. package/dist/system/index.d.ts.map +1 -1
  171. package/dist/system/index.js +15 -20
  172. package/dist/system/job.zod.d.ts +5 -5
  173. package/dist/system/logger.zod.d.ts +111 -0
  174. package/dist/system/logger.zod.d.ts.map +1 -0
  175. package/dist/system/logger.zod.js +75 -0
  176. package/dist/system/manifest.zod.d.ts +136 -18
  177. package/dist/system/manifest.zod.d.ts.map +1 -1
  178. package/dist/system/manifest.zod.js +28 -0
  179. package/dist/system/plugin.zod.d.ts +598 -318
  180. package/dist/system/plugin.zod.d.ts.map +1 -1
  181. package/dist/system/plugin.zod.js +13 -0
  182. package/dist/system/scoped-storage.zod.d.ts +81 -0
  183. package/dist/system/scoped-storage.zod.d.ts.map +1 -0
  184. package/dist/system/scoped-storage.zod.js +66 -0
  185. package/dist/ui/action.zod.d.ts +42 -17
  186. package/dist/ui/action.zod.d.ts.map +1 -1
  187. package/dist/ui/action.zod.js +30 -1
  188. package/dist/ui/app.zod.d.ts +26 -11
  189. package/dist/ui/app.zod.d.ts.map +1 -1
  190. package/dist/ui/app.zod.js +32 -4
  191. package/dist/ui/block.zod.d.ts +265 -0
  192. package/dist/ui/block.zod.d.ts.map +1 -0
  193. package/dist/ui/block.zod.js +90 -0
  194. package/dist/ui/component.zod.d.ts +265 -0
  195. package/dist/ui/component.zod.d.ts.map +1 -0
  196. package/dist/ui/component.zod.js +90 -0
  197. package/dist/ui/dashboard.zod.d.ts +15 -15
  198. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  199. package/dist/ui/dashboard.zod.js +18 -8
  200. package/dist/ui/index.d.ts +1 -0
  201. package/dist/ui/index.d.ts.map +1 -1
  202. package/dist/ui/index.js +1 -0
  203. package/dist/ui/page.zod.d.ts +23 -5
  204. package/dist/ui/page.zod.d.ts.map +1 -1
  205. package/dist/ui/page.zod.js +37 -4
  206. package/dist/ui/report.zod.d.ts +12 -12
  207. package/dist/ui/theme.zod.d.ts +42 -42
  208. package/dist/ui/view.zod.d.ts +302 -290
  209. package/dist/ui/view.zod.d.ts.map +1 -1
  210. package/dist/ui/view.zod.js +32 -3
  211. package/dist/ui/widget.zod.d.ts +730 -29
  212. package/dist/ui/widget.zod.d.ts.map +1 -1
  213. package/dist/ui/widget.zod.js +294 -1
  214. package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
  215. package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
  216. package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
  217. package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
  218. package/json-schema/{system → api}/ApiEndpoint.json +3 -1
  219. package/json-schema/{system → api}/ApiRoutes.json +7 -7
  220. package/json-schema/{system → api}/Discovery.json +7 -7
  221. package/json-schema/api/ExportRequest.json +402 -438
  222. package/json-schema/{system → api}/HttpMethod.json +3 -1
  223. package/json-schema/api/ODataError.json +65 -0
  224. package/json-schema/api/ODataFilterFunction.json +39 -0
  225. package/json-schema/api/ODataFilterOperator.json +24 -0
  226. package/json-schema/api/ODataMetadata.json +115 -0
  227. package/json-schema/api/ODataQuery.json +89 -0
  228. package/json-schema/api/ODataResponse.json +37 -0
  229. package/json-schema/api/RouteCategory.json +17 -0
  230. package/json-schema/api/RouteDefinition.json +77 -0
  231. package/json-schema/api/RouterConfig.json +117 -0
  232. package/json-schema/{system → auth}/Role.json +3 -2
  233. package/json-schema/auth/SCIMAddress.json +50 -0
  234. package/json-schema/auth/SCIMEmail.json +38 -0
  235. package/json-schema/auth/SCIMEnterpriseUser.json +55 -0
  236. package/json-schema/auth/SCIMError.json +52 -0
  237. package/json-schema/auth/SCIMGroup.json +102 -0
  238. package/json-schema/auth/SCIMGroupReference.json +36 -0
  239. package/json-schema/auth/SCIMListResponse.json +606 -0
  240. package/json-schema/auth/SCIMMemberReference.json +36 -0
  241. package/json-schema/auth/SCIMMeta.json +35 -0
  242. package/json-schema/auth/SCIMName.json +36 -0
  243. package/json-schema/auth/SCIMPatchOperation.json +31 -0
  244. package/json-schema/auth/SCIMPatchRequest.json +56 -0
  245. package/json-schema/auth/SCIMPhoneNumber.json +40 -0
  246. package/json-schema/auth/SCIMUser.json +462 -0
  247. package/json-schema/automation/ApprovalAction.json +35 -0
  248. package/json-schema/automation/ApprovalActionType.json +15 -0
  249. package/json-schema/automation/ApprovalProcess.json +326 -0
  250. package/json-schema/automation/ApprovalStep.json +147 -0
  251. package/json-schema/automation/ApproverType.json +16 -0
  252. package/json-schema/automation/AuthField.json +73 -0
  253. package/json-schema/automation/Authentication.json +159 -0
  254. package/json-schema/automation/AuthenticationType.json +18 -0
  255. package/json-schema/automation/ConflictResolution.json +16 -0
  256. package/json-schema/automation/Connector.json +440 -0
  257. package/json-schema/automation/ConnectorCategory.json +26 -0
  258. package/json-schema/automation/ConnectorInstance.json +69 -0
  259. package/json-schema/automation/ConnectorOperation.json +117 -0
  260. package/json-schema/automation/ConnectorTrigger.json +54 -0
  261. package/json-schema/automation/DataDestinationConfig.json +89 -0
  262. package/json-schema/automation/DataSourceConfig.json +34 -0
  263. package/json-schema/automation/DataSyncConfig.json +355 -0
  264. package/json-schema/automation/ETLDestination.json +57 -0
  265. package/json-schema/automation/ETLEndpointType.json +19 -0
  266. package/json-schema/automation/ETLPipeline.json +252 -0
  267. package/json-schema/automation/ETLPipelineRun.json +107 -0
  268. package/json-schema/automation/ETLRunStatus.json +17 -0
  269. package/json-schema/automation/ETLSource.json +60 -0
  270. package/json-schema/{data/LogicOperator.json → automation/ETLSyncMode.json} +5 -5
  271. package/json-schema/automation/ETLTransformation.json +46 -0
  272. package/json-schema/automation/ETLTransformationType.json +21 -0
  273. package/json-schema/automation/FieldMapping.json +36 -0
  274. package/json-schema/{data → automation}/Flow.json +31 -1
  275. package/json-schema/{data → automation}/FlowEdge.json +9 -0
  276. package/json-schema/automation/OAuth2Config.json +43 -0
  277. package/json-schema/automation/OperationParameter.json +59 -0
  278. package/json-schema/automation/OperationType.json +17 -0
  279. package/json-schema/automation/SyncDirection.json +14 -0
  280. package/json-schema/automation/SyncExecutionResult.json +135 -0
  281. package/json-schema/automation/SyncExecutionStatus.json +17 -0
  282. package/json-schema/{data/TriggerTiming.json → automation/SyncMode.json} +5 -4
  283. package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
  284. package/json-schema/{system → automation}/Webhook.json +3 -1
  285. package/json-schema/{system → automation}/WebhookReceiver.json +3 -1
  286. package/json-schema/automation/WorkflowRule.json +1032 -0
  287. package/json-schema/data/AggregationNode.json +23 -0
  288. package/json-schema/data/AsyncValidation.json +49 -2
  289. package/json-schema/data/ComparisonOperator.json +52 -0
  290. package/json-schema/data/ConditionalValidation.json +693 -46
  291. package/json-schema/data/CrossFieldValidation.json +33 -2
  292. package/json-schema/data/CurrencyConfig.json +35 -0
  293. package/json-schema/data/CurrencyValue.json +26 -0
  294. package/json-schema/data/CustomValidator.json +37 -10
  295. package/json-schema/data/Field.json +92 -4
  296. package/json-schema/data/FieldOperators.json +78 -0
  297. package/json-schema/data/FieldReference.json +19 -0
  298. package/json-schema/data/FieldType.json +12 -2
  299. package/json-schema/data/FormatValidation.json +33 -2
  300. package/json-schema/data/Hook.json +95 -0
  301. package/json-schema/data/HookContext.json +88 -0
  302. package/json-schema/data/HookEvent.json +29 -0
  303. package/json-schema/data/Index.json +10 -0
  304. package/json-schema/data/JSONValidation.json +85 -0
  305. package/json-schema/data/JoinNode.json +197 -213
  306. package/json-schema/data/JoinStrategy.json +15 -0
  307. package/json-schema/data/NormalizedFilter.json +234 -0
  308. package/json-schema/data/Object.json +1642 -32
  309. package/json-schema/data/ObjectCapabilities.json +30 -12
  310. package/json-schema/data/Query.json +246 -262
  311. package/json-schema/data/RangeOperator.json +26 -0
  312. package/json-schema/data/ScriptValidation.json +33 -2
  313. package/json-schema/data/SearchConfig.json +36 -0
  314. package/json-schema/data/SelectOption.json +4 -2
  315. package/json-schema/data/StateMachineValidation.json +33 -2
  316. package/json-schema/data/UniquenessValidation.json +33 -2
  317. package/json-schema/data/ValidationRule.json +693 -46
  318. package/json-schema/data/VectorConfig.json +51 -0
  319. package/json-schema/hub/BillOfMaterials.json +70 -0
  320. package/json-schema/hub/ComposerRequest.json +86 -0
  321. package/json-schema/hub/ComposerResponse.json +483 -0
  322. package/json-schema/hub/ConflictReport.json +53 -0
  323. package/json-schema/hub/DependencyRequirement.json +36 -0
  324. package/json-schema/hub/DeploymentTarget.json +38 -0
  325. package/json-schema/hub/HubSpace.json +279 -0
  326. package/json-schema/{system → hub}/License.json +11 -3
  327. package/json-schema/hub/MarketplacePlugin.json +141 -0
  328. package/json-schema/hub/PluginAuthor.json +26 -0
  329. package/json-schema/hub/PluginPricing.json +43 -0
  330. package/json-schema/hub/SpaceSubscription.json +77 -0
  331. package/json-schema/hub/SubscriptionStatus.json +16 -0
  332. package/json-schema/{system → hub}/Tenant.json +3 -5
  333. package/json-schema/permission/CriteriaSharingRule.json +82 -0
  334. package/json-schema/{data → permission}/OWDModel.json +2 -1
  335. package/json-schema/{data → permission}/ObjectPermission.json +15 -0
  336. package/json-schema/permission/OwnerSharingRule.json +102 -0
  337. package/json-schema/{data → permission}/PermissionSet.json +18 -1
  338. package/json-schema/permission/RLSConfig.json +59 -0
  339. package/json-schema/permission/RLSEvaluationResult.json +40 -0
  340. package/json-schema/{data/TriggerAction.json → permission/RLSOperation.json} +5 -3
  341. package/json-schema/permission/RLSUserContext.json +51 -0
  342. package/json-schema/permission/RowLevelSecurityPolicy.json +77 -0
  343. package/json-schema/permission/ShareRecipientType.json +16 -0
  344. package/json-schema/{data → permission}/SharingLevel.json +2 -1
  345. package/json-schema/permission/SharingRule.json +182 -0
  346. package/json-schema/{data → permission}/SharingRuleType.json +1 -3
  347. package/json-schema/{system → permission}/Territory.json +3 -1
  348. package/json-schema/shared/EventName.json +12 -0
  349. package/json-schema/shared/SnakeCaseIdentifier.json +12 -0
  350. package/json-schema/shared/SystemIdentifier.json +12 -0
  351. package/json-schema/system/Datasource.json +35 -0
  352. package/json-schema/system/DriverCapabilities.json +10 -0
  353. package/json-schema/system/DriverInterface.json +10 -0
  354. package/json-schema/system/DriverOptions.json +11 -0
  355. package/json-schema/system/Event.json +3 -2
  356. package/json-schema/system/FeatureFlag.json +87 -0
  357. package/json-schema/system/FeatureStrategy.json +16 -0
  358. package/json-schema/system/FileMetadata.json +43 -0
  359. package/json-schema/system/KernelContext.json +62 -0
  360. package/json-schema/system/LogEntry.json +63 -0
  361. package/json-schema/system/LogFormat.json +15 -0
  362. package/json-schema/system/LogLevel.json +17 -0
  363. package/json-schema/system/LoggerConfig.json +70 -0
  364. package/json-schema/system/Manifest.json +80 -0
  365. package/json-schema/system/MongoConfig.json +82 -0
  366. package/json-schema/system/PluginContext.json +8 -1
  367. package/json-schema/system/PostgresConfig.json +98 -0
  368. package/json-schema/system/RuntimeMode.json +16 -0
  369. package/json-schema/system/ScopedStorageConfig.json +54 -0
  370. package/json-schema/system/StorageAdapterType.json +17 -0
  371. package/json-schema/system/StorageScope.json +18 -0
  372. package/json-schema/ui/Action.json +25 -4
  373. package/json-schema/ui/ActionParam.json +12 -2
  374. package/json-schema/ui/App.json +18 -7
  375. package/json-schema/ui/ChartType.json +9 -1
  376. package/json-schema/ui/Dashboard.json +9 -1
  377. package/json-schema/ui/DashboardNavItem.json +3 -1
  378. package/json-schema/ui/DashboardWidget.json +9 -1
  379. package/json-schema/ui/FieldWidgetProps.json +92 -4
  380. package/json-schema/ui/FormView.json +4 -1
  381. package/json-schema/ui/GroupNavItem.json +3 -1
  382. package/json-schema/ui/ListView.json +7 -1
  383. package/json-schema/ui/NavigationItem.json +15 -5
  384. package/json-schema/ui/ObjectNavItem.json +3 -1
  385. package/json-schema/ui/Page.json +36 -4
  386. package/json-schema/ui/PageCardProps.json +32 -0
  387. package/json-schema/ui/PageComponent.json +33 -3
  388. package/json-schema/ui/PageComponentType.json +32 -0
  389. package/json-schema/ui/PageHeaderProps.json +39 -0
  390. package/json-schema/ui/PageNavItem.json +3 -1
  391. package/json-schema/ui/PageRegion.json +33 -3
  392. package/json-schema/ui/PageTabsProps.json +55 -0
  393. package/json-schema/ui/RecordDetailsProps.json +37 -0
  394. package/json-schema/ui/RecordHighlightsProps.json +24 -0
  395. package/json-schema/ui/RecordRelatedListProps.json +39 -0
  396. package/json-schema/ui/UrlNavItem.json +3 -1
  397. package/json-schema/ui/View.json +22 -4
  398. package/json-schema/ui/WidgetEvent.json +42 -0
  399. package/json-schema/ui/WidgetLifecycle.json +40 -0
  400. package/json-schema/ui/WidgetManifest.json +262 -0
  401. package/json-schema/ui/WidgetProperty.json +58 -0
  402. package/llms.txt +182 -0
  403. package/package.json +38 -16
  404. package/prompts/README.md +18 -0
  405. package/prompts/architecture.md +81 -0
  406. package/prompts/create-new-project.md +85 -0
  407. package/prompts/implement-objectai.md +39 -0
  408. package/prompts/implement-objectos.md +48 -0
  409. package/prompts/implement-objectql.md +39 -0
  410. package/prompts/implement-objectui.md +46 -0
  411. package/prompts/instructions.md +91 -0
  412. package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
  413. package/dist/data/flow.zod.d.ts.map +0 -1
  414. package/dist/data/permission.zod.d.ts.map +0 -1
  415. package/dist/data/sharing.zod.d.ts +0 -63
  416. package/dist/data/sharing.zod.d.ts.map +0 -1
  417. package/dist/data/sharing.zod.js +0 -57
  418. package/dist/data/trigger.zod.d.ts +0 -354
  419. package/dist/data/trigger.zod.d.ts.map +0 -1
  420. package/dist/data/trigger.zod.js +0 -195
  421. package/dist/data/workflow.zod.d.ts +0 -986
  422. package/dist/data/workflow.zod.d.ts.map +0 -1
  423. package/dist/system/api.zod.d.ts.map +0 -1
  424. package/dist/system/auth-protocol.d.ts.map +0 -1
  425. package/dist/system/auth.zod.d.ts.map +0 -1
  426. package/dist/system/discovery.zod.d.ts.map +0 -1
  427. package/dist/system/identity.zod.d.ts.map +0 -1
  428. package/dist/system/license.zod.d.ts.map +0 -1
  429. package/dist/system/organization.zod.d.ts.map +0 -1
  430. package/dist/system/policy.zod.d.ts.map +0 -1
  431. package/dist/system/realtime.zod.d.ts.map +0 -1
  432. package/dist/system/role.zod.d.ts.map +0 -1
  433. package/dist/system/tenant.zod.d.ts.map +0 -1
  434. package/dist/system/territory.zod.d.ts.map +0 -1
  435. package/dist/system/webhook.zod.d.ts.map +0 -1
  436. package/json-schema/README.md +0 -127
  437. package/json-schema/data/FieldMapping.json +0 -83
  438. package/json-schema/data/FilterNode.json +0 -52
  439. package/json-schema/data/FilterOperator.json +0 -26
  440. package/json-schema/data/Mapping.json +0 -598
  441. package/json-schema/data/SharingRule.json +0 -58
  442. package/json-schema/data/TransformType.json +0 -18
  443. package/json-schema/data/Trigger.json +0 -73
  444. package/json-schema/data/TriggerContext.json +0 -61
  445. /package/dist/{system → api}/realtime.zod.js +0 -0
  446. /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
  447. /package/dist/{system → auth}/identity.zod.js +0 -0
  448. /package/dist/{system → auth}/organization.zod.js +0 -0
  449. /package/dist/{system → auth}/policy.zod.js +0 -0
  450. /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
  451. /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
  452. /package/json-schema/{system → api}/ApiMapping.json +0 -0
  453. /package/json-schema/{system → api}/Presence.json +0 -0
  454. /package/json-schema/{system → api}/PresenceStatus.json +0 -0
  455. /package/json-schema/{system → api}/RateLimit.json +0 -0
  456. /package/json-schema/{system → api}/RealtimeAction.json +0 -0
  457. /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
  458. /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
  459. /package/json-schema/{system → api}/Subscription.json +0 -0
  460. /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
  461. /package/json-schema/{system → api}/TransportProtocol.json +0 -0
  462. /package/json-schema/{system → auth}/Account.json +0 -0
  463. /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
  464. /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
  465. /package/json-schema/{system → auth}/AuthConfig.json +0 -0
  466. /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
  467. /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
  468. /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
  469. /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
  470. /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
  471. /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
  472. /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
  473. /package/json-schema/{system → auth}/Invitation.json +0 -0
  474. /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
  475. /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
  476. /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
  477. /package/json-schema/{system → auth}/Member.json +0 -0
  478. /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
  479. /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
  480. /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
  481. /package/json-schema/{system → auth}/Organization.json +0 -0
  482. /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
  483. /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
  484. /package/json-schema/{system → auth}/Policy.json +0 -0
  485. /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
  486. /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
  487. /package/json-schema/{system → auth}/Session.json +0 -0
  488. /package/json-schema/{system → auth}/SessionConfig.json +0 -0
  489. /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
  490. /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
  491. /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
  492. /package/json-schema/{system → auth}/User.json +0 -0
  493. /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
  494. /package/json-schema/{system → auth}/VerificationToken.json +0 -0
  495. /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
  496. /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
  497. /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
  498. /package/json-schema/{data → automation}/FlowNode.json +0 -0
  499. /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
  500. /package/json-schema/{data → automation}/FlowVariable.json +0 -0
  501. /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
  502. /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
  503. /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
  504. /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
  505. /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
  506. /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
  507. /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
  508. /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
  509. /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
  510. /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
  511. /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
  512. /package/json-schema/{system → hub}/Feature.json +0 -0
  513. /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
  514. /package/json-schema/{system → hub}/MetricType.json +0 -0
  515. /package/json-schema/{system → hub}/Plan.json +0 -0
  516. /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
  517. /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
  518. /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
  519. /package/json-schema/{system → hub}/TenantQuota.json +0 -0
  520. /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
  521. /package/json-schema/{data → permission}/FieldPermission.json +0 -0
  522. /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
  523. /package/json-schema/{system → permission}/TerritoryType.json +0 -0
@@ -17,14 +17,28 @@ export declare const DriverOptionsSchema: z.ZodObject<{
17
17
  * Whether to bypass cache and force a fresh read.
18
18
  */
19
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>;
20
30
  }, "strip", z.ZodTypeAny, {
21
31
  timeout?: number | undefined;
32
+ tenantId?: string | undefined;
22
33
  transaction?: any;
23
34
  skipCache?: boolean | undefined;
35
+ traceContext?: Record<string, string> | undefined;
24
36
  }, {
25
37
  timeout?: number | undefined;
38
+ tenantId?: string | undefined;
26
39
  transaction?: any;
27
40
  skipCache?: boolean | undefined;
41
+ traceContext?: Record<string, string> | undefined;
28
42
  }>;
29
43
  /**
30
44
  * Driver Capabilities Schema
@@ -90,6 +104,15 @@ export declare const DriverCapabilitiesSchema: z.ZodObject<{
90
104
  * If false, arrays will be stored as JSON strings or in separate tables.
91
105
  */
92
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>;
93
116
  }, "strip", z.ZodTypeAny, {
94
117
  joins: boolean;
95
118
  transactions: boolean;
@@ -102,6 +125,8 @@ export declare const DriverCapabilitiesSchema: z.ZodObject<{
102
125
  fullTextSearch: boolean;
103
126
  jsonFields: boolean;
104
127
  arrayFields: boolean;
128
+ vectorSearch: boolean;
129
+ geoSpatial: boolean;
105
130
  }, {
106
131
  joins: boolean;
107
132
  transactions: boolean;
@@ -114,6 +139,8 @@ export declare const DriverCapabilitiesSchema: z.ZodObject<{
114
139
  fullTextSearch: boolean;
115
140
  jsonFields: boolean;
116
141
  arrayFields: boolean;
142
+ vectorSearch?: boolean | undefined;
143
+ geoSpatial?: boolean | undefined;
117
144
  }>;
118
145
  /**
119
146
  * Unified Database Driver Interface
@@ -191,6 +218,15 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
191
218
  * If false, arrays will be stored as JSON strings or in separate tables.
192
219
  */
193
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>;
194
230
  }, "strip", z.ZodTypeAny, {
195
231
  joins: boolean;
196
232
  transactions: boolean;
@@ -203,6 +239,8 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
203
239
  fullTextSearch: boolean;
204
240
  jsonFields: boolean;
205
241
  arrayFields: boolean;
242
+ vectorSearch: boolean;
243
+ geoSpatial: boolean;
206
244
  }, {
207
245
  joins: boolean;
208
246
  transactions: boolean;
@@ -215,6 +253,8 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
215
253
  fullTextSearch: boolean;
216
254
  jsonFields: boolean;
217
255
  arrayFields: boolean;
256
+ vectorSearch?: boolean | undefined;
257
+ geoSpatial?: boolean | undefined;
218
258
  }>;
219
259
  /**
220
260
  * Initialize connection pool or authenticate.
@@ -229,6 +269,26 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
229
269
  * @returns true if healthy, false otherwise.
230
270
  */
231
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
+ }>>>>;
232
292
  /**
233
293
  * Execute a raw command/query native to the driver.
234
294
  * Useful for complex reports, stored procedures, or DDL not covered by standard sync.
@@ -259,14 +319,28 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
259
319
  * Whether to bypass cache and force a fresh read.
260
320
  */
261
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>;
262
332
  }, "strip", z.ZodTypeAny, {
263
333
  timeout?: number | undefined;
334
+ tenantId?: string | undefined;
264
335
  transaction?: any;
265
336
  skipCache?: boolean | undefined;
337
+ traceContext?: Record<string, string> | undefined;
266
338
  }, {
267
339
  timeout?: number | undefined;
340
+ tenantId?: string | undefined;
268
341
  transaction?: any;
269
342
  skipCache?: boolean | undefined;
343
+ traceContext?: Record<string, string> | undefined;
270
344
  }>>], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
271
345
  /**
272
346
  * Find multiple records matching the structured query.
@@ -289,22 +363,42 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
289
363
  find: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
290
364
  object: z.ZodString;
291
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">>;
292
381
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
293
382
  function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
294
383
  field: z.ZodOptional<z.ZodString>;
295
384
  alias: z.ZodString;
296
385
  distinct: z.ZodOptional<z.ZodBoolean>;
386
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
297
387
  }, "strip", z.ZodTypeAny, {
298
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
388
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
299
389
  alias: string;
390
+ filter?: import("../data").FilterCondition | undefined;
300
391
  field?: string | undefined;
301
392
  distinct?: boolean | undefined;
302
393
  }, {
303
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
394
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
304
395
  alias: string;
396
+ filter?: import("../data").FilterCondition | undefined;
305
397
  field?: string | undefined;
306
398
  distinct?: boolean | undefined;
307
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>>;
308
402
  windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
309
403
  function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
310
404
  field: z.ZodOptional<z.ZodString>;
@@ -335,22 +429,22 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
335
429
  end?: string | undefined;
336
430
  }>>;
337
431
  }, "strip", z.ZodTypeAny, {
338
- partitionBy?: string[] | undefined;
339
432
  orderBy?: {
340
433
  field: string;
341
434
  order: "asc" | "desc";
342
435
  }[] | undefined;
436
+ partitionBy?: string[] | undefined;
343
437
  frame?: {
344
438
  type?: "rows" | "range" | undefined;
345
439
  start?: string | undefined;
346
440
  end?: string | undefined;
347
441
  } | undefined;
348
442
  }, {
349
- partitionBy?: string[] | undefined;
350
443
  orderBy?: {
351
444
  field: string;
352
445
  order?: "asc" | "desc" | undefined;
353
446
  }[] | undefined;
447
+ partitionBy?: string[] | undefined;
354
448
  frame?: {
355
449
  type?: "rows" | "range" | undefined;
356
450
  start?: string | undefined;
@@ -358,14 +452,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
358
452
  } | undefined;
359
453
  }>;
360
454
  }, "strip", z.ZodTypeAny, {
361
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
455
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
362
456
  alias: string;
363
457
  over: {
364
- partitionBy?: string[] | undefined;
365
458
  orderBy?: {
366
459
  field: string;
367
460
  order: "asc" | "desc";
368
461
  }[] | undefined;
462
+ partitionBy?: string[] | undefined;
369
463
  frame?: {
370
464
  type?: "rows" | "range" | undefined;
371
465
  start?: string | undefined;
@@ -374,14 +468,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
374
468
  };
375
469
  field?: string | undefined;
376
470
  }, {
377
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
471
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
378
472
  alias: string;
379
473
  over: {
380
- partitionBy?: string[] | undefined;
381
474
  orderBy?: {
382
475
  field: string;
383
476
  order?: "asc" | "desc" | undefined;
384
477
  }[] | undefined;
478
+ partitionBy?: string[] | undefined;
385
479
  frame?: {
386
480
  type?: "rows" | "range" | undefined;
387
481
  start?: string | undefined;
@@ -390,46 +484,38 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
390
484
  };
391
485
  field?: string | undefined;
392
486
  }>, "many">>;
393
- filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
394
- joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
395
- groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
396
- having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
397
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
398
- field: z.ZodString;
399
- order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
400
- }, "strip", z.ZodTypeAny, {
401
- field: string;
402
- order: "asc" | "desc";
403
- }, {
404
- field: string;
405
- order?: "asc" | "desc" | undefined;
406
- }>, "many">>;
407
- top: z.ZodOptional<z.ZodNumber>;
408
- skip: z.ZodOptional<z.ZodNumber>;
409
487
  distinct: z.ZodOptional<z.ZodBoolean>;
410
488
  }, "strip", z.ZodTypeAny, {
411
489
  object: string;
412
- sort?: {
490
+ where?: import("../data").FilterCondition | undefined;
491
+ distinct?: boolean | undefined;
492
+ fields?: any[] | undefined;
493
+ orderBy?: {
413
494
  field: string;
414
495
  order: "asc" | "desc";
415
496
  }[] | undefined;
416
- fields?: any[] | undefined;
417
- distinct?: boolean | undefined;
497
+ limit?: number | undefined;
498
+ offset?: number | undefined;
499
+ cursor?: Record<string, any> | undefined;
500
+ joins?: any[] | undefined;
418
501
  aggregations?: {
419
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
502
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
420
503
  alias: string;
504
+ filter?: import("../data").FilterCondition | undefined;
421
505
  field?: string | undefined;
422
506
  distinct?: boolean | undefined;
423
507
  }[] | undefined;
508
+ groupBy?: string[] | undefined;
509
+ having?: import("../data").FilterCondition | undefined;
424
510
  windowFunctions?: {
425
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
511
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
426
512
  alias: string;
427
513
  over: {
428
- partitionBy?: string[] | undefined;
429
514
  orderBy?: {
430
515
  field: string;
431
516
  order: "asc" | "desc";
432
517
  }[] | undefined;
518
+ partitionBy?: string[] | undefined;
433
519
  frame?: {
434
520
  type?: "rows" | "range" | undefined;
435
521
  start?: string | undefined;
@@ -438,35 +524,37 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
438
524
  };
439
525
  field?: string | undefined;
440
526
  }[] | undefined;
441
- filters?: any;
442
- joins?: any[] | undefined;
443
- groupBy?: string[] | undefined;
444
- having?: any;
445
- top?: number | undefined;
446
- skip?: number | undefined;
447
527
  }, {
448
528
  object: string;
449
- sort?: {
529
+ where?: import("../data").FilterCondition | undefined;
530
+ distinct?: boolean | undefined;
531
+ fields?: any[] | undefined;
532
+ orderBy?: {
450
533
  field: string;
451
534
  order?: "asc" | "desc" | undefined;
452
535
  }[] | undefined;
453
- fields?: any[] | undefined;
454
- distinct?: boolean | undefined;
536
+ limit?: number | undefined;
537
+ offset?: number | undefined;
538
+ cursor?: Record<string, any> | undefined;
539
+ joins?: any[] | undefined;
455
540
  aggregations?: {
456
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
541
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
457
542
  alias: string;
543
+ filter?: import("../data").FilterCondition | undefined;
458
544
  field?: string | undefined;
459
545
  distinct?: boolean | undefined;
460
546
  }[] | undefined;
547
+ groupBy?: string[] | undefined;
548
+ having?: import("../data").FilterCondition | undefined;
461
549
  windowFunctions?: {
462
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
550
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
463
551
  alias: string;
464
552
  over: {
465
- partitionBy?: string[] | undefined;
466
553
  orderBy?: {
467
554
  field: string;
468
555
  order?: "asc" | "desc" | undefined;
469
556
  }[] | undefined;
557
+ partitionBy?: string[] | undefined;
470
558
  frame?: {
471
559
  type?: "rows" | "range" | undefined;
472
560
  start?: string | undefined;
@@ -475,12 +563,6 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
475
563
  };
476
564
  field?: string | undefined;
477
565
  }[] | undefined;
478
- filters?: any;
479
- joins?: any[] | undefined;
480
- groupBy?: string[] | undefined;
481
- having?: any;
482
- top?: number | undefined;
483
- skip?: number | undefined;
484
566
  }>, z.ZodOptional<z.ZodObject<{
485
567
  /**
486
568
  * Transaction handle/identifier.
@@ -495,44 +577,77 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
495
577
  * Whether to bypass cache and force a fresh read.
496
578
  */
497
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>;
498
590
  }, "strip", z.ZodTypeAny, {
499
591
  timeout?: number | undefined;
592
+ tenantId?: string | undefined;
500
593
  transaction?: any;
501
594
  skipCache?: boolean | undefined;
595
+ traceContext?: Record<string, string> | undefined;
502
596
  }, {
503
597
  timeout?: number | undefined;
598
+ tenantId?: string | undefined;
504
599
  transaction?: any;
505
600
  skipCache?: boolean | undefined;
601
+ traceContext?: Record<string, string> | undefined;
506
602
  }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
507
603
  /**
508
- * Find a single record by query.
509
- * Similar to find(), but returns only the first match or null.
604
+ * Stream records matching the structured query.
605
+ * Optimized for large datasets to avoid memory overflow.
510
606
  *
511
607
  * @param object - The name of the object.
512
- * @param query - QueryAST.
608
+ * @param query - The structured QueryAST.
513
609
  * @param options - Driver options.
514
- * @returns The record or null.
515
- * MUST return `id` as string. MUST NOT return implementation details like `_id`.
610
+ * @returns AsyncIterable/ReadableStream of records.
516
611
  */
517
- findOne: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
612
+ findStream: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
518
613
  object: z.ZodString;
519
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">>;
520
630
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
521
631
  function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
522
632
  field: z.ZodOptional<z.ZodString>;
523
633
  alias: z.ZodString;
524
634
  distinct: z.ZodOptional<z.ZodBoolean>;
635
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
525
636
  }, "strip", z.ZodTypeAny, {
526
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
637
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
527
638
  alias: string;
639
+ filter?: import("../data").FilterCondition | undefined;
528
640
  field?: string | undefined;
529
641
  distinct?: boolean | undefined;
530
642
  }, {
531
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
643
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
532
644
  alias: string;
645
+ filter?: import("../data").FilterCondition | undefined;
533
646
  field?: string | undefined;
534
647
  distinct?: boolean | undefined;
535
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>>;
536
651
  windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
537
652
  function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
538
653
  field: z.ZodOptional<z.ZodString>;
@@ -563,22 +678,22 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
563
678
  end?: string | undefined;
564
679
  }>>;
565
680
  }, "strip", z.ZodTypeAny, {
566
- partitionBy?: string[] | undefined;
567
681
  orderBy?: {
568
682
  field: string;
569
683
  order: "asc" | "desc";
570
684
  }[] | undefined;
685
+ partitionBy?: string[] | undefined;
571
686
  frame?: {
572
687
  type?: "rows" | "range" | undefined;
573
688
  start?: string | undefined;
574
689
  end?: string | undefined;
575
690
  } | undefined;
576
691
  }, {
577
- partitionBy?: string[] | undefined;
578
692
  orderBy?: {
579
693
  field: string;
580
694
  order?: "asc" | "desc" | undefined;
581
695
  }[] | undefined;
696
+ partitionBy?: string[] | undefined;
582
697
  frame?: {
583
698
  type?: "rows" | "range" | undefined;
584
699
  start?: string | undefined;
@@ -586,14 +701,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
586
701
  } | undefined;
587
702
  }>;
588
703
  }, "strip", z.ZodTypeAny, {
589
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
704
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
590
705
  alias: string;
591
706
  over: {
592
- partitionBy?: string[] | undefined;
593
707
  orderBy?: {
594
708
  field: string;
595
709
  order: "asc" | "desc";
596
710
  }[] | undefined;
711
+ partitionBy?: string[] | undefined;
597
712
  frame?: {
598
713
  type?: "rows" | "range" | undefined;
599
714
  start?: string | undefined;
@@ -602,14 +717,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
602
717
  };
603
718
  field?: string | undefined;
604
719
  }, {
605
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
720
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
606
721
  alias: string;
607
722
  over: {
608
- partitionBy?: string[] | undefined;
609
723
  orderBy?: {
610
724
  field: string;
611
725
  order?: "asc" | "desc" | undefined;
612
726
  }[] | undefined;
727
+ partitionBy?: string[] | undefined;
613
728
  frame?: {
614
729
  type?: "rows" | "range" | undefined;
615
730
  start?: string | undefined;
@@ -618,46 +733,38 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
618
733
  };
619
734
  field?: string | undefined;
620
735
  }>, "many">>;
621
- filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
622
- joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
623
- groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
624
- having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
625
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
626
- field: z.ZodString;
627
- order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
628
- }, "strip", z.ZodTypeAny, {
629
- field: string;
630
- order: "asc" | "desc";
631
- }, {
632
- field: string;
633
- order?: "asc" | "desc" | undefined;
634
- }>, "many">>;
635
- top: z.ZodOptional<z.ZodNumber>;
636
- skip: z.ZodOptional<z.ZodNumber>;
637
736
  distinct: z.ZodOptional<z.ZodBoolean>;
638
737
  }, "strip", z.ZodTypeAny, {
639
738
  object: string;
640
- sort?: {
739
+ where?: import("../data").FilterCondition | undefined;
740
+ distinct?: boolean | undefined;
741
+ fields?: any[] | undefined;
742
+ orderBy?: {
641
743
  field: string;
642
744
  order: "asc" | "desc";
643
745
  }[] | undefined;
644
- fields?: any[] | undefined;
645
- distinct?: boolean | undefined;
746
+ limit?: number | undefined;
747
+ offset?: number | undefined;
748
+ cursor?: Record<string, any> | undefined;
749
+ joins?: any[] | undefined;
646
750
  aggregations?: {
647
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
751
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
648
752
  alias: string;
753
+ filter?: import("../data").FilterCondition | undefined;
649
754
  field?: string | undefined;
650
755
  distinct?: boolean | undefined;
651
756
  }[] | undefined;
757
+ groupBy?: string[] | undefined;
758
+ having?: import("../data").FilterCondition | undefined;
652
759
  windowFunctions?: {
653
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
760
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
654
761
  alias: string;
655
762
  over: {
656
- partitionBy?: string[] | undefined;
657
763
  orderBy?: {
658
764
  field: string;
659
765
  order: "asc" | "desc";
660
766
  }[] | undefined;
767
+ partitionBy?: string[] | undefined;
661
768
  frame?: {
662
769
  type?: "rows" | "range" | undefined;
663
770
  start?: string | undefined;
@@ -666,35 +773,37 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
666
773
  };
667
774
  field?: string | undefined;
668
775
  }[] | undefined;
669
- filters?: any;
670
- joins?: any[] | undefined;
671
- groupBy?: string[] | undefined;
672
- having?: any;
673
- top?: number | undefined;
674
- skip?: number | undefined;
675
776
  }, {
676
777
  object: string;
677
- sort?: {
778
+ where?: import("../data").FilterCondition | undefined;
779
+ distinct?: boolean | undefined;
780
+ fields?: any[] | undefined;
781
+ orderBy?: {
678
782
  field: string;
679
783
  order?: "asc" | "desc" | undefined;
680
784
  }[] | undefined;
681
- fields?: any[] | undefined;
682
- distinct?: boolean | undefined;
785
+ limit?: number | undefined;
786
+ offset?: number | undefined;
787
+ cursor?: Record<string, any> | undefined;
788
+ joins?: any[] | undefined;
683
789
  aggregations?: {
684
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
790
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
685
791
  alias: string;
792
+ filter?: import("../data").FilterCondition | undefined;
686
793
  field?: string | undefined;
687
794
  distinct?: boolean | undefined;
688
795
  }[] | undefined;
796
+ groupBy?: string[] | undefined;
797
+ having?: import("../data").FilterCondition | undefined;
689
798
  windowFunctions?: {
690
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
799
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
691
800
  alias: string;
692
801
  over: {
693
- partitionBy?: string[] | undefined;
694
802
  orderBy?: {
695
803
  field: string;
696
804
  order?: "asc" | "desc" | undefined;
697
805
  }[] | undefined;
806
+ partitionBy?: string[] | undefined;
698
807
  frame?: {
699
808
  type?: "rows" | "range" | undefined;
700
809
  start?: string | undefined;
@@ -703,12 +812,6 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
703
812
  };
704
813
  field?: string | undefined;
705
814
  }[] | undefined;
706
- filters?: any;
707
- joins?: any[] | undefined;
708
- groupBy?: string[] | undefined;
709
- having?: any;
710
- top?: number | undefined;
711
- skip?: number | undefined;
712
815
  }>, z.ZodOptional<z.ZodObject<{
713
816
  /**
714
817
  * Transaction handle/identifier.
@@ -723,138 +826,78 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
723
826
  * Whether to bypass cache and force a fresh read.
724
827
  */
725
828
  skipCache: z.ZodOptional<z.ZodBoolean>;
726
- }, "strip", z.ZodTypeAny, {
727
- timeout?: number | undefined;
728
- transaction?: any;
729
- skipCache?: boolean | undefined;
730
- }, {
731
- timeout?: number | undefined;
732
- transaction?: any;
733
- skipCache?: boolean | undefined;
734
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
735
- /**
736
- * Create a new record.
737
- *
738
- * @param object - The object name.
739
- * @param data - Key-value map of field data.
740
- * @param options - Driver options.
741
- * @returns The created record, including server-generated fields (id, created_at, etc.).
742
- * MUST return `id` as string. MUST NOT return implementation details like `_id`.
743
- */
744
- create: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
745
- /**
746
- * Transaction handle/identifier.
747
- * If provided, the operation must run within this transaction.
748
- */
749
- transaction: z.ZodOptional<z.ZodAny>;
750
829
  /**
751
- * Operation timeout in milliseconds.
830
+ * Distributed Tracing Context.
831
+ * Used for passing OpenTelemetry span context or request IDs for observability.
752
832
  */
753
- timeout: z.ZodOptional<z.ZodNumber>;
833
+ traceContext: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
754
834
  /**
755
- * Whether to bypass cache and force a fresh read.
835
+ * Tenant Identifier.
836
+ * For multi-tenant databases (row-level security or schema-per-tenant).
756
837
  */
757
- skipCache: z.ZodOptional<z.ZodBoolean>;
838
+ tenantId: z.ZodOptional<z.ZodString>;
758
839
  }, "strip", z.ZodTypeAny, {
759
840
  timeout?: number | undefined;
841
+ tenantId?: string | undefined;
760
842
  transaction?: any;
761
843
  skipCache?: boolean | undefined;
844
+ traceContext?: Record<string, string> | undefined;
762
845
  }, {
763
846
  timeout?: number | undefined;
847
+ tenantId?: string | undefined;
764
848
  transaction?: any;
765
849
  skipCache?: boolean | undefined;
766
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
850
+ traceContext?: Record<string, string> | undefined;
851
+ }>>], z.ZodUnknown>, z.ZodAny>;
767
852
  /**
768
- * Update an existing record by ID.
853
+ * Find a single record by query.
854
+ * Similar to find(), but returns only the first match or null.
769
855
  *
770
- * @param object - The object name.
771
- * @param id - The unique identifier of the record.
772
- * @param data - The fields to update.
856
+ * @param object - The name of the object.
857
+ * @param query - QueryAST.
773
858
  * @param options - Driver options.
774
- * @returns The updated record.
859
+ * @returns The record or null.
775
860
  * MUST return `id` as string. MUST NOT return implementation details like `_id`.
776
861
  */
777
- update: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
778
- /**
779
- * Transaction handle/identifier.
780
- * If provided, the operation must run within this transaction.
781
- */
782
- transaction: z.ZodOptional<z.ZodAny>;
783
- /**
784
- * Operation timeout in milliseconds.
785
- */
786
- timeout: z.ZodOptional<z.ZodNumber>;
787
- /**
788
- * Whether to bypass cache and force a fresh read.
789
- */
790
- skipCache: z.ZodOptional<z.ZodBoolean>;
791
- }, "strip", z.ZodTypeAny, {
792
- timeout?: number | undefined;
793
- transaction?: any;
794
- skipCache?: boolean | undefined;
795
- }, {
796
- timeout?: number | undefined;
797
- transaction?: any;
798
- skipCache?: boolean | undefined;
799
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
800
- /**
801
- * Delete a record by ID.
802
- *
803
- * @param object - The object name.
804
- * @param id - The unique identifier of the record.
805
- * @param options - Driver options.
806
- * @returns True if deleted, false if not found.
807
- */
808
- delete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodOptional<z.ZodObject<{
809
- /**
810
- * Transaction handle/identifier.
811
- * If provided, the operation must run within this transaction.
812
- */
813
- transaction: z.ZodOptional<z.ZodAny>;
814
- /**
815
- * Operation timeout in milliseconds.
816
- */
817
- timeout: z.ZodOptional<z.ZodNumber>;
818
- /**
819
- * Whether to bypass cache and force a fresh read.
820
- */
821
- skipCache: z.ZodOptional<z.ZodBoolean>;
822
- }, "strip", z.ZodTypeAny, {
823
- timeout?: number | undefined;
824
- transaction?: any;
825
- skipCache?: boolean | undefined;
826
- }, {
827
- timeout?: number | undefined;
828
- transaction?: any;
829
- skipCache?: boolean | undefined;
830
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
831
- /**
832
- * Count records matching a query.
833
- *
834
- * @param object - The object name.
835
- * @param query - Optional filtering criteria.
836
- * @param options - Driver options.
837
- * @returns Total count.
838
- */
839
- count: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
862
+ findOne: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodObject<{
840
863
  object: z.ZodString;
841
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">>;
842
880
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
843
881
  function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
844
882
  field: z.ZodOptional<z.ZodString>;
845
883
  alias: z.ZodString;
846
884
  distinct: z.ZodOptional<z.ZodBoolean>;
885
+ filter: z.ZodOptional<z.ZodType<import("../data").FilterCondition, z.ZodTypeDef, import("../data").FilterCondition>>;
847
886
  }, "strip", z.ZodTypeAny, {
848
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
887
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
849
888
  alias: string;
889
+ filter?: import("../data").FilterCondition | undefined;
850
890
  field?: string | undefined;
851
891
  distinct?: boolean | undefined;
852
892
  }, {
853
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
893
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
854
894
  alias: string;
895
+ filter?: import("../data").FilterCondition | undefined;
855
896
  field?: string | undefined;
856
897
  distinct?: boolean | undefined;
857
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>>;
858
901
  windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
859
902
  function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
860
903
  field: z.ZodOptional<z.ZodString>;
@@ -885,22 +928,22 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
885
928
  end?: string | undefined;
886
929
  }>>;
887
930
  }, "strip", z.ZodTypeAny, {
888
- partitionBy?: string[] | undefined;
889
931
  orderBy?: {
890
932
  field: string;
891
933
  order: "asc" | "desc";
892
934
  }[] | undefined;
935
+ partitionBy?: string[] | undefined;
893
936
  frame?: {
894
937
  type?: "rows" | "range" | undefined;
895
938
  start?: string | undefined;
896
939
  end?: string | undefined;
897
940
  } | undefined;
898
941
  }, {
899
- partitionBy?: string[] | undefined;
900
942
  orderBy?: {
901
943
  field: string;
902
944
  order?: "asc" | "desc" | undefined;
903
945
  }[] | undefined;
946
+ partitionBy?: string[] | undefined;
904
947
  frame?: {
905
948
  type?: "rows" | "range" | undefined;
906
949
  start?: string | undefined;
@@ -908,14 +951,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
908
951
  } | undefined;
909
952
  }>;
910
953
  }, "strip", z.ZodTypeAny, {
911
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
954
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
912
955
  alias: string;
913
956
  over: {
914
- partitionBy?: string[] | undefined;
915
957
  orderBy?: {
916
958
  field: string;
917
959
  order: "asc" | "desc";
918
960
  }[] | undefined;
961
+ partitionBy?: string[] | undefined;
919
962
  frame?: {
920
963
  type?: "rows" | "range" | undefined;
921
964
  start?: string | undefined;
@@ -924,14 +967,14 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
924
967
  };
925
968
  field?: string | undefined;
926
969
  }, {
927
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
970
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
928
971
  alias: string;
929
972
  over: {
930
- partitionBy?: string[] | undefined;
931
973
  orderBy?: {
932
974
  field: string;
933
975
  order?: "asc" | "desc" | undefined;
934
976
  }[] | undefined;
977
+ partitionBy?: string[] | undefined;
935
978
  frame?: {
936
979
  type?: "rows" | "range" | undefined;
937
980
  start?: string | undefined;
@@ -940,46 +983,38 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
940
983
  };
941
984
  field?: string | undefined;
942
985
  }>, "many">>;
943
- filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
944
- joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
945
- groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
946
- having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
947
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
948
- field: z.ZodString;
949
- order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
950
- }, "strip", z.ZodTypeAny, {
951
- field: string;
952
- order: "asc" | "desc";
953
- }, {
954
- field: string;
955
- order?: "asc" | "desc" | undefined;
956
- }>, "many">>;
957
- top: z.ZodOptional<z.ZodNumber>;
958
- skip: z.ZodOptional<z.ZodNumber>;
959
986
  distinct: z.ZodOptional<z.ZodBoolean>;
960
987
  }, "strip", z.ZodTypeAny, {
961
988
  object: string;
962
- sort?: {
989
+ where?: import("../data").FilterCondition | undefined;
990
+ distinct?: boolean | undefined;
991
+ fields?: any[] | undefined;
992
+ orderBy?: {
963
993
  field: string;
964
994
  order: "asc" | "desc";
965
995
  }[] | undefined;
966
- fields?: any[] | undefined;
967
- distinct?: boolean | undefined;
996
+ limit?: number | undefined;
997
+ offset?: number | undefined;
998
+ cursor?: Record<string, any> | undefined;
999
+ joins?: any[] | undefined;
968
1000
  aggregations?: {
969
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1001
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
970
1002
  alias: string;
1003
+ filter?: import("../data").FilterCondition | undefined;
971
1004
  field?: string | undefined;
972
1005
  distinct?: boolean | undefined;
973
1006
  }[] | undefined;
1007
+ groupBy?: string[] | undefined;
1008
+ having?: import("../data").FilterCondition | undefined;
974
1009
  windowFunctions?: {
975
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1010
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
976
1011
  alias: string;
977
1012
  over: {
978
- partitionBy?: string[] | undefined;
979
1013
  orderBy?: {
980
1014
  field: string;
981
1015
  order: "asc" | "desc";
982
1016
  }[] | undefined;
1017
+ partitionBy?: string[] | undefined;
983
1018
  frame?: {
984
1019
  type?: "rows" | "range" | undefined;
985
1020
  start?: string | undefined;
@@ -988,35 +1023,37 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
988
1023
  };
989
1024
  field?: string | undefined;
990
1025
  }[] | undefined;
991
- filters?: any;
992
- joins?: any[] | undefined;
993
- groupBy?: string[] | undefined;
994
- having?: any;
995
- top?: number | undefined;
996
- skip?: number | undefined;
997
1026
  }, {
998
1027
  object: string;
999
- sort?: {
1028
+ where?: import("../data").FilterCondition | undefined;
1029
+ distinct?: boolean | undefined;
1030
+ fields?: any[] | undefined;
1031
+ orderBy?: {
1000
1032
  field: string;
1001
1033
  order?: "asc" | "desc" | undefined;
1002
1034
  }[] | undefined;
1003
- fields?: any[] | undefined;
1004
- distinct?: boolean | undefined;
1035
+ limit?: number | undefined;
1036
+ offset?: number | undefined;
1037
+ cursor?: Record<string, any> | undefined;
1038
+ joins?: any[] | undefined;
1005
1039
  aggregations?: {
1006
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
1040
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1007
1041
  alias: string;
1042
+ filter?: import("../data").FilterCondition | undefined;
1008
1043
  field?: string | undefined;
1009
1044
  distinct?: boolean | undefined;
1010
1045
  }[] | undefined;
1046
+ groupBy?: string[] | undefined;
1047
+ having?: import("../data").FilterCondition | undefined;
1011
1048
  windowFunctions?: {
1012
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1049
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1013
1050
  alias: string;
1014
1051
  over: {
1015
- partitionBy?: string[] | undefined;
1016
1052
  orderBy?: {
1017
1053
  field: string;
1018
1054
  order?: "asc" | "desc" | undefined;
1019
1055
  }[] | undefined;
1056
+ partitionBy?: string[] | undefined;
1020
1057
  frame?: {
1021
1058
  type?: "rows" | "range" | undefined;
1022
1059
  start?: string | undefined;
@@ -1025,13 +1062,7 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1025
1062
  };
1026
1063
  field?: string | undefined;
1027
1064
  }[] | undefined;
1028
- filters?: any;
1029
- joins?: any[] | undefined;
1030
- groupBy?: string[] | undefined;
1031
- having?: any;
1032
- top?: number | undefined;
1033
- skip?: number | undefined;
1034
- }>>, z.ZodOptional<z.ZodObject<{
1065
+ }>, z.ZodOptional<z.ZodObject<{
1035
1066
  /**
1036
1067
  * Transaction handle/identifier.
1037
1068
  * If provided, the operation must run within this transaction.
@@ -1045,24 +1076,39 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1045
1076
  * Whether to bypass cache and force a fresh read.
1046
1077
  */
1047
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>;
1048
1089
  }, "strip", z.ZodTypeAny, {
1049
1090
  timeout?: number | undefined;
1091
+ tenantId?: string | undefined;
1050
1092
  transaction?: any;
1051
1093
  skipCache?: boolean | undefined;
1094
+ traceContext?: Record<string, string> | undefined;
1052
1095
  }, {
1053
1096
  timeout?: number | undefined;
1097
+ tenantId?: string | undefined;
1054
1098
  transaction?: any;
1055
1099
  skipCache?: boolean | undefined;
1056
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNumber>>;
1100
+ traceContext?: Record<string, string> | undefined;
1101
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>>;
1057
1102
  /**
1058
- * Create multiple records in a single batch.
1059
- * Optimized for performance.
1103
+ * Create a new record.
1060
1104
  *
1061
1105
  * @param object - The object name.
1062
- * @param dataArray - Array of record data.
1063
- * @returns Array of created records.
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`.
1064
1110
  */
1065
- bulkCreate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">, z.ZodOptional<z.ZodObject<{
1111
+ create: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
1066
1112
  /**
1067
1113
  * Transaction handle/identifier.
1068
1114
  * If provided, the operation must run within this transaction.
@@ -1076,32 +1122,40 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1076
1122
  * Whether to bypass cache and force a fresh read.
1077
1123
  */
1078
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>;
1079
1135
  }, "strip", z.ZodTypeAny, {
1080
1136
  timeout?: number | undefined;
1137
+ tenantId?: string | undefined;
1081
1138
  transaction?: any;
1082
1139
  skipCache?: boolean | undefined;
1140
+ traceContext?: Record<string, string> | undefined;
1083
1141
  }, {
1084
1142
  timeout?: number | undefined;
1143
+ tenantId?: string | undefined;
1085
1144
  transaction?: any;
1086
1145
  skipCache?: boolean | undefined;
1087
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
1146
+ traceContext?: Record<string, string> | undefined;
1147
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1088
1148
  /**
1089
- * Update multiple records in a single batch.
1149
+ * Update an existing record by ID.
1090
1150
  *
1091
1151
  * @param object - The object name.
1092
- * @param updates - Array of objects containing {id, data}.
1093
- * @returns Array of updated records.
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`.
1094
1157
  */
1095
- bulkUpdate: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodObject<{
1096
- id: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
1097
- data: z.ZodRecord<z.ZodString, z.ZodAny>;
1098
- }, "strip", z.ZodTypeAny, {
1099
- data: Record<string, any>;
1100
- id: string | number;
1101
- }, {
1102
- data: Record<string, any>;
1103
- id: string | number;
1104
- }>, "many">, z.ZodOptional<z.ZodObject<{
1158
+ update: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodOptional<z.ZodObject<{
1105
1159
  /**
1106
1160
  * Transaction handle/identifier.
1107
1161
  * If provided, the operation must run within this transaction.
@@ -1115,22 +1169,39 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1115
1169
  * Whether to bypass cache and force a fresh read.
1116
1170
  */
1117
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>;
1118
1182
  }, "strip", z.ZodTypeAny, {
1119
1183
  timeout?: number | undefined;
1184
+ tenantId?: string | undefined;
1120
1185
  transaction?: any;
1121
1186
  skipCache?: boolean | undefined;
1187
+ traceContext?: Record<string, string> | undefined;
1122
1188
  }, {
1123
1189
  timeout?: number | undefined;
1190
+ tenantId?: string | undefined;
1124
1191
  transaction?: any;
1125
1192
  skipCache?: boolean | undefined;
1126
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">>>;
1193
+ traceContext?: Record<string, string> | undefined;
1194
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1127
1195
  /**
1128
- * Delete multiple records in a single batch.
1196
+ * Upsert (Update or Insert) a record.
1129
1197
  *
1130
1198
  * @param object - The object name.
1131
- * @param ids - Array of record IDs.
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.
1132
1203
  */
1133
- bulkDelete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">, z.ZodOptional<z.ZodObject<{
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<{
1134
1205
  /**
1135
1206
  * Transaction handle/identifier.
1136
1207
  * If provided, the operation must run within this transaction.
@@ -1144,40 +1215,38 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1144
1215
  * Whether to bypass cache and force a fresh read.
1145
1216
  */
1146
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>;
1147
1228
  }, "strip", z.ZodTypeAny, {
1148
1229
  timeout?: number | undefined;
1230
+ tenantId?: string | undefined;
1149
1231
  transaction?: any;
1150
1232
  skipCache?: boolean | undefined;
1233
+ traceContext?: Record<string, string> | undefined;
1151
1234
  }, {
1152
1235
  timeout?: number | undefined;
1236
+ tenantId?: string | undefined;
1153
1237
  transaction?: any;
1154
1238
  skipCache?: boolean | undefined;
1155
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1156
- /**
1157
- * Begin a new database transaction.
1158
- * @returns A transaction handle to be passed to subsequent operations via `options.transaction`.
1159
- */
1160
- beginTransaction: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodAny>>;
1161
- /**
1162
- * Commit the transaction.
1163
- * @param transaction - The transaction handle.
1164
- */
1165
- commit: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1166
- /**
1167
- * Rollback the transaction.
1168
- * @param transaction - The transaction handle.
1169
- */
1170
- rollback: z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1239
+ traceContext?: Record<string, string> | undefined;
1240
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodRecord<z.ZodString, z.ZodAny>>>;
1171
1241
  /**
1172
- * Synchronize the database schema with the Object definition.
1173
- * This is an idempotent operation: it should create tables if missing,
1174
- * add columns if missing, and update indexes.
1242
+ * Delete a record by ID.
1175
1243
  *
1176
1244
  * @param object - The object name.
1177
- * @param schema - The full Object Schema (fields, indexes, etc).
1245
+ * @param id - The unique identifier of the record.
1178
1246
  * @param options - Driver options.
1247
+ * @returns True if deleted, false if not found.
1179
1248
  */
1180
- syncSchema: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny, z.ZodOptional<z.ZodObject<{
1249
+ delete: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodOptional<z.ZodObject<{
1181
1250
  /**
1182
1251
  * Transaction handle/identifier.
1183
1252
  * If provided, the operation must run within this transaction.
@@ -1191,68 +1260,1686 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1191
1260
  * Whether to bypass cache and force a fresh read.
1192
1261
  */
1193
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>;
1194
1273
  }, "strip", z.ZodTypeAny, {
1195
1274
  timeout?: number | undefined;
1275
+ tenantId?: string | undefined;
1196
1276
  transaction?: any;
1197
1277
  skipCache?: boolean | undefined;
1278
+ traceContext?: Record<string, string> | undefined;
1198
1279
  }, {
1199
1280
  timeout?: number | undefined;
1281
+ tenantId?: string | undefined;
1200
1282
  transaction?: any;
1201
1283
  skipCache?: boolean | undefined;
1202
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1284
+ traceContext?: Record<string, string> | undefined;
1285
+ }>>], z.ZodUnknown>, z.ZodPromise<z.ZodBoolean>>;
1203
1286
  /**
1204
- * Drop the underlying table or collection for an object.
1205
- * WARNING: Destructive operation.
1287
+ * Count records matching a query.
1206
1288
  *
1207
1289
  * @param object - The object name.
1290
+ * @param query - Optional filtering criteria.
1291
+ * @param options - Driver options.
1292
+ * @returns Total count.
1208
1293
  */
1209
- dropTable: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
1210
- /**
1211
- * Transaction handle/identifier.
1212
- * If provided, the operation must run within this transaction.
1213
- */
1214
- transaction: z.ZodOptional<z.ZodAny>;
1215
- /**
1216
- * Operation timeout in milliseconds.
1217
- */
1218
- timeout: z.ZodOptional<z.ZodNumber>;
1219
- /**
1220
- * Whether to bypass cache and force a fresh read.
1221
- */
1222
- skipCache: z.ZodOptional<z.ZodBoolean>;
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>;
1223
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
+ execute: (args_0: any, args_1: any[] | undefined, args_2: {
2655
+ timeout?: number | undefined;
2656
+ tenantId?: string | undefined;
2657
+ transaction?: any;
2658
+ skipCache?: boolean | undefined;
2659
+ traceContext?: Record<string, string> | undefined;
2660
+ } | undefined, ...args: unknown[]) => Promise<any>;
2661
+ supports: {
2662
+ joins: boolean;
2663
+ transactions: boolean;
2664
+ queryFilters: boolean;
2665
+ queryAggregations: boolean;
2666
+ querySorting: boolean;
2667
+ queryPagination: boolean;
2668
+ queryWindowFunctions: boolean;
2669
+ querySubqueries: boolean;
2670
+ fullTextSearch: boolean;
2671
+ jsonFields: boolean;
2672
+ arrayFields: boolean;
2673
+ vectorSearch: boolean;
2674
+ geoSpatial: boolean;
2675
+ };
2676
+ connect: (...args: unknown[]) => Promise<void>;
2677
+ disconnect: (...args: unknown[]) => Promise<void>;
2678
+ checkHealth: (...args: unknown[]) => Promise<boolean>;
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: {
1224
2906
  timeout?: number | undefined;
2907
+ tenantId?: string | undefined;
1225
2908
  transaction?: any;
1226
2909
  skipCache?: boolean | undefined;
1227
- }, {
1228
- timeout?: number | undefined;
1229
- transaction?: any;
1230
- skipCache?: boolean | undefined;
1231
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodVoid>>;
1232
- }, "strip", z.ZodTypeAny, {
1233
- find: (args_0: string, args_1: {
2910
+ traceContext?: Record<string, string> | undefined;
2911
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
2912
+ explain?: ((args_0: string, args_1: {
1234
2913
  object: string;
1235
- sort?: {
2914
+ where?: import("../data").FilterCondition | undefined;
2915
+ distinct?: boolean | undefined;
2916
+ fields?: any[] | undefined;
2917
+ orderBy?: {
1236
2918
  field: string;
1237
2919
  order?: "asc" | "desc" | undefined;
1238
2920
  }[] | undefined;
1239
- fields?: any[] | undefined;
1240
- distinct?: boolean | undefined;
2921
+ limit?: number | undefined;
2922
+ offset?: number | undefined;
2923
+ cursor?: Record<string, any> | undefined;
2924
+ joins?: any[] | undefined;
1241
2925
  aggregations?: {
1242
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
2926
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1243
2927
  alias: string;
2928
+ filter?: import("../data").FilterCondition | undefined;
1244
2929
  field?: string | undefined;
1245
2930
  distinct?: boolean | undefined;
1246
2931
  }[] | undefined;
2932
+ groupBy?: string[] | undefined;
2933
+ having?: import("../data").FilterCondition | undefined;
1247
2934
  windowFunctions?: {
1248
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
2935
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1249
2936
  alias: string;
1250
2937
  over: {
1251
- partitionBy?: string[] | undefined;
1252
2938
  orderBy?: {
1253
2939
  field: string;
1254
2940
  order?: "asc" | "desc" | undefined;
1255
2941
  }[] | undefined;
2942
+ partitionBy?: string[] | undefined;
1256
2943
  frame?: {
1257
2944
  type?: "rows" | "range" | undefined;
1258
2945
  start?: string | undefined;
@@ -1261,41 +2948,91 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1261
2948
  };
1262
2949
  field?: string | undefined;
1263
2950
  }[] | undefined;
1264
- filters?: any;
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;
1265
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;
1266
2979
  groupBy?: string[] | undefined;
1267
- having?: any;
1268
- top?: number | undefined;
1269
- skip?: number | 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;
1270
2998
  }, args_2: {
1271
2999
  timeout?: number | undefined;
3000
+ tenantId?: string | undefined;
1272
3001
  transaction?: any;
1273
3002
  skipCache?: boolean | undefined;
3003
+ traceContext?: Record<string, string> | undefined;
1274
3004
  } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1275
- name: string;
1276
3005
  count: (args_0: string, args_1: {
1277
3006
  object: string;
1278
- sort?: {
3007
+ where?: import("../data").FilterCondition | undefined;
3008
+ distinct?: boolean | undefined;
3009
+ fields?: any[] | undefined;
3010
+ orderBy?: {
1279
3011
  field: string;
1280
- order?: "asc" | "desc" | undefined;
3012
+ order: "asc" | "desc";
1281
3013
  }[] | undefined;
1282
- fields?: any[] | undefined;
1283
- distinct?: boolean | undefined;
3014
+ limit?: number | undefined;
3015
+ offset?: number | undefined;
3016
+ cursor?: Record<string, any> | undefined;
3017
+ joins?: any[] | undefined;
1284
3018
  aggregations?: {
1285
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
3019
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1286
3020
  alias: string;
3021
+ filter?: import("../data").FilterCondition | undefined;
1287
3022
  field?: string | undefined;
1288
3023
  distinct?: boolean | undefined;
1289
3024
  }[] | undefined;
3025
+ groupBy?: string[] | undefined;
3026
+ having?: import("../data").FilterCondition | undefined;
1290
3027
  windowFunctions?: {
1291
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3028
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1292
3029
  alias: string;
1293
3030
  over: {
1294
- partitionBy?: string[] | undefined;
1295
3031
  orderBy?: {
1296
3032
  field: string;
1297
- order?: "asc" | "desc" | undefined;
3033
+ order: "asc" | "desc";
1298
3034
  }[] | undefined;
3035
+ partitionBy?: string[] | undefined;
1299
3036
  frame?: {
1300
3037
  type?: "rows" | "range" | undefined;
1301
3038
  start?: string | undefined;
@@ -1304,56 +3041,50 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1304
3041
  };
1305
3042
  field?: string | undefined;
1306
3043
  }[] | undefined;
1307
- filters?: any;
1308
- joins?: any[] | undefined;
1309
- groupBy?: string[] | undefined;
1310
- having?: any;
1311
- top?: number | undefined;
1312
- skip?: number | undefined;
1313
3044
  } | undefined, args_2: {
1314
3045
  timeout?: number | undefined;
3046
+ tenantId?: string | undefined;
1315
3047
  transaction?: any;
1316
3048
  skipCache?: boolean | undefined;
3049
+ traceContext?: Record<string, string> | undefined;
1317
3050
  } | undefined, ...args: unknown[]) => Promise<number>;
1318
- create: (args_0: string, args_1: Record<string, any>, args_2: {
1319
- timeout?: number | undefined;
1320
- transaction?: any;
1321
- skipCache?: boolean | undefined;
1322
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
3051
+ name: string;
1323
3052
  update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
1324
3053
  timeout?: number | undefined;
3054
+ tenantId?: string | undefined;
1325
3055
  transaction?: any;
1326
3056
  skipCache?: boolean | undefined;
3057
+ traceContext?: Record<string, string> | undefined;
1327
3058
  } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1328
3059
  delete: (args_0: string, args_1: string | number, args_2: {
1329
3060
  timeout?: number | undefined;
3061
+ tenantId?: string | undefined;
1330
3062
  transaction?: any;
1331
3063
  skipCache?: boolean | undefined;
3064
+ traceContext?: Record<string, string> | undefined;
1332
3065
  } | undefined, ...args: unknown[]) => Promise<boolean>;
1333
- bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
1334
- timeout?: number | undefined;
1335
- transaction?: any;
1336
- skipCache?: boolean | undefined;
1337
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1338
- bulkUpdate: (args_0: string, args_1: {
1339
- data: Record<string, any>;
1340
- id: string | number;
1341
- }[], args_2: {
3066
+ create: (args_0: string, args_1: Record<string, any>, args_2: {
1342
3067
  timeout?: number | undefined;
3068
+ tenantId?: string | undefined;
1343
3069
  transaction?: any;
1344
3070
  skipCache?: boolean | undefined;
1345
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1346
- bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
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: {
1347
3074
  timeout?: number | undefined;
3075
+ tenantId?: string | undefined;
1348
3076
  transaction?: any;
1349
3077
  skipCache?: boolean | undefined;
1350
- } | undefined, ...args: unknown[]) => Promise<void>;
3078
+ traceContext?: Record<string, string> | undefined;
3079
+ } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
3080
+ version: string;
1351
3081
  execute: (args_0: any, args_1: any[] | undefined, args_2: {
1352
3082
  timeout?: number | undefined;
3083
+ tenantId?: string | undefined;
1353
3084
  transaction?: any;
1354
3085
  skipCache?: boolean | undefined;
3086
+ traceContext?: Record<string, string> | undefined;
1355
3087
  } | undefined, ...args: unknown[]) => Promise<any>;
1356
- version: string;
1357
3088
  supports: {
1358
3089
  joins: boolean;
1359
3090
  transactions: boolean;
@@ -1366,33 +3097,43 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1366
3097
  fullTextSearch: boolean;
1367
3098
  jsonFields: boolean;
1368
3099
  arrayFields: boolean;
3100
+ vectorSearch?: boolean | undefined;
3101
+ geoSpatial?: boolean | undefined;
1369
3102
  };
1370
3103
  connect: (...args: unknown[]) => Promise<void>;
1371
3104
  disconnect: (...args: unknown[]) => Promise<void>;
1372
3105
  checkHealth: (...args: unknown[]) => Promise<boolean>;
1373
- findOne: (args_0: string, args_1: {
3106
+ findStream: (args_0: string, args_1: {
1374
3107
  object: string;
1375
- sort?: {
3108
+ where?: import("../data").FilterCondition | undefined;
3109
+ distinct?: boolean | undefined;
3110
+ fields?: any[] | undefined;
3111
+ orderBy?: {
1376
3112
  field: string;
1377
- order?: "asc" | "desc" | undefined;
3113
+ order: "asc" | "desc";
1378
3114
  }[] | undefined;
1379
- fields?: any[] | undefined;
1380
- distinct?: boolean | undefined;
3115
+ limit?: number | undefined;
3116
+ offset?: number | undefined;
3117
+ cursor?: Record<string, any> | undefined;
3118
+ joins?: any[] | undefined;
1381
3119
  aggregations?: {
1382
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
3120
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1383
3121
  alias: string;
3122
+ filter?: import("../data").FilterCondition | undefined;
1384
3123
  field?: string | undefined;
1385
3124
  distinct?: boolean | undefined;
1386
3125
  }[] | undefined;
3126
+ groupBy?: string[] | undefined;
3127
+ having?: import("../data").FilterCondition | undefined;
1387
3128
  windowFunctions?: {
1388
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3129
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1389
3130
  alias: string;
1390
3131
  over: {
1391
- partitionBy?: string[] | undefined;
1392
3132
  orderBy?: {
1393
3133
  field: string;
1394
- order?: "asc" | "desc" | undefined;
3134
+ order: "asc" | "desc";
1395
3135
  }[] | undefined;
3136
+ partitionBy?: string[] | undefined;
1396
3137
  frame?: {
1397
3138
  type?: "rows" | "range" | undefined;
1398
3139
  start?: string | undefined;
@@ -1401,54 +3142,139 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1401
3142
  };
1402
3143
  field?: string | undefined;
1403
3144
  }[] | undefined;
1404
- filters?: any;
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;
1405
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;
1406
3172
  groupBy?: string[] | undefined;
1407
- having?: any;
1408
- top?: number | undefined;
1409
- skip?: number | 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;
1410
3191
  }, args_2: {
1411
3192
  timeout?: number | undefined;
3193
+ tenantId?: string | undefined;
1412
3194
  transaction?: any;
1413
3195
  skipCache?: boolean | undefined;
3196
+ traceContext?: Record<string, string> | undefined;
1414
3197
  } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
1415
- beginTransaction: (...args: unknown[]) => Promise<any>;
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>;
1416
3225
  commit: (args_0: any, ...args: unknown[]) => Promise<void>;
1417
3226
  rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
1418
3227
  syncSchema: (args_0: string, args_1: any, args_2: {
1419
3228
  timeout?: number | undefined;
3229
+ tenantId?: string | undefined;
1420
3230
  transaction?: any;
1421
3231
  skipCache?: boolean | undefined;
3232
+ traceContext?: Record<string, string> | undefined;
1422
3233
  } | undefined, ...args: unknown[]) => Promise<void>;
1423
3234
  dropTable: (args_0: string, args_1: {
1424
3235
  timeout?: number | undefined;
3236
+ tenantId?: string | undefined;
1425
3237
  transaction?: any;
1426
3238
  skipCache?: boolean | undefined;
3239
+ traceContext?: Record<string, string> | undefined;
1427
3240
  } | undefined, ...args: unknown[]) => Promise<void>;
1428
- }, {
1429
- find: (args_0: string, args_1: {
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: {
1430
3248
  object: string;
1431
- sort?: {
3249
+ where?: import("../data").FilterCondition | undefined;
3250
+ distinct?: boolean | undefined;
3251
+ fields?: any[] | undefined;
3252
+ orderBy?: {
1432
3253
  field: string;
1433
3254
  order: "asc" | "desc";
1434
3255
  }[] | undefined;
1435
- fields?: any[] | undefined;
1436
- distinct?: boolean | undefined;
3256
+ limit?: number | undefined;
3257
+ offset?: number | undefined;
3258
+ cursor?: Record<string, any> | undefined;
3259
+ joins?: any[] | undefined;
1437
3260
  aggregations?: {
1438
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
3261
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1439
3262
  alias: string;
3263
+ filter?: import("../data").FilterCondition | undefined;
1440
3264
  field?: string | undefined;
1441
3265
  distinct?: boolean | undefined;
1442
3266
  }[] | undefined;
3267
+ groupBy?: string[] | undefined;
3268
+ having?: import("../data").FilterCondition | undefined;
1443
3269
  windowFunctions?: {
1444
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3270
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1445
3271
  alias: string;
1446
3272
  over: {
1447
- partitionBy?: string[] | undefined;
1448
3273
  orderBy?: {
1449
3274
  field: string;
1450
3275
  order: "asc" | "desc";
1451
3276
  }[] | undefined;
3277
+ partitionBy?: string[] | undefined;
1452
3278
  frame?: {
1453
3279
  type?: "rows" | "range" | undefined;
1454
3280
  start?: string | undefined;
@@ -1457,41 +3283,44 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1457
3283
  };
1458
3284
  field?: string | undefined;
1459
3285
  }[] | undefined;
1460
- filters?: any;
1461
- joins?: any[] | undefined;
1462
- groupBy?: string[] | undefined;
1463
- having?: any;
1464
- top?: number | undefined;
1465
- skip?: number | undefined;
1466
- }, args_2: {
3286
+ }, args_2: Record<string, any>, args_3: {
1467
3287
  timeout?: number | undefined;
3288
+ tenantId?: string | undefined;
1468
3289
  transaction?: any;
1469
3290
  skipCache?: boolean | undefined;
1470
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1471
- name: string;
1472
- count: (args_0: string, args_1: {
3291
+ traceContext?: Record<string, string> | undefined;
3292
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
3293
+ deleteMany?: ((args_0: string, args_1: {
1473
3294
  object: string;
1474
- sort?: {
3295
+ where?: import("../data").FilterCondition | undefined;
3296
+ distinct?: boolean | undefined;
3297
+ fields?: any[] | undefined;
3298
+ orderBy?: {
1475
3299
  field: string;
1476
3300
  order: "asc" | "desc";
1477
3301
  }[] | undefined;
1478
- fields?: any[] | undefined;
1479
- distinct?: boolean | undefined;
3302
+ limit?: number | undefined;
3303
+ offset?: number | undefined;
3304
+ cursor?: Record<string, any> | undefined;
3305
+ joins?: any[] | undefined;
1480
3306
  aggregations?: {
1481
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
3307
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1482
3308
  alias: string;
3309
+ filter?: import("../data").FilterCondition | undefined;
1483
3310
  field?: string | undefined;
1484
3311
  distinct?: boolean | undefined;
1485
3312
  }[] | undefined;
3313
+ groupBy?: string[] | undefined;
3314
+ having?: import("../data").FilterCondition | undefined;
1486
3315
  windowFunctions?: {
1487
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3316
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1488
3317
  alias: string;
1489
3318
  over: {
1490
- partitionBy?: string[] | undefined;
1491
3319
  orderBy?: {
1492
3320
  field: string;
1493
3321
  order: "asc" | "desc";
1494
3322
  }[] | undefined;
3323
+ partitionBy?: string[] | undefined;
1495
3324
  frame?: {
1496
3325
  type?: "rows" | "range" | undefined;
1497
3326
  start?: string | undefined;
@@ -1500,95 +3329,44 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1500
3329
  };
1501
3330
  field?: string | undefined;
1502
3331
  }[] | undefined;
1503
- filters?: any;
1504
- joins?: any[] | undefined;
1505
- groupBy?: string[] | undefined;
1506
- having?: any;
1507
- top?: number | undefined;
1508
- skip?: number | undefined;
1509
- } | undefined, args_2: {
1510
- timeout?: number | undefined;
1511
- transaction?: any;
1512
- skipCache?: boolean | undefined;
1513
- } | undefined, ...args: unknown[]) => Promise<number>;
1514
- create: (args_0: string, args_1: Record<string, any>, args_2: {
1515
- timeout?: number | undefined;
1516
- transaction?: any;
1517
- skipCache?: boolean | undefined;
1518
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1519
- update: (args_0: string, args_1: string | number, args_2: Record<string, any>, args_3: {
1520
- timeout?: number | undefined;
1521
- transaction?: any;
1522
- skipCache?: boolean | undefined;
1523
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>>;
1524
- delete: (args_0: string, args_1: string | number, args_2: {
1525
- timeout?: number | undefined;
1526
- transaction?: any;
1527
- skipCache?: boolean | undefined;
1528
- } | undefined, ...args: unknown[]) => Promise<boolean>;
1529
- bulkCreate: (args_0: string, args_1: Record<string, any>[], args_2: {
1530
- timeout?: number | undefined;
1531
- transaction?: any;
1532
- skipCache?: boolean | undefined;
1533
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1534
- bulkUpdate: (args_0: string, args_1: {
1535
- data: Record<string, any>;
1536
- id: string | number;
1537
- }[], args_2: {
1538
- timeout?: number | undefined;
1539
- transaction?: any;
1540
- skipCache?: boolean | undefined;
1541
- } | undefined, ...args: unknown[]) => Promise<Record<string, any>[]>;
1542
- bulkDelete: (args_0: string, args_1: (string | number)[], args_2: {
1543
- timeout?: number | undefined;
1544
- transaction?: any;
1545
- skipCache?: boolean | undefined;
1546
- } | undefined, ...args: unknown[]) => Promise<void>;
1547
- execute: (args_0: any, args_1: any[] | undefined, args_2: {
3332
+ }, args_2: {
1548
3333
  timeout?: number | undefined;
3334
+ tenantId?: string | undefined;
1549
3335
  transaction?: any;
1550
3336
  skipCache?: boolean | undefined;
1551
- } | undefined, ...args: unknown[]) => Promise<any>;
1552
- version: string;
1553
- supports: {
1554
- joins: boolean;
1555
- transactions: boolean;
1556
- queryFilters: boolean;
1557
- queryAggregations: boolean;
1558
- querySorting: boolean;
1559
- queryPagination: boolean;
1560
- queryWindowFunctions: boolean;
1561
- querySubqueries: boolean;
1562
- fullTextSearch: boolean;
1563
- jsonFields: boolean;
1564
- arrayFields: boolean;
1565
- };
1566
- connect: (...args: unknown[]) => Promise<void>;
1567
- disconnect: (...args: unknown[]) => Promise<void>;
1568
- checkHealth: (...args: unknown[]) => Promise<boolean>;
1569
- findOne: (args_0: string, args_1: {
3337
+ traceContext?: Record<string, string> | undefined;
3338
+ } | undefined, ...args: unknown[]) => Promise<number>) | undefined;
3339
+ explain?: ((args_0: string, args_1: {
1570
3340
  object: string;
1571
- sort?: {
3341
+ where?: import("../data").FilterCondition | undefined;
3342
+ distinct?: boolean | undefined;
3343
+ fields?: any[] | undefined;
3344
+ orderBy?: {
1572
3345
  field: string;
1573
3346
  order: "asc" | "desc";
1574
3347
  }[] | undefined;
1575
- fields?: any[] | undefined;
1576
- distinct?: boolean | undefined;
3348
+ limit?: number | undefined;
3349
+ offset?: number | undefined;
3350
+ cursor?: Record<string, any> | undefined;
3351
+ joins?: any[] | undefined;
1577
3352
  aggregations?: {
1578
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
3353
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
1579
3354
  alias: string;
3355
+ filter?: import("../data").FilterCondition | undefined;
1580
3356
  field?: string | undefined;
1581
3357
  distinct?: boolean | undefined;
1582
3358
  }[] | undefined;
3359
+ groupBy?: string[] | undefined;
3360
+ having?: import("../data").FilterCondition | undefined;
1583
3361
  windowFunctions?: {
1584
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
3362
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
1585
3363
  alias: string;
1586
3364
  over: {
1587
- partitionBy?: string[] | undefined;
1588
3365
  orderBy?: {
1589
3366
  field: string;
1590
3367
  order: "asc" | "desc";
1591
3368
  }[] | undefined;
3369
+ partitionBy?: string[] | undefined;
1592
3370
  frame?: {
1593
3371
  type?: "rows" | "range" | undefined;
1594
3372
  start?: string | undefined;
@@ -1597,30 +3375,13 @@ export declare const DriverInterfaceSchema: z.ZodObject<{
1597
3375
  };
1598
3376
  field?: string | undefined;
1599
3377
  }[] | undefined;
1600
- filters?: any;
1601
- joins?: any[] | undefined;
1602
- groupBy?: string[] | undefined;
1603
- having?: any;
1604
- top?: number | undefined;
1605
- skip?: number | undefined;
1606
3378
  }, args_2: {
1607
3379
  timeout?: number | undefined;
3380
+ tenantId?: string | undefined;
1608
3381
  transaction?: any;
1609
3382
  skipCache?: boolean | undefined;
1610
- } | undefined, ...args: unknown[]) => Promise<Record<string, any> | null>;
1611
- beginTransaction: (...args: unknown[]) => Promise<any>;
1612
- commit: (args_0: any, ...args: unknown[]) => Promise<void>;
1613
- rollback: (args_0: any, ...args: unknown[]) => Promise<void>;
1614
- syncSchema: (args_0: string, args_1: any, args_2: {
1615
- timeout?: number | undefined;
1616
- transaction?: any;
1617
- skipCache?: boolean | undefined;
1618
- } | undefined, ...args: unknown[]) => Promise<void>;
1619
- dropTable: (args_0: string, args_1: {
1620
- timeout?: number | undefined;
1621
- transaction?: any;
1622
- skipCache?: boolean | undefined;
1623
- } | undefined, ...args: unknown[]) => Promise<void>;
3383
+ traceContext?: Record<string, string> | undefined;
3384
+ } | undefined, ...args: unknown[]) => Promise<any>) | undefined;
1624
3385
  }>;
1625
3386
  /**
1626
3387
  * TypeScript types