@carthooks/arcubase-cli 0.1.20 → 0.1.22
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/bundle/arcubase-admin.mjs +1669 -163
- package/bundle/arcubase.mjs +1669 -163
- package/dist/generated/command_registry.generated.d.ts +300 -0
- package/dist/generated/command_registry.generated.d.ts.map +1 -1
- package/dist/generated/command_registry.generated.js +416 -0
- package/dist/generated/help_examples.generated.d.ts +191 -0
- package/dist/generated/help_examples.generated.d.ts.map +1 -1
- package/dist/generated/help_examples.generated.js +277 -0
- package/dist/generated/type_index.generated.d.ts +44 -1
- package/dist/generated/type_index.generated.d.ts.map +1 -1
- package/dist/generated/type_index.generated.js +46 -1
- package/dist/generated/zod_registry.generated.d.ts +32 -1
- package/dist/generated/zod_registry.generated.d.ts.map +1 -1
- package/dist/generated/zod_registry.generated.js +41 -0
- package/dist/runtime/dev_sdk_gen.d.ts +9 -0
- package/dist/runtime/dev_sdk_gen.d.ts.map +1 -0
- package/dist/runtime/dev_sdk_gen.js +319 -0
- package/dist/runtime/execute.d.ts.map +1 -1
- package/dist/runtime/execute.js +384 -32
- package/dist/runtime/zod_registry.d.ts.map +1 -1
- package/dist/runtime/zod_registry.js +66 -0
- package/package.json +1 -1
- package/sdk-dist/api/admin/index.ts +1 -0
- package/sdk-dist/api/admin/ingress.ts +11 -0
- package/sdk-dist/api/admin/public-link.ts +48 -0
- package/sdk-dist/api/shared-link/form.ts +42 -1
- package/sdk-dist/api/user/index.ts +0 -1
- package/sdk-dist/docs/runtime-reference/access-rule.md +19 -0
- package/sdk-dist/docs/runtime-reference/dashboard.md +15 -0
- package/sdk-dist/docs/runtime-reference/dev-sdk-gen.md +41 -0
- package/sdk-dist/docs/runtime-reference/help-examples/admin/access-rule/bulk-apply.json +105 -0
- package/sdk-dist/docs/runtime-reference/help-examples/admin/dashboard/update-layout.json +16 -0
- package/sdk-dist/docs/runtime-reference/help-examples/admin/widget/create.json +33 -0
- package/sdk-dist/docs/runtime-reference/help-examples/admin/widget/preview-data.json +42 -0
- package/sdk-dist/docs/runtime-reference/widgets.md +40 -0
- package/sdk-dist/generated/command_registry.generated.ts +416 -0
- package/sdk-dist/generated/help_examples.generated.ts +277 -0
- package/sdk-dist/generated/type_index.generated.ts +46 -1
- package/sdk-dist/generated/zod_registry.generated.ts +62 -0
- package/sdk-dist/types/app.ts +37 -1
- package/sdk-dist/types/common.ts +77 -35
- package/sdk-dist/types/index.ts +1 -1
- package/sdk-dist/types/ingress.ts +31 -0
- package/sdk-dist/types/public-link.ts +10 -0
- package/sdk-dist/types/shared-link.ts +16 -1
- package/sdk-dist/types/user-action.ts +1 -43
- package/src/generated/command_registry.generated.ts +416 -0
- package/src/generated/help_examples.generated.ts +277 -0
- package/src/generated/type_index.generated.ts +46 -1
- package/src/generated/zod_registry.generated.ts +62 -0
- package/src/runtime/dev_sdk_gen.ts +360 -0
- package/src/runtime/execute.ts +484 -52
- package/src/runtime/zod_registry.ts +66 -0
- package/src/tests/command_registry.test.ts +21 -2
- package/src/tests/dev_sdk_gen.test.ts +226 -0
- package/src/tests/docs_readability.test.ts +15 -0
- package/src/tests/execute_validation.test.ts +215 -0
- package/src/tests/help.test.ts +83 -0
- package/sdk-dist/api/user/copilot.ts +0 -20
- package/sdk-dist/types/copilot.ts +0 -34
|
@@ -43,6 +43,161 @@ export const helpExamplesIndex = {
|
|
|
43
43
|
}
|
|
44
44
|
]
|
|
45
45
|
},
|
|
46
|
+
"admin.access-rule.bulk-apply": {
|
|
47
|
+
"command": [
|
|
48
|
+
"access-rule",
|
|
49
|
+
"bulk-apply"
|
|
50
|
+
],
|
|
51
|
+
"examples": [
|
|
52
|
+
{
|
|
53
|
+
"title": "upsert permission matrix by rule name in one transaction",
|
|
54
|
+
"body": {
|
|
55
|
+
"mode": "upsert_by_name",
|
|
56
|
+
"items": [
|
|
57
|
+
{
|
|
58
|
+
"table_id": 2188893443,
|
|
59
|
+
"name": "Customer archive - sales owns rows",
|
|
60
|
+
"enabled": true,
|
|
61
|
+
"type": "form",
|
|
62
|
+
"options": {
|
|
63
|
+
"user_scope": [
|
|
64
|
+
{
|
|
65
|
+
"type": "department",
|
|
66
|
+
"id": 2188881201
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"policy": {
|
|
70
|
+
"key": "custom",
|
|
71
|
+
"actions": [
|
|
72
|
+
"view",
|
|
73
|
+
"add",
|
|
74
|
+
"edit"
|
|
75
|
+
],
|
|
76
|
+
"all_fields_read": true,
|
|
77
|
+
"all_fields_write": true,
|
|
78
|
+
"condition": {
|
|
79
|
+
"mode": "and",
|
|
80
|
+
"conditions": [
|
|
81
|
+
{
|
|
82
|
+
"column": "creator",
|
|
83
|
+
"operator": "$eq",
|
|
84
|
+
"value": "[[current_user]]",
|
|
85
|
+
"value_from": 0,
|
|
86
|
+
"value_relation": ""
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"list_options": {}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"table_id": 2188893444,
|
|
96
|
+
"name": "Lead review - manager queue",
|
|
97
|
+
"enabled": true,
|
|
98
|
+
"type": "form",
|
|
99
|
+
"options": {
|
|
100
|
+
"user_scope": [
|
|
101
|
+
{
|
|
102
|
+
"type": "actor",
|
|
103
|
+
"id": 2188883301
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
"policy": {
|
|
107
|
+
"key": "custom",
|
|
108
|
+
"actions": [
|
|
109
|
+
"view",
|
|
110
|
+
"edit"
|
|
111
|
+
],
|
|
112
|
+
"all_fields_read": true,
|
|
113
|
+
"all_fields_write": true,
|
|
114
|
+
"condition": {
|
|
115
|
+
"mode": "and",
|
|
116
|
+
"conditions": [
|
|
117
|
+
{
|
|
118
|
+
"column": ":1004",
|
|
119
|
+
"operator": "$eq",
|
|
120
|
+
"value": "pending",
|
|
121
|
+
"value_from": 0,
|
|
122
|
+
"value_relation": ""
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"column": "",
|
|
126
|
+
"operator": "",
|
|
127
|
+
"value": null,
|
|
128
|
+
"value_from": 0,
|
|
129
|
+
"value_relation": "",
|
|
130
|
+
"subset": {
|
|
131
|
+
"mode": "or",
|
|
132
|
+
"conditions": [
|
|
133
|
+
{
|
|
134
|
+
"column": "creator",
|
|
135
|
+
"operator": "$eq",
|
|
136
|
+
"value": "[[current_user]]",
|
|
137
|
+
"value_from": 0,
|
|
138
|
+
"value_relation": ""
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"column": ":1005",
|
|
142
|
+
"operator": "$eq",
|
|
143
|
+
"value": "high",
|
|
144
|
+
"value_from": 0,
|
|
145
|
+
"value_relation": ""
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
"list_options": {}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
"notes": [
|
|
159
|
+
"mode upsert_by_name is for idempotent setup; rule names must be unique within each table",
|
|
160
|
+
"department, actor, and specific user scopes all use options.user_scope",
|
|
161
|
+
"row-owner isolation uses [[current_user]] in policy.condition"
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"title": "preview updates for existing rule ids",
|
|
166
|
+
"body": {
|
|
167
|
+
"mode": "update_existing",
|
|
168
|
+
"dry_run": true,
|
|
169
|
+
"items": [
|
|
170
|
+
{
|
|
171
|
+
"table_id": 2188893443,
|
|
172
|
+
"rule_id": 2188893557,
|
|
173
|
+
"enabled": true,
|
|
174
|
+
"options": {
|
|
175
|
+
"user_scope": [
|
|
176
|
+
{
|
|
177
|
+
"type": "user",
|
|
178
|
+
"id": 2188889901
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"policy": {
|
|
182
|
+
"key": "custom",
|
|
183
|
+
"actions": [
|
|
184
|
+
"view"
|
|
185
|
+
],
|
|
186
|
+
"all_fields_read": true,
|
|
187
|
+
"all_fields_write": false
|
|
188
|
+
},
|
|
189
|
+
"list_options": {}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
"notes": [
|
|
195
|
+
"dry_run true returns the planned operations without writing",
|
|
196
|
+
"update_existing requires rule_id on every item"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
46
201
|
"admin.access-rule.create": {
|
|
47
202
|
"command": [
|
|
48
203
|
"access-rule",
|
|
@@ -191,6 +346,128 @@ export const helpExamplesIndex = {
|
|
|
191
346
|
}
|
|
192
347
|
]
|
|
193
348
|
},
|
|
349
|
+
"admin.dashboard.update-layout": {
|
|
350
|
+
"command": [
|
|
351
|
+
"dashboard",
|
|
352
|
+
"update-layout"
|
|
353
|
+
],
|
|
354
|
+
"examples": [
|
|
355
|
+
{
|
|
356
|
+
"title": "place one dashboard widget in the top-left area",
|
|
357
|
+
"body": [
|
|
358
|
+
{
|
|
359
|
+
"id": 2188892001,
|
|
360
|
+
"x": 0,
|
|
361
|
+
"y": 0,
|
|
362
|
+
"w": 12,
|
|
363
|
+
"h": 6
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"notes": [
|
|
367
|
+
"the request body is a top-level array",
|
|
368
|
+
"do not wrap the array as {\"layout\":[...]}"
|
|
369
|
+
]
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
"admin.widget.create": {
|
|
374
|
+
"command": [
|
|
375
|
+
"widget",
|
|
376
|
+
"create"
|
|
377
|
+
],
|
|
378
|
+
"examples": [
|
|
379
|
+
{
|
|
380
|
+
"title": "create a dashboard chart widget",
|
|
381
|
+
"body": {
|
|
382
|
+
"type": "chart",
|
|
383
|
+
"options": {
|
|
384
|
+
"dashboard_id": 2188892001
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
"notes": [
|
|
388
|
+
"do not set options.type by hand",
|
|
389
|
+
"dashboard_id selects a dashboard widget",
|
|
390
|
+
"use widget update next to save chart options"
|
|
391
|
+
]
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
"title": "create an ingress list widget",
|
|
395
|
+
"body": {
|
|
396
|
+
"type": "list",
|
|
397
|
+
"options": {
|
|
398
|
+
"ingress_id": 2188893001
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
"notes": [
|
|
402
|
+
"ingress_id selects an ingress widget",
|
|
403
|
+
"do not place ingress widgets with dashboard update-layout"
|
|
404
|
+
]
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
"admin.widget.preview-data": {
|
|
409
|
+
"command": [
|
|
410
|
+
"widget",
|
|
411
|
+
"preview-data"
|
|
412
|
+
],
|
|
413
|
+
"examples": [
|
|
414
|
+
{
|
|
415
|
+
"title": "preview dashboard chart data from a table",
|
|
416
|
+
"body": {
|
|
417
|
+
"dataSource": 2188891001,
|
|
418
|
+
"dataSourceType": "entity",
|
|
419
|
+
"dimensions": [
|
|
420
|
+
{
|
|
421
|
+
"IsField": true,
|
|
422
|
+
"FieldID": 1004,
|
|
423
|
+
"Name": "Source"
|
|
424
|
+
}
|
|
425
|
+
],
|
|
426
|
+
"measures": [
|
|
427
|
+
{
|
|
428
|
+
"FieldID": 1005,
|
|
429
|
+
"Aggregate": "sum",
|
|
430
|
+
"Name": "Total Amount"
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
},
|
|
434
|
+
"notes": [
|
|
435
|
+
"preview-data does not accept --widget-id",
|
|
436
|
+
"do not send widget_id or id in the request body",
|
|
437
|
+
"copy dimensions and measures from the chart query you want to preview"
|
|
438
|
+
]
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"title": "preview count and distinct_count in one grouped chart",
|
|
442
|
+
"body": {
|
|
443
|
+
"dataSource": 2188891001,
|
|
444
|
+
"dataSourceType": "entity",
|
|
445
|
+
"dimensions": [
|
|
446
|
+
{
|
|
447
|
+
"IsField": true,
|
|
448
|
+
"FieldID": 1004,
|
|
449
|
+
"Name": "Source"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"measures": [
|
|
453
|
+
{
|
|
454
|
+
"Aggregate": "count",
|
|
455
|
+
"Name": "Lead Count"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"FieldID": 1002,
|
|
459
|
+
"Aggregate": "distinct_count",
|
|
460
|
+
"Name": "Distinct Customers"
|
|
461
|
+
}
|
|
462
|
+
]
|
|
463
|
+
},
|
|
464
|
+
"notes": [
|
|
465
|
+
"supported Aggregate values are sum, avg, max, min, count, and distinct_count",
|
|
466
|
+
"unsupported aggregate names fail local body validation before the request is sent"
|
|
467
|
+
]
|
|
468
|
+
}
|
|
469
|
+
]
|
|
470
|
+
},
|
|
194
471
|
"user.row.bulk-update": {
|
|
195
472
|
"command": [
|
|
196
473
|
"row",
|
|
@@ -9,6 +9,10 @@ export const typeIndex = {
|
|
|
9
9
|
"file": "types/app.ts",
|
|
10
10
|
"dependencies": []
|
|
11
11
|
},
|
|
12
|
+
"AppIngressBulkApplyReqVO": {
|
|
13
|
+
"file": "types/ingress.ts",
|
|
14
|
+
"dependencies": []
|
|
15
|
+
},
|
|
12
16
|
"AppIngressCreateReqVO": {
|
|
13
17
|
"file": "types/ingress.ts",
|
|
14
18
|
"dependencies": []
|
|
@@ -17,10 +21,47 @@ export const typeIndex = {
|
|
|
17
21
|
"file": "types/ingress.ts",
|
|
18
22
|
"dependencies": []
|
|
19
23
|
},
|
|
24
|
+
"AppNewWidgetsReqVO": {
|
|
25
|
+
"file": "types/widgets.ts",
|
|
26
|
+
"dependencies": []
|
|
27
|
+
},
|
|
28
|
+
"AppPreviewWidgetsDataReqVO": {
|
|
29
|
+
"file": "types/widgets.ts",
|
|
30
|
+
"dependencies": []
|
|
31
|
+
},
|
|
20
32
|
"AppUpdateAppReqVO": {
|
|
21
33
|
"file": "types/app.ts",
|
|
22
34
|
"dependencies": []
|
|
23
35
|
},
|
|
36
|
+
"AppUpdateWidgetsIngressOptionsReqVO": {
|
|
37
|
+
"file": "types/widgets.ts",
|
|
38
|
+
"dependencies": []
|
|
39
|
+
},
|
|
40
|
+
"AppUpdateWidgetsReqVO": {
|
|
41
|
+
"file": "types/widgets.ts",
|
|
42
|
+
"dependencies": []
|
|
43
|
+
},
|
|
44
|
+
"DashboardCreateReqVO": {
|
|
45
|
+
"file": "types/dashboard.ts",
|
|
46
|
+
"dependencies": []
|
|
47
|
+
},
|
|
48
|
+
"DashboardUpdateLayoutReqVO": {
|
|
49
|
+
"file": "types/dashboard.ts",
|
|
50
|
+
"dependencies": [
|
|
51
|
+
{
|
|
52
|
+
"symbol": "LayoutPosition",
|
|
53
|
+
"file": "types/dashboard.ts"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"DashboardUpdateOptionsReqVO": {
|
|
58
|
+
"file": "types/dashboard.ts",
|
|
59
|
+
"dependencies": []
|
|
60
|
+
},
|
|
61
|
+
"DashboardUpdateTitleReqVO": {
|
|
62
|
+
"file": "types/dashboard.ts",
|
|
63
|
+
"dependencies": []
|
|
64
|
+
},
|
|
24
65
|
"EntityBulkUpdateReqVO": {
|
|
25
66
|
"file": "types/user-action.ts",
|
|
26
67
|
"dependencies": []
|
|
@@ -30,7 +71,7 @@ export const typeIndex = {
|
|
|
30
71
|
"dependencies": []
|
|
31
72
|
},
|
|
32
73
|
"EntityQueryRelationReqVO": {
|
|
33
|
-
"file": "types/
|
|
74
|
+
"file": "types/common.ts",
|
|
34
75
|
"dependencies": []
|
|
35
76
|
},
|
|
36
77
|
"EntityQueryReqVO": {
|
|
@@ -69,6 +110,10 @@ export const typeIndex = {
|
|
|
69
110
|
"file": "types/workflow.ts",
|
|
70
111
|
"dependencies": []
|
|
71
112
|
},
|
|
113
|
+
"FetchWidgetsDataReqVO": {
|
|
114
|
+
"file": "types/user-action.ts",
|
|
115
|
+
"dependencies": []
|
|
116
|
+
},
|
|
72
117
|
"GetUploadTokenReqVO": {
|
|
73
118
|
"file": "types/user-action.ts",
|
|
74
119
|
"dependencies": []
|
|
@@ -34,16 +34,54 @@ export const PermitUserScopeSchema: z.ZodTypeAny = z.lazy(() => z.object({ "data
|
|
|
34
34
|
|
|
35
35
|
export const EntityIngressOptionsSchema: z.ZodTypeAny = z.lazy(() => z.object({ "i18n_name": I18NTextSchema.optional(), "list_options": PermitEntityListOptionsSchema.optional(), "policy": PermitPolicySchema.optional(), "user_scope": z.array(PermitUserScopeSchema).optional() }).strict())
|
|
36
36
|
|
|
37
|
+
export const AppIngressBulkApplyItemVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "enabled": z.boolean().optional(), "name": z.string().optional(), "options": EntityIngressOptionsSchema.optional(), "rule_id": z.number().optional(), "table_id": z.number().optional(), "type": z.string().optional() }).strict())
|
|
38
|
+
|
|
39
|
+
export const AppIngressBulkApplyReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "dry_run": z.boolean().optional(), "items": z.array(AppIngressBulkApplyItemVOSchema).optional(), "mode": z.string().optional() }).strict())
|
|
40
|
+
|
|
37
41
|
export const AppIngressCreateReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "enabled": z.boolean().optional(), "entity_id": z.number().optional(), "icon_name": z.string().optional(), "name": z.string().optional(), "options": EntityIngressOptionsSchema.optional(), "type": z.string().optional(), "url": z.string().optional() }).strict())
|
|
38
42
|
|
|
39
43
|
export const AppIngressUpdateReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "enabled": z.boolean().optional(), "name": z.string().optional(), "options": EntityIngressOptionsSchema.optional(), "update": z.array(z.string()).optional() }).strict())
|
|
40
44
|
|
|
45
|
+
export const WidgetsTypeCodeSchema: z.ZodTypeAny = z.lazy(() => z.union([z.literal(1), z.literal(2)]))
|
|
46
|
+
|
|
47
|
+
export const WidgetsTypeSchema: z.ZodTypeAny = z.lazy(() => z.object({ "dashboard_id": z.number().optional(), "ingress_id": z.number().optional(), "type": WidgetsTypeCodeSchema.optional() }).strict())
|
|
48
|
+
|
|
49
|
+
export const AppNewWidgetsReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "options": WidgetsTypeSchema.optional(), "type": z.string().optional() }).strict())
|
|
50
|
+
|
|
51
|
+
export const CubeDimensionSchema: z.ZodTypeAny = z.lazy(() => z.object({ "FieldID": z.number().optional(), "IsField": z.boolean().optional(), "Label": z.string().optional(), "Name": z.string().optional(), "Options": z.record(z.string(), z.any()).optional(), "OrderBy": z.string().optional(), "PropName": z.string().optional() }).strict())
|
|
52
|
+
|
|
53
|
+
export const CubeMeasureAggregateSchema: z.ZodTypeAny = z.lazy(() => z.union([z.literal("sum"), z.literal("avg"), z.literal("max"), z.literal("min"), z.literal("count"), z.literal("distinct_count")]))
|
|
54
|
+
|
|
55
|
+
export const CubeMeasureSchema: z.ZodTypeAny = z.lazy(() => z.object({ "Aggregate": CubeMeasureAggregateSchema.optional(), "FieldID": z.number().optional(), "Label": z.string().optional(), "Name": z.string().optional(), "Options": z.record(z.string(), z.any()).optional(), "OrderBy": z.string().optional() }).strict())
|
|
56
|
+
|
|
57
|
+
export const AppPreviewWidgetsDataReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "conditions": PermitConditionSetSchema.optional(), "dataSource": z.number().optional(), "dataSourceType": z.string().optional(), "dimensions": z.array(CubeDimensionSchema).optional(), "measures": z.array(CubeMeasureSchema).optional() }).strict())
|
|
58
|
+
|
|
41
59
|
export const GormDeletedAtSchema: z.ZodTypeAny = z.lazy(() => z.object({ "Time": z.string().optional(), "Valid": z.boolean().optional() }).strict())
|
|
42
60
|
|
|
43
61
|
export const AppOptionsSchema: z.ZodTypeAny = z.lazy(() => z.object({ "use_home_dashboard": z.boolean().optional() }).strict())
|
|
44
62
|
|
|
45
63
|
export const AppUpdateAppReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "CreatedAt": z.string().optional(), "DeletedAt": GormDeletedAtSchema.optional(), "ID": z.number().optional(), "Options": AppOptionsSchema.optional(), "UpdatedAt": z.string().optional(), "changed": z.array(z.string()).optional(), "has_workflow": z.boolean().optional(), "icon_color": z.string().optional(), "icon_name": z.string().optional(), "name": z.string().optional(), "tenant_id": z.number().optional(), "use_home_dashboard": z.boolean().optional() }).strict())
|
|
46
64
|
|
|
65
|
+
export const WidgetsListViewOptionsSchema: z.ZodTypeAny = z.lazy(() => z.object({ "cond_follow": z.boolean().optional(), "cond_follow_cols": z.array(z.string()).optional(), "cond_follow_tab": z.boolean().optional(), "link": z.record(z.string(), z.any()).optional() }).strict())
|
|
66
|
+
|
|
67
|
+
export const AppUpdateWidgetsIngressOptionsReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "options": WidgetsListViewOptionsSchema.optional() }).strict())
|
|
68
|
+
|
|
69
|
+
export const ChartOptionSchema: z.ZodTypeAny = z.lazy(() => z.object({ "conditions": PermitConditionSetSchema.optional(), "dimensions": z.array(CubeDimensionSchema).optional(), "entity_id": z.number().optional(), "measures": z.array(CubeMeasureSchema).optional(), "options": z.record(z.string(), z.any()).optional(), "type": z.string().optional() }).strict())
|
|
70
|
+
|
|
71
|
+
export const WidgetsOptionSchema: z.ZodTypeAny = z.lazy(() => z.object({ "charts": ChartOptionSchema.optional(), "ingress": WidgetsListViewOptionsSchema.optional(), "render": z.record(z.string(), z.any()).optional() }).strict())
|
|
72
|
+
|
|
73
|
+
export const AppUpdateWidgetsReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "entity_id": z.number().optional(), "options": WidgetsOptionSchema.optional() }).strict())
|
|
74
|
+
|
|
75
|
+
export const DashboardCreateReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "name": z.string().optional() }).strict())
|
|
76
|
+
|
|
77
|
+
export const LayoutPositionSchema: z.ZodTypeAny = z.lazy(() => z.object({ "h": z.number().optional(), "id": z.number().optional(), "w": z.number().optional(), "x": z.number().optional(), "y": z.number().optional() }).strict())
|
|
78
|
+
|
|
79
|
+
export const DashboardUpdateLayoutReqVOSchema: z.ZodTypeAny = z.lazy(() => z.array(LayoutPositionSchema))
|
|
80
|
+
|
|
81
|
+
export const DashboardUpdateOptionsReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "changed": z.array(z.string()).optional(), "i18n_name": z.record(z.string(), z.string()).optional(), "theme": z.object({ "gutter": z.number().optional(), "has_shadow": z.boolean().optional(), "round_corners": z.number().optional() }).strict().optional(), "users": z.array(PermitUserScopeSchema).optional() }).strict())
|
|
82
|
+
|
|
83
|
+
export const DashboardUpdateTitleReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "name": z.string().optional() }).strict())
|
|
84
|
+
|
|
47
85
|
export const EntityBulkUpdateActionVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "number_add": z.number().optional(), "number_mul": z.number().optional(), "number_sub": z.number().optional(), "text_append": z.string().optional(), "text_prepend": z.string().optional(), "text_replace": z.string().optional(), "text_search": z.string().optional(), "type": z.string().optional(), "value": z.any().optional() }).strict())
|
|
48
86
|
|
|
49
87
|
export const EntityBulkUpdateFieldVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "action": EntityBulkUpdateActionVOSchema.optional(), "id": z.number().optional() }).strict())
|
|
@@ -140,6 +178,10 @@ export const EntityWorkflowDeployReqVOSchema: z.ZodTypeAny = z.lazy(() => z.obje
|
|
|
140
178
|
|
|
141
179
|
export const EntityWorkflowUpdateReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "diagram": WorkflowConfigDiagramSchema.optional(), "id": z.number().optional(), "options": WorkflowOptionsSchema.optional() }).strict())
|
|
142
180
|
|
|
181
|
+
export const EntityUtilsQueryOrderSchema: z.ZodTypeAny = z.lazy(() => z.object({ "column": z.string().optional(), "order": z.string().optional() }).strict())
|
|
182
|
+
|
|
183
|
+
export const FetchWidgetsDataReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "dashboard_id": z.number().optional(), "ingress_hash_id": z.string().optional(), "ingress_id": z.number().optional(), "querys": z.object({ "search": z.record(z.string(), z.any()).optional(), "sorts": z.array(EntityUtilsQueryOrderSchema).optional() }).strict().optional(), "type": WidgetsTypeCodeSchema.optional() }).strict())
|
|
184
|
+
|
|
143
185
|
export const GetUploadTokenReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "global": z.boolean().optional() }).strict())
|
|
144
186
|
|
|
145
187
|
export const InsertReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object({ "fields": z.record(z.string(), z.any()).optional(), "policy_id": z.string().optional() }).strict())
|
|
@@ -165,9 +207,18 @@ export const UserProfileUpdateReqVOSchema: z.ZodTypeAny = z.lazy(() => z.object(
|
|
|
165
207
|
export const generatedRequestTypes = [
|
|
166
208
|
"AppCreateByTenantsReqVO",
|
|
167
209
|
"AppCreateEntityReqVO",
|
|
210
|
+
"AppIngressBulkApplyReqVO",
|
|
168
211
|
"AppIngressCreateReqVO",
|
|
169
212
|
"AppIngressUpdateReqVO",
|
|
213
|
+
"AppNewWidgetsReqVO",
|
|
214
|
+
"AppPreviewWidgetsDataReqVO",
|
|
170
215
|
"AppUpdateAppReqVO",
|
|
216
|
+
"AppUpdateWidgetsIngressOptionsReqVO",
|
|
217
|
+
"AppUpdateWidgetsReqVO",
|
|
218
|
+
"DashboardCreateReqVO",
|
|
219
|
+
"DashboardUpdateLayoutReqVO",
|
|
220
|
+
"DashboardUpdateOptionsReqVO",
|
|
221
|
+
"DashboardUpdateTitleReqVO",
|
|
171
222
|
"EntityBulkUpdateReqVO",
|
|
172
223
|
"EntityDoActionReqVO",
|
|
173
224
|
"EntityQueryRelationReqVO",
|
|
@@ -180,6 +231,7 @@ export const generatedRequestTypes = [
|
|
|
180
231
|
"EntityWorkflowApproveUsersReqVO",
|
|
181
232
|
"EntityWorkflowDeployReqVO",
|
|
182
233
|
"EntityWorkflowUpdateReqVO",
|
|
234
|
+
"FetchWidgetsDataReqVO",
|
|
183
235
|
"GetUploadTokenReqVO",
|
|
184
236
|
"InsertReqVO",
|
|
185
237
|
"MobileUploadCheckReqVO",
|
|
@@ -191,9 +243,18 @@ export const generatedRequestTypes = [
|
|
|
191
243
|
export const bodySchemas = {
|
|
192
244
|
"AppCreateByTenantsReqVO": AppCreateByTenantsReqVOSchema,
|
|
193
245
|
"AppCreateEntityReqVO": AppCreateEntityReqVOSchema,
|
|
246
|
+
"AppIngressBulkApplyReqVO": AppIngressBulkApplyReqVOSchema,
|
|
194
247
|
"AppIngressCreateReqVO": AppIngressCreateReqVOSchema,
|
|
195
248
|
"AppIngressUpdateReqVO": AppIngressUpdateReqVOSchema,
|
|
249
|
+
"AppNewWidgetsReqVO": AppNewWidgetsReqVOSchema,
|
|
250
|
+
"AppPreviewWidgetsDataReqVO": AppPreviewWidgetsDataReqVOSchema,
|
|
196
251
|
"AppUpdateAppReqVO": AppUpdateAppReqVOSchema,
|
|
252
|
+
"AppUpdateWidgetsIngressOptionsReqVO": AppUpdateWidgetsIngressOptionsReqVOSchema,
|
|
253
|
+
"AppUpdateWidgetsReqVO": AppUpdateWidgetsReqVOSchema,
|
|
254
|
+
"DashboardCreateReqVO": DashboardCreateReqVOSchema,
|
|
255
|
+
"DashboardUpdateLayoutReqVO": DashboardUpdateLayoutReqVOSchema,
|
|
256
|
+
"DashboardUpdateOptionsReqVO": DashboardUpdateOptionsReqVOSchema,
|
|
257
|
+
"DashboardUpdateTitleReqVO": DashboardUpdateTitleReqVOSchema,
|
|
197
258
|
"EntityBulkUpdateReqVO": EntityBulkUpdateReqVOSchema,
|
|
198
259
|
"EntityDoActionReqVO": EntityDoActionReqVOSchema,
|
|
199
260
|
"EntityQueryRelationReqVO": EntityQueryRelationReqVOSchema,
|
|
@@ -206,6 +267,7 @@ export const bodySchemas = {
|
|
|
206
267
|
"EntityWorkflowApproveUsersReqVO": EntityWorkflowApproveUsersReqVOSchema,
|
|
207
268
|
"EntityWorkflowDeployReqVO": EntityWorkflowDeployReqVOSchema,
|
|
208
269
|
"EntityWorkflowUpdateReqVO": EntityWorkflowUpdateReqVOSchema,
|
|
270
|
+
"FetchWidgetsDataReqVO": FetchWidgetsDataReqVOSchema,
|
|
209
271
|
"GetUploadTokenReqVO": GetUploadTokenReqVOSchema,
|
|
210
272
|
"InsertReqVO": InsertReqVOSchema,
|
|
211
273
|
"MobileUploadCheckReqVO": MobileUploadCheckReqVOSchema,
|
package/sdk-dist/types/app.ts
CHANGED
|
@@ -10,7 +10,23 @@
|
|
|
10
10
|
* ---------------------------------------------------------------
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
/** @format int32 */
|
|
14
|
+
import type { PermitValueFrom, PermitEntityProp, GormDeletedAt, AppOptions, IngressGroup, IngressItem, I18NText, PermitConditionSet, PermitFieldPermit, PermitPermit, PermitRecordCondition, AppGetEntitiesEntityVO, ErrorResponse } from './common'
|
|
15
|
+
|
|
16
|
+
export interface EntityPublicLinkOptions {
|
|
17
|
+
fieldPermits?: PermitPermit;
|
|
18
|
+
page_description?: string;
|
|
19
|
+
page_title?: string;
|
|
20
|
+
query_condition?: PermitConditionSet;
|
|
21
|
+
query_limit?: number;
|
|
22
|
+
query_sorts?: EntityPublicQuerySort[];
|
|
23
|
+
search_fields?: number[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface EntityPublicQuerySort {
|
|
27
|
+
column?: string;
|
|
28
|
+
order?: string;
|
|
29
|
+
}
|
|
14
30
|
|
|
15
31
|
export interface AppCreateByTenantsReqVO {
|
|
16
32
|
icon_color?: string;
|
|
@@ -173,6 +189,26 @@ export interface IngressGroupReqVO {
|
|
|
173
189
|
name?: string;
|
|
174
190
|
}
|
|
175
191
|
|
|
192
|
+
export interface PublicLinkConfigItemVO {
|
|
193
|
+
enabled?: boolean;
|
|
194
|
+
options?: EntityPublicLinkOptions;
|
|
195
|
+
sharing_id?: string;
|
|
196
|
+
type?: string;
|
|
197
|
+
url?: string;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export interface PublicLinkConfigReqVO {
|
|
201
|
+
enabled?: boolean;
|
|
202
|
+
options?: EntityPublicLinkOptions;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
export type PublicLinkConfigRespVO = Record<string, PublicLinkConfigItemVO>;
|
|
206
|
+
|
|
207
|
+
export interface PublicRecordLinkRespVO {
|
|
208
|
+
sharing_id?: string;
|
|
209
|
+
url?: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
176
212
|
export type AppListRespVO = AppListItemVO[];
|
|
177
213
|
|
|
178
214
|
export type AppGetEntitiesRespVO = AppGetEntitiesEntityVO[];
|
package/sdk-dist/types/common.ts
CHANGED
|
@@ -14,6 +14,19 @@
|
|
|
14
14
|
* This file is auto-generated to avoid duplicate type definitions
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
+
export enum PermitValueFrom {
|
|
18
|
+
ValueFromStatic = 1,
|
|
19
|
+
ValueFromRelation = 2,
|
|
20
|
+
/** 新增:计算表达式 */
|
|
21
|
+
ValueFromFormula = 3,
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export enum PermitEntityProp {
|
|
25
|
+
PropCreateTime = "created",
|
|
26
|
+
PropUpdateTime = "updated",
|
|
27
|
+
PropCreateBy = "creator",
|
|
28
|
+
}
|
|
29
|
+
|
|
17
30
|
export interface GormDeletedAt {
|
|
18
31
|
Time?: string;
|
|
19
32
|
/** Valid is true if Time is not NULL */
|
|
@@ -44,6 +57,34 @@ export interface IngressItem {
|
|
|
44
57
|
|
|
45
58
|
export type I18NText = Record<string, string>;
|
|
46
59
|
|
|
60
|
+
export interface PermitConditionSet {
|
|
61
|
+
conditions?: PermitRecordCondition[];
|
|
62
|
+
/** and, or */
|
|
63
|
+
mode?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface PermitFieldPermit {
|
|
67
|
+
key?: string;
|
|
68
|
+
read?: boolean;
|
|
69
|
+
report?: boolean;
|
|
70
|
+
write?: boolean;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface PermitPermit {
|
|
74
|
+
all_fields_read?: boolean;
|
|
75
|
+
all_fields_write?: boolean;
|
|
76
|
+
fields?: PermitFieldPermit[];
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface PermitRecordCondition {
|
|
80
|
+
column?: PermitEntityProp;
|
|
81
|
+
operator?: string;
|
|
82
|
+
subset?: PermitConditionSet;
|
|
83
|
+
value?: any;
|
|
84
|
+
value_from?: PermitValueFrom;
|
|
85
|
+
value_relation?: PermitEntityProp;
|
|
86
|
+
}
|
|
87
|
+
|
|
47
88
|
export interface AppGetEntitiesEntityVO {
|
|
48
89
|
id?: number;
|
|
49
90
|
name?: string;
|
|
@@ -116,19 +157,6 @@ export interface AuthSessionVO {
|
|
|
116
157
|
token_type?: string;
|
|
117
158
|
}
|
|
118
159
|
|
|
119
|
-
export enum PermitValueFrom {
|
|
120
|
-
ValueFromStatic = 1,
|
|
121
|
-
ValueFromRelation = 2,
|
|
122
|
-
/** 新增:计算表达式 */
|
|
123
|
-
ValueFromFormula = 3,
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export enum PermitEntityProp {
|
|
127
|
-
PropCreateTime = "created",
|
|
128
|
-
PropUpdateTime = "updated",
|
|
129
|
-
PropCreateBy = "creator",
|
|
130
|
-
}
|
|
131
|
-
|
|
132
160
|
export enum PermitEntityEvent {
|
|
133
161
|
EntityCreated = 1,
|
|
134
162
|
EntityUpdated = 2,
|
|
@@ -139,21 +167,6 @@ export enum PermitEntityEvent {
|
|
|
139
167
|
EntityFlowAction = 12,
|
|
140
168
|
}
|
|
141
169
|
|
|
142
|
-
export interface PermitConditionSet {
|
|
143
|
-
conditions?: PermitRecordCondition[];
|
|
144
|
-
/** and, or */
|
|
145
|
-
mode?: string;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
export interface PermitRecordCondition {
|
|
149
|
-
column?: PermitEntityProp;
|
|
150
|
-
operator?: string;
|
|
151
|
-
subset?: PermitConditionSet;
|
|
152
|
-
value?: any;
|
|
153
|
-
value_from?: PermitValueFrom;
|
|
154
|
-
value_relation?: PermitEntityProp;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
170
|
export interface CommonPagination {
|
|
158
171
|
page?: number;
|
|
159
172
|
size?: number;
|
|
@@ -478,13 +491,6 @@ export interface PermitEntityListWidget {
|
|
|
478
491
|
width?: number;
|
|
479
492
|
}
|
|
480
493
|
|
|
481
|
-
export interface PermitFieldPermit {
|
|
482
|
-
key?: string;
|
|
483
|
-
read?: boolean;
|
|
484
|
-
report?: boolean;
|
|
485
|
-
write?: boolean;
|
|
486
|
-
}
|
|
487
|
-
|
|
488
494
|
export interface PermitPolicy {
|
|
489
495
|
actions?: string[];
|
|
490
496
|
all_fields_read?: boolean;
|
|
@@ -580,6 +586,42 @@ export interface OpenAPITenantInfo {
|
|
|
580
586
|
SiteLogoUrl?: string;
|
|
581
587
|
}
|
|
582
588
|
|
|
589
|
+
export interface EntityQueryLinkToValuesReqVO {
|
|
590
|
+
addition?: boolean;
|
|
591
|
+
data?: Record<string, any>;
|
|
592
|
+
entity?: boolean;
|
|
593
|
+
field_id?: number;
|
|
594
|
+
input?: string;
|
|
595
|
+
limit?: number;
|
|
596
|
+
offset?: number;
|
|
597
|
+
policies?: boolean;
|
|
598
|
+
query?: string;
|
|
599
|
+
record_id?: number;
|
|
600
|
+
total?: boolean;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
export interface EntityQueryRelationReqVO {
|
|
604
|
+
addition?: boolean;
|
|
605
|
+
data?: Record<string, any>;
|
|
606
|
+
entity?: boolean;
|
|
607
|
+
field_id?: number;
|
|
608
|
+
input?: string;
|
|
609
|
+
limit?: number;
|
|
610
|
+
offset?: number;
|
|
611
|
+
policies?: boolean;
|
|
612
|
+
query?: string;
|
|
613
|
+
total?: boolean;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
export interface EntityQueryRelationRespVO {
|
|
617
|
+
add_policy?: PermitPolicy;
|
|
618
|
+
addition?: PostqueryAppendData;
|
|
619
|
+
entity?: EntityVO;
|
|
620
|
+
records?: DataRecord[];
|
|
621
|
+
total?: number;
|
|
622
|
+
view_policy?: PermitPolicy;
|
|
623
|
+
}
|
|
624
|
+
|
|
583
625
|
export interface EntityValidateUniqFieldVO {
|
|
584
626
|
field_id?: number;
|
|
585
627
|
value?: string;
|