@objectstack/spec 0.3.3 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/ai/conversation.zod.d.ts +14 -14
  2. package/dist/ai/cost.zod.d.ts +112 -112
  3. package/dist/ai/model-registry.zod.d.ts +44 -44
  4. package/dist/ai/nlq.zod.d.ts +2 -2
  5. package/dist/ai/orchestration.zod.d.ts +6 -6
  6. package/dist/ai/predictive.zod.d.ts +8 -8
  7. package/dist/ai/rag-pipeline.zod.d.ts +62 -62
  8. package/dist/api/contract.zod.d.ts +92 -92
  9. package/dist/api/discovery.zod.d.ts +2 -2
  10. package/dist/api/index.d.ts +2 -0
  11. package/dist/api/index.d.ts.map +1 -1
  12. package/dist/api/index.js +2 -0
  13. package/dist/api/odata.zod.d.ts +482 -0
  14. package/dist/api/odata.zod.d.ts.map +1 -0
  15. package/dist/api/odata.zod.js +401 -0
  16. package/dist/api/router.zod.d.ts +4 -4
  17. package/dist/auth/config.zod.d.ts +21 -21
  18. package/dist/auth/index.d.ts +1 -0
  19. package/dist/auth/index.d.ts.map +1 -1
  20. package/dist/auth/index.js +1 -0
  21. package/dist/auth/organization.zod.d.ts +2 -2
  22. package/dist/auth/role.zod.d.ts +14 -0
  23. package/dist/auth/role.zod.d.ts.map +1 -1
  24. package/dist/auth/role.zod.js +16 -1
  25. package/dist/auth/scim.zod.d.ts +2732 -0
  26. package/dist/auth/scim.zod.d.ts.map +1 -0
  27. package/dist/auth/scim.zod.js +811 -0
  28. package/dist/automation/approval.zod.d.ts +643 -0
  29. package/dist/automation/approval.zod.d.ts.map +1 -0
  30. package/dist/automation/approval.zod.js +84 -0
  31. package/dist/automation/connector.zod.d.ts +1284 -0
  32. package/dist/automation/connector.zod.d.ts.map +1 -0
  33. package/dist/automation/connector.zod.js +500 -0
  34. package/dist/automation/etl.zod.d.ts +623 -0
  35. package/dist/automation/etl.zod.d.ts.map +1 -0
  36. package/dist/automation/etl.zod.js +359 -0
  37. package/dist/automation/flow.zod.d.ts +6 -6
  38. package/dist/automation/index.d.ts +4 -0
  39. package/dist/automation/index.d.ts.map +1 -1
  40. package/dist/automation/index.js +4 -0
  41. package/dist/automation/sync.zod.d.ts +854 -0
  42. package/dist/automation/sync.zod.d.ts.map +1 -0
  43. package/dist/automation/sync.zod.js +444 -0
  44. package/dist/automation/webhook.zod.d.ts +24 -1
  45. package/dist/automation/webhook.zod.d.ts.map +1 -1
  46. package/dist/automation/webhook.zod.js +27 -3
  47. package/dist/automation/workflow.zod.d.ts +14 -0
  48. package/dist/automation/workflow.zod.d.ts.map +1 -1
  49. package/dist/automation/workflow.zod.js +16 -1
  50. package/dist/data/field.zod.d.ts +338 -8
  51. package/dist/data/field.zod.d.ts.map +1 -1
  52. package/dist/data/field.zod.js +100 -16
  53. package/dist/data/mapping.zod.d.ts +22 -10
  54. package/dist/data/mapping.zod.d.ts.map +1 -1
  55. package/dist/data/mapping.zod.js +16 -3
  56. package/dist/data/object.zod.d.ts +116 -22
  57. package/dist/data/object.zod.d.ts.map +1 -1
  58. package/dist/data/object.zod.js +4 -4
  59. package/dist/data/validation.zod.d.ts +18 -18
  60. package/dist/hub/composer.zod.d.ts +43 -1940
  61. package/dist/hub/composer.zod.d.ts.map +1 -1
  62. package/dist/hub/composer.zod.js +1 -1
  63. package/dist/hub/license.zod.d.ts +2 -2
  64. package/dist/hub/marketplace.zod.d.ts +6 -6
  65. package/dist/index.d.ts +2 -2
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +6 -3
  68. package/dist/permission/index.d.ts +7 -5
  69. package/dist/permission/index.d.ts.map +1 -1
  70. package/dist/permission/index.js +7 -5
  71. package/dist/permission/permission.zod.d.ts +14 -0
  72. package/dist/permission/permission.zod.d.ts.map +1 -1
  73. package/dist/permission/permission.zod.js +16 -1
  74. package/dist/permission/rls.zod.d.ts +605 -0
  75. package/dist/permission/rls.zod.d.ts.map +1 -0
  76. package/dist/permission/rls.zod.js +615 -0
  77. package/dist/permission/territory.zod.d.ts +13 -0
  78. package/dist/permission/territory.zod.d.ts.map +1 -1
  79. package/dist/permission/territory.zod.js +15 -1
  80. package/dist/shared/identifiers.zod.d.ts +87 -0
  81. package/dist/shared/identifiers.zod.d.ts.map +1 -0
  82. package/dist/shared/identifiers.zod.js +101 -0
  83. package/dist/shared/index.d.ts +6 -0
  84. package/dist/shared/index.d.ts.map +1 -0
  85. package/dist/{driver → shared}/index.js +5 -4
  86. package/dist/stack.zod.d.ts +19869 -0
  87. package/dist/stack.zod.d.ts.map +1 -0
  88. package/dist/stack.zod.js +248 -0
  89. package/dist/system/audit.zod.d.ts +12 -12
  90. package/dist/{kernel → system}/context.zod.d.ts.map +1 -1
  91. package/dist/{driver → system}/datasource.zod.d.ts +2 -2
  92. package/dist/{driver → system}/datasource.zod.d.ts.map +1 -1
  93. package/dist/{driver → system/driver}/mongo.zod.d.ts +2 -2
  94. package/dist/system/driver/mongo.zod.d.ts.map +1 -0
  95. package/dist/{driver → system/driver}/postgres.zod.d.ts +4 -4
  96. package/dist/system/driver/postgres.zod.d.ts.map +1 -0
  97. package/dist/{driver → system}/driver.zod.d.ts +14 -14
  98. package/dist/{driver → system}/driver.zod.d.ts.map +1 -1
  99. package/dist/system/events.zod.d.ts +15 -12
  100. package/dist/system/events.zod.d.ts.map +1 -1
  101. package/dist/system/events.zod.js +5 -1
  102. package/dist/system/feature.zod.d.ts +131 -0
  103. package/dist/system/feature.zod.d.ts.map +1 -0
  104. package/dist/system/feature.zod.js +45 -0
  105. package/dist/system/index.d.ts +10 -0
  106. package/dist/system/index.d.ts.map +1 -1
  107. package/dist/system/index.js +12 -0
  108. package/dist/system/job.zod.d.ts +8 -8
  109. package/dist/{kernel → system}/logger.zod.d.ts +4 -4
  110. package/dist/{kernel → system}/logger.zod.d.ts.map +1 -1
  111. package/dist/system/manifest.zod.d.ts +518 -0
  112. package/dist/system/manifest.zod.d.ts.map +1 -0
  113. package/dist/{kernel → system}/manifest.zod.js +8 -17
  114. package/dist/{kernel → system}/plugin.zod.d.ts.map +1 -1
  115. package/dist/{kernel → system}/scoped-storage.zod.d.ts +2 -2
  116. package/dist/{kernel → system}/scoped-storage.zod.d.ts.map +1 -1
  117. package/dist/ui/action.zod.d.ts +35 -10
  118. package/dist/ui/action.zod.d.ts.map +1 -1
  119. package/dist/ui/action.zod.js +30 -1
  120. package/dist/ui/app.zod.d.ts +23 -8
  121. package/dist/ui/app.zod.d.ts.map +1 -1
  122. package/dist/ui/app.zod.js +32 -4
  123. package/dist/ui/block.zod.d.ts +265 -0
  124. package/dist/ui/block.zod.d.ts.map +1 -0
  125. package/dist/ui/block.zod.js +90 -0
  126. package/dist/ui/component.zod.d.ts +265 -0
  127. package/dist/ui/component.zod.d.ts.map +1 -0
  128. package/dist/ui/component.zod.js +90 -0
  129. package/dist/ui/dashboard.zod.d.ts +15 -15
  130. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  131. package/dist/ui/dashboard.zod.js +18 -8
  132. package/dist/ui/index.d.ts +1 -0
  133. package/dist/ui/index.d.ts.map +1 -1
  134. package/dist/ui/index.js +1 -0
  135. package/dist/ui/page.zod.d.ts +21 -3
  136. package/dist/ui/page.zod.d.ts.map +1 -1
  137. package/dist/ui/page.zod.js +37 -4
  138. package/dist/ui/report.zod.d.ts +7 -7
  139. package/dist/ui/view.zod.d.ts +252 -240
  140. package/dist/ui/view.zod.d.ts.map +1 -1
  141. package/dist/ui/view.zod.js +32 -3
  142. package/dist/ui/widget.zod.d.ts +673 -5
  143. package/dist/ui/widget.zod.d.ts.map +1 -1
  144. package/dist/ui/widget.zod.js +294 -1
  145. package/json-schema/api/ODataError.json +65 -0
  146. package/json-schema/api/ODataFilterFunction.json +39 -0
  147. package/json-schema/api/ODataFilterOperator.json +24 -0
  148. package/json-schema/api/ODataMetadata.json +115 -0
  149. package/json-schema/api/ODataQuery.json +89 -0
  150. package/json-schema/api/ODataResponse.json +37 -0
  151. package/json-schema/auth/Role.json +3 -2
  152. package/json-schema/auth/SCIMAddress.json +50 -0
  153. package/json-schema/auth/SCIMEmail.json +38 -0
  154. package/json-schema/auth/SCIMEnterpriseUser.json +55 -0
  155. package/json-schema/auth/SCIMError.json +52 -0
  156. package/json-schema/auth/SCIMGroup.json +102 -0
  157. package/json-schema/auth/SCIMGroupReference.json +36 -0
  158. package/json-schema/auth/SCIMListResponse.json +606 -0
  159. package/json-schema/auth/SCIMMemberReference.json +36 -0
  160. package/json-schema/auth/SCIMMeta.json +35 -0
  161. package/json-schema/auth/SCIMName.json +36 -0
  162. package/json-schema/auth/SCIMPatchOperation.json +31 -0
  163. package/json-schema/auth/SCIMPatchRequest.json +56 -0
  164. package/json-schema/auth/SCIMPhoneNumber.json +40 -0
  165. package/json-schema/auth/SCIMUser.json +462 -0
  166. package/json-schema/automation/ApprovalAction.json +35 -0
  167. package/json-schema/automation/ApprovalActionType.json +15 -0
  168. package/json-schema/automation/ApprovalProcess.json +326 -0
  169. package/json-schema/automation/ApprovalStep.json +147 -0
  170. package/json-schema/automation/ApproverType.json +16 -0
  171. package/json-schema/automation/AuthField.json +73 -0
  172. package/json-schema/automation/Authentication.json +159 -0
  173. package/json-schema/automation/AuthenticationType.json +18 -0
  174. package/json-schema/automation/ConflictResolution.json +16 -0
  175. package/json-schema/automation/Connector.json +440 -0
  176. package/json-schema/automation/ConnectorCategory.json +26 -0
  177. package/json-schema/automation/ConnectorInstance.json +69 -0
  178. package/json-schema/automation/ConnectorOperation.json +117 -0
  179. package/json-schema/automation/ConnectorTrigger.json +54 -0
  180. package/json-schema/automation/DataDestinationConfig.json +89 -0
  181. package/json-schema/automation/DataSourceConfig.json +34 -0
  182. package/json-schema/automation/DataSyncConfig.json +355 -0
  183. package/json-schema/automation/ETLDestination.json +57 -0
  184. package/json-schema/automation/ETLEndpointType.json +19 -0
  185. package/json-schema/automation/ETLPipeline.json +252 -0
  186. package/json-schema/automation/ETLPipelineRun.json +107 -0
  187. package/json-schema/automation/ETLRunStatus.json +17 -0
  188. package/json-schema/automation/ETLSource.json +60 -0
  189. package/json-schema/automation/ETLSyncMode.json +14 -0
  190. package/json-schema/automation/ETLTransformation.json +46 -0
  191. package/json-schema/automation/ETLTransformationType.json +21 -0
  192. package/json-schema/automation/FieldMapping.json +36 -0
  193. package/json-schema/automation/OAuth2Config.json +43 -0
  194. package/json-schema/automation/OperationParameter.json +59 -0
  195. package/json-schema/automation/OperationType.json +17 -0
  196. package/json-schema/automation/SyncDirection.json +14 -0
  197. package/json-schema/automation/SyncExecutionResult.json +135 -0
  198. package/json-schema/automation/SyncExecutionStatus.json +17 -0
  199. package/json-schema/automation/SyncMode.json +14 -0
  200. package/json-schema/automation/Webhook.json +3 -1
  201. package/json-schema/automation/WebhookReceiver.json +3 -1
  202. package/json-schema/automation/WorkflowRule.json +3 -2
  203. package/json-schema/data/Field.json +62 -4
  204. package/json-schema/data/FieldType.json +12 -2
  205. package/json-schema/data/Object.json +62 -4
  206. package/json-schema/data/SelectOption.json +4 -2
  207. package/json-schema/data/VectorConfig.json +51 -0
  208. package/json-schema/hub/ComposerResponse.json +4 -2163
  209. package/json-schema/permission/PermissionSet.json +3 -1
  210. package/json-schema/permission/RLSConfig.json +59 -0
  211. package/json-schema/permission/RLSEvaluationResult.json +40 -0
  212. package/json-schema/permission/RLSOperation.json +16 -0
  213. package/json-schema/permission/RLSUserContext.json +51 -0
  214. package/json-schema/permission/RowLevelSecurityPolicy.json +77 -0
  215. package/json-schema/permission/Territory.json +3 -1
  216. package/json-schema/shared/EventName.json +12 -0
  217. package/json-schema/shared/SnakeCaseIdentifier.json +12 -0
  218. package/json-schema/shared/SystemIdentifier.json +12 -0
  219. package/json-schema/system/Event.json +3 -2
  220. package/json-schema/system/FeatureFlag.json +87 -0
  221. package/json-schema/system/FeatureStrategy.json +16 -0
  222. package/json-schema/system/Manifest.json +398 -0
  223. package/json-schema/ui/Action.json +25 -4
  224. package/json-schema/ui/ActionParam.json +12 -2
  225. package/json-schema/ui/App.json +18 -7
  226. package/json-schema/ui/ChartType.json +9 -1
  227. package/json-schema/ui/Dashboard.json +9 -1
  228. package/json-schema/ui/DashboardNavItem.json +3 -1
  229. package/json-schema/ui/DashboardWidget.json +9 -1
  230. package/json-schema/ui/FieldWidgetProps.json +62 -4
  231. package/json-schema/ui/FormView.json +4 -1
  232. package/json-schema/ui/GroupNavItem.json +3 -1
  233. package/json-schema/ui/ListView.json +7 -1
  234. package/json-schema/ui/NavigationItem.json +15 -5
  235. package/json-schema/ui/ObjectNavItem.json +3 -1
  236. package/json-schema/ui/Page.json +36 -4
  237. package/json-schema/ui/PageCardProps.json +32 -0
  238. package/json-schema/ui/PageComponent.json +33 -3
  239. package/json-schema/ui/PageComponentType.json +32 -0
  240. package/json-schema/ui/PageHeaderProps.json +39 -0
  241. package/json-schema/ui/PageNavItem.json +3 -1
  242. package/json-schema/ui/PageRegion.json +33 -3
  243. package/json-schema/ui/PageTabsProps.json +55 -0
  244. package/json-schema/ui/RecordDetailsProps.json +37 -0
  245. package/json-schema/ui/RecordHighlightsProps.json +24 -0
  246. package/json-schema/ui/RecordRelatedListProps.json +39 -0
  247. package/json-schema/ui/UrlNavItem.json +3 -1
  248. package/json-schema/ui/View.json +22 -4
  249. package/json-schema/ui/WidgetEvent.json +42 -0
  250. package/json-schema/ui/WidgetLifecycle.json +40 -0
  251. package/json-schema/ui/WidgetManifest.json +262 -0
  252. package/json-schema/ui/WidgetProperty.json +58 -0
  253. package/package.json +1 -1
  254. package/prompts/architecture.md +5 -5
  255. package/prompts/create-new-project.md +85 -0
  256. package/dist/driver/index.d.ts +0 -5
  257. package/dist/driver/index.d.ts.map +0 -1
  258. package/dist/driver/mongo.zod.d.ts.map +0 -1
  259. package/dist/driver/postgres.zod.d.ts.map +0 -1
  260. package/dist/kernel/index.d.ts +0 -12
  261. package/dist/kernel/index.d.ts.map +0 -1
  262. package/dist/kernel/index.js +0 -27
  263. package/dist/kernel/manifest.zod.d.ts +0 -2153
  264. package/dist/kernel/manifest.zod.d.ts.map +0 -1
  265. package/json-schema/kernel/Manifest.json +0 -2557
  266. /package/dist/{kernel → system}/context.zod.d.ts +0 -0
  267. /package/dist/{kernel → system}/context.zod.js +0 -0
  268. /package/dist/{driver → system}/datasource.zod.js +0 -0
  269. /package/dist/{driver → system/driver}/mongo.zod.js +0 -0
  270. /package/dist/{driver → system/driver}/postgres.zod.js +0 -0
  271. /package/dist/{driver → system}/driver.zod.js +0 -0
  272. /package/dist/{kernel → system}/logger.zod.js +0 -0
  273. /package/dist/{kernel → system}/plugin.zod.d.ts +0 -0
  274. /package/dist/{kernel → system}/plugin.zod.js +0 -0
  275. /package/dist/{kernel → system}/scoped-storage.zod.js +0 -0
  276. /package/json-schema/{driver → system}/Datasource.json +0 -0
  277. /package/json-schema/{driver → system}/DatasourceCapabilities.json +0 -0
  278. /package/json-schema/{driver → system}/DriverCapabilities.json +0 -0
  279. /package/json-schema/{driver → system}/DriverDefinition.json +0 -0
  280. /package/json-schema/{driver → system}/DriverInterface.json +0 -0
  281. /package/json-schema/{driver → system}/DriverOptions.json +0 -0
  282. /package/json-schema/{driver → system}/DriverType.json +0 -0
  283. /package/json-schema/{kernel → system}/FileMetadata.json +0 -0
  284. /package/json-schema/{kernel → system}/I18nContext.json +0 -0
  285. /package/json-schema/{kernel → system}/KernelContext.json +0 -0
  286. /package/json-schema/{kernel → system}/LogEntry.json +0 -0
  287. /package/json-schema/{kernel → system}/LogFormat.json +0 -0
  288. /package/json-schema/{kernel → system}/LogLevel.json +0 -0
  289. /package/json-schema/{kernel → system}/Logger.json +0 -0
  290. /package/json-schema/{kernel → system}/LoggerConfig.json +0 -0
  291. /package/json-schema/{driver → system}/MongoConfig.json +0 -0
  292. /package/json-schema/{kernel → system}/ObjectQLClient.json +0 -0
  293. /package/json-schema/{kernel → system}/Plugin.json +0 -0
  294. /package/json-schema/{kernel → system}/PluginContext.json +0 -0
  295. /package/json-schema/{kernel → system}/PluginLifecycle.json +0 -0
  296. /package/json-schema/{driver → system}/PostgresConfig.json +0 -0
  297. /package/json-schema/{kernel → system}/Router.json +0 -0
  298. /package/json-schema/{kernel → system}/RuntimeMode.json +0 -0
  299. /package/json-schema/{kernel → system}/Scheduler.json +0 -0
  300. /package/json-schema/{kernel → system}/ScopedStorage.json +0 -0
  301. /package/json-schema/{kernel → system}/ScopedStorageConfig.json +0 -0
  302. /package/json-schema/{kernel → system}/StorageAdapterType.json +0 -0
  303. /package/json-schema/{kernel → system}/StorageScope.json +0 -0
  304. /package/json-schema/{kernel → system}/SystemAPI.json +0 -0
@@ -124,6 +124,7 @@ export declare const DiscoverySchema: z.ZodObject<{
124
124
  }, "strip", z.ZodTypeAny, {
125
125
  name: string;
126
126
  version: string;
127
+ environment: "development" | "production" | "sandbox";
127
128
  locale: {
128
129
  default: string;
129
130
  timezone: string;
@@ -135,7 +136,6 @@ export declare const DiscoverySchema: z.ZodObject<{
135
136
  graphql: boolean;
136
137
  websockets: boolean;
137
138
  };
138
- environment: "development" | "production" | "sandbox";
139
139
  routes: {
140
140
  data: string;
141
141
  metadata: string;
@@ -147,6 +147,7 @@ export declare const DiscoverySchema: z.ZodObject<{
147
147
  }, {
148
148
  name: string;
149
149
  version: string;
150
+ environment: "development" | "production" | "sandbox";
150
151
  locale: {
151
152
  default: string;
152
153
  timezone: string;
@@ -158,7 +159,6 @@ export declare const DiscoverySchema: z.ZodObject<{
158
159
  graphql?: boolean | undefined;
159
160
  websockets?: boolean | undefined;
160
161
  };
161
- environment: "development" | "production" | "sandbox";
162
162
  routes: {
163
163
  data: string;
164
164
  metadata: string;
@@ -4,10 +4,12 @@
4
4
  * API Contracts & Envelopes
5
5
  * - Request/Response schemas
6
6
  * - Error handling
7
+ * - OData v4 compatibility
7
8
  */
8
9
  export * from './contract.zod';
9
10
  export * from './endpoint.zod';
10
11
  export * from './discovery.zod';
11
12
  export * from './realtime.zod';
12
13
  export * from './router.zod';
14
+ export * from './odata.zod';
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
package/dist/api/index.js CHANGED
@@ -5,6 +5,7 @@
5
5
  * API Contracts & Envelopes
6
6
  * - Request/Response schemas
7
7
  * - Error handling
8
+ * - OData v4 compatibility
8
9
  */
9
10
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
10
11
  if (k2 === undefined) k2 = k;
@@ -26,3 +27,4 @@ __exportStar(require("./endpoint.zod"), exports);
26
27
  __exportStar(require("./discovery.zod"), exports);
27
28
  __exportStar(require("./realtime.zod"), exports);
28
29
  __exportStar(require("./router.zod"), exports);
30
+ __exportStar(require("./odata.zod"), exports);
@@ -0,0 +1,482 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * OData v4 Protocol Support
4
+ *
5
+ * Open Data Protocol (OData) v4 is an industry-standard protocol for building
6
+ * and consuming RESTful APIs. It provides a uniform way to expose, structure,
7
+ * query, and manipulate data.
8
+ *
9
+ * ## Overview
10
+ *
11
+ * OData v4 provides standardized URL conventions for querying data including:
12
+ * - $select: Choose which fields to return
13
+ * - $filter: Filter results with complex expressions
14
+ * - $orderby: Sort results
15
+ * - $top/$skip: Pagination
16
+ * - $expand: Include related entities
17
+ * - $count: Get total count
18
+ *
19
+ * ## Use Cases
20
+ *
21
+ * 1. **Enterprise Integration**
22
+ * - Integrate with Microsoft Dynamics 365
23
+ * - Connect to SharePoint Online
24
+ * - SAP OData services
25
+ *
26
+ * 2. **API Standardization**
27
+ * - Provide consistent query interface
28
+ * - Standard pagination and filtering
29
+ * - Industry-recognized protocol
30
+ *
31
+ * 3. **External Data Sources**
32
+ * - Connect to OData-compliant systems
33
+ * - Federated queries
34
+ * - Data virtualization
35
+ *
36
+ * @see https://www.odata.org/documentation/
37
+ * @see https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html
38
+ *
39
+ * @example OData Query
40
+ * ```
41
+ * GET /api/odata/customers?
42
+ * $select=name,email&
43
+ * $filter=country eq 'US' and revenue gt 100000&
44
+ * $orderby=revenue desc&
45
+ * $top=10&
46
+ * $skip=20&
47
+ * $expand=orders&
48
+ * $count=true
49
+ * ```
50
+ *
51
+ * @example Programmatic Use
52
+ * ```typescript
53
+ * const query: ODataQuery = {
54
+ * select: ['name', 'email'],
55
+ * filter: "country eq 'US' and revenue gt 100000",
56
+ * orderby: 'revenue desc',
57
+ * top: 10,
58
+ * skip: 20,
59
+ * expand: ['orders'],
60
+ * count: true
61
+ * }
62
+ * ```
63
+ */
64
+ /**
65
+ * OData Query Options Schema
66
+ *
67
+ * System query options defined by OData v4 specification.
68
+ * These are URL query parameters that control the query execution.
69
+ *
70
+ * @see https://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html#sec_SystemQueryOptions
71
+ */
72
+ export declare const ODataQuerySchema: z.ZodObject<{
73
+ /**
74
+ * $select - Select specific fields to return
75
+ *
76
+ * Comma-separated list of field names to include in the response.
77
+ * Reduces payload size and improves performance.
78
+ *
79
+ * @example "name,email,phone"
80
+ * @example "id,customer/name" - With navigation path
81
+ */
82
+ $select: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
83
+ /**
84
+ * $filter - Filter results with conditions
85
+ *
86
+ * OData filter expression using comparison operators, logical operators,
87
+ * and functions.
88
+ *
89
+ * Comparison: eq, ne, lt, le, gt, ge
90
+ * Logical: and, or, not
91
+ * Functions: contains, startswith, endswith, length, indexof, substring, etc.
92
+ *
93
+ * @example "age gt 18"
94
+ * @example "country eq 'US' and revenue gt 100000"
95
+ * @example "contains(name, 'Smith')"
96
+ * @example "startswith(email, 'admin') and isActive eq true"
97
+ */
98
+ $filter: z.ZodOptional<z.ZodString>;
99
+ /**
100
+ * $orderby - Sort results
101
+ *
102
+ * Comma-separated list of fields with optional asc/desc.
103
+ * Default is ascending.
104
+ *
105
+ * @example "name"
106
+ * @example "revenue desc"
107
+ * @example "country asc, revenue desc"
108
+ */
109
+ $orderby: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
110
+ /**
111
+ * $top - Limit number of results
112
+ *
113
+ * Maximum number of results to return.
114
+ * Equivalent to SQL LIMIT or FETCH FIRST.
115
+ *
116
+ * @example 10
117
+ * @example 100
118
+ */
119
+ $top: z.ZodOptional<z.ZodNumber>;
120
+ /**
121
+ * $skip - Skip results for pagination
122
+ *
123
+ * Number of results to skip before returning results.
124
+ * Equivalent to SQL OFFSET.
125
+ *
126
+ * @example 20
127
+ * @example 100
128
+ */
129
+ $skip: z.ZodOptional<z.ZodNumber>;
130
+ /**
131
+ * $expand - Include related entities
132
+ *
133
+ * Comma-separated list of navigation properties to expand.
134
+ * Loads related data in the same request.
135
+ *
136
+ * @example "orders"
137
+ * @example "customer,products"
138
+ * @example "orders($select=id,total)" - With nested query options
139
+ */
140
+ $expand: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
141
+ /**
142
+ * $count - Include total count
143
+ *
144
+ * When true, includes totalResults count in response.
145
+ * Useful for pagination UI.
146
+ *
147
+ * @example true
148
+ */
149
+ $count: z.ZodOptional<z.ZodBoolean>;
150
+ /**
151
+ * $search - Full-text search
152
+ *
153
+ * Free-text search expression.
154
+ * Search implementation is service-specific.
155
+ *
156
+ * @example "John Smith"
157
+ * @example "urgent AND support"
158
+ */
159
+ $search: z.ZodOptional<z.ZodString>;
160
+ /**
161
+ * $format - Response format
162
+ *
163
+ * Preferred response format.
164
+ *
165
+ * @example "json"
166
+ * @example "xml"
167
+ */
168
+ $format: z.ZodOptional<z.ZodEnum<["json", "xml", "atom"]>>;
169
+ /**
170
+ * $apply - Data aggregation
171
+ *
172
+ * Aggregation transformations (groupby, aggregate, etc.)
173
+ * Part of OData aggregation extension.
174
+ *
175
+ * @example "groupby((country),aggregate(revenue with sum as totalRevenue))"
176
+ */
177
+ $apply: z.ZodOptional<z.ZodString>;
178
+ }, "strip", z.ZodTypeAny, {
179
+ $select?: string | string[] | undefined;
180
+ $filter?: string | undefined;
181
+ $orderby?: string | string[] | undefined;
182
+ $top?: number | undefined;
183
+ $skip?: number | undefined;
184
+ $expand?: string | string[] | undefined;
185
+ $count?: boolean | undefined;
186
+ $search?: string | undefined;
187
+ $format?: "json" | "xml" | "atom" | undefined;
188
+ $apply?: string | undefined;
189
+ }, {
190
+ $select?: string | string[] | undefined;
191
+ $filter?: string | undefined;
192
+ $orderby?: string | string[] | undefined;
193
+ $top?: number | undefined;
194
+ $skip?: number | undefined;
195
+ $expand?: string | string[] | undefined;
196
+ $count?: boolean | undefined;
197
+ $search?: string | undefined;
198
+ $format?: "json" | "xml" | "atom" | undefined;
199
+ $apply?: string | undefined;
200
+ }>;
201
+ export type ODataQuery = z.infer<typeof ODataQuerySchema>;
202
+ /**
203
+ * OData Filter Operator
204
+ *
205
+ * Standard comparison and logical operators in OData filter expressions.
206
+ */
207
+ export declare const ODataFilterOperatorSchema: z.ZodEnum<["eq", "ne", "lt", "le", "gt", "ge", "and", "or", "not", "(", ")", "in", "has"]>;
208
+ export type ODataFilterOperator = z.infer<typeof ODataFilterOperatorSchema>;
209
+ /**
210
+ * OData Filter Function
211
+ *
212
+ * Standard functions available in OData filter expressions.
213
+ */
214
+ export declare const ODataFilterFunctionSchema: z.ZodEnum<["contains", "startswith", "endswith", "length", "indexof", "substring", "tolower", "toupper", "trim", "concat", "year", "month", "day", "hour", "minute", "second", "date", "time", "now", "maxdatetime", "mindatetime", "round", "floor", "ceiling", "cast", "isof", "any", "all"]>;
215
+ export type ODataFilterFunction = z.infer<typeof ODataFilterFunctionSchema>;
216
+ /**
217
+ * OData Response Schema
218
+ *
219
+ * Standard OData JSON response format.
220
+ */
221
+ export declare const ODataResponseSchema: z.ZodObject<{
222
+ /**
223
+ * OData context URL
224
+ * Describes the payload structure
225
+ */
226
+ '@odata.context': z.ZodOptional<z.ZodString>;
227
+ /**
228
+ * Total count (when $count=true)
229
+ */
230
+ '@odata.count': z.ZodOptional<z.ZodNumber>;
231
+ /**
232
+ * Next link for pagination
233
+ */
234
+ '@odata.nextLink': z.ZodOptional<z.ZodString>;
235
+ /**
236
+ * Result array
237
+ */
238
+ value: z.ZodArray<z.ZodRecord<z.ZodString, z.ZodAny>, "many">;
239
+ }, "strip", z.ZodTypeAny, {
240
+ value: Record<string, any>[];
241
+ '@odata.context'?: string | undefined;
242
+ '@odata.count'?: number | undefined;
243
+ '@odata.nextLink'?: string | undefined;
244
+ }, {
245
+ value: Record<string, any>[];
246
+ '@odata.context'?: string | undefined;
247
+ '@odata.count'?: number | undefined;
248
+ '@odata.nextLink'?: string | undefined;
249
+ }>;
250
+ export type ODataResponse = z.infer<typeof ODataResponseSchema>;
251
+ /**
252
+ * OData Error Response Schema
253
+ *
254
+ * Standard OData error format.
255
+ */
256
+ export declare const ODataErrorSchema: z.ZodObject<{
257
+ error: z.ZodObject<{
258
+ /**
259
+ * Error code
260
+ */
261
+ code: z.ZodString;
262
+ /**
263
+ * Error message
264
+ */
265
+ message: z.ZodString;
266
+ /**
267
+ * Target of the error (field name, etc.)
268
+ */
269
+ target: z.ZodOptional<z.ZodString>;
270
+ /**
271
+ * Additional error details
272
+ */
273
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
274
+ code: z.ZodString;
275
+ message: z.ZodString;
276
+ target: z.ZodOptional<z.ZodString>;
277
+ }, "strip", z.ZodTypeAny, {
278
+ message: string;
279
+ code: string;
280
+ target?: string | undefined;
281
+ }, {
282
+ message: string;
283
+ code: string;
284
+ target?: string | undefined;
285
+ }>, "many">>;
286
+ /**
287
+ * Inner error for debugging
288
+ */
289
+ innererror: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ message: string;
292
+ code: string;
293
+ target?: string | undefined;
294
+ details?: {
295
+ message: string;
296
+ code: string;
297
+ target?: string | undefined;
298
+ }[] | undefined;
299
+ innererror?: Record<string, any> | undefined;
300
+ }, {
301
+ message: string;
302
+ code: string;
303
+ target?: string | undefined;
304
+ details?: {
305
+ message: string;
306
+ code: string;
307
+ target?: string | undefined;
308
+ }[] | undefined;
309
+ innererror?: Record<string, any> | undefined;
310
+ }>;
311
+ }, "strip", z.ZodTypeAny, {
312
+ error: {
313
+ message: string;
314
+ code: string;
315
+ target?: string | undefined;
316
+ details?: {
317
+ message: string;
318
+ code: string;
319
+ target?: string | undefined;
320
+ }[] | undefined;
321
+ innererror?: Record<string, any> | undefined;
322
+ };
323
+ }, {
324
+ error: {
325
+ message: string;
326
+ code: string;
327
+ target?: string | undefined;
328
+ details?: {
329
+ message: string;
330
+ code: string;
331
+ target?: string | undefined;
332
+ }[] | undefined;
333
+ innererror?: Record<string, any> | undefined;
334
+ };
335
+ }>;
336
+ export type ODataError = z.infer<typeof ODataErrorSchema>;
337
+ /**
338
+ * OData Metadata Configuration
339
+ *
340
+ * Configuration for OData metadata endpoint ($metadata).
341
+ */
342
+ export declare const ODataMetadataSchema: z.ZodObject<{
343
+ /**
344
+ * Service namespace
345
+ */
346
+ namespace: z.ZodString;
347
+ /**
348
+ * Entity types to expose
349
+ */
350
+ entityTypes: z.ZodArray<z.ZodObject<{
351
+ name: z.ZodString;
352
+ key: z.ZodArray<z.ZodString, "many">;
353
+ properties: z.ZodArray<z.ZodObject<{
354
+ name: z.ZodString;
355
+ type: z.ZodString;
356
+ nullable: z.ZodDefault<z.ZodBoolean>;
357
+ }, "strip", z.ZodTypeAny, {
358
+ type: string;
359
+ name: string;
360
+ nullable: boolean;
361
+ }, {
362
+ type: string;
363
+ name: string;
364
+ nullable?: boolean | undefined;
365
+ }>, "many">;
366
+ navigationProperties: z.ZodOptional<z.ZodArray<z.ZodObject<{
367
+ name: z.ZodString;
368
+ type: z.ZodString;
369
+ partner: z.ZodOptional<z.ZodString>;
370
+ }, "strip", z.ZodTypeAny, {
371
+ type: string;
372
+ name: string;
373
+ partner?: string | undefined;
374
+ }, {
375
+ type: string;
376
+ name: string;
377
+ partner?: string | undefined;
378
+ }>, "many">>;
379
+ }, "strip", z.ZodTypeAny, {
380
+ name: string;
381
+ properties: {
382
+ type: string;
383
+ name: string;
384
+ nullable: boolean;
385
+ }[];
386
+ key: string[];
387
+ navigationProperties?: {
388
+ type: string;
389
+ name: string;
390
+ partner?: string | undefined;
391
+ }[] | undefined;
392
+ }, {
393
+ name: string;
394
+ properties: {
395
+ type: string;
396
+ name: string;
397
+ nullable?: boolean | undefined;
398
+ }[];
399
+ key: string[];
400
+ navigationProperties?: {
401
+ type: string;
402
+ name: string;
403
+ partner?: string | undefined;
404
+ }[] | undefined;
405
+ }>, "many">;
406
+ /**
407
+ * Entity sets
408
+ */
409
+ entitySets: z.ZodArray<z.ZodObject<{
410
+ name: z.ZodString;
411
+ entityType: z.ZodString;
412
+ }, "strip", z.ZodTypeAny, {
413
+ name: string;
414
+ entityType: string;
415
+ }, {
416
+ name: string;
417
+ entityType: string;
418
+ }>, "many">;
419
+ }, "strip", z.ZodTypeAny, {
420
+ namespace: string;
421
+ entityTypes: {
422
+ name: string;
423
+ properties: {
424
+ type: string;
425
+ name: string;
426
+ nullable: boolean;
427
+ }[];
428
+ key: string[];
429
+ navigationProperties?: {
430
+ type: string;
431
+ name: string;
432
+ partner?: string | undefined;
433
+ }[] | undefined;
434
+ }[];
435
+ entitySets: {
436
+ name: string;
437
+ entityType: string;
438
+ }[];
439
+ }, {
440
+ namespace: string;
441
+ entityTypes: {
442
+ name: string;
443
+ properties: {
444
+ type: string;
445
+ name: string;
446
+ nullable?: boolean | undefined;
447
+ }[];
448
+ key: string[];
449
+ navigationProperties?: {
450
+ type: string;
451
+ name: string;
452
+ partner?: string | undefined;
453
+ }[] | undefined;
454
+ }[];
455
+ entitySets: {
456
+ name: string;
457
+ entityType: string;
458
+ }[];
459
+ }>;
460
+ export type ODataMetadata = z.infer<typeof ODataMetadataSchema>;
461
+ /**
462
+ * Helper functions for OData operations
463
+ */
464
+ export declare const OData: {
465
+ /**
466
+ * Build OData query URL
467
+ */
468
+ readonly buildUrl: (baseUrl: string, query: ODataQuery) => string;
469
+ /**
470
+ * Create a simple filter expression
471
+ */
472
+ readonly filter: {
473
+ readonly eq: (field: string, value: string | number | boolean) => string;
474
+ readonly ne: (field: string, value: string | number | boolean) => string;
475
+ readonly gt: (field: string, value: number) => string;
476
+ readonly lt: (field: string, value: number) => string;
477
+ readonly contains: (field: string, value: string) => string;
478
+ readonly and: (...expressions: string[]) => string;
479
+ readonly or: (...expressions: string[]) => string;
480
+ };
481
+ };
482
+ //# sourceMappingURL=odata.zod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odata.zod.d.ts","sourceRoot":"","sources":["../../src/api/odata.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6DG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;;;;;;OAQG;;IAMH;;;;;;;;;;;;;;OAcG;;IAGH;;;;;;;;;OASG;;IAMH;;;;;;;;OAQG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;;;OASG;;IAMH;;;;;;;OAOG;;IAGH;;;;;;;;OAQG;;IAGH;;;;;;;OAOG;;IAGH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,4FAqBpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,iSAsCpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;;OAGG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;EAEH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;QAEzB;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;QAGH;;WAEG;;;;;;;;;;;;;;QAOH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGL,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;GAIG;AACH,eAAO,MAAM,mBAAmB;IAC9B;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKH,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,KAAK;IAChB;;OAEG;iCACiB,MAAM,SAAS,UAAU,KAAG,MAAM;IAsCtD;;OAEG;;6BAEW,MAAM,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO;6BAExC,MAAM,SAAS,MAAM,GAAG,MAAM,GAAG,OAAO;6BAExC,MAAM,SAAS,MAAM;6BACrB,MAAM,SAAS,MAAM;mCACf,MAAM,SAAS,MAAM;uCACjB,MAAM,EAAE;sCACT,MAAM,EAAE;;CAEvB,CAAC"}