@objectstack/spec 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (396) hide show
  1. package/README.md +32 -10
  2. package/dist/ai/agent.zod.d.ts +12 -12
  3. package/dist/ai/conversation.zod.d.ts +65 -65
  4. package/dist/ai/cost.zod.d.ts +125 -125
  5. package/dist/ai/index.d.ts +1 -1
  6. package/dist/ai/index.d.ts.map +1 -1
  7. package/dist/ai/index.js +1 -1
  8. package/dist/ai/model-registry.zod.d.ts +94 -94
  9. package/dist/ai/nlq.zod.d.ts +70 -70
  10. package/dist/ai/{workflow-automation.zod.d.ts → orchestration.zod.d.ts} +50 -49
  11. package/dist/ai/orchestration.zod.d.ts.map +1 -0
  12. package/dist/ai/{workflow-automation.zod.js → orchestration.zod.js} +26 -25
  13. package/dist/ai/predictive.zod.d.ts +31 -31
  14. package/dist/ai/rag-pipeline.zod.d.ts +86 -86
  15. package/dist/api/contract.zod.d.ts +121 -105
  16. package/dist/api/contract.zod.d.ts.map +1 -1
  17. package/dist/{system → api}/discovery.zod.d.ts +26 -26
  18. package/dist/api/discovery.zod.d.ts.map +1 -0
  19. package/dist/{system → api}/discovery.zod.js +9 -9
  20. package/dist/{system/api.zod.d.ts → api/endpoint.zod.d.ts} +53 -57
  21. package/dist/api/endpoint.zod.d.ts.map +1 -0
  22. package/dist/{system/api.zod.js → api/endpoint.zod.js} +3 -6
  23. package/dist/api/index.d.ts +4 -0
  24. package/dist/api/index.d.ts.map +1 -1
  25. package/dist/api/index.js +4 -0
  26. package/dist/{system → api}/realtime.zod.d.ts +4 -4
  27. package/dist/api/realtime.zod.d.ts.map +1 -0
  28. package/dist/api/router.zod.d.ts +182 -0
  29. package/dist/api/router.zod.d.ts.map +1 -0
  30. package/dist/api/router.zod.js +103 -0
  31. package/dist/{system/auth.zod.d.ts → auth/config.zod.d.ts} +191 -191
  32. package/dist/auth/config.zod.d.ts.map +1 -0
  33. package/dist/{system → auth}/identity.zod.d.ts +8 -8
  34. package/dist/auth/identity.zod.d.ts.map +1 -0
  35. package/dist/auth/index.d.ts +7 -0
  36. package/dist/auth/index.d.ts.map +1 -0
  37. package/dist/auth/index.js +22 -0
  38. package/dist/{system → auth}/organization.zod.d.ts +5 -5
  39. package/dist/auth/organization.zod.d.ts.map +1 -0
  40. package/dist/{system → auth}/policy.zod.d.ts +3 -3
  41. package/dist/auth/policy.zod.d.ts.map +1 -0
  42. package/dist/{system/auth-protocol.d.ts → auth/protocol.d.ts} +1 -1
  43. package/dist/auth/protocol.d.ts.map +1 -0
  44. package/dist/auth/role.zod.d.ts.map +1 -0
  45. package/dist/{data → automation}/flow.zod.d.ts +34 -16
  46. package/dist/automation/flow.zod.d.ts.map +1 -0
  47. package/dist/{data → automation}/flow.zod.js +6 -1
  48. package/dist/automation/index.d.ts +4 -0
  49. package/dist/automation/index.d.ts.map +1 -0
  50. package/dist/automation/index.js +19 -0
  51. package/dist/{system → automation}/webhook.zod.d.ts +2 -2
  52. package/dist/automation/webhook.zod.d.ts.map +1 -0
  53. package/dist/automation/workflow.zod.d.ts +2045 -0
  54. package/dist/automation/workflow.zod.d.ts.map +1 -0
  55. package/dist/{data → automation}/workflow.zod.js +24 -1
  56. package/dist/data/dataset.zod.d.ts +2 -2
  57. package/dist/data/field.zod.d.ts +443 -213
  58. package/dist/data/field.zod.d.ts.map +1 -1
  59. package/dist/data/field.zod.js +29 -1
  60. package/dist/data/filter.zod.d.ts +167 -30
  61. package/dist/data/filter.zod.d.ts.map +1 -1
  62. package/dist/data/filter.zod.js +25 -13
  63. package/dist/data/hook.zod.d.ts +191 -0
  64. package/dist/data/hook.zod.d.ts.map +1 -0
  65. package/dist/data/hook.zod.js +144 -0
  66. package/dist/data/index.d.ts +4 -17
  67. package/dist/data/index.d.ts.map +1 -1
  68. package/dist/data/index.js +4 -17
  69. package/dist/data/mapping.zod.d.ts +103 -91
  70. package/dist/data/mapping.zod.d.ts.map +1 -1
  71. package/dist/data/object.zod.d.ts +387 -127
  72. package/dist/data/object.zod.d.ts.map +1 -1
  73. package/dist/data/object.zod.js +87 -42
  74. package/dist/data/query.zod.d.ts +98 -169
  75. package/dist/data/query.zod.d.ts.map +1 -1
  76. package/dist/data/query.zod.js +42 -130
  77. package/dist/data/validation.zod.d.ts +166 -26
  78. package/dist/data/validation.zod.d.ts.map +1 -1
  79. package/dist/data/validation.zod.js +38 -16
  80. package/dist/{system → driver}/datasource.zod.d.ts +42 -8
  81. package/dist/driver/datasource.zod.d.ts.map +1 -0
  82. package/dist/{system → driver}/datasource.zod.js +17 -13
  83. package/dist/driver/driver.zod.d.ts +3392 -0
  84. package/dist/driver/driver.zod.d.ts.map +1 -0
  85. package/dist/{system → driver}/driver.zod.js +99 -0
  86. package/dist/driver/index.d.ts +5 -0
  87. package/dist/driver/index.d.ts.map +1 -0
  88. package/dist/driver/index.js +20 -0
  89. package/dist/driver/mongo.zod.d.ts +107 -0
  90. package/dist/driver/mongo.zod.d.ts.map +1 -0
  91. package/dist/driver/mongo.zod.js +80 -0
  92. package/dist/driver/postgres.zod.d.ts +134 -0
  93. package/dist/driver/postgres.zod.d.ts.map +1 -0
  94. package/dist/driver/postgres.zod.js +88 -0
  95. package/dist/hub/composer.zod.d.ts +2768 -0
  96. package/dist/hub/composer.zod.d.ts.map +1 -0
  97. package/dist/hub/composer.zod.js +111 -0
  98. package/dist/hub/index.d.ts +6 -0
  99. package/dist/hub/index.d.ts.map +1 -0
  100. package/dist/hub/index.js +22 -0
  101. package/dist/{system → hub}/license.zod.d.ts +11 -7
  102. package/dist/hub/license.zod.d.ts.map +1 -0
  103. package/dist/{system → hub}/license.zod.js +5 -3
  104. package/dist/hub/marketplace.zod.d.ts +191 -0
  105. package/dist/hub/marketplace.zod.d.ts.map +1 -0
  106. package/dist/hub/marketplace.zod.js +85 -0
  107. package/dist/hub/space.zod.d.ts +383 -0
  108. package/dist/hub/space.zod.d.ts.map +1 -0
  109. package/dist/hub/space.zod.js +103 -0
  110. package/dist/{system → hub}/tenant.zod.d.ts +73 -47
  111. package/dist/hub/tenant.zod.d.ts.map +1 -0
  112. package/dist/{system → hub}/tenant.zod.js +36 -10
  113. package/dist/index.d.ts +11 -4
  114. package/dist/index.d.ts.map +1 -1
  115. package/dist/index.js +12 -5
  116. package/dist/kernel/context.zod.d.ts +56 -0
  117. package/dist/kernel/context.zod.d.ts.map +1 -0
  118. package/dist/kernel/context.zod.js +43 -0
  119. package/dist/kernel/index.d.ts +12 -0
  120. package/dist/kernel/index.d.ts.map +1 -0
  121. package/dist/kernel/index.js +27 -0
  122. package/dist/kernel/logger.zod.d.ts +111 -0
  123. package/dist/kernel/logger.zod.d.ts.map +1 -0
  124. package/dist/kernel/logger.zod.js +75 -0
  125. package/dist/kernel/manifest.zod.d.ts +2153 -0
  126. package/dist/kernel/manifest.zod.d.ts.map +1 -0
  127. package/dist/{system → kernel}/manifest.zod.js +40 -0
  128. package/dist/{system → kernel}/plugin.zod.d.ts +598 -318
  129. package/dist/kernel/plugin.zod.d.ts.map +1 -0
  130. package/dist/{system → kernel}/plugin.zod.js +13 -0
  131. package/dist/kernel/scoped-storage.zod.d.ts +81 -0
  132. package/dist/kernel/scoped-storage.zod.d.ts.map +1 -0
  133. package/dist/kernel/scoped-storage.zod.js +66 -0
  134. package/dist/permission/index.d.ts +12 -0
  135. package/dist/permission/index.d.ts.map +1 -0
  136. package/dist/permission/index.js +27 -0
  137. package/dist/{data → permission}/permission.zod.d.ts +34 -3
  138. package/dist/permission/permission.zod.d.ts.map +1 -0
  139. package/dist/{data → permission}/permission.zod.js +10 -1
  140. package/dist/permission/sharing.zod.d.ts +146 -0
  141. package/dist/permission/sharing.zod.d.ts.map +1 -0
  142. package/dist/permission/sharing.zod.js +88 -0
  143. package/dist/permission/territory.zod.d.ts.map +1 -0
  144. package/dist/system/audit.zod.d.ts +52 -52
  145. package/dist/system/events.zod.d.ts +17 -17
  146. package/dist/system/index.d.ts +1 -20
  147. package/dist/system/index.d.ts.map +1 -1
  148. package/dist/system/index.js +3 -20
  149. package/dist/system/job.zod.d.ts +13 -13
  150. package/dist/ui/action.zod.d.ts +13 -13
  151. package/dist/ui/app.zod.d.ts +11 -11
  152. package/dist/ui/dashboard.zod.d.ts +12 -12
  153. package/dist/ui/page.zod.d.ts +2 -2
  154. package/dist/ui/report.zod.d.ts +7 -7
  155. package/dist/ui/theme.zod.d.ts +42 -42
  156. package/dist/ui/view.zod.d.ts +55 -55
  157. package/dist/ui/widget.zod.d.ts +61 -28
  158. package/dist/ui/widget.zod.d.ts.map +1 -1
  159. package/json-schema/ai/{AIWorkflowAutomation.json → AIOrchestration.json} +5 -5
  160. package/json-schema/ai/{AIWorkflowExecutionResult.json → AIOrchestrationExecutionResult.json} +2 -2
  161. package/json-schema/ai/{AIWorkflowTrigger.json → AIOrchestrationTrigger.json} +2 -2
  162. package/json-schema/ai/{BatchAIWorkflowExecution.json → BatchAIOrchestrationExecution.json} +3 -3
  163. package/json-schema/{system → api}/ApiEndpoint.json +3 -1
  164. package/json-schema/{system → api}/ApiRoutes.json +7 -7
  165. package/json-schema/{system → api}/Discovery.json +7 -7
  166. package/json-schema/api/ExportRequest.json +402 -438
  167. package/json-schema/{system → api}/HttpMethod.json +3 -1
  168. package/json-schema/api/RouteCategory.json +17 -0
  169. package/json-schema/api/RouteDefinition.json +77 -0
  170. package/json-schema/api/RouterConfig.json +117 -0
  171. package/json-schema/{data → automation}/Flow.json +31 -1
  172. package/json-schema/{data → automation}/FlowEdge.json +9 -0
  173. package/json-schema/{data/WorkflowRule.json → automation/TimeTrigger.json} +35 -25
  174. package/json-schema/automation/WorkflowRule.json +1031 -0
  175. package/json-schema/data/AggregationNode.json +23 -0
  176. package/json-schema/data/AsyncValidation.json +49 -2
  177. package/json-schema/data/ComparisonOperator.json +52 -0
  178. package/json-schema/data/ConditionalValidation.json +693 -46
  179. package/json-schema/data/CrossFieldValidation.json +33 -2
  180. package/json-schema/data/CurrencyConfig.json +35 -0
  181. package/json-schema/data/CurrencyValue.json +26 -0
  182. package/json-schema/data/CustomValidator.json +37 -10
  183. package/json-schema/data/Field.json +30 -0
  184. package/json-schema/data/FieldOperators.json +78 -0
  185. package/json-schema/data/FieldReference.json +19 -0
  186. package/json-schema/data/FormatValidation.json +33 -2
  187. package/json-schema/data/Hook.json +95 -0
  188. package/json-schema/data/HookContext.json +88 -0
  189. package/json-schema/data/HookEvent.json +29 -0
  190. package/json-schema/data/Index.json +10 -0
  191. package/json-schema/data/JSONValidation.json +85 -0
  192. package/json-schema/data/JoinNode.json +197 -213
  193. package/json-schema/data/{TriggerAction.json → JoinStrategy.json} +6 -5
  194. package/json-schema/data/NormalizedFilter.json +234 -0
  195. package/json-schema/data/Object.json +1580 -28
  196. package/json-schema/data/ObjectCapabilities.json +30 -12
  197. package/json-schema/data/Query.json +246 -262
  198. package/json-schema/data/RangeOperator.json +26 -0
  199. package/json-schema/data/ScriptValidation.json +33 -2
  200. package/json-schema/data/SearchConfig.json +36 -0
  201. package/json-schema/data/StateMachineValidation.json +33 -2
  202. package/json-schema/data/UniquenessValidation.json +33 -2
  203. package/json-schema/data/ValidationRule.json +693 -46
  204. package/json-schema/{system → driver}/Datasource.json +35 -0
  205. package/json-schema/{system → driver}/DriverCapabilities.json +10 -0
  206. package/json-schema/{system → driver}/DriverInterface.json +10 -0
  207. package/json-schema/{system → driver}/DriverOptions.json +11 -0
  208. package/json-schema/driver/MongoConfig.json +82 -0
  209. package/json-schema/driver/PostgresConfig.json +98 -0
  210. package/json-schema/hub/BillOfMaterials.json +70 -0
  211. package/json-schema/hub/ComposerRequest.json +86 -0
  212. package/json-schema/hub/ComposerResponse.json +2645 -0
  213. package/json-schema/hub/ConflictReport.json +53 -0
  214. package/json-schema/hub/DependencyRequirement.json +36 -0
  215. package/json-schema/hub/DeploymentTarget.json +38 -0
  216. package/json-schema/hub/HubSpace.json +279 -0
  217. package/json-schema/{system → hub}/License.json +11 -3
  218. package/json-schema/hub/MarketplacePlugin.json +141 -0
  219. package/json-schema/hub/PluginAuthor.json +26 -0
  220. package/json-schema/hub/PluginPricing.json +43 -0
  221. package/json-schema/hub/SpaceSubscription.json +77 -0
  222. package/json-schema/hub/SubscriptionStatus.json +16 -0
  223. package/json-schema/{system → hub}/Tenant.json +3 -5
  224. package/json-schema/kernel/FileMetadata.json +43 -0
  225. package/json-schema/kernel/KernelContext.json +62 -0
  226. package/json-schema/kernel/LogEntry.json +63 -0
  227. package/json-schema/kernel/LogFormat.json +15 -0
  228. package/json-schema/kernel/LogLevel.json +17 -0
  229. package/json-schema/kernel/LoggerConfig.json +70 -0
  230. package/json-schema/kernel/Manifest.json +2557 -0
  231. package/json-schema/{system → kernel}/PluginContext.json +8 -1
  232. package/json-schema/kernel/RuntimeMode.json +16 -0
  233. package/json-schema/kernel/ScopedStorageConfig.json +54 -0
  234. package/json-schema/kernel/StorageAdapterType.json +17 -0
  235. package/json-schema/kernel/StorageScope.json +18 -0
  236. package/json-schema/permission/CriteriaSharingRule.json +82 -0
  237. package/json-schema/{data → permission}/OWDModel.json +2 -1
  238. package/json-schema/{data → permission}/ObjectPermission.json +15 -0
  239. package/json-schema/permission/OwnerSharingRule.json +102 -0
  240. package/json-schema/{data → permission}/PermissionSet.json +15 -0
  241. package/json-schema/permission/ShareRecipientType.json +16 -0
  242. package/json-schema/{data → permission}/SharingLevel.json +2 -1
  243. package/json-schema/permission/SharingRule.json +182 -0
  244. package/json-schema/{data → permission}/SharingRuleType.json +1 -3
  245. package/json-schema/ui/FieldWidgetProps.json +30 -0
  246. package/llms.txt +182 -0
  247. package/package.json +38 -16
  248. package/prompts/README.md +18 -0
  249. package/prompts/architecture.md +81 -0
  250. package/prompts/implement-objectai.md +39 -0
  251. package/prompts/implement-objectos.md +48 -0
  252. package/prompts/implement-objectql.md +39 -0
  253. package/prompts/implement-objectui.md +46 -0
  254. package/prompts/instructions.md +91 -0
  255. package/dist/ai/workflow-automation.zod.d.ts.map +0 -1
  256. package/dist/data/flow.zod.d.ts.map +0 -1
  257. package/dist/data/permission.zod.d.ts.map +0 -1
  258. package/dist/data/sharing.zod.d.ts +0 -63
  259. package/dist/data/sharing.zod.d.ts.map +0 -1
  260. package/dist/data/sharing.zod.js +0 -57
  261. package/dist/data/trigger.zod.d.ts +0 -354
  262. package/dist/data/trigger.zod.d.ts.map +0 -1
  263. package/dist/data/trigger.zod.js +0 -195
  264. package/dist/data/workflow.zod.d.ts +0 -986
  265. package/dist/data/workflow.zod.d.ts.map +0 -1
  266. package/dist/system/api.zod.d.ts.map +0 -1
  267. package/dist/system/auth-protocol.d.ts.map +0 -1
  268. package/dist/system/auth.zod.d.ts.map +0 -1
  269. package/dist/system/datasource.zod.d.ts.map +0 -1
  270. package/dist/system/discovery.zod.d.ts.map +0 -1
  271. package/dist/system/driver.zod.d.ts +0 -1631
  272. package/dist/system/driver.zod.d.ts.map +0 -1
  273. package/dist/system/identity.zod.d.ts.map +0 -1
  274. package/dist/system/license.zod.d.ts.map +0 -1
  275. package/dist/system/manifest.zod.d.ts +0 -397
  276. package/dist/system/manifest.zod.d.ts.map +0 -1
  277. package/dist/system/organization.zod.d.ts.map +0 -1
  278. package/dist/system/plugin.zod.d.ts.map +0 -1
  279. package/dist/system/policy.zod.d.ts.map +0 -1
  280. package/dist/system/realtime.zod.d.ts.map +0 -1
  281. package/dist/system/role.zod.d.ts.map +0 -1
  282. package/dist/system/tenant.zod.d.ts.map +0 -1
  283. package/dist/system/territory.zod.d.ts.map +0 -1
  284. package/dist/system/webhook.zod.d.ts.map +0 -1
  285. package/json-schema/README.md +0 -127
  286. package/json-schema/data/FieldMapping.json +0 -83
  287. package/json-schema/data/FilterNode.json +0 -52
  288. package/json-schema/data/FilterOperator.json +0 -26
  289. package/json-schema/data/LogicOperator.json +0 -14
  290. package/json-schema/data/Mapping.json +0 -598
  291. package/json-schema/data/SharingRule.json +0 -58
  292. package/json-schema/data/TransformType.json +0 -18
  293. package/json-schema/data/Trigger.json +0 -73
  294. package/json-schema/data/TriggerContext.json +0 -61
  295. package/json-schema/data/TriggerTiming.json +0 -13
  296. package/json-schema/system/Manifest.json +0 -315
  297. /package/dist/{system → api}/realtime.zod.js +0 -0
  298. /package/dist/{system/auth.zod.js → auth/config.zod.js} +0 -0
  299. /package/dist/{system → auth}/identity.zod.js +0 -0
  300. /package/dist/{system → auth}/organization.zod.js +0 -0
  301. /package/dist/{system → auth}/policy.zod.js +0 -0
  302. /package/dist/{system/auth-protocol.js → auth/protocol.js} +0 -0
  303. /package/dist/{system → auth}/role.zod.d.ts +0 -0
  304. /package/dist/{system → auth}/role.zod.js +0 -0
  305. /package/dist/{system → automation}/webhook.zod.js +0 -0
  306. /package/dist/{system → permission}/territory.zod.d.ts +0 -0
  307. /package/dist/{system → permission}/territory.zod.js +0 -0
  308. /package/json-schema/{system → api}/ApiCapabilities.json +0 -0
  309. /package/json-schema/{system → api}/ApiMapping.json +0 -0
  310. /package/json-schema/{system → api}/Presence.json +0 -0
  311. /package/json-schema/{system → api}/PresenceStatus.json +0 -0
  312. /package/json-schema/{system → api}/RateLimit.json +0 -0
  313. /package/json-schema/{system → api}/RealtimeAction.json +0 -0
  314. /package/json-schema/{system → api}/RealtimeEvent.json +0 -0
  315. /package/json-schema/{system → api}/RealtimeEventType.json +0 -0
  316. /package/json-schema/{system → api}/Subscription.json +0 -0
  317. /package/json-schema/{system → api}/SubscriptionEvent.json +0 -0
  318. /package/json-schema/{system → api}/TransportProtocol.json +0 -0
  319. /package/json-schema/{system → auth}/Account.json +0 -0
  320. /package/json-schema/{system → auth}/AccountLinkingConfig.json +0 -0
  321. /package/json-schema/{system → auth}/AuditPolicy.json +0 -0
  322. /package/json-schema/{system → auth}/AuthConfig.json +0 -0
  323. /package/json-schema/{system → auth}/AuthPluginConfig.json +0 -0
  324. /package/json-schema/{system → auth}/AuthStrategy.json +0 -0
  325. /package/json-schema/{system → auth}/CSRFConfig.json +0 -0
  326. /package/json-schema/{system → auth}/DatabaseAdapter.json +0 -0
  327. /package/json-schema/{system → auth}/DatabaseMapping.json +0 -0
  328. /package/json-schema/{system → auth}/EmailPasswordConfig.json +0 -0
  329. /package/json-schema/{system → auth}/EnterpriseAuthConfig.json +0 -0
  330. /package/json-schema/{system → auth}/Invitation.json +0 -0
  331. /package/json-schema/{system → auth}/InvitationStatus.json +0 -0
  332. /package/json-schema/{system → auth}/LDAPConfig.json +0 -0
  333. /package/json-schema/{system → auth}/MagicLinkConfig.json +0 -0
  334. /package/json-schema/{system → auth}/Member.json +0 -0
  335. /package/json-schema/{system → auth}/NetworkPolicy.json +0 -0
  336. /package/json-schema/{system → auth}/OAuthProvider.json +0 -0
  337. /package/json-schema/{system → auth}/OIDCConfig.json +0 -0
  338. /package/json-schema/{system → auth}/Organization.json +0 -0
  339. /package/json-schema/{system → auth}/PasskeyConfig.json +0 -0
  340. /package/json-schema/{system → auth}/PasswordPolicy.json +0 -0
  341. /package/json-schema/{system → auth}/Policy.json +0 -0
  342. /package/json-schema/{system → auth}/RateLimitConfig.json +0 -0
  343. /package/json-schema/{system → auth}/Role.json +0 -0
  344. /package/json-schema/{system → auth}/SAMLConfig.json +0 -0
  345. /package/json-schema/{system → auth}/Session.json +0 -0
  346. /package/json-schema/{system → auth}/SessionConfig.json +0 -0
  347. /package/json-schema/{system → auth}/SessionPolicy.json +0 -0
  348. /package/json-schema/{system → auth}/StandardAuthProvider.json +0 -0
  349. /package/json-schema/{system → auth}/TwoFactorConfig.json +0 -0
  350. /package/json-schema/{system → auth}/User.json +0 -0
  351. /package/json-schema/{system → auth}/UserFieldMapping.json +0 -0
  352. /package/json-schema/{system → auth}/VerificationToken.json +0 -0
  353. /package/json-schema/{data → automation}/CustomScriptAction.json +0 -0
  354. /package/json-schema/{data → automation}/EmailAlertAction.json +0 -0
  355. /package/json-schema/{data → automation}/FieldUpdateAction.json +0 -0
  356. /package/json-schema/{data → automation}/FlowNode.json +0 -0
  357. /package/json-schema/{data → automation}/FlowNodeAction.json +0 -0
  358. /package/json-schema/{data → automation}/FlowVariable.json +0 -0
  359. /package/json-schema/{data → automation}/HttpCallAction.json +0 -0
  360. /package/json-schema/{data → automation}/PushNotificationAction.json +0 -0
  361. /package/json-schema/{data → automation}/SlackMessageAction.json +0 -0
  362. /package/json-schema/{data → automation}/SmsNotificationAction.json +0 -0
  363. /package/json-schema/{data → automation}/TaskCreationAction.json +0 -0
  364. /package/json-schema/{data → automation}/TeamsMessageAction.json +0 -0
  365. /package/json-schema/{system → automation}/Webhook.json +0 -0
  366. /package/json-schema/{system → automation}/WebhookReceiver.json +0 -0
  367. /package/json-schema/{data → automation}/WebhookTriggerAction.json +0 -0
  368. /package/json-schema/{system → automation}/WebhookTriggerType.json +0 -0
  369. /package/json-schema/{data → automation}/WorkflowAction.json +0 -0
  370. /package/json-schema/{data → automation}/WorkflowTriggerType.json +0 -0
  371. /package/json-schema/{system → driver}/DatasourceCapabilities.json +0 -0
  372. /package/json-schema/{system → driver}/DriverDefinition.json +0 -0
  373. /package/json-schema/{system → driver}/DriverType.json +0 -0
  374. /package/json-schema/{system → hub}/DatabaseLevelIsolationStrategy.json +0 -0
  375. /package/json-schema/{system → hub}/Feature.json +0 -0
  376. /package/json-schema/{system → hub}/LevelIsolationStrategySchema.json +0 -0
  377. /package/json-schema/{system → hub}/MetricType.json +0 -0
  378. /package/json-schema/{system → hub}/Plan.json +0 -0
  379. /package/json-schema/{system → hub}/RowLevelIsolationStrategy.json +0 -0
  380. /package/json-schema/{system → hub}/TenantIsolationConfig.json +0 -0
  381. /package/json-schema/{system → hub}/TenantIsolationLevel.json +0 -0
  382. /package/json-schema/{system → hub}/TenantQuota.json +0 -0
  383. /package/json-schema/{system → hub}/TenantSecurityPolicy.json +0 -0
  384. /package/json-schema/{system → kernel}/I18nContext.json +0 -0
  385. /package/json-schema/{system → kernel}/Logger.json +0 -0
  386. /package/json-schema/{system → kernel}/ObjectQLClient.json +0 -0
  387. /package/json-schema/{system → kernel}/Plugin.json +0 -0
  388. /package/json-schema/{system → kernel}/PluginLifecycle.json +0 -0
  389. /package/json-schema/{system → kernel}/Router.json +0 -0
  390. /package/json-schema/{system → kernel}/Scheduler.json +0 -0
  391. /package/json-schema/{system → kernel}/ScopedStorage.json +0 -0
  392. /package/json-schema/{system → kernel}/SystemAPI.json +0 -0
  393. /package/json-schema/{data → permission}/FieldPermission.json +0 -0
  394. /package/json-schema/{system → permission}/Territory.json +0 -0
  395. /package/json-schema/{system → permission}/TerritoryModel.json +0 -0
  396. /package/json-schema/{system → permission}/TerritoryType.json +0 -0
@@ -1,23 +1,4 @@
1
1
  import { z } from 'zod';
2
- /**
3
- * Filter Operator Enum
4
- * Standard SQL/NoSQL operators supported by the engine.
5
- */
6
- export declare const FilterOperator: z.ZodEnum<["=", "!=", "<>", ">", ">=", "<", "<=", "startswith", "contains", "notcontains", "between", "in", "notin", "is_null", "is_not_null"]>;
7
- /**
8
- * Filter Logic Operator
9
- */
10
- export declare const LogicOperator: z.ZodEnum<["and", "or", "not"]>;
11
- /**
12
- * Recursive Filter Node
13
- * Represents the "Where" clause.
14
- *
15
- * Structure: [Field, Operator, Value] OR [Logic, Filter, Filter...]
16
- * Examples:
17
- * - Simple: ["amount", ">", 1000]
18
- * - Logic: [["status", "=", "closed"], "or", ["amount", ">", 1000]]
19
- */
20
- export declare const FilterNodeSchema: z.ZodType<any>;
21
2
  /**
22
3
  * Sort Node
23
4
  * Represents "Order By".
@@ -108,14 +89,17 @@ export declare const AggregationNodeSchema: z.ZodObject<{
108
89
  field: z.ZodOptional<z.ZodString>;
109
90
  alias: z.ZodString;
110
91
  distinct: z.ZodOptional<z.ZodBoolean>;
92
+ filter: z.ZodOptional<z.ZodType<import("./filter.zod").FilterCondition, z.ZodTypeDef, import("./filter.zod").FilterCondition>>;
111
93
  }, "strip", z.ZodTypeAny, {
112
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
94
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
113
95
  alias: string;
96
+ filter?: import("./filter.zod").FilterCondition | undefined;
114
97
  field?: string | undefined;
115
98
  distinct?: boolean | undefined;
116
99
  }, {
117
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
100
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
118
101
  alias: string;
102
+ filter?: import("./filter.zod").FilterCondition | undefined;
119
103
  field?: string | undefined;
120
104
  distinct?: boolean | undefined;
121
105
  }>;
@@ -156,6 +140,17 @@ export declare const AggregationNodeSchema: z.ZodObject<{
156
140
  * }
157
141
  */
158
142
  export declare const JoinType: z.ZodEnum<["inner", "left", "right", "full"]>;
143
+ /**
144
+ * Join Execution Strategy
145
+ * Hints to the query engine on how to execute the join.
146
+ *
147
+ * Strategies:
148
+ * - **auto**: Engine decides best strategy (Default).
149
+ * - **database**: Push down join to the database (Requires same datasource).
150
+ * - **hash**: Load both sets into memory and hash join (Cross-datasource, memory intensive).
151
+ * - **loop**: Nested loop lookup (N+1 safe version). (Good for small right-side lookups).
152
+ */
153
+ export declare const JoinStrategy: z.ZodEnum<["auto", "database", "hash", "loop"]>;
159
154
  /**
160
155
  * Join Node
161
156
  * Represents table joins for combining data from multiple objects.
@@ -344,22 +339,22 @@ export declare const WindowSpecSchema: z.ZodObject<{
344
339
  end?: string | undefined;
345
340
  }>>;
346
341
  }, "strip", z.ZodTypeAny, {
347
- partitionBy?: string[] | undefined;
348
342
  orderBy?: {
349
343
  field: string;
350
344
  order: "asc" | "desc";
351
345
  }[] | undefined;
346
+ partitionBy?: string[] | undefined;
352
347
  frame?: {
353
348
  type?: "rows" | "range" | undefined;
354
349
  start?: string | undefined;
355
350
  end?: string | undefined;
356
351
  } | undefined;
357
352
  }, {
358
- partitionBy?: string[] | undefined;
359
353
  orderBy?: {
360
354
  field: string;
361
355
  order?: "asc" | "desc" | undefined;
362
356
  }[] | undefined;
357
+ partitionBy?: string[] | undefined;
363
358
  frame?: {
364
359
  type?: "rows" | "range" | undefined;
365
360
  start?: string | undefined;
@@ -439,22 +434,22 @@ export declare const WindowFunctionNodeSchema: z.ZodObject<{
439
434
  end?: string | undefined;
440
435
  }>>;
441
436
  }, "strip", z.ZodTypeAny, {
442
- partitionBy?: string[] | undefined;
443
437
  orderBy?: {
444
438
  field: string;
445
439
  order: "asc" | "desc";
446
440
  }[] | undefined;
441
+ partitionBy?: string[] | undefined;
447
442
  frame?: {
448
443
  type?: "rows" | "range" | undefined;
449
444
  start?: string | undefined;
450
445
  end?: string | undefined;
451
446
  } | undefined;
452
447
  }, {
453
- partitionBy?: string[] | undefined;
454
448
  orderBy?: {
455
449
  field: string;
456
450
  order?: "asc" | "desc" | undefined;
457
451
  }[] | undefined;
452
+ partitionBy?: string[] | undefined;
458
453
  frame?: {
459
454
  type?: "rows" | "range" | undefined;
460
455
  start?: string | undefined;
@@ -462,14 +457,14 @@ export declare const WindowFunctionNodeSchema: z.ZodObject<{
462
457
  } | undefined;
463
458
  }>;
464
459
  }, "strip", z.ZodTypeAny, {
465
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
460
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
466
461
  alias: string;
467
462
  over: {
468
- partitionBy?: string[] | undefined;
469
463
  orderBy?: {
470
464
  field: string;
471
465
  order: "asc" | "desc";
472
466
  }[] | undefined;
467
+ partitionBy?: string[] | undefined;
473
468
  frame?: {
474
469
  type?: "rows" | "range" | undefined;
475
470
  start?: string | undefined;
@@ -478,14 +473,14 @@ export declare const WindowFunctionNodeSchema: z.ZodObject<{
478
473
  };
479
474
  field?: string | undefined;
480
475
  }, {
481
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
476
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
482
477
  alias: string;
483
478
  over: {
484
- partitionBy?: string[] | undefined;
485
479
  orderBy?: {
486
480
  field: string;
487
481
  order?: "asc" | "desc" | undefined;
488
482
  }[] | undefined;
483
+ partitionBy?: string[] | undefined;
489
484
  frame?: {
490
485
  type?: "rows" | "range" | undefined;
491
486
  start?: string | undefined;
@@ -506,101 +501,28 @@ export declare const FieldNodeSchema: z.ZodType<any>;
506
501
  * This schema represents ObjectQL - a universal query language that abstracts
507
502
  * SQL, NoSQL, and SaaS APIs into a single unified interface.
508
503
  *
509
- * Key Features:
510
- * - **Filtering**: WHERE clauses with nested logic
511
- * - **Aggregations**: GROUP BY with COUNT, SUM, AVG, MIN, MAX
512
- * - **Joins**: INNER, LEFT, RIGHT, FULL OUTER joins
513
- * - **Window Functions**: ROW_NUMBER, RANK, LAG, LEAD, running totals
514
- * - **Subqueries**: Nested queries in joins and filters
515
- * - **Sorting & Pagination**: ORDER BY, LIMIT, OFFSET
504
+ * Updates (v2):
505
+ * - Aligned with modern ORM standards (Prisma/TypeORM)
506
+ * - Added `cursor` based pagination support
507
+ * - Renamed `top`/`skip` to `limit`/`offset`
508
+ * - Unified filtering syntax with `FilterConditionSchema`
516
509
  *
517
510
  * @example
518
511
  * // Simple query: SELECT name, email FROM account WHERE status = 'active'
519
512
  * {
520
513
  * object: 'account',
521
514
  * fields: ['name', 'email'],
522
- * filters: ['status', '=', 'active']
515
+ * where: { status: 'active' }
523
516
  * }
524
517
  *
525
518
  * @example
526
- * // Aggregation: SELECT region, SUM(amount) as total FROM sales GROUP BY region HAVING total > 10000
519
+ * // Pagination with Limit/Offset
527
520
  * {
528
- * object: 'sales',
529
- * fields: ['region'],
530
- * aggregations: [
531
- * { function: 'sum', field: 'amount', alias: 'total' }
532
- * ],
533
- * groupBy: ['region'],
534
- * having: ['total', '>', 10000]
535
- * }
536
- *
537
- * @example
538
- * // Join: SELECT o.*, c.name FROM orders o INNER JOIN customers c ON o.customer_id = c.id
539
- * {
540
- * object: 'order',
541
- * fields: ['id', 'amount'],
542
- * joins: [
543
- * {
544
- * type: 'inner',
545
- * object: 'customer',
546
- * alias: 'c',
547
- * on: ['order.customer_id', '=', 'c.id']
548
- * }
549
- * ]
550
- * }
551
- *
552
- * @example
553
- * // Window Function: Top 5 orders per customer
554
- * {
555
- * object: 'order',
556
- * fields: ['customer_id', 'amount', 'created_at'],
557
- * windowFunctions: [
558
- * {
559
- * function: 'row_number',
560
- * alias: 'customer_order_rank',
561
- * over: {
562
- * partitionBy: ['customer_id'],
563
- * orderBy: [{ field: 'amount', order: 'desc' }]
564
- * }
565
- * }
566
- * ]
567
- * }
568
- *
569
- * @example
570
- * // Complex: Customer lifetime value with rankings
571
- * {
572
- * object: 'customer',
573
- * fields: ['id', 'name'],
574
- * joins: [
575
- * {
576
- * type: 'left',
577
- * object: 'order',
578
- * alias: 'o',
579
- * on: ['customer.id', '=', 'o.customer_id']
580
- * }
581
- * ],
582
- * aggregations: [
583
- * { function: 'count', field: 'o.id', alias: 'order_count' },
584
- * { function: 'sum', field: 'o.amount', alias: 'lifetime_value' }
585
- * ],
586
- * groupBy: ['customer.id', 'customer.name'],
587
- * having: ['order_count', '>', 0],
588
- * sort: [{ field: 'lifetime_value', order: 'desc' }],
589
- * top: 100
590
- * }
591
- *
592
- * @example
593
- * // Salesforce SOQL: SELECT Name, (SELECT LastName FROM Contacts) FROM Account
594
- * {
595
- * object: 'account',
596
- * fields: ['name'],
597
- * joins: [
598
- * {
599
- * type: 'left',
600
- * object: 'contact',
601
- * on: ['account.id', '=', 'contact.account_id']
602
- * }
603
- * ]
521
+ * object: 'post',
522
+ * where: { published: true },
523
+ * orderBy: [{ field: 'created_at', order: 'desc' }],
524
+ * limit: 20,
525
+ * offset: 40
604
526
  * }
605
527
  */
606
528
  export declare const QuerySchema: z.ZodObject<{
@@ -608,23 +530,49 @@ export declare const QuerySchema: z.ZodObject<{
608
530
  object: z.ZodString;
609
531
  /** Select Clause */
610
532
  fields: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
533
+ /** Where Clause (Filtering) */
534
+ where: z.ZodOptional<z.ZodType<import("./filter.zod").FilterCondition, z.ZodTypeDef, import("./filter.zod").FilterCondition>>;
535
+ /** Order By Clause (Sorting) */
536
+ orderBy: z.ZodOptional<z.ZodArray<z.ZodObject<{
537
+ field: z.ZodString;
538
+ order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
539
+ }, "strip", z.ZodTypeAny, {
540
+ field: string;
541
+ order: "asc" | "desc";
542
+ }, {
543
+ field: string;
544
+ order?: "asc" | "desc" | undefined;
545
+ }>, "many">>;
546
+ /** Pagination */
547
+ limit: z.ZodOptional<z.ZodNumber>;
548
+ offset: z.ZodOptional<z.ZodNumber>;
549
+ cursor: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
550
+ /** Joins */
551
+ joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
611
552
  /** Aggregations */
612
553
  aggregations: z.ZodOptional<z.ZodArray<z.ZodObject<{
613
554
  function: z.ZodEnum<["count", "sum", "avg", "min", "max", "count_distinct", "array_agg", "string_agg"]>;
614
555
  field: z.ZodOptional<z.ZodString>;
615
556
  alias: z.ZodString;
616
557
  distinct: z.ZodOptional<z.ZodBoolean>;
558
+ filter: z.ZodOptional<z.ZodType<import("./filter.zod").FilterCondition, z.ZodTypeDef, import("./filter.zod").FilterCondition>>;
617
559
  }, "strip", z.ZodTypeAny, {
618
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
560
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
619
561
  alias: string;
562
+ filter?: import("./filter.zod").FilterCondition | undefined;
620
563
  field?: string | undefined;
621
564
  distinct?: boolean | undefined;
622
565
  }, {
623
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
566
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
624
567
  alias: string;
568
+ filter?: import("./filter.zod").FilterCondition | undefined;
625
569
  field?: string | undefined;
626
570
  distinct?: boolean | undefined;
627
571
  }>, "many">>;
572
+ /** Group By Clause */
573
+ groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
574
+ /** Having Clause */
575
+ having: z.ZodOptional<z.ZodType<import("./filter.zod").FilterCondition, z.ZodTypeDef, import("./filter.zod").FilterCondition>>;
628
576
  /** Window Functions */
629
577
  windowFunctions: z.ZodOptional<z.ZodArray<z.ZodObject<{
630
578
  function: z.ZodEnum<["row_number", "rank", "dense_rank", "percent_rank", "lag", "lead", "first_value", "last_value", "sum", "avg", "count", "min", "max"]>;
@@ -656,22 +604,22 @@ export declare const QuerySchema: z.ZodObject<{
656
604
  end?: string | undefined;
657
605
  }>>;
658
606
  }, "strip", z.ZodTypeAny, {
659
- partitionBy?: string[] | undefined;
660
607
  orderBy?: {
661
608
  field: string;
662
609
  order: "asc" | "desc";
663
610
  }[] | undefined;
611
+ partitionBy?: string[] | undefined;
664
612
  frame?: {
665
613
  type?: "rows" | "range" | undefined;
666
614
  start?: string | undefined;
667
615
  end?: string | undefined;
668
616
  } | undefined;
669
617
  }, {
670
- partitionBy?: string[] | undefined;
671
618
  orderBy?: {
672
619
  field: string;
673
620
  order?: "asc" | "desc" | undefined;
674
621
  }[] | undefined;
622
+ partitionBy?: string[] | undefined;
675
623
  frame?: {
676
624
  type?: "rows" | "range" | undefined;
677
625
  start?: string | undefined;
@@ -679,14 +627,14 @@ export declare const QuerySchema: z.ZodObject<{
679
627
  } | undefined;
680
628
  }>;
681
629
  }, "strip", z.ZodTypeAny, {
682
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
630
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
683
631
  alias: string;
684
632
  over: {
685
- partitionBy?: string[] | undefined;
686
633
  orderBy?: {
687
634
  field: string;
688
635
  order: "asc" | "desc";
689
636
  }[] | undefined;
637
+ partitionBy?: string[] | undefined;
690
638
  frame?: {
691
639
  type?: "rows" | "range" | undefined;
692
640
  start?: string | undefined;
@@ -695,14 +643,14 @@ export declare const QuerySchema: z.ZodObject<{
695
643
  };
696
644
  field?: string | undefined;
697
645
  }, {
698
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
646
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
699
647
  alias: string;
700
648
  over: {
701
- partitionBy?: string[] | undefined;
702
649
  orderBy?: {
703
650
  field: string;
704
651
  order?: "asc" | "desc" | undefined;
705
652
  }[] | undefined;
653
+ partitionBy?: string[] | undefined;
706
654
  frame?: {
707
655
  type?: "rows" | "range" | undefined;
708
656
  start?: string | undefined;
@@ -711,53 +659,39 @@ export declare const QuerySchema: z.ZodObject<{
711
659
  };
712
660
  field?: string | undefined;
713
661
  }>, "many">>;
714
- /** Where Clause */
715
- filters: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
716
- /** Joins */
717
- joins: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
718
- /** Group By Clause */
719
- groupBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
720
- /** Having Clause */
721
- having: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
722
- /** Order By Clause */
723
- sort: z.ZodOptional<z.ZodArray<z.ZodObject<{
724
- field: z.ZodString;
725
- order: z.ZodDefault<z.ZodEnum<["asc", "desc"]>>;
726
- }, "strip", z.ZodTypeAny, {
727
- field: string;
728
- order: "asc" | "desc";
729
- }, {
730
- field: string;
731
- order?: "asc" | "desc" | undefined;
732
- }>, "many">>;
733
- /** Pagination */
734
- top: z.ZodOptional<z.ZodNumber>;
735
- skip: z.ZodOptional<z.ZodNumber>;
736
662
  /** Subquery flag */
737
663
  distinct: z.ZodOptional<z.ZodBoolean>;
738
664
  }, "strip", z.ZodTypeAny, {
739
665
  object: string;
740
- sort?: {
666
+ where?: import("./filter.zod").FilterCondition | undefined;
667
+ distinct?: boolean | undefined;
668
+ fields?: any[] | undefined;
669
+ orderBy?: {
741
670
  field: string;
742
671
  order: "asc" | "desc";
743
672
  }[] | undefined;
744
- fields?: any[] | undefined;
745
- distinct?: boolean | undefined;
673
+ limit?: number | undefined;
674
+ offset?: number | undefined;
675
+ cursor?: Record<string, any> | undefined;
676
+ joins?: any[] | undefined;
746
677
  aggregations?: {
747
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
678
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
748
679
  alias: string;
680
+ filter?: import("./filter.zod").FilterCondition | undefined;
749
681
  field?: string | undefined;
750
682
  distinct?: boolean | undefined;
751
683
  }[] | undefined;
684
+ groupBy?: string[] | undefined;
685
+ having?: import("./filter.zod").FilterCondition | undefined;
752
686
  windowFunctions?: {
753
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
687
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
754
688
  alias: string;
755
689
  over: {
756
- partitionBy?: string[] | undefined;
757
690
  orderBy?: {
758
691
  field: string;
759
692
  order: "asc" | "desc";
760
693
  }[] | undefined;
694
+ partitionBy?: string[] | undefined;
761
695
  frame?: {
762
696
  type?: "rows" | "range" | undefined;
763
697
  start?: string | undefined;
@@ -766,35 +700,37 @@ export declare const QuerySchema: z.ZodObject<{
766
700
  };
767
701
  field?: string | undefined;
768
702
  }[] | undefined;
769
- filters?: any;
770
- joins?: any[] | undefined;
771
- groupBy?: string[] | undefined;
772
- having?: any;
773
- top?: number | undefined;
774
- skip?: number | undefined;
775
703
  }, {
776
704
  object: string;
777
- sort?: {
705
+ where?: import("./filter.zod").FilterCondition | undefined;
706
+ distinct?: boolean | undefined;
707
+ fields?: any[] | undefined;
708
+ orderBy?: {
778
709
  field: string;
779
710
  order?: "asc" | "desc" | undefined;
780
711
  }[] | undefined;
781
- fields?: any[] | undefined;
782
- distinct?: boolean | undefined;
712
+ limit?: number | undefined;
713
+ offset?: number | undefined;
714
+ cursor?: Record<string, any> | undefined;
715
+ joins?: any[] | undefined;
783
716
  aggregations?: {
784
- function: "min" | "max" | "count" | "sum" | "avg" | "count_distinct" | "array_agg" | "string_agg";
717
+ function: "count" | "sum" | "avg" | "min" | "max" | "count_distinct" | "array_agg" | "string_agg";
785
718
  alias: string;
719
+ filter?: import("./filter.zod").FilterCondition | undefined;
786
720
  field?: string | undefined;
787
721
  distinct?: boolean | undefined;
788
722
  }[] | undefined;
723
+ groupBy?: string[] | undefined;
724
+ having?: import("./filter.zod").FilterCondition | undefined;
789
725
  windowFunctions?: {
790
- function: "min" | "max" | "count" | "sum" | "avg" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
726
+ function: "count" | "sum" | "avg" | "min" | "max" | "row_number" | "rank" | "dense_rank" | "percent_rank" | "lag" | "lead" | "first_value" | "last_value";
791
727
  alias: string;
792
728
  over: {
793
- partitionBy?: string[] | undefined;
794
729
  orderBy?: {
795
730
  field: string;
796
731
  order?: "asc" | "desc" | undefined;
797
732
  }[] | undefined;
733
+ partitionBy?: string[] | undefined;
798
734
  frame?: {
799
735
  type?: "rows" | "range" | undefined;
800
736
  start?: string | undefined;
@@ -803,16 +739,9 @@ export declare const QuerySchema: z.ZodObject<{
803
739
  };
804
740
  field?: string | undefined;
805
741
  }[] | undefined;
806
- filters?: any;
807
- joins?: any[] | undefined;
808
- groupBy?: string[] | undefined;
809
- having?: any;
810
- top?: number | undefined;
811
- skip?: number | undefined;
812
742
  }>;
813
743
  export type QueryAST = z.infer<typeof QuerySchema>;
814
744
  export type QueryInput = z.input<typeof QuerySchema>;
815
- export type FilterNode = z.infer<typeof FilterNodeSchema>;
816
745
  export type SortNode = z.infer<typeof SortNodeSchema>;
817
746
  export type AggregationNode = z.infer<typeof AggregationNodeSchema>;
818
747
  export type JoinNode = z.infer<typeof JoinNodeSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"query.zod.d.ts","sourceRoot":"","sources":["../../src/data/query.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,cAAc,iJAMzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa,iCAA+B,CAAC;AAE1D;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAQ3C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;EAGzB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,mBAAmB,+FAG9B,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,QAAQ,+CAA6C,CAAC;AAEnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,eAAO,MAAM,cAAc,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAQzC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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