@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
@@ -24,6 +24,7 @@
24
24
  "password",
25
25
  "markdown",
26
26
  "html",
27
+ "richtext",
27
28
  "number",
28
29
  "currency",
29
30
  "percent",
@@ -32,7 +33,6 @@
32
33
  "time",
33
34
  "boolean",
34
35
  "select",
35
- "multiselect",
36
36
  "lookup",
37
37
  "master_detail",
38
38
  "image",
@@ -40,7 +40,13 @@
40
40
  "avatar",
41
41
  "formula",
42
42
  "summary",
43
- "autonumber"
43
+ "autonumber",
44
+ "location",
45
+ "address",
46
+ "code",
47
+ "color",
48
+ "rating",
49
+ "signature"
44
50
  ],
45
51
  "description": "Field Data Type"
46
52
  },
@@ -48,11 +54,20 @@
48
54
  "type": "string",
49
55
  "description": "Tooltip/Help text"
50
56
  },
57
+ "format": {
58
+ "type": "string",
59
+ "description": "Format string (e.g. email, phone)"
60
+ },
51
61
  "required": {
52
62
  "type": "boolean",
53
63
  "default": false,
54
64
  "description": "Is required"
55
65
  },
66
+ "searchable": {
67
+ "type": "boolean",
68
+ "default": false,
69
+ "description": "Is searchable"
70
+ },
56
71
  "multiple": {
57
72
  "type": "boolean",
58
73
  "default": false,
@@ -181,6 +196,64 @@
181
196
  "additionalProperties": false,
182
197
  "description": "Roll-up summary definition"
183
198
  },
199
+ "language": {
200
+ "type": "string",
201
+ "description": "Programming language for syntax highlighting (e.g., javascript, python, sql)"
202
+ },
203
+ "theme": {
204
+ "type": "string",
205
+ "description": "Code editor theme (e.g., dark, light, monokai)"
206
+ },
207
+ "lineNumbers": {
208
+ "type": "boolean",
209
+ "description": "Show line numbers in code editor"
210
+ },
211
+ "maxRating": {
212
+ "type": "number",
213
+ "description": "Maximum rating value (default: 5)"
214
+ },
215
+ "allowHalf": {
216
+ "type": "boolean",
217
+ "description": "Allow half-star ratings"
218
+ },
219
+ "displayMap": {
220
+ "type": "boolean",
221
+ "description": "Display map widget for location field"
222
+ },
223
+ "allowGeocoding": {
224
+ "type": "boolean",
225
+ "description": "Allow address-to-coordinate conversion"
226
+ },
227
+ "addressFormat": {
228
+ "type": "string",
229
+ "enum": [
230
+ "us",
231
+ "uk",
232
+ "international"
233
+ ],
234
+ "description": "Address format template"
235
+ },
236
+ "colorFormat": {
237
+ "type": "string",
238
+ "enum": [
239
+ "hex",
240
+ "rgb",
241
+ "rgba",
242
+ "hsl"
243
+ ],
244
+ "description": "Color value format"
245
+ },
246
+ "allowAlpha": {
247
+ "type": "boolean",
248
+ "description": "Allow transparency/alpha channel"
249
+ },
250
+ "presetColors": {
251
+ "type": "array",
252
+ "items": {
253
+ "type": "string"
254
+ },
255
+ "description": "Preset color options"
256
+ },
184
257
  "hidden": {
185
258
  "type": "boolean",
186
259
  "default": false,
@@ -208,8 +281,6 @@
208
281
  }
209
282
  },
210
283
  "required": [
211
- "name",
212
- "label",
213
284
  "type"
214
285
  ],
215
286
  "additionalProperties": false
@@ -12,6 +12,7 @@
12
12
  "password",
13
13
  "markdown",
14
14
  "html",
15
+ "richtext",
15
16
  "number",
16
17
  "currency",
17
18
  "percent",
@@ -20,7 +21,6 @@
20
21
  "time",
21
22
  "boolean",
22
23
  "select",
23
- "multiselect",
24
24
  "lookup",
25
25
  "master_detail",
26
26
  "image",
@@ -28,7 +28,13 @@
28
28
  "avatar",
29
29
  "formula",
30
30
  "summary",
31
- "autonumber"
31
+ "autonumber",
32
+ "location",
33
+ "address",
34
+ "code",
35
+ "color",
36
+ "rating",
37
+ "signature"
32
38
  ]
33
39
  }
34
40
  },
@@ -0,0 +1,327 @@
1
+ {
2
+ "$ref": "#/definitions/FieldWidgetProps",
3
+ "definitions": {
4
+ "FieldWidgetProps": {
5
+ "type": "object",
6
+ "properties": {
7
+ "value": {
8
+ "description": "Current field value"
9
+ },
10
+ "readonly": {
11
+ "type": "boolean",
12
+ "default": false,
13
+ "description": "Read-only mode flag"
14
+ },
15
+ "required": {
16
+ "type": "boolean",
17
+ "default": false,
18
+ "description": "Required field flag"
19
+ },
20
+ "error": {
21
+ "type": "string",
22
+ "description": "Validation error message"
23
+ },
24
+ "field": {
25
+ "type": "object",
26
+ "properties": {
27
+ "name": {
28
+ "type": "string",
29
+ "pattern": "^[a-z_][a-z0-9_]*$",
30
+ "description": "Machine name (snake_case)"
31
+ },
32
+ "label": {
33
+ "type": "string",
34
+ "description": "Human readable label"
35
+ },
36
+ "type": {
37
+ "type": "string",
38
+ "enum": [
39
+ "text",
40
+ "textarea",
41
+ "email",
42
+ "url",
43
+ "phone",
44
+ "password",
45
+ "markdown",
46
+ "html",
47
+ "richtext",
48
+ "number",
49
+ "currency",
50
+ "percent",
51
+ "date",
52
+ "datetime",
53
+ "time",
54
+ "boolean",
55
+ "select",
56
+ "lookup",
57
+ "master_detail",
58
+ "image",
59
+ "file",
60
+ "avatar",
61
+ "formula",
62
+ "summary",
63
+ "autonumber",
64
+ "location",
65
+ "address",
66
+ "code",
67
+ "color",
68
+ "rating",
69
+ "signature"
70
+ ],
71
+ "description": "Field Data Type"
72
+ },
73
+ "description": {
74
+ "type": "string",
75
+ "description": "Tooltip/Help text"
76
+ },
77
+ "format": {
78
+ "type": "string",
79
+ "description": "Format string (e.g. email, phone)"
80
+ },
81
+ "required": {
82
+ "type": "boolean",
83
+ "default": false,
84
+ "description": "Is required"
85
+ },
86
+ "searchable": {
87
+ "type": "boolean",
88
+ "default": false,
89
+ "description": "Is searchable"
90
+ },
91
+ "multiple": {
92
+ "type": "boolean",
93
+ "default": false,
94
+ "description": "Allow multiple values (Stores as Array/JSON). Applicable for select, lookup, file, image."
95
+ },
96
+ "unique": {
97
+ "type": "boolean",
98
+ "default": false,
99
+ "description": "Is unique constraint"
100
+ },
101
+ "defaultValue": {
102
+ "description": "Default value"
103
+ },
104
+ "maxLength": {
105
+ "type": "number",
106
+ "description": "Max character length"
107
+ },
108
+ "minLength": {
109
+ "type": "number",
110
+ "description": "Min character length"
111
+ },
112
+ "precision": {
113
+ "type": "number",
114
+ "description": "Total digits"
115
+ },
116
+ "scale": {
117
+ "type": "number",
118
+ "description": "Decimal places"
119
+ },
120
+ "min": {
121
+ "type": "number",
122
+ "description": "Minimum value"
123
+ },
124
+ "max": {
125
+ "type": "number",
126
+ "description": "Maximum value"
127
+ },
128
+ "options": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "object",
132
+ "properties": {
133
+ "label": {
134
+ "type": "string",
135
+ "description": "Display label"
136
+ },
137
+ "value": {
138
+ "type": "string",
139
+ "description": "Stored value"
140
+ },
141
+ "color": {
142
+ "type": "string",
143
+ "description": "Color code for badges/charts"
144
+ },
145
+ "default": {
146
+ "type": "boolean",
147
+ "description": "Is default option"
148
+ }
149
+ },
150
+ "required": [
151
+ "label",
152
+ "value"
153
+ ],
154
+ "additionalProperties": false
155
+ },
156
+ "description": "Static options for select/multiselect"
157
+ },
158
+ "reference": {
159
+ "type": "string",
160
+ "description": "Target Object Name"
161
+ },
162
+ "referenceFilters": {
163
+ "type": "array",
164
+ "items": {
165
+ "type": "string"
166
+ },
167
+ "description": "Filters applied to lookup dialogs (e.g. \"active = true\")"
168
+ },
169
+ "writeRequiresMasterRead": {
170
+ "type": "boolean",
171
+ "description": "If true, user needs read access to master record to edit this field"
172
+ },
173
+ "deleteBehavior": {
174
+ "type": "string",
175
+ "enum": [
176
+ "set_null",
177
+ "cascade",
178
+ "restrict"
179
+ ],
180
+ "default": "set_null",
181
+ "description": "What happens if referenced record is deleted"
182
+ },
183
+ "expression": {
184
+ "type": "string",
185
+ "description": "Formula expression"
186
+ },
187
+ "formula": {
188
+ "type": "string",
189
+ "description": "Deprecated: Use expression"
190
+ },
191
+ "summaryOperations": {
192
+ "type": "object",
193
+ "properties": {
194
+ "object": {
195
+ "type": "string"
196
+ },
197
+ "field": {
198
+ "type": "string"
199
+ },
200
+ "function": {
201
+ "type": "string",
202
+ "enum": [
203
+ "count",
204
+ "sum",
205
+ "min",
206
+ "max",
207
+ "avg"
208
+ ]
209
+ }
210
+ },
211
+ "required": [
212
+ "object",
213
+ "field",
214
+ "function"
215
+ ],
216
+ "additionalProperties": false,
217
+ "description": "Roll-up summary definition"
218
+ },
219
+ "language": {
220
+ "type": "string",
221
+ "description": "Programming language for syntax highlighting (e.g., javascript, python, sql)"
222
+ },
223
+ "theme": {
224
+ "type": "string",
225
+ "description": "Code editor theme (e.g., dark, light, monokai)"
226
+ },
227
+ "lineNumbers": {
228
+ "type": "boolean",
229
+ "description": "Show line numbers in code editor"
230
+ },
231
+ "maxRating": {
232
+ "type": "number",
233
+ "description": "Maximum rating value (default: 5)"
234
+ },
235
+ "allowHalf": {
236
+ "type": "boolean",
237
+ "description": "Allow half-star ratings"
238
+ },
239
+ "displayMap": {
240
+ "type": "boolean",
241
+ "description": "Display map widget for location field"
242
+ },
243
+ "allowGeocoding": {
244
+ "type": "boolean",
245
+ "description": "Allow address-to-coordinate conversion"
246
+ },
247
+ "addressFormat": {
248
+ "type": "string",
249
+ "enum": [
250
+ "us",
251
+ "uk",
252
+ "international"
253
+ ],
254
+ "description": "Address format template"
255
+ },
256
+ "colorFormat": {
257
+ "type": "string",
258
+ "enum": [
259
+ "hex",
260
+ "rgb",
261
+ "rgba",
262
+ "hsl"
263
+ ],
264
+ "description": "Color value format"
265
+ },
266
+ "allowAlpha": {
267
+ "type": "boolean",
268
+ "description": "Allow transparency/alpha channel"
269
+ },
270
+ "presetColors": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string"
274
+ },
275
+ "description": "Preset color options"
276
+ },
277
+ "hidden": {
278
+ "type": "boolean",
279
+ "default": false,
280
+ "description": "Hidden from default UI"
281
+ },
282
+ "readonly": {
283
+ "type": "boolean",
284
+ "default": false,
285
+ "description": "Read-only in UI"
286
+ },
287
+ "encryption": {
288
+ "type": "boolean",
289
+ "default": false,
290
+ "description": "Encrypt at rest"
291
+ },
292
+ "index": {
293
+ "type": "boolean",
294
+ "default": false,
295
+ "description": "Create standard database index"
296
+ },
297
+ "externalId": {
298
+ "type": "boolean",
299
+ "default": false,
300
+ "description": "Is external ID for upsert operations"
301
+ }
302
+ },
303
+ "required": [
304
+ "type"
305
+ ],
306
+ "additionalProperties": false,
307
+ "description": "Field schema definition"
308
+ },
309
+ "record": {
310
+ "type": "object",
311
+ "additionalProperties": {},
312
+ "description": "Complete record data"
313
+ },
314
+ "options": {
315
+ "type": "object",
316
+ "additionalProperties": {},
317
+ "description": "Custom widget options"
318
+ }
319
+ },
320
+ "required": [
321
+ "field"
322
+ ],
323
+ "additionalProperties": false
324
+ }
325
+ },
326
+ "$schema": "http://json-schema.org/draft-07/schema#"
327
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "$ref": "#/definitions/I18nContext",
3
+ "definitions": {
4
+ "I18nContext": {
5
+ "type": "object",
6
+ "properties": {},
7
+ "additionalProperties": false,
8
+ "description": "Internationalization Helper"
9
+ }
10
+ },
11
+ "$schema": "http://json-schema.org/draft-07/schema#"
12
+ }