@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.zod.d.ts","sourceRoot":"","sources":["../../src/ui/view.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAI7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;EAK/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;IAKzB,0BAA0B
|
|
1
|
+
{"version":3,"file":"view.zod.d.ts","sourceRoot":"","sources":["../../src/ui/view.zod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,gBAAgB,sDAAoD,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;EAM5B,CAAC;AAEH;;;;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AC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC1D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/ui/view.zod.js
CHANGED
|
@@ -1,7 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViewSchema = exports.FormViewSchema = exports.FormSectionSchema = exports.ListViewSchema = exports.GanttConfigSchema = exports.CalendarConfigSchema = exports.KanbanConfigSchema = void 0;
|
|
3
|
+
exports.ViewSchema = exports.FormViewSchema = exports.FormSectionSchema = exports.FormFieldSchema = exports.ListViewSchema = exports.GanttConfigSchema = exports.CalendarConfigSchema = exports.KanbanConfigSchema = exports.PaginationConfigSchema = exports.SelectionConfigSchema = exports.ListColumnSchema = exports.ViewDataSchema = exports.HttpRequestSchema = exports.HttpMethodSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* HTTP Method Enum
|
|
7
|
+
*/
|
|
8
|
+
exports.HttpMethodSchema = zod_1.z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE']);
|
|
9
|
+
/**
|
|
10
|
+
* HTTP Request Configuration for API Provider
|
|
11
|
+
*/
|
|
12
|
+
exports.HttpRequestSchema = zod_1.z.object({
|
|
13
|
+
url: zod_1.z.string().describe('API endpoint URL'),
|
|
14
|
+
method: exports.HttpMethodSchema.optional().default('GET').describe('HTTP method'),
|
|
15
|
+
headers: zod_1.z.record(zod_1.z.string()).optional().describe('Custom HTTP headers'),
|
|
16
|
+
params: zod_1.z.record(zod_1.z.unknown()).optional().describe('Query parameters'),
|
|
17
|
+
body: zod_1.z.unknown().optional().describe('Request body for POST/PUT/PATCH'),
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* View Data Source Configuration
|
|
21
|
+
* Supports three modes:
|
|
22
|
+
* 1. 'object': Standard Protocol - Auto-connects to ObjectStack Metadata and Data APIs
|
|
23
|
+
* 2. 'api': Custom API - Explicitly provided API URLs
|
|
24
|
+
* 3. 'value': Static Data - Hardcoded data array
|
|
25
|
+
*/
|
|
26
|
+
exports.ViewDataSchema = zod_1.z.discriminatedUnion('provider', [
|
|
27
|
+
zod_1.z.object({
|
|
28
|
+
provider: zod_1.z.literal('object'),
|
|
29
|
+
object: zod_1.z.string().describe('Target object name'),
|
|
30
|
+
}),
|
|
31
|
+
zod_1.z.object({
|
|
32
|
+
provider: zod_1.z.literal('api'),
|
|
33
|
+
read: exports.HttpRequestSchema.optional().describe('Configuration for fetching data'),
|
|
34
|
+
write: exports.HttpRequestSchema.optional().describe('Configuration for submitting data (for forms/editable tables)'),
|
|
35
|
+
}),
|
|
36
|
+
zod_1.z.object({
|
|
37
|
+
provider: zod_1.z.literal('value'),
|
|
38
|
+
items: zod_1.z.array(zod_1.z.unknown()).describe('Static data array'),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
/**
|
|
42
|
+
* List Column Configuration Schema
|
|
43
|
+
* Detailed configuration for individual list view columns
|
|
44
|
+
*/
|
|
45
|
+
exports.ListColumnSchema = zod_1.z.object({
|
|
46
|
+
field: zod_1.z.string().describe('Field name (snake_case)'),
|
|
47
|
+
label: zod_1.z.string().optional().describe('Display label override'),
|
|
48
|
+
width: zod_1.z.number().positive().optional().describe('Column width in pixels'),
|
|
49
|
+
align: zod_1.z.enum(['left', 'center', 'right']).optional().describe('Text alignment'),
|
|
50
|
+
hidden: zod_1.z.boolean().optional().describe('Hide column by default'),
|
|
51
|
+
sortable: zod_1.z.boolean().optional().describe('Allow sorting by this column'),
|
|
52
|
+
resizable: zod_1.z.boolean().optional().describe('Allow resizing this column'),
|
|
53
|
+
wrap: zod_1.z.boolean().optional().describe('Allow text wrapping'),
|
|
54
|
+
type: zod_1.z.string().optional().describe('Renderer type override (e.g., "currency", "date")'),
|
|
55
|
+
});
|
|
56
|
+
/**
|
|
57
|
+
* List View Selection Configuration
|
|
58
|
+
*/
|
|
59
|
+
exports.SelectionConfigSchema = zod_1.z.object({
|
|
60
|
+
type: zod_1.z.enum(['none', 'single', 'multiple']).default('none').describe('Selection mode'),
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* List View Pagination Configuration
|
|
64
|
+
*/
|
|
65
|
+
exports.PaginationConfigSchema = zod_1.z.object({
|
|
66
|
+
pageSize: zod_1.z.number().int().positive().default(25).describe('Number of records per page'),
|
|
67
|
+
pageSizeOptions: zod_1.z.array(zod_1.z.number().int().positive()).optional().describe('Available page size options'),
|
|
68
|
+
});
|
|
5
69
|
/**
|
|
6
70
|
* Kanban Settings
|
|
7
71
|
*/
|
|
@@ -36,8 +100,13 @@ exports.ListViewSchema = zod_1.z.object({
|
|
|
36
100
|
name: zod_1.z.string().optional(), // Internal name
|
|
37
101
|
label: zod_1.z.string().optional(), // Display label override
|
|
38
102
|
type: zod_1.z.enum(['grid', 'kanban', 'calendar', 'gantt', 'map']).default('grid'),
|
|
103
|
+
/** Data Source Configuration */
|
|
104
|
+
data: exports.ViewDataSchema.optional().describe('Data source configuration (defaults to "object" provider)'),
|
|
39
105
|
/** Shared Query Config */
|
|
40
|
-
columns: zod_1.z.
|
|
106
|
+
columns: zod_1.z.union([
|
|
107
|
+
zod_1.z.array(zod_1.z.string()), // Legacy: simple field names
|
|
108
|
+
zod_1.z.array(exports.ListColumnSchema), // Enhanced: detailed column config
|
|
109
|
+
]).describe('Fields to display as columns'),
|
|
41
110
|
filter: zod_1.z.array(zod_1.z.any()).optional().describe('Filter criteria (JSON Rules)'),
|
|
42
111
|
sort: zod_1.z.union([
|
|
43
112
|
zod_1.z.string(), //Legacy "field desc"
|
|
@@ -48,11 +117,36 @@ exports.ListViewSchema = zod_1.z.object({
|
|
|
48
117
|
]).optional(),
|
|
49
118
|
/** Search */
|
|
50
119
|
searchableFields: zod_1.z.array(zod_1.z.string()).optional().describe('Fields enabled for search'),
|
|
120
|
+
/** Grid Features */
|
|
121
|
+
resizable: zod_1.z.boolean().optional().describe('Enable column resizing'),
|
|
122
|
+
striped: zod_1.z.boolean().optional().describe('Striped row styling'),
|
|
123
|
+
bordered: zod_1.z.boolean().optional().describe('Show borders'),
|
|
124
|
+
/** Selection */
|
|
125
|
+
selection: exports.SelectionConfigSchema.optional().describe('Row selection configuration'),
|
|
126
|
+
/** Pagination */
|
|
127
|
+
pagination: exports.PaginationConfigSchema.optional().describe('Pagination configuration'),
|
|
51
128
|
/** Type Specific Config */
|
|
52
129
|
kanban: exports.KanbanConfigSchema.optional(),
|
|
53
130
|
calendar: exports.CalendarConfigSchema.optional(),
|
|
54
131
|
gantt: exports.GanttConfigSchema.optional(),
|
|
55
132
|
});
|
|
133
|
+
/**
|
|
134
|
+
* Form Field Configuration Schema
|
|
135
|
+
* Detailed configuration for individual form fields
|
|
136
|
+
*/
|
|
137
|
+
exports.FormFieldSchema = zod_1.z.object({
|
|
138
|
+
field: zod_1.z.string().describe('Field name (snake_case)'),
|
|
139
|
+
label: zod_1.z.string().optional().describe('Display label override'),
|
|
140
|
+
placeholder: zod_1.z.string().optional().describe('Placeholder text'),
|
|
141
|
+
helpText: zod_1.z.string().optional().describe('Help/hint text'),
|
|
142
|
+
readonly: zod_1.z.boolean().optional().describe('Read-only override'),
|
|
143
|
+
required: zod_1.z.boolean().optional().describe('Required override'),
|
|
144
|
+
hidden: zod_1.z.boolean().optional().describe('Hidden override'),
|
|
145
|
+
colSpan: zod_1.z.number().int().min(1).max(4).optional().describe('Column span in grid layout (1-4)'),
|
|
146
|
+
widget: zod_1.z.string().optional().describe('Custom widget/component name'),
|
|
147
|
+
dependsOn: zod_1.z.string().optional().describe('Parent field name for cascading'),
|
|
148
|
+
visibleOn: zod_1.z.string().optional().describe('Visibility condition expression'),
|
|
149
|
+
});
|
|
56
150
|
/**
|
|
57
151
|
* Form Layout Section
|
|
58
152
|
*/
|
|
@@ -61,13 +155,18 @@ exports.FormSectionSchema = zod_1.z.object({
|
|
|
61
155
|
collapsible: zod_1.z.boolean().default(false),
|
|
62
156
|
collapsed: zod_1.z.boolean().default(false),
|
|
63
157
|
columns: zod_1.z.enum(['1', '2', '3', '4']).default('2').transform(val => parseInt(val)),
|
|
64
|
-
fields: zod_1.z.array(zod_1.z.
|
|
158
|
+
fields: zod_1.z.array(zod_1.z.union([
|
|
159
|
+
zod_1.z.string(), // Legacy: simple field name
|
|
160
|
+
exports.FormFieldSchema, // Enhanced: detailed field config
|
|
161
|
+
])),
|
|
65
162
|
});
|
|
66
163
|
/**
|
|
67
164
|
* Form View Schema
|
|
68
165
|
*/
|
|
69
166
|
exports.FormViewSchema = zod_1.z.object({
|
|
70
167
|
type: zod_1.z.enum(['simple', 'tabbed', 'wizard']).default('simple'),
|
|
168
|
+
/** Data Source Configuration */
|
|
169
|
+
data: exports.ViewDataSchema.optional().describe('Data source configuration (defaults to "object" provider)'),
|
|
71
170
|
sections: zod_1.z.array(exports.FormSectionSchema).optional(), // For simple layout
|
|
72
171
|
groups: zod_1.z.array(exports.FormSectionSchema).optional(), // Legacy support -> alias to sections
|
|
73
172
|
});
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/FormField",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"FormField": {
|
|
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
|
+
"placeholder": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "Placeholder text"
|
|
18
|
+
},
|
|
19
|
+
"helpText": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "Help/hint text"
|
|
22
|
+
},
|
|
23
|
+
"readonly": {
|
|
24
|
+
"type": "boolean",
|
|
25
|
+
"description": "Read-only override"
|
|
26
|
+
},
|
|
27
|
+
"required": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "Required override"
|
|
30
|
+
},
|
|
31
|
+
"hidden": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Hidden override"
|
|
34
|
+
},
|
|
35
|
+
"colSpan": {
|
|
36
|
+
"type": "integer",
|
|
37
|
+
"minimum": 1,
|
|
38
|
+
"maximum": 4,
|
|
39
|
+
"description": "Column span in grid layout (1-4)"
|
|
40
|
+
},
|
|
41
|
+
"widget": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Custom widget/component name"
|
|
44
|
+
},
|
|
45
|
+
"dependsOn": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"description": "Parent field name for cascading"
|
|
48
|
+
},
|
|
49
|
+
"visibleOn": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"description": "Visibility condition expression"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"required": [
|
|
55
|
+
"field"
|
|
56
|
+
],
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
61
|
+
}
|
|
@@ -28,7 +28,66 @@
|
|
|
28
28
|
"fields": {
|
|
29
29
|
"type": "array",
|
|
30
30
|
"items": {
|
|
31
|
-
"
|
|
31
|
+
"anyOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"field": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "Field name (snake_case)"
|
|
41
|
+
},
|
|
42
|
+
"label": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Display label override"
|
|
45
|
+
},
|
|
46
|
+
"placeholder": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "Placeholder text"
|
|
49
|
+
},
|
|
50
|
+
"helpText": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"description": "Help/hint text"
|
|
53
|
+
},
|
|
54
|
+
"readonly": {
|
|
55
|
+
"type": "boolean",
|
|
56
|
+
"description": "Read-only override"
|
|
57
|
+
},
|
|
58
|
+
"required": {
|
|
59
|
+
"type": "boolean",
|
|
60
|
+
"description": "Required override"
|
|
61
|
+
},
|
|
62
|
+
"hidden": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"description": "Hidden override"
|
|
65
|
+
},
|
|
66
|
+
"colSpan": {
|
|
67
|
+
"type": "integer",
|
|
68
|
+
"minimum": 1,
|
|
69
|
+
"maximum": 4,
|
|
70
|
+
"description": "Column span in grid layout (1-4)"
|
|
71
|
+
},
|
|
72
|
+
"widget": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"description": "Custom widget/component name"
|
|
75
|
+
},
|
|
76
|
+
"dependsOn": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"description": "Parent field name for cascading"
|
|
79
|
+
},
|
|
80
|
+
"visibleOn": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"description": "Visibility condition expression"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"required": [
|
|
86
|
+
"field"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
}
|
|
90
|
+
]
|
|
32
91
|
}
|
|
33
92
|
}
|
|
34
93
|
},
|
|
@@ -13,6 +13,143 @@
|
|
|
13
13
|
],
|
|
14
14
|
"default": "simple"
|
|
15
15
|
},
|
|
16
|
+
"data": {
|
|
17
|
+
"anyOf": [
|
|
18
|
+
{
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"provider": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"const": "object"
|
|
24
|
+
},
|
|
25
|
+
"object": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Target object name"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"required": [
|
|
31
|
+
"provider",
|
|
32
|
+
"object"
|
|
33
|
+
],
|
|
34
|
+
"additionalProperties": false
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"provider": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"const": "api"
|
|
42
|
+
},
|
|
43
|
+
"read": {
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"url": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"description": "API endpoint URL"
|
|
49
|
+
},
|
|
50
|
+
"method": {
|
|
51
|
+
"type": "string",
|
|
52
|
+
"enum": [
|
|
53
|
+
"GET",
|
|
54
|
+
"POST",
|
|
55
|
+
"PUT",
|
|
56
|
+
"PATCH",
|
|
57
|
+
"DELETE"
|
|
58
|
+
],
|
|
59
|
+
"default": "GET",
|
|
60
|
+
"description": "HTTP method"
|
|
61
|
+
},
|
|
62
|
+
"headers": {
|
|
63
|
+
"type": "object",
|
|
64
|
+
"additionalProperties": {
|
|
65
|
+
"type": "string"
|
|
66
|
+
},
|
|
67
|
+
"description": "Custom HTTP headers"
|
|
68
|
+
},
|
|
69
|
+
"params": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": {},
|
|
72
|
+
"description": "Query parameters"
|
|
73
|
+
},
|
|
74
|
+
"body": {
|
|
75
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"required": [
|
|
79
|
+
"url"
|
|
80
|
+
],
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"description": "Configuration for fetching data"
|
|
83
|
+
},
|
|
84
|
+
"write": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"url": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "API endpoint URL"
|
|
90
|
+
},
|
|
91
|
+
"method": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"enum": [
|
|
94
|
+
"GET",
|
|
95
|
+
"POST",
|
|
96
|
+
"PUT",
|
|
97
|
+
"PATCH",
|
|
98
|
+
"DELETE"
|
|
99
|
+
],
|
|
100
|
+
"default": "GET",
|
|
101
|
+
"description": "HTTP method"
|
|
102
|
+
},
|
|
103
|
+
"headers": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"additionalProperties": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"description": "Custom HTTP headers"
|
|
109
|
+
},
|
|
110
|
+
"params": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"additionalProperties": {},
|
|
113
|
+
"description": "Query parameters"
|
|
114
|
+
},
|
|
115
|
+
"body": {
|
|
116
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": [
|
|
120
|
+
"url"
|
|
121
|
+
],
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"description": "Configuration for submitting data (for forms/editable tables)"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"provider"
|
|
128
|
+
],
|
|
129
|
+
"additionalProperties": false
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"provider": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"const": "value"
|
|
137
|
+
},
|
|
138
|
+
"items": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"items": {},
|
|
141
|
+
"description": "Static data array"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"provider",
|
|
146
|
+
"items"
|
|
147
|
+
],
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"description": "Data source configuration (defaults to \"object\" provider)"
|
|
152
|
+
},
|
|
16
153
|
"sections": {
|
|
17
154
|
"type": "array",
|
|
18
155
|
"items": {
|
|
@@ -42,7 +179,66 @@
|
|
|
42
179
|
"fields": {
|
|
43
180
|
"type": "array",
|
|
44
181
|
"items": {
|
|
45
|
-
"
|
|
182
|
+
"anyOf": [
|
|
183
|
+
{
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"type": "object",
|
|
188
|
+
"properties": {
|
|
189
|
+
"field": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"description": "Field name (snake_case)"
|
|
192
|
+
},
|
|
193
|
+
"label": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"description": "Display label override"
|
|
196
|
+
},
|
|
197
|
+
"placeholder": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"description": "Placeholder text"
|
|
200
|
+
},
|
|
201
|
+
"helpText": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"description": "Help/hint text"
|
|
204
|
+
},
|
|
205
|
+
"readonly": {
|
|
206
|
+
"type": "boolean",
|
|
207
|
+
"description": "Read-only override"
|
|
208
|
+
},
|
|
209
|
+
"required": {
|
|
210
|
+
"type": "boolean",
|
|
211
|
+
"description": "Required override"
|
|
212
|
+
},
|
|
213
|
+
"hidden": {
|
|
214
|
+
"type": "boolean",
|
|
215
|
+
"description": "Hidden override"
|
|
216
|
+
},
|
|
217
|
+
"colSpan": {
|
|
218
|
+
"type": "integer",
|
|
219
|
+
"minimum": 1,
|
|
220
|
+
"maximum": 4,
|
|
221
|
+
"description": "Column span in grid layout (1-4)"
|
|
222
|
+
},
|
|
223
|
+
"widget": {
|
|
224
|
+
"type": "string",
|
|
225
|
+
"description": "Custom widget/component name"
|
|
226
|
+
},
|
|
227
|
+
"dependsOn": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"description": "Parent field name for cascading"
|
|
230
|
+
},
|
|
231
|
+
"visibleOn": {
|
|
232
|
+
"type": "string",
|
|
233
|
+
"description": "Visibility condition expression"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"required": [
|
|
237
|
+
"field"
|
|
238
|
+
],
|
|
239
|
+
"additionalProperties": false
|
|
240
|
+
}
|
|
241
|
+
]
|
|
46
242
|
}
|
|
47
243
|
}
|
|
48
244
|
},
|
|
@@ -81,7 +277,66 @@
|
|
|
81
277
|
"fields": {
|
|
82
278
|
"type": "array",
|
|
83
279
|
"items": {
|
|
84
|
-
"
|
|
280
|
+
"anyOf": [
|
|
281
|
+
{
|
|
282
|
+
"type": "string"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"properties": {
|
|
287
|
+
"field": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "Field name (snake_case)"
|
|
290
|
+
},
|
|
291
|
+
"label": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Display label override"
|
|
294
|
+
},
|
|
295
|
+
"placeholder": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"description": "Placeholder text"
|
|
298
|
+
},
|
|
299
|
+
"helpText": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"description": "Help/hint text"
|
|
302
|
+
},
|
|
303
|
+
"readonly": {
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"description": "Read-only override"
|
|
306
|
+
},
|
|
307
|
+
"required": {
|
|
308
|
+
"type": "boolean",
|
|
309
|
+
"description": "Required override"
|
|
310
|
+
},
|
|
311
|
+
"hidden": {
|
|
312
|
+
"type": "boolean",
|
|
313
|
+
"description": "Hidden override"
|
|
314
|
+
},
|
|
315
|
+
"colSpan": {
|
|
316
|
+
"type": "integer",
|
|
317
|
+
"minimum": 1,
|
|
318
|
+
"maximum": 4,
|
|
319
|
+
"description": "Column span in grid layout (1-4)"
|
|
320
|
+
},
|
|
321
|
+
"widget": {
|
|
322
|
+
"type": "string",
|
|
323
|
+
"description": "Custom widget/component name"
|
|
324
|
+
},
|
|
325
|
+
"dependsOn": {
|
|
326
|
+
"type": "string",
|
|
327
|
+
"description": "Parent field name for cascading"
|
|
328
|
+
},
|
|
329
|
+
"visibleOn": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"description": "Visibility condition expression"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"required": [
|
|
335
|
+
"field"
|
|
336
|
+
],
|
|
337
|
+
"additionalProperties": false
|
|
338
|
+
}
|
|
339
|
+
]
|
|
85
340
|
}
|
|
86
341
|
}
|
|
87
342
|
},
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/HttpRequest",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"HttpRequest": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"url": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "API endpoint URL"
|
|
10
|
+
},
|
|
11
|
+
"method": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": [
|
|
14
|
+
"GET",
|
|
15
|
+
"POST",
|
|
16
|
+
"PUT",
|
|
17
|
+
"PATCH",
|
|
18
|
+
"DELETE"
|
|
19
|
+
],
|
|
20
|
+
"default": "GET",
|
|
21
|
+
"description": "HTTP method"
|
|
22
|
+
},
|
|
23
|
+
"headers": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"description": "Custom HTTP headers"
|
|
29
|
+
},
|
|
30
|
+
"params": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"additionalProperties": {},
|
|
33
|
+
"description": "Query parameters"
|
|
34
|
+
},
|
|
35
|
+
"body": {
|
|
36
|
+
"description": "Request body for POST/PUT/PATCH"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"url"
|
|
41
|
+
],
|
|
42
|
+
"additionalProperties": false
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
46
|
+
}
|