@objectstack/spec 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +73 -1
  2. package/dist/api/contract.zod.d.ts +1733 -0
  3. package/dist/api/contract.zod.d.ts.map +1 -0
  4. package/dist/api/contract.zod.js +138 -0
  5. package/dist/data/dataset.zod.d.ts +2 -2
  6. package/dist/data/field.zod.d.ts +1648 -10
  7. package/dist/data/field.zod.d.ts.map +1 -1
  8. package/dist/data/field.zod.js +149 -8
  9. package/dist/data/mapping.zod.d.ts +215 -2
  10. package/dist/data/mapping.zod.d.ts.map +1 -1
  11. package/dist/data/object.zod.d.ts +505 -25
  12. package/dist/data/object.zod.d.ts.map +1 -1
  13. package/dist/data/object.zod.js +32 -5
  14. package/dist/data/query.zod.d.ts +349 -0
  15. package/dist/data/query.zod.d.ts.map +1 -1
  16. package/dist/data/query.zod.js +77 -1
  17. package/dist/data/trigger.zod.d.ts +354 -0
  18. package/dist/data/trigger.zod.d.ts.map +1 -0
  19. package/dist/data/trigger.zod.js +195 -0
  20. package/dist/data/validation.zod.d.ts +83 -43
  21. package/dist/data/validation.zod.d.ts.map +1 -1
  22. package/dist/data/validation.zod.js +51 -5
  23. package/dist/index.d.ts +8 -0
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +9 -0
  26. package/dist/system/api.zod.d.ts +130 -4
  27. package/dist/system/api.zod.d.ts.map +1 -1
  28. package/dist/system/api.zod.js +4 -1
  29. package/dist/system/datasource.zod.d.ts +89 -6
  30. package/dist/system/datasource.zod.d.ts.map +1 -1
  31. package/dist/system/datasource.zod.js +33 -5
  32. package/dist/system/discovery.zod.d.ts +174 -0
  33. package/dist/system/discovery.zod.d.ts.map +1 -0
  34. package/dist/system/discovery.zod.js +53 -0
  35. package/dist/system/driver.zod.d.ts +1525 -0
  36. package/dist/system/driver.zod.d.ts.map +1 -0
  37. package/dist/system/driver.zod.js +290 -0
  38. package/dist/system/license.zod.d.ts +2 -2
  39. package/dist/system/manifest.zod.d.ts +323 -52
  40. package/dist/system/manifest.zod.d.ts.map +1 -1
  41. package/dist/system/manifest.zod.js +91 -17
  42. package/dist/system/plugin.zod.d.ts +3516 -0
  43. package/dist/system/plugin.zod.d.ts.map +1 -0
  44. package/dist/system/plugin.zod.js +226 -0
  45. package/dist/system/territory.zod.d.ts +1 -1
  46. package/dist/system/webhook.zod.d.ts +3 -3
  47. package/dist/ui/action.zod.d.ts +19 -12
  48. package/dist/ui/action.zod.d.ts.map +1 -1
  49. package/dist/ui/action.zod.js +7 -1
  50. package/dist/ui/app.zod.d.ts +109 -3
  51. package/dist/ui/app.zod.d.ts.map +1 -1
  52. package/dist/ui/app.zod.js +13 -2
  53. package/dist/ui/dashboard.zod.d.ts +9 -3
  54. package/dist/ui/dashboard.zod.d.ts.map +1 -1
  55. package/dist/ui/dashboard.zod.js +7 -1
  56. package/dist/ui/page.zod.d.ts +6 -6
  57. package/dist/ui/report.zod.d.ts +9 -0
  58. package/dist/ui/report.zod.d.ts.map +1 -1
  59. package/dist/ui/report.zod.js +7 -1
  60. package/dist/ui/theme.zod.d.ts +1221 -0
  61. package/dist/ui/theme.zod.d.ts.map +1 -0
  62. package/dist/ui/theme.zod.js +202 -0
  63. package/dist/ui/widget.zod.d.ts +350 -0
  64. package/dist/ui/widget.zod.d.ts.map +1 -0
  65. package/dist/ui/widget.zod.js +66 -0
  66. package/json-schema/Action.json +8 -2
  67. package/json-schema/ActionParam.json +8 -2
  68. package/json-schema/Address.json +40 -0
  69. package/json-schema/AggregationFunction.json +19 -0
  70. package/json-schema/AggregationNode.json +42 -0
  71. package/json-schema/Animation.json +56 -0
  72. package/json-schema/ApiCapabilities.json +28 -0
  73. package/json-schema/ApiError.json +27 -0
  74. package/json-schema/ApiRoutes.json +41 -0
  75. package/json-schema/App.json +13 -2
  76. package/json-schema/AsyncValidation.json +70 -0
  77. package/json-schema/BaseResponse.json +63 -0
  78. package/json-schema/BorderRadius.json +44 -0
  79. package/json-schema/Breakpoints.json +36 -0
  80. package/json-schema/BulkRequest.json +29 -0
  81. package/json-schema/BulkResponse.json +108 -0
  82. package/json-schema/ColorPalette.json +83 -0
  83. package/json-schema/ConditionalValidation.json +793 -0
  84. package/json-schema/CreateRequest.json +20 -0
  85. package/json-schema/CrossFieldValidation.json +56 -0
  86. package/json-schema/CustomValidator.json +57 -0
  87. package/json-schema/Datasource.json +0 -18
  88. package/json-schema/DeleteResponse.json +68 -0
  89. package/json-schema/Discovery.json +114 -0
  90. package/json-schema/DriverCapabilities.json +39 -0
  91. package/json-schema/DriverDefinition.json +66 -0
  92. package/json-schema/DriverInterface.json +58 -0
  93. package/json-schema/DriverOptions.json +23 -0
  94. package/json-schema/DriverType.json +1 -18
  95. package/json-schema/ExportRequest.json +786 -0
  96. package/json-schema/Field.json +75 -4
  97. package/json-schema/FieldType.json +8 -2
  98. package/json-schema/FieldWidgetProps.json +327 -0
  99. package/json-schema/I18nContext.json +12 -0
  100. package/json-schema/JoinNode.json +455 -0
  101. package/json-schema/JoinType.json +15 -0
  102. package/json-schema/ListRecordResponse.json +103 -0
  103. package/json-schema/LocationCoordinates.json +36 -0
  104. package/json-schema/Logger.json +25 -0
  105. package/json-schema/Manifest.json +243 -18
  106. package/json-schema/Mapping.json +328 -0
  107. package/json-schema/ModificationResult.json +46 -0
  108. package/json-schema/Object.json +103 -6
  109. package/json-schema/ObjectCapabilities.json +26 -0
  110. package/json-schema/ObjectQLClient.json +12 -0
  111. package/json-schema/Plugin.json +20 -0
  112. package/json-schema/PluginContext.json +91 -0
  113. package/json-schema/PluginLifecycle.json +11 -0
  114. package/json-schema/Query.json +328 -0
  115. package/json-schema/RecordData.json +11 -0
  116. package/json-schema/Router.json +12 -0
  117. package/json-schema/Scheduler.json +12 -0
  118. package/json-schema/ScopedStorage.json +12 -0
  119. package/json-schema/Shadow.json +44 -0
  120. package/json-schema/SingleRecordResponse.json +69 -0
  121. package/json-schema/Spacing.json +64 -0
  122. package/json-schema/SystemAPI.json +12 -0
  123. package/json-schema/Theme.json +543 -0
  124. package/json-schema/ThemeMode.json +14 -0
  125. package/json-schema/Trigger.json +73 -0
  126. package/json-schema/TriggerAction.json +14 -0
  127. package/json-schema/TriggerContext.json +61 -0
  128. package/json-schema/TriggerTiming.json +13 -0
  129. package/json-schema/Typography.json +142 -0
  130. package/json-schema/UpdateRequest.json +20 -0
  131. package/json-schema/ValidationRule.json +583 -0
  132. package/json-schema/WindowFunction.json +24 -0
  133. package/json-schema/WindowFunctionNode.json +104 -0
  134. package/json-schema/WindowSpec.json +65 -0
  135. package/json-schema/ZIndex.json +44 -0
  136. package/package.json +8 -3
@@ -0,0 +1,455 @@
1
+ {
2
+ "$ref": "#/definitions/JoinNode",
3
+ "definitions": {
4
+ "JoinNode": {
5
+ "type": "object",
6
+ "properties": {
7
+ "type": {
8
+ "type": "string",
9
+ "enum": [
10
+ "inner",
11
+ "left",
12
+ "right",
13
+ "full"
14
+ ],
15
+ "description": "Join type"
16
+ },
17
+ "object": {
18
+ "type": "string",
19
+ "description": "Object/table to join"
20
+ },
21
+ "alias": {
22
+ "type": "string",
23
+ "description": "Table alias"
24
+ },
25
+ "on": {
26
+ "anyOf": [
27
+ {
28
+ "type": "array",
29
+ "minItems": 3,
30
+ "maxItems": 3,
31
+ "items": [
32
+ {
33
+ "type": "string"
34
+ },
35
+ {
36
+ "type": "string",
37
+ "enum": [
38
+ "=",
39
+ "!=",
40
+ "<>",
41
+ ">",
42
+ ">=",
43
+ "<",
44
+ "<=",
45
+ "startswith",
46
+ "contains",
47
+ "notcontains",
48
+ "between",
49
+ "in",
50
+ "notin",
51
+ "is_null",
52
+ "is_not_null"
53
+ ]
54
+ },
55
+ {}
56
+ ]
57
+ },
58
+ {
59
+ "type": "array",
60
+ "items": {
61
+ "anyOf": [
62
+ {
63
+ "type": "string"
64
+ },
65
+ {
66
+ "anyOf": [
67
+ {
68
+ "type": "array",
69
+ "minItems": 3,
70
+ "maxItems": 3,
71
+ "items": [
72
+ {
73
+ "type": "string"
74
+ },
75
+ {
76
+ "type": "string",
77
+ "enum": [
78
+ "=",
79
+ "!=",
80
+ "<>",
81
+ ">",
82
+ ">=",
83
+ "<",
84
+ "<=",
85
+ "startswith",
86
+ "contains",
87
+ "notcontains",
88
+ "between",
89
+ "in",
90
+ "notin",
91
+ "is_null",
92
+ "is_not_null"
93
+ ]
94
+ },
95
+ {}
96
+ ]
97
+ },
98
+ {
99
+ "type": "array",
100
+ "items": {
101
+ "anyOf": [
102
+ {
103
+ "type": "string"
104
+ },
105
+ {}
106
+ ]
107
+ }
108
+ }
109
+ ]
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ ],
115
+ "description": "Join condition"
116
+ },
117
+ "subquery": {
118
+ "type": "object",
119
+ "properties": {
120
+ "object": {
121
+ "type": "string",
122
+ "description": "Object name (e.g. account)"
123
+ },
124
+ "fields": {
125
+ "type": "array",
126
+ "items": {
127
+ "anyOf": [
128
+ {
129
+ "type": "string"
130
+ },
131
+ {
132
+ "type": "object",
133
+ "properties": {
134
+ "field": {
135
+ "type": "string"
136
+ },
137
+ "fields": {
138
+ "type": "array",
139
+ "items": {}
140
+ },
141
+ "alias": {
142
+ "type": "string"
143
+ }
144
+ },
145
+ "required": [
146
+ "field"
147
+ ],
148
+ "additionalProperties": false
149
+ }
150
+ ]
151
+ },
152
+ "description": "Fields to retrieve"
153
+ },
154
+ "aggregations": {
155
+ "type": "array",
156
+ "items": {
157
+ "type": "object",
158
+ "properties": {
159
+ "function": {
160
+ "type": "string",
161
+ "enum": [
162
+ "count",
163
+ "sum",
164
+ "avg",
165
+ "min",
166
+ "max",
167
+ "count_distinct",
168
+ "array_agg",
169
+ "string_agg"
170
+ ],
171
+ "description": "Aggregation function"
172
+ },
173
+ "field": {
174
+ "type": "string",
175
+ "description": "Field to aggregate (optional for COUNT(*))"
176
+ },
177
+ "alias": {
178
+ "type": "string",
179
+ "description": "Result column alias"
180
+ },
181
+ "distinct": {
182
+ "type": "boolean",
183
+ "description": "Apply DISTINCT before aggregation"
184
+ }
185
+ },
186
+ "required": [
187
+ "function",
188
+ "alias"
189
+ ],
190
+ "additionalProperties": false
191
+ },
192
+ "description": "Aggregation functions (GROUP BY)"
193
+ },
194
+ "windowFunctions": {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "object",
198
+ "properties": {
199
+ "function": {
200
+ "type": "string",
201
+ "enum": [
202
+ "row_number",
203
+ "rank",
204
+ "dense_rank",
205
+ "percent_rank",
206
+ "lag",
207
+ "lead",
208
+ "first_value",
209
+ "last_value",
210
+ "sum",
211
+ "avg",
212
+ "count",
213
+ "min",
214
+ "max"
215
+ ],
216
+ "description": "Window function name"
217
+ },
218
+ "field": {
219
+ "type": "string",
220
+ "description": "Field to operate on (for aggregate window functions)"
221
+ },
222
+ "alias": {
223
+ "type": "string",
224
+ "description": "Result column alias"
225
+ },
226
+ "over": {
227
+ "type": "object",
228
+ "properties": {
229
+ "partitionBy": {
230
+ "type": "array",
231
+ "items": {
232
+ "type": "string"
233
+ },
234
+ "description": "PARTITION BY fields"
235
+ },
236
+ "orderBy": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "object",
240
+ "properties": {
241
+ "field": {
242
+ "type": "string"
243
+ },
244
+ "order": {
245
+ "type": "string",
246
+ "enum": [
247
+ "asc",
248
+ "desc"
249
+ ],
250
+ "default": "asc"
251
+ }
252
+ },
253
+ "required": [
254
+ "field"
255
+ ],
256
+ "additionalProperties": false
257
+ },
258
+ "description": "ORDER BY specification"
259
+ },
260
+ "frame": {
261
+ "type": "object",
262
+ "properties": {
263
+ "type": {
264
+ "type": "string",
265
+ "enum": [
266
+ "rows",
267
+ "range"
268
+ ]
269
+ },
270
+ "start": {
271
+ "type": "string",
272
+ "description": "Frame start (e.g., \"UNBOUNDED PRECEDING\", \"1 PRECEDING\")"
273
+ },
274
+ "end": {
275
+ "type": "string",
276
+ "description": "Frame end (e.g., \"CURRENT ROW\", \"1 FOLLOWING\")"
277
+ }
278
+ },
279
+ "additionalProperties": false,
280
+ "description": "Window frame specification"
281
+ }
282
+ },
283
+ "additionalProperties": false,
284
+ "description": "Window specification (OVER clause)"
285
+ }
286
+ },
287
+ "required": [
288
+ "function",
289
+ "alias",
290
+ "over"
291
+ ],
292
+ "additionalProperties": false
293
+ },
294
+ "description": "Window functions with OVER clause"
295
+ },
296
+ "filters": {
297
+ "anyOf": [
298
+ {
299
+ "type": "array",
300
+ "minItems": 3,
301
+ "maxItems": 3,
302
+ "items": [
303
+ {
304
+ "type": "string"
305
+ },
306
+ {
307
+ "type": "string",
308
+ "enum": [
309
+ "=",
310
+ "!=",
311
+ "<>",
312
+ ">",
313
+ ">=",
314
+ "<",
315
+ "<=",
316
+ "startswith",
317
+ "contains",
318
+ "notcontains",
319
+ "between",
320
+ "in",
321
+ "notin",
322
+ "is_null",
323
+ "is_not_null"
324
+ ]
325
+ },
326
+ {}
327
+ ]
328
+ },
329
+ {
330
+ "type": "array",
331
+ "items": {
332
+ "anyOf": [
333
+ {
334
+ "type": "string"
335
+ },
336
+ {}
337
+ ]
338
+ }
339
+ }
340
+ ],
341
+ "description": "Filtering criteria"
342
+ },
343
+ "joins": {
344
+ "type": "array",
345
+ "items": {},
346
+ "description": "Table joins"
347
+ },
348
+ "groupBy": {
349
+ "type": "array",
350
+ "items": {
351
+ "type": "string"
352
+ },
353
+ "description": "GROUP BY fields"
354
+ },
355
+ "having": {
356
+ "anyOf": [
357
+ {
358
+ "type": "array",
359
+ "minItems": 3,
360
+ "maxItems": 3,
361
+ "items": [
362
+ {
363
+ "type": "string"
364
+ },
365
+ {
366
+ "type": "string",
367
+ "enum": [
368
+ "=",
369
+ "!=",
370
+ "<>",
371
+ ">",
372
+ ">=",
373
+ "<",
374
+ "<=",
375
+ "startswith",
376
+ "contains",
377
+ "notcontains",
378
+ "between",
379
+ "in",
380
+ "notin",
381
+ "is_null",
382
+ "is_not_null"
383
+ ]
384
+ },
385
+ {}
386
+ ]
387
+ },
388
+ {
389
+ "type": "array",
390
+ "items": {
391
+ "anyOf": [
392
+ {
393
+ "type": "string"
394
+ },
395
+ {}
396
+ ]
397
+ }
398
+ }
399
+ ],
400
+ "description": "HAVING clause for aggregation filtering"
401
+ },
402
+ "sort": {
403
+ "type": "array",
404
+ "items": {
405
+ "type": "object",
406
+ "properties": {
407
+ "field": {
408
+ "type": "string"
409
+ },
410
+ "order": {
411
+ "type": "string",
412
+ "enum": [
413
+ "asc",
414
+ "desc"
415
+ ],
416
+ "default": "asc"
417
+ }
418
+ },
419
+ "required": [
420
+ "field"
421
+ ],
422
+ "additionalProperties": false
423
+ },
424
+ "description": "Sorting instructions"
425
+ },
426
+ "top": {
427
+ "type": "number",
428
+ "description": "Limit results"
429
+ },
430
+ "skip": {
431
+ "type": "number",
432
+ "description": "Offset results"
433
+ },
434
+ "distinct": {
435
+ "type": "boolean",
436
+ "description": "SELECT DISTINCT flag"
437
+ }
438
+ },
439
+ "required": [
440
+ "object"
441
+ ],
442
+ "additionalProperties": false,
443
+ "description": "Subquery instead of object"
444
+ }
445
+ },
446
+ "required": [
447
+ "type",
448
+ "object",
449
+ "on"
450
+ ],
451
+ "additionalProperties": false
452
+ }
453
+ },
454
+ "$schema": "http://json-schema.org/draft-07/schema#"
455
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "$ref": "#/definitions/JoinType",
3
+ "definitions": {
4
+ "JoinType": {
5
+ "type": "string",
6
+ "enum": [
7
+ "inner",
8
+ "left",
9
+ "right",
10
+ "full"
11
+ ]
12
+ }
13
+ },
14
+ "$schema": "http://json-schema.org/draft-07/schema#"
15
+ }
@@ -0,0 +1,103 @@
1
+ {
2
+ "$ref": "#/definitions/ListRecordResponse",
3
+ "definitions": {
4
+ "ListRecordResponse": {
5
+ "type": "object",
6
+ "properties": {
7
+ "success": {
8
+ "type": "boolean",
9
+ "description": "Operation success status"
10
+ },
11
+ "error": {
12
+ "type": "object",
13
+ "properties": {
14
+ "code": {
15
+ "type": "string",
16
+ "description": "Error code (e.g. validation_error)"
17
+ },
18
+ "message": {
19
+ "type": "string",
20
+ "description": "Readable error message"
21
+ },
22
+ "details": {
23
+ "description": "Additional error context (e.g. field validation errors)"
24
+ }
25
+ },
26
+ "required": [
27
+ "code",
28
+ "message"
29
+ ],
30
+ "additionalProperties": false,
31
+ "description": "Error details if success is false"
32
+ },
33
+ "meta": {
34
+ "type": "object",
35
+ "properties": {
36
+ "timestamp": {
37
+ "type": "string"
38
+ },
39
+ "duration": {
40
+ "type": "number"
41
+ },
42
+ "requestId": {
43
+ "type": "string"
44
+ },
45
+ "traceId": {
46
+ "type": "string"
47
+ }
48
+ },
49
+ "required": [
50
+ "timestamp"
51
+ ],
52
+ "additionalProperties": false,
53
+ "description": "Response metadata"
54
+ },
55
+ "data": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "object",
59
+ "additionalProperties": {},
60
+ "description": "Key-value map of record data"
61
+ },
62
+ "description": "Array of matching records"
63
+ },
64
+ "pagination": {
65
+ "type": "object",
66
+ "properties": {
67
+ "total": {
68
+ "type": "number",
69
+ "description": "Total matching records count"
70
+ },
71
+ "limit": {
72
+ "type": "number",
73
+ "description": "Page size"
74
+ },
75
+ "offset": {
76
+ "type": "number",
77
+ "description": "Page offset"
78
+ },
79
+ "hasMore": {
80
+ "type": "boolean",
81
+ "description": "Are there more pages?"
82
+ }
83
+ },
84
+ "required": [
85
+ "total",
86
+ "limit",
87
+ "offset",
88
+ "hasMore"
89
+ ],
90
+ "additionalProperties": false,
91
+ "description": "Pagination info"
92
+ }
93
+ },
94
+ "required": [
95
+ "success",
96
+ "data",
97
+ "pagination"
98
+ ],
99
+ "additionalProperties": false
100
+ }
101
+ },
102
+ "$schema": "http://json-schema.org/draft-07/schema#"
103
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "$ref": "#/definitions/LocationCoordinates",
3
+ "definitions": {
4
+ "LocationCoordinates": {
5
+ "type": "object",
6
+ "properties": {
7
+ "latitude": {
8
+ "type": "number",
9
+ "minimum": -90,
10
+ "maximum": 90,
11
+ "description": "Latitude coordinate"
12
+ },
13
+ "longitude": {
14
+ "type": "number",
15
+ "minimum": -180,
16
+ "maximum": 180,
17
+ "description": "Longitude coordinate"
18
+ },
19
+ "altitude": {
20
+ "type": "number",
21
+ "description": "Altitude in meters"
22
+ },
23
+ "accuracy": {
24
+ "type": "number",
25
+ "description": "Accuracy in meters"
26
+ }
27
+ },
28
+ "required": [
29
+ "latitude",
30
+ "longitude"
31
+ ],
32
+ "additionalProperties": false
33
+ }
34
+ },
35
+ "$schema": "http://json-schema.org/draft-07/schema#"
36
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "$ref": "#/definitions/Logger",
3
+ "definitions": {
4
+ "Logger": {
5
+ "type": "object",
6
+ "properties": {
7
+ "debug": {
8
+ "description": "(message: string, ...meta: any[]) => void"
9
+ },
10
+ "info": {
11
+ "description": "(message: string, ...meta: any[]) => void"
12
+ },
13
+ "warn": {
14
+ "description": "(message: string, ...meta: any[]) => void"
15
+ },
16
+ "error": {
17
+ "description": "(message: string, ...meta: any[]) => void"
18
+ }
19
+ },
20
+ "additionalProperties": false,
21
+ "description": "Structured Logger"
22
+ }
23
+ },
24
+ "$schema": "http://json-schema.org/draft-07/schema#"
25
+ }