@carthooks/arcubase-cli 0.1.2 → 0.1.3

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 (95) hide show
  1. package/bundle/arcubase-admin.mjs +907 -10
  2. package/bundle/arcubase.mjs +907 -10
  3. package/dist/runtime/command_registry.d.ts +8 -0
  4. package/dist/runtime/command_registry.d.ts.map +1 -1
  5. package/dist/runtime/command_registry.js +35 -0
  6. package/dist/runtime/entity_save_schema.d.ts +15 -0
  7. package/dist/runtime/entity_save_schema.d.ts.map +1 -0
  8. package/dist/runtime/entity_save_schema.js +641 -0
  9. package/dist/runtime/errors.d.ts +10 -0
  10. package/dist/runtime/errors.d.ts.map +1 -1
  11. package/dist/runtime/execute.d.ts.map +1 -1
  12. package/dist/runtime/execute.js +89 -10
  13. package/dist/runtime/zod_registry.d.ts +6 -0
  14. package/dist/runtime/zod_registry.d.ts.map +1 -1
  15. package/dist/runtime/zod_registry.js +133 -0
  16. package/dist/tests/command_registry.test.js +5 -0
  17. package/dist/tests/entity_save_schema.test.d.ts +2 -0
  18. package/dist/tests/entity_save_schema.test.d.ts.map +1 -0
  19. package/dist/tests/entity_save_schema.test.js +221 -0
  20. package/dist/tests/execute_validation.test.js +450 -0
  21. package/dist/tests/help.test.js +33 -0
  22. package/package.json +1 -1
  23. package/sdk-dist/docs/runtime-reference/README.md +177 -0
  24. package/sdk-dist/docs/runtime-reference/entity-schema/README.md +120 -0
  25. package/sdk-dist/docs/runtime-reference/entity-schema/address.md +34 -0
  26. package/sdk-dist/docs/runtime-reference/entity-schema/boolean.md +37 -0
  27. package/sdk-dist/docs/runtime-reference/entity-schema/button.md +47 -0
  28. package/sdk-dist/docs/runtime-reference/entity-schema/checkbox.md +61 -0
  29. package/sdk-dist/docs/runtime-reference/entity-schema/datasets.md +35 -0
  30. package/sdk-dist/docs/runtime-reference/entity-schema/datetime.md +40 -0
  31. package/sdk-dist/docs/runtime-reference/entity-schema/department.md +33 -0
  32. package/sdk-dist/docs/runtime-reference/entity-schema/departments.md +34 -0
  33. package/sdk-dist/docs/runtime-reference/entity-schema/divider.md +39 -0
  34. package/sdk-dist/docs/runtime-reference/entity-schema/file.md +44 -0
  35. package/sdk-dist/docs/runtime-reference/entity-schema/formula.md +44 -0
  36. package/sdk-dist/docs/runtime-reference/entity-schema/image.md +43 -0
  37. package/sdk-dist/docs/runtime-reference/entity-schema/linkto.md +67 -0
  38. package/sdk-dist/docs/runtime-reference/entity-schema/location.md +32 -0
  39. package/sdk-dist/docs/runtime-reference/entity-schema/lookup.md +41 -0
  40. package/sdk-dist/docs/runtime-reference/entity-schema/member.md +37 -0
  41. package/sdk-dist/docs/runtime-reference/entity-schema/members.md +31 -0
  42. package/sdk-dist/docs/runtime-reference/entity-schema/number.md +70 -0
  43. package/sdk-dist/docs/runtime-reference/entity-schema/query.md +50 -0
  44. package/sdk-dist/docs/runtime-reference/entity-schema/radio.md +53 -0
  45. package/sdk-dist/docs/runtime-reference/entity-schema/relation.md +55 -0
  46. package/sdk-dist/docs/runtime-reference/entity-schema/relationfield.md +38 -0
  47. package/sdk-dist/docs/runtime-reference/entity-schema/rollup.md +54 -0
  48. package/sdk-dist/docs/runtime-reference/entity-schema/select.md +63 -0
  49. package/sdk-dist/docs/runtime-reference/entity-schema/selects.md +51 -0
  50. package/sdk-dist/docs/runtime-reference/entity-schema/serialnumber.md +48 -0
  51. package/sdk-dist/docs/runtime-reference/entity-schema/signature.md +31 -0
  52. package/sdk-dist/docs/runtime-reference/entity-schema/status.md +70 -0
  53. package/sdk-dist/docs/runtime-reference/entity-schema/subform.md +74 -0
  54. package/sdk-dist/docs/runtime-reference/entity-schema/tags.md +19 -0
  55. package/sdk-dist/docs/runtime-reference/entity-schema/text.md +76 -0
  56. package/sdk-dist/docs/runtime-reference/entity-schema/textarea.md +47 -0
  57. package/sdk-dist/docs/runtime-reference/entity-schema/workflow_status.md +17 -0
  58. package/sdk-dist/docs/runtime-reference/entity-schema.md +197 -0
  59. package/sdk-dist/docs/runtime-reference/examples/README.md +51 -0
  60. package/sdk-dist/docs/runtime-reference/examples/crm-01/README.md +20 -0
  61. package/sdk-dist/docs/runtime-reference/examples/mes-01/README.md +21 -0
  62. package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +164 -0
  63. package/sdk-dist/docs/runtime-reference/examples/oms-01/app-overview.md +79 -0
  64. package/sdk-dist/docs/runtime-reference/examples/oms-01/create-app.json +3 -0
  65. package/sdk-dist/docs/runtime-reference/examples/oms-01/goods-receipt.create-entity.json +3 -0
  66. package/sdk-dist/docs/runtime-reference/examples/oms-01/goods-receipt.schema.json +159 -0
  67. package/sdk-dist/docs/runtime-reference/examples/oms-01/item-master.create-entity.json +3 -0
  68. package/sdk-dist/docs/runtime-reference/examples/oms-01/item-master.schema.json +179 -0
  69. package/sdk-dist/docs/runtime-reference/examples/oms-01/picking-list.create-entity.json +3 -0
  70. package/sdk-dist/docs/runtime-reference/examples/oms-01/picking-list.schema.json +168 -0
  71. package/sdk-dist/docs/runtime-reference/examples/oms-01/purchase-order.create-entity.json +3 -0
  72. package/sdk-dist/docs/runtime-reference/examples/oms-01/purchase-order.schema.json +417 -0
  73. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.bulk-update.json +22 -0
  74. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.create-entity.json +3 -0
  75. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.query.json +10 -0
  76. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.row.insert.json +28 -0
  77. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.schema.json +398 -0
  78. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.selection.condition.json +13 -0
  79. package/sdk-dist/docs/runtime-reference/examples/oms-01/sales-order.selection.ids.json +7 -0
  80. package/sdk-dist/docs/runtime-reference/examples/oms-01/stock-issue.create-entity.json +3 -0
  81. package/sdk-dist/docs/runtime-reference/examples/oms-01/stock-issue.schema.json +137 -0
  82. package/sdk-dist/docs/runtime-reference/examples/wms-01/README.md +21 -0
  83. package/sdk-dist/docs/runtime-reference/row-crud.md +186 -0
  84. package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +494 -0
  85. package/sdk-dist/docs/runtime-reference/table-lifecycle.md +123 -0
  86. package/sdk-dist/docs/runtime-reference/workflow/README.md +19 -0
  87. package/src/runtime/command_registry.ts +47 -0
  88. package/src/runtime/entity_save_schema.ts +708 -0
  89. package/src/runtime/errors.ts +11 -0
  90. package/src/runtime/execute.ts +123 -10
  91. package/src/runtime/zod_registry.ts +154 -0
  92. package/src/tests/command_registry.test.ts +6 -0
  93. package/src/tests/entity_save_schema.test.ts +236 -0
  94. package/src/tests/execute_validation.test.ts +598 -0
  95. package/src/tests/help.test.ts +39 -0
@@ -0,0 +1,177 @@
1
+ # Arcubase CLI Runtime Reference
2
+
3
+ This documentation set is for using `arcubase-admin` and `arcubase` directly.
4
+
5
+ Read it as a command cheatsheet:
6
+
7
+ - which binary to use
8
+ - which subcommand to run
9
+ - which flags are required
10
+ - what the body file should look like
11
+ - what result shape to expect
12
+
13
+ Do not start from raw HTTP methods or paths. Start from the CLI command.
14
+
15
+ ## Paths
16
+
17
+ - Development source:
18
+ - `misc/packages/@carthooks/arcubase-cli/docs/runtime-reference/`
19
+ - Runtime location:
20
+ - `/opt/arcubase-sdk/docs/runtime-reference/`
21
+ - Published path:
22
+ - `sdk-dist/docs/runtime-reference/`
23
+
24
+ ## Which binary to use
25
+
26
+ Use `arcubase-admin` for:
27
+
28
+ - app creation
29
+ - entity shell creation
30
+ - entity schema save
31
+ - entity tag admin actions
32
+
33
+ Common commands:
34
+
35
+ ```bash
36
+ arcubase-admin app create-app-by-tenants --body-file create-app.json
37
+ arcubase-admin app create-entity --id <app_id> --body-file create-entity.json
38
+ arcubase-admin entity admin-get-entity-info --app-id <app_id> --entity-id <entity_id>
39
+ arcubase-admin entity admin-save-entity --app-id <app_id> --entity-id <entity_id> --body-file save-entity.json
40
+ arcubase-admin entity-tags get-selection-tags --appId <app_id> --entityId <entity_id> --body-file get-tags.json
41
+ ```
42
+
43
+ Use `arcubase` for:
44
+
45
+ - row insert
46
+ - row query
47
+ - row update
48
+ - row delete / restore
49
+ - search
50
+ - selection actions
51
+ - bulk update
52
+ - batch operator
53
+
54
+ Common commands:
55
+
56
+ ```bash
57
+ arcubase workflow insert-entity --app-id <app_id> --entity-id <entity_id> --body-file insert.json
58
+ arcubase workflow query-entity --app-id <app_id> --entity-id <entity_id> --body-file query.json
59
+ arcubase workflow update-entity-row --app-id <app_id> --entity-id <entity_id> --row-id <row_id> --body-file update.json
60
+ arcubase workflow delete-entity-row --app-id <app_id> --entity-id <entity_id> --body-file delete.json
61
+ arcubase workflow restore-entity-row --app-id <app_id> --entity-id <entity_id> --body-file restore.json
62
+ arcubase workflow query-entity-selection --app-id <app_id> --entity-id <entity_id> --action archive --body-file selection.json
63
+ arcubase entity update-entity-bulk --app-id <app_id> --entity-id <entity_id> --body-file bulk-update.json
64
+ arcubase entity invoke-entity-batch-operator --app-id <app_id> --entity-id <entity_id> --body-file invoke-batch-operator.json
65
+ ```
66
+
67
+ ## Required file inputs
68
+
69
+ Most write commands use:
70
+
71
+ - `--body-file <file>.json`
72
+
73
+ Some query commands also use:
74
+
75
+ - `--query-file <file>.json`
76
+
77
+ Use `--query-file` when the command needs query-string parameters that do not belong in the JSON body.
78
+
79
+ Current important example:
80
+
81
+ ```bash
82
+ arcubase workflow query-entity \
83
+ --app-id <app_id> \
84
+ --entity-id <entity_id> \
85
+ --query-file archived-query.json \
86
+ --body-file archived-body.json
87
+ ```
88
+
89
+ ## Runtime env
90
+
91
+ The CLIs accept either generic env keys:
92
+
93
+ - `ARCUBASE_BASE_URL`
94
+ - `ARCUBASE_TENANT_ID`
95
+ - `ARCUBASE_ACCESS_TOKEN`
96
+ - `ARCUBASE_HOST`
97
+
98
+ or scoped env keys:
99
+
100
+ - admin:
101
+ - `ARCUBASE_ADMIN_BASE_URL`
102
+ - `ARCUBASE_ADMIN_TENANT_ID`
103
+ - `ARCUBASE_ADMIN_ACCESS_TOKEN`
104
+ - `ARCUBASE_ADMIN_HOST`
105
+ - user:
106
+ - `ARCUBASE_USER_BASE_URL`
107
+ - `ARCUBASE_USER_TENANT_ID`
108
+ - `ARCUBASE_USER_ACCESS_TOKEN`
109
+ - `ARCUBASE_USER_HOST`
110
+
111
+ Help should work without runtime env:
112
+
113
+ ```bash
114
+ arcubase-admin --help
115
+ arcubase-admin <module> --help
116
+ arcubase-admin <module> <command> --help
117
+ arcubase --help
118
+ arcubase <module> --help
119
+ arcubase <module> <command> --help
120
+ ```
121
+
122
+ Command help is also the discovery entrypoint for this doc set.
123
+
124
+ When a command is tied to a common task, `--help` should print:
125
+
126
+ - the normalized external endpoint
127
+ - required path and scalar flags
128
+ - whether `--query-file` is supported
129
+ - direct links to the most relevant runtime reference pages
130
+ - direct links to business-shaped examples when available
131
+
132
+ ## Reading order by task
133
+
134
+ If you need to create a table:
135
+
136
+ 1. read `table-lifecycle.md`
137
+ 2. read `entity-schema.md`
138
+ 3. read `entity-schema/README.md`
139
+ 4. open the exact field-type page you need
140
+
141
+ If you need row CRUD:
142
+
143
+ 1. read `row-crud.md`
144
+ 2. if a field is complex, open the exact field-type page
145
+
146
+ If you need a business-shaped template:
147
+
148
+ 1. read `examples/README.md`
149
+ 2. pick the closest domain directory
150
+ 3. copy and adapt the example schema and payload files
151
+
152
+ If you need search, selection, tags, bulk update, or batch operator:
153
+
154
+ 1. read `search-and-bulk-actions.md`
155
+ 2. use `row-crud.md` only for row result shapes
156
+
157
+ ## Covered now
158
+
159
+ - `table-lifecycle.md`
160
+ - app shell, entity shell, schema save, readiness probe
161
+ - `entity-schema.md`
162
+ - full save-ready schema rules
163
+ - `entity-schema/README.md`
164
+ - field index and how to use field docs
165
+ - `entity-schema/*.md`
166
+ - one field cheatsheet per file
167
+ - `row-crud.md`
168
+ - insert, query, update, delete, restore
169
+ - `search-and-bulk-actions.md`
170
+ - search, selection, tags, bulk update, batch operator
171
+ - `examples/`
172
+ - business-shaped schema and payload templates
173
+
174
+ ## Reserved expansion
175
+
176
+ - `workflow/README.md`
177
+ - reserved for future workflow-specific CLI docs
@@ -0,0 +1,120 @@
1
+ # Entity Schema Field Reference
2
+
3
+ Use this directory while building `save-entity.json` for:
4
+
5
+ ```bash
6
+ arcubase-admin entity admin-save-entity \
7
+ --app-id <app_id> \
8
+ --entity-id <entity_id> \
9
+ --body-file save-entity.json
10
+ ```
11
+
12
+ ## How to use these field pages
13
+
14
+ 1. fetch the current shell with:
15
+
16
+ ```bash
17
+ arcubase-admin entity admin-get-entity-info \
18
+ --app-id <app_id> \
19
+ --entity-id <entity_id>
20
+ ```
21
+
22
+ 2. build the top-level save payload with:
23
+
24
+ - `entity-schema.md`
25
+
26
+ 3. open the exact field page you need
27
+
28
+ 4. copy the field-specific `options` shape into the full base `FieldVO`
29
+
30
+ These field pages do **not** replace the full base field shape. They only explain the field-specific part.
31
+
32
+ ## Global save rules
33
+
34
+ - `fields` must be `FieldVO[]`
35
+ - field ids should start from `1001`
36
+ - field ids must be non-zero
37
+ - `field_id_seq > max(field.id)`
38
+ - top-level `layout` may only reference top-level field ids
39
+ - non-`subform` fields should use `children: null`
40
+ - saved `subform` payload keeps `children` only
41
+ - `lookup/rollup.local_linkto_field_id` must point to a `linkto` field
42
+ - formula references must point to existing field ids
43
+ - `schema_version` should come from the current shell
44
+ - if the response contains a top-level `error`, the save failed even when HTTP is `200`
45
+
46
+ ## Row CRUD reminder
47
+
48
+ These field pages are for schema save.
49
+
50
+ If you need row payloads, read:
51
+
52
+ - `../row-crud.md`
53
+
54
+ Current important row rules:
55
+
56
+ - row delete / restore uses:
57
+ - `arcubase workflow delete-entity-row`
58
+ - `arcubase workflow restore-entity-row`
59
+ - `selection.type = "ids"`
60
+ - `subform` row values use:
61
+ - `[{ "id": 0, "fields": { ... } }]`
62
+
63
+ ## Field index
64
+
65
+ ### Basic types
66
+
67
+ - [`text`](./text.md)
68
+ - [`textarea`](./textarea.md)
69
+ - [`number`](./number.md)
70
+ - [`datetime`](./datetime.md)
71
+ - [`boolean`](./boolean.md)
72
+
73
+ ### Enum and status
74
+
75
+ - [`radio`](./radio.md)
76
+ - [`checkbox`](./checkbox.md)
77
+ - [`select`](./select.md)
78
+ - [`selects`](./selects.md)
79
+ - [`status`](./status.md)
80
+
81
+ ### Structure and display
82
+
83
+ - [`divider`](./divider.md)
84
+ - [`subform`](./subform.md)
85
+ - [`button`](./button.md)
86
+
87
+ ### File and media
88
+
89
+ - [`image`](./image.md)
90
+ - [`file`](./file.md)
91
+ - [`signature`](./signature.md)
92
+
93
+ ### Geography and external data
94
+
95
+ - [`address`](./address.md)
96
+ - [`datasets`](./datasets.md)
97
+ - [`location`](./location.md)
98
+
99
+ ### People and organization
100
+
101
+ - [`member`](./member.md)
102
+ - [`members`](./members.md)
103
+ - [`department`](./department.md)
104
+ - [`departments`](./departments.md)
105
+
106
+ ### Relations and computation
107
+
108
+ - [`linkto`](./linkto.md)
109
+ - [`relation`](./relation.md)
110
+ - [`relationfield`](./relationfield.md)
111
+ - [`query`](./query.md)
112
+ - [`lookup`](./lookup.md)
113
+ - [`rollup`](./rollup.md)
114
+ - [`formula`](./formula.md)
115
+
116
+ ### Other advanced types
117
+
118
+ - [`serialnumber`](./serialnumber.md)
119
+ - [`workflow_status`](./workflow_status.md)
120
+ - [`tags`](./tags.md)
@@ -0,0 +1,34 @@
1
+ # address
2
+
3
+ ## Purpose
4
+
5
+ Hierarchical address selection field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: advanced`
10
+ - `useFormula: true`
11
+ - `useRelation: true`
12
+
13
+ ## Minimal shape
14
+
15
+ ```json
16
+ {
17
+ "type": "address",
18
+ "options": {
19
+ "dataset_id": 1,
20
+ "maxDepth": 3
21
+ }
22
+ }
23
+ ```
24
+
25
+ ## Common options
26
+
27
+ - `dataset_id`
28
+ - `maxDepth`
29
+
30
+ ## Constraints
31
+
32
+ - `dataset_id` is required
33
+ - common `maxDepth` values are `1` to `4`
34
+ - if `maxDepth` is omitted, prefer `3`
@@ -0,0 +1,37 @@
1
+ # boolean
2
+
3
+ ## Purpose
4
+
5
+ Boolean field.
6
+
7
+
8
+
9
+ ## Frontend capability flags
10
+
11
+ - `group: normal`
12
+ - `switchgroup: enum`
13
+ - `useFormula: true`
14
+ - `useRelation: true`
15
+ - `inlineEdtiable: true`
16
+ - `events: ['change']`
17
+
18
+ ## Minimal shape
19
+
20
+ ```json
21
+ {
22
+ "type": "boolean",
23
+ "options": {}
24
+ }
25
+ ```
26
+
27
+ ## Available options
28
+
29
+ - There is currently no stable complex `options` contract
30
+
31
+ ## Constraints
32
+
33
+ - In the current direct-write pathprefer empty `options`
34
+ - only use generic field flags for:
35
+ - `required`
36
+ - `visible`
37
+ - `editable`
@@ -0,0 +1,47 @@
1
+ # button
2
+
3
+ ## Purpose
4
+
5
+ Button field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: advanced`
10
+ - `custom_permissions: true`
11
+ - `notImportAble: true`
12
+ - `notExportAble: true`
13
+ - `events: ['click']`
14
+
15
+ ## Minimal shape
16
+
17
+ ```json
18
+ {
19
+ "type": "button",
20
+ "options": {
21
+ "label": "Button",
22
+ "hideInList": false,
23
+ "perm": {
24
+ "create": true,
25
+ "edit": true,
26
+ "list": true,
27
+ "view": true
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ ## Common options
34
+
35
+ - `label`
36
+ - `hideInList`
37
+ - `perm.create`
38
+ - `perm.edit`
39
+ - `perm.list`
40
+ - `perm.view`
41
+
42
+ ## Constraints
43
+
44
+ - `label` is required
45
+ - `perm` should explicitly include all four boolean flags
46
+ - `hideInList` should stay consistent with `perm.list`
47
+ - Button behavior is bound through top-level `options.FrontendEvents`, not written directly in the field body
@@ -0,0 +1,61 @@
1
+ # checkbox
2
+
3
+ ## Purpose
4
+
5
+ Multi-select enum field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: normal`
10
+ - `useFormula: true`
11
+ - `useRelation: true`
12
+ - `events: ['change']`
13
+
14
+ ## Minimal shape
15
+
16
+ ```json
17
+ {
18
+ "type": "checkbox",
19
+ "options": {
20
+ "horizontal": false,
21
+ "options": {
22
+ "mode": "custom",
23
+ "colorful": false,
24
+ "items": [
25
+ { "key": 1, "value": "Option 1" }
26
+ ]
27
+ }
28
+ }
29
+ }
30
+ ```
31
+
32
+ ## Common options
33
+
34
+ - `horizontal`
35
+ - `hideInList`
36
+ - `options.items`
37
+ - `options.mode`
38
+ - `options.colorful`
39
+ - `options.has_other`
40
+ - `options.other_label`
41
+
42
+ ## Constraints
43
+
44
+ - `options.items` at least one item
45
+ - when `options.has_other = true`, also provide `options.other_label`
46
+ - row values should be an array of selected option values
47
+
48
+ ## Save-ready reminder
49
+
50
+ For `arcubase-admin entity admin-save-entity`, keep the full base `FieldVO`.
51
+
52
+ The saved field still needs:
53
+
54
+ - `id`
55
+ - `label`
56
+ - `required`
57
+ - `editable`
58
+ - `visible`
59
+ - `number_decimal`
60
+ - `key`
61
+ - `children: null`
@@ -0,0 +1,35 @@
1
+ # datasets
2
+
3
+ ## Purpose
4
+
5
+ Dataset picker field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: advanced`
10
+ - `useFormula: true`
11
+ - `useRelation: true`
12
+ - `inlineEdtiable: true`
13
+ - `events: ['change']`
14
+
15
+ ## Minimal shape
16
+
17
+ ```json
18
+ {
19
+ "type": "datasets",
20
+ "options": {
21
+ "dataset_id": 0,
22
+ "maxDepth": 0
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Common options
28
+
29
+ - `dataset_id`
30
+ - `maxDepth`
31
+
32
+ ## Constraints
33
+
34
+ - `dataset_id` is required
35
+ - if `maxDepth` is omitted, prefer `3`
@@ -0,0 +1,40 @@
1
+ # datetime
2
+
3
+ ## Purpose
4
+
5
+ Date-time field.
6
+
7
+
8
+
9
+ ## Frontend capability flags
10
+
11
+ - `group: normal`
12
+ - `useFormula: true`
13
+ - `useRelation: true`
14
+ - `inlineEdtiable: true`
15
+ - `events: ['change']`
16
+
17
+ ## Minimal shape
18
+
19
+ ```json
20
+ {
21
+ "type": "datetime",
22
+ "options": {
23
+ "placeholder": "",
24
+ "type": "datetime"
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Available options
30
+
31
+ - `placeholder`
32
+ - `type`
33
+
34
+ ## Constraints
35
+
36
+ - in the current direct-write path, valid `type` values are:
37
+ - `date`
38
+ - `datetime`
39
+ - if omitted, prefer `date`
40
+ - if a default is written into `value`, it should match a value accepted by the frontend date picker
@@ -0,0 +1,33 @@
1
+ # department
2
+
3
+ ## Purpose
4
+
5
+ Single-department field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: normal`
10
+ - `useFormula: true`
11
+ - `useRelation: true`
12
+ - `operator: department`
13
+ - `notImportAble: true`
14
+ - `notExportAble: true`
15
+ - `events: ['change']`
16
+
17
+ ## Minimal shape
18
+
19
+ ```json
20
+ {
21
+ "type": "department",
22
+ "options": {}
23
+ }
24
+ ```
25
+
26
+ ## Common options
27
+
28
+ - `placeholder`
29
+
30
+ ## Constraints
31
+
32
+ - `department` is a single-value field
33
+ - in the current direct-write path, `options` may contain only `placeholder`
@@ -0,0 +1,34 @@
1
+ # departments
2
+
3
+ ## Purpose
4
+
5
+ Multi-department field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: normal`
10
+ - `useFormula: true`
11
+ - `useRelation: true`
12
+ - `notImportAble: true`
13
+ - `notExportAble: true`
14
+ - `events: ['change']`
15
+
16
+ ## Minimal shape
17
+
18
+ ```json
19
+ {
20
+ "type": "departments",
21
+ "options": {
22
+ "placeholder": ""
23
+ }
24
+ }
25
+ ```
26
+
27
+ ## Common options
28
+
29
+ - `placeholder`
30
+
31
+ ## Constraints
32
+
33
+ - `departments` is a multi-value field
34
+ - in the current direct-write path, `options` may contain only `placeholder`
@@ -0,0 +1,39 @@
1
+ # divider
2
+
3
+ ## Purpose
4
+
5
+ Divider / visual grouping field.
6
+
7
+
8
+
9
+ ## Frontend capability flags
10
+
11
+ - `group: normal`
12
+ - `withoutFieldContainer: true`
13
+ - `custom_permissions: true`
14
+ - `hideInList: true`
15
+ - `readonly: true`
16
+ - `notImportAble: true`
17
+ - `notExportAble: true`
18
+
19
+ ## Minimal shape
20
+
21
+ ```json
22
+ {
23
+ "type": "divider",
24
+ "options": {
25
+ "color": "",
26
+ "style_id": ""
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Available options
32
+
33
+ - `color`
34
+ - `style_id`
35
+
36
+ ## Constraints
37
+
38
+ - In the current direct-write path, `options.style_id` and `options.color` should both be explicit
39
+ - `divider` is a display-only field and does not carry business values
@@ -0,0 +1,44 @@
1
+ # file
2
+
3
+ ## Purpose
4
+
5
+ File upload field.
6
+
7
+ ## Frontend capability flags
8
+
9
+ - `group: advanced`
10
+ - `switchgroup: file`
11
+ - `notImportAble: true`
12
+ - `notExportAble: true`
13
+ - `events: ['change']`
14
+
15
+ ## Minimal shape
16
+
17
+ ```json
18
+ {
19
+ "type": "file",
20
+ "options": {
21
+ "placeholder": "",
22
+ "count_range": false,
23
+ "count_min": 0,
24
+ "count_max": 9
25
+ }
26
+ }
27
+ ```
28
+
29
+ ## Common options
30
+
31
+ - `placeholder`
32
+ - `count_range`
33
+ - `count_min`
34
+ - `count_max`
35
+ - `hideInList`
36
+
37
+ ## Constraints
38
+
39
+ - when `count_range=true`, it is recommended to provide both `count_min` and `count_max`
40
+ - `required` is controlled by generic field flags, not inside `options`
41
+ - when count limits are disabled in the current direct-write path, use:
42
+ - `count_range: false`
43
+ - `count_min: 0`
44
+ - `count_max: 9`