@objectstack/spec 0.3.1 → 0.3.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.
- package/dist/api/contract.zod.d.ts +4 -4
- package/dist/ui/view.zod.d.ts +2315 -54
- package/dist/ui/view.zod.d.ts.map +1 -1
- package/dist/ui/view.zod.js +102 -3
- package/json-schema/ui/FormField.json +61 -0
- package/json-schema/ui/FormSection.json +60 -1
- package/json-schema/ui/FormView.json +257 -2
- package/json-schema/ui/HttpMethod.json +16 -0
- package/json-schema/ui/HttpRequest.json +46 -0
- package/json-schema/ui/ListColumn.json +57 -0
- package/json-schema/ui/ListView.json +249 -4
- package/json-schema/ui/PaginationConfig.json +26 -0
- package/json-schema/ui/SelectionConfig.json +22 -0
- package/json-schema/ui/View.json +1012 -12
- package/json-schema/ui/ViewData.json +142 -0
- package/package.json +1 -1
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/ListColumn",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"ListColumn": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"field": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Field name (snake_case)"
|
|
10
|
+
},
|
|
11
|
+
"label": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Display label override"
|
|
14
|
+
},
|
|
15
|
+
"width": {
|
|
16
|
+
"type": "number",
|
|
17
|
+
"exclusiveMinimum": 0,
|
|
18
|
+
"description": "Column width in pixels"
|
|
19
|
+
},
|
|
20
|
+
"align": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"left",
|
|
24
|
+
"center",
|
|
25
|
+
"right"
|
|
26
|
+
],
|
|
27
|
+
"description": "Text alignment"
|
|
28
|
+
},
|
|
29
|
+
"hidden": {
|
|
30
|
+
"type": "boolean",
|
|
31
|
+
"description": "Hide column by default"
|
|
32
|
+
},
|
|
33
|
+
"sortable": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"description": "Allow sorting by this column"
|
|
36
|
+
},
|
|
37
|
+
"resizable": {
|
|
38
|
+
"type": "boolean",
|
|
39
|
+
"description": "Allow resizing this column"
|
|
40
|
+
},
|
|
41
|
+
"wrap": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Allow text wrapping"
|
|
44
|
+
},
|
|
45
|
+
"type": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Renderer type override (e.g., \"currency\", \"date\")"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"required": [
|
|
51
|
+
"field"
|
|
52
|
+
],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
57
|
+
}
|
|
@@ -21,11 +21,206 @@
|
|
|
21
21
|
],
|
|
22
22
|
"default": "grid"
|
|
23
23
|
},
|
|
24
|
+
"data": {
|
|
25
|
+
"anyOf": [
|
|
26
|
+
{
|
|
27
|
+
"type": "object",
|
|
28
|
+
"properties": {
|
|
29
|
+
"provider": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"const": "object"
|
|
32
|
+
},
|
|
33
|
+
"object": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Target object name"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": [
|
|
39
|
+
"provider",
|
|
40
|
+
"object"
|
|
41
|
+
],
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "object",
|
|
46
|
+
"properties": {
|
|
47
|
+
"provider": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"const": "api"
|
|
50
|
+
},
|
|
51
|
+
"read": {
|
|
52
|
+
"type": "object",
|
|
53
|
+
"properties": {
|
|
54
|
+
"url": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"description": "API endpoint URL"
|
|
57
|
+
},
|
|
58
|
+
"method": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"enum": [
|
|
61
|
+
"GET",
|
|
62
|
+
"POST",
|
|
63
|
+
"PUT",
|
|
64
|
+
"PATCH",
|
|
65
|
+
"DELETE"
|
|
66
|
+
],
|
|
67
|
+
"default": "GET",
|
|
68
|
+
"description": "HTTP method"
|
|
69
|
+
},
|
|
70
|
+
"headers": {
|
|
71
|
+
"type": "object",
|
|
72
|
+
"additionalProperties": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
},
|
|
75
|
+
"description": "Custom HTTP headers"
|
|
76
|
+
},
|
|
77
|
+
"params": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"additionalProperties": {},
|
|
80
|
+
"description": "Query parameters"
|
|
81
|
+
},
|
|
82
|
+
"body": {
|
|
83
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"required": [
|
|
87
|
+
"url"
|
|
88
|
+
],
|
|
89
|
+
"additionalProperties": false,
|
|
90
|
+
"description": "Configuration for fetching data"
|
|
91
|
+
},
|
|
92
|
+
"write": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"properties": {
|
|
95
|
+
"url": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "API endpoint URL"
|
|
98
|
+
},
|
|
99
|
+
"method": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"enum": [
|
|
102
|
+
"GET",
|
|
103
|
+
"POST",
|
|
104
|
+
"PUT",
|
|
105
|
+
"PATCH",
|
|
106
|
+
"DELETE"
|
|
107
|
+
],
|
|
108
|
+
"default": "GET",
|
|
109
|
+
"description": "HTTP method"
|
|
110
|
+
},
|
|
111
|
+
"headers": {
|
|
112
|
+
"type": "object",
|
|
113
|
+
"additionalProperties": {
|
|
114
|
+
"type": "string"
|
|
115
|
+
},
|
|
116
|
+
"description": "Custom HTTP headers"
|
|
117
|
+
},
|
|
118
|
+
"params": {
|
|
119
|
+
"type": "object",
|
|
120
|
+
"additionalProperties": {},
|
|
121
|
+
"description": "Query parameters"
|
|
122
|
+
},
|
|
123
|
+
"body": {
|
|
124
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"required": [
|
|
128
|
+
"url"
|
|
129
|
+
],
|
|
130
|
+
"additionalProperties": false,
|
|
131
|
+
"description": "Configuration for submitting data (for forms/editable tables)"
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"required": [
|
|
135
|
+
"provider"
|
|
136
|
+
],
|
|
137
|
+
"additionalProperties": false
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": {
|
|
142
|
+
"provider": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"const": "value"
|
|
145
|
+
},
|
|
146
|
+
"items": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {},
|
|
149
|
+
"description": "Static data array"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"required": [
|
|
153
|
+
"provider",
|
|
154
|
+
"items"
|
|
155
|
+
],
|
|
156
|
+
"additionalProperties": false
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"description": "Data source configuration (defaults to \"object\" provider)"
|
|
160
|
+
},
|
|
24
161
|
"columns": {
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{
|
|
164
|
+
"type": "array",
|
|
165
|
+
"items": {
|
|
166
|
+
"type": "string"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"type": "array",
|
|
171
|
+
"items": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"properties": {
|
|
174
|
+
"field": {
|
|
175
|
+
"type": "string",
|
|
176
|
+
"description": "Field name (snake_case)"
|
|
177
|
+
},
|
|
178
|
+
"label": {
|
|
179
|
+
"type": "string",
|
|
180
|
+
"description": "Display label override"
|
|
181
|
+
},
|
|
182
|
+
"width": {
|
|
183
|
+
"type": "number",
|
|
184
|
+
"exclusiveMinimum": 0,
|
|
185
|
+
"description": "Column width in pixels"
|
|
186
|
+
},
|
|
187
|
+
"align": {
|
|
188
|
+
"type": "string",
|
|
189
|
+
"enum": [
|
|
190
|
+
"left",
|
|
191
|
+
"center",
|
|
192
|
+
"right"
|
|
193
|
+
],
|
|
194
|
+
"description": "Text alignment"
|
|
195
|
+
},
|
|
196
|
+
"hidden": {
|
|
197
|
+
"type": "boolean",
|
|
198
|
+
"description": "Hide column by default"
|
|
199
|
+
},
|
|
200
|
+
"sortable": {
|
|
201
|
+
"type": "boolean",
|
|
202
|
+
"description": "Allow sorting by this column"
|
|
203
|
+
},
|
|
204
|
+
"resizable": {
|
|
205
|
+
"type": "boolean",
|
|
206
|
+
"description": "Allow resizing this column"
|
|
207
|
+
},
|
|
208
|
+
"wrap": {
|
|
209
|
+
"type": "boolean",
|
|
210
|
+
"description": "Allow text wrapping"
|
|
211
|
+
},
|
|
212
|
+
"type": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "Renderer type override (e.g., \"currency\", \"date\")"
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"required": [
|
|
218
|
+
"field"
|
|
219
|
+
],
|
|
220
|
+
"additionalProperties": false
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
],
|
|
29
224
|
"description": "Fields to display as columns"
|
|
30
225
|
},
|
|
31
226
|
"filter": {
|
|
@@ -69,6 +264,56 @@
|
|
|
69
264
|
},
|
|
70
265
|
"description": "Fields enabled for search"
|
|
71
266
|
},
|
|
267
|
+
"resizable": {
|
|
268
|
+
"type": "boolean",
|
|
269
|
+
"description": "Enable column resizing"
|
|
270
|
+
},
|
|
271
|
+
"striped": {
|
|
272
|
+
"type": "boolean",
|
|
273
|
+
"description": "Striped row styling"
|
|
274
|
+
},
|
|
275
|
+
"bordered": {
|
|
276
|
+
"type": "boolean",
|
|
277
|
+
"description": "Show borders"
|
|
278
|
+
},
|
|
279
|
+
"selection": {
|
|
280
|
+
"type": "object",
|
|
281
|
+
"properties": {
|
|
282
|
+
"type": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"enum": [
|
|
285
|
+
"none",
|
|
286
|
+
"single",
|
|
287
|
+
"multiple"
|
|
288
|
+
],
|
|
289
|
+
"default": "none",
|
|
290
|
+
"description": "Selection mode"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"additionalProperties": false,
|
|
294
|
+
"description": "Row selection configuration"
|
|
295
|
+
},
|
|
296
|
+
"pagination": {
|
|
297
|
+
"type": "object",
|
|
298
|
+
"properties": {
|
|
299
|
+
"pageSize": {
|
|
300
|
+
"type": "integer",
|
|
301
|
+
"exclusiveMinimum": 0,
|
|
302
|
+
"default": 25,
|
|
303
|
+
"description": "Number of records per page"
|
|
304
|
+
},
|
|
305
|
+
"pageSizeOptions": {
|
|
306
|
+
"type": "array",
|
|
307
|
+
"items": {
|
|
308
|
+
"type": "integer",
|
|
309
|
+
"exclusiveMinimum": 0
|
|
310
|
+
},
|
|
311
|
+
"description": "Available page size options"
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"description": "Pagination configuration"
|
|
316
|
+
},
|
|
72
317
|
"kanban": {
|
|
73
318
|
"type": "object",
|
|
74
319
|
"properties": {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/PaginationConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"PaginationConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"pageSize": {
|
|
8
|
+
"type": "integer",
|
|
9
|
+
"exclusiveMinimum": 0,
|
|
10
|
+
"default": 25,
|
|
11
|
+
"description": "Number of records per page"
|
|
12
|
+
},
|
|
13
|
+
"pageSizeOptions": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"exclusiveMinimum": 0
|
|
18
|
+
},
|
|
19
|
+
"description": "Available page size options"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/SelectionConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"SelectionConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"type": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"enum": [
|
|
10
|
+
"none",
|
|
11
|
+
"single",
|
|
12
|
+
"multiple"
|
|
13
|
+
],
|
|
14
|
+
"default": "none",
|
|
15
|
+
"description": "Selection mode"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
22
|
+
}
|