@carthooks/arcubase-cli 0.1.21 → 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 +1297 -79
- package/bundle/arcubase.mjs +1297 -79
- package/dist/generated/command_registry.generated.d.ts +285 -0
- package/dist/generated/command_registry.generated.d.ts.map +1 -1
- package/dist/generated/command_registry.generated.js +395 -0
- package/dist/generated/help_examples.generated.d.ts +77 -0
- package/dist/generated/help_examples.generated.d.ts.map +1 -1
- package/dist/generated/help_examples.generated.js +122 -0
- package/dist/generated/type_index.generated.d.ts +40 -1
- package/dist/generated/type_index.generated.d.ts.map +1 -1
- package/dist/generated/type_index.generated.js +42 -1
- package/dist/generated/zod_registry.generated.d.ts +29 -1
- package/dist/generated/zod_registry.generated.d.ts.map +1 -1
- package/dist/generated/zod_registry.generated.js +37 -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 +280 -1
- package/dist/runtime/zod_registry.d.ts.map +1 -1
- package/dist/runtime/zod_registry.js +58 -0
- package/package.json +1 -1
- package/sdk-dist/api/admin/index.ts +1 -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/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/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 +395 -0
- package/sdk-dist/generated/help_examples.generated.ts +122 -0
- package/sdk-dist/generated/type_index.generated.ts +42 -1
- package/sdk-dist/generated/zod_registry.generated.ts +56 -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/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 +395 -0
- package/src/generated/help_examples.generated.ts +122 -0
- package/src/generated/type_index.generated.ts +42 -1
- package/src/generated/zod_registry.generated.ts +56 -0
- package/src/runtime/dev_sdk_gen.ts +360 -0
- package/src/runtime/execute.ts +325 -1
- package/src/runtime/zod_registry.ts +58 -0
- package/src/tests/command_registry.test.ts +20 -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 +129 -0
- package/src/tests/help.test.ts +70 -0
- package/sdk-dist/api/user/copilot.ts +0 -20
- package/sdk-dist/types/copilot.ts +0 -34
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scope": "admin",
|
|
3
|
+
"command": ["widget", "create"],
|
|
4
|
+
"examples": [
|
|
5
|
+
{
|
|
6
|
+
"title": "create a dashboard chart widget",
|
|
7
|
+
"body": {
|
|
8
|
+
"type": "chart",
|
|
9
|
+
"options": {
|
|
10
|
+
"dashboard_id": 2188892001
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"notes": [
|
|
14
|
+
"do not set options.type by hand",
|
|
15
|
+
"dashboard_id selects a dashboard widget",
|
|
16
|
+
"use widget update next to save chart options"
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"title": "create an ingress list widget",
|
|
21
|
+
"body": {
|
|
22
|
+
"type": "list",
|
|
23
|
+
"options": {
|
|
24
|
+
"ingress_id": 2188893001
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"notes": [
|
|
28
|
+
"ingress_id selects an ingress widget",
|
|
29
|
+
"do not place ingress widgets with dashboard update-layout"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
]
|
|
33
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scope": "admin",
|
|
3
|
+
"command": ["widget", "preview-data"],
|
|
4
|
+
"examples": [
|
|
5
|
+
{
|
|
6
|
+
"title": "preview dashboard chart data from a table",
|
|
7
|
+
"body": {
|
|
8
|
+
"dataSource": 2188891001,
|
|
9
|
+
"dataSourceType": "entity",
|
|
10
|
+
"dimensions": [
|
|
11
|
+
{"IsField": true, "FieldID": 1004, "Name": "Source"}
|
|
12
|
+
],
|
|
13
|
+
"measures": [
|
|
14
|
+
{"FieldID": 1005, "Aggregate": "sum", "Name": "Total Amount"}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"notes": [
|
|
18
|
+
"preview-data does not accept --widget-id",
|
|
19
|
+
"do not send widget_id or id in the request body",
|
|
20
|
+
"copy dimensions and measures from the chart query you want to preview"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"title": "preview count and distinct_count in one grouped chart",
|
|
25
|
+
"body": {
|
|
26
|
+
"dataSource": 2188891001,
|
|
27
|
+
"dataSourceType": "entity",
|
|
28
|
+
"dimensions": [
|
|
29
|
+
{"IsField": true, "FieldID": 1004, "Name": "Source"}
|
|
30
|
+
],
|
|
31
|
+
"measures": [
|
|
32
|
+
{"Aggregate": "count", "Name": "Lead Count"},
|
|
33
|
+
{"FieldID": 1002, "Aggregate": "distinct_count", "Name": "Distinct Customers"}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"notes": [
|
|
37
|
+
"supported Aggregate values are sum, avg, max, min, count, and distinct_count",
|
|
38
|
+
"unsupported aggregate names fail local body validation before the request is sent"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Widgets
|
|
2
|
+
|
|
3
|
+
Use `arcubase-admin widget list --app-id <app_id> --type dashboard --dashboard-id <dashboard_id>` to list dashboard widgets.
|
|
4
|
+
|
|
5
|
+
Use `arcubase-admin widget get`, `arcubase-admin widget create`, `arcubase-admin widget update`, `arcubase-admin widget update-ingress-options`, `arcubase-admin widget preview-data`, and `arcubase-admin widget delete` to manage widgets.
|
|
6
|
+
|
|
7
|
+
Use `arcubase widget data --app-id <app_id> --body-json '<FetchWidgetsDataReqVO>'` to fetch user-visible widget data.
|
|
8
|
+
|
|
9
|
+
Create dashboard widgets with `{"type":"chart","options":{"dashboard_id":<dashboard_id>}}`. Do not set `options.type` by hand; the backend derives dashboard versus ingress widget type from `dashboard_id` or `ingress_id`.
|
|
10
|
+
|
|
11
|
+
Most widget commands use `--widget-id`; `widget preview-data` is the exception. Preview data does not read a saved widget by id and does not accept `--widget-id`, `widget_id`, or `id`. Its body is the chart query itself:
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{"dataSource":2188891001,"dataSourceType":"entity","dimensions":[{"IsField":true,"FieldID":1004,"Name":"Source"}],"measures":[{"FieldID":1005,"Aggregate":"sum","Name":"Total Amount"}]}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Field dimensions must set `IsField:true`. If `IsField` is omitted or false while `FieldID` is present, the CLI rejects the chart request before sending it. A saved chart returned by `widget get` or `widget list` with `FieldID` and `IsField:false` is not grouped by that field; update the chart before reading grouped statistics.
|
|
18
|
+
|
|
19
|
+
Fastfail rule: `widget preview-data` accepts only the chart query body. If validation reports unrecognized keys such as `id`, `entity_id`, or `options`, do not retry with a saved widget object. Retry with `dataSource`, `dataSourceType`, `dimensions`, `measures`, and optional `conditions` only.
|
|
20
|
+
|
|
21
|
+
After `widget update`, verify persistence with `widget get` or `widget list`. The saved widget must contain non-null `options.charts`; an update response alone is not enough evidence that the chart configuration was persisted.
|
|
22
|
+
|
|
23
|
+
## Chart measures
|
|
24
|
+
|
|
25
|
+
Dashboard chart widgets use `ChartOption.measures[]` to define statistics. Supported `Aggregate` values are:
|
|
26
|
+
|
|
27
|
+
| Aggregate | Meaning |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| `sum` | Sum the selected numeric field. |
|
|
30
|
+
| `avg` | Average the selected numeric field. |
|
|
31
|
+
| `max` | Return the maximum selected field value. |
|
|
32
|
+
| `min` | Return the minimum selected field value. |
|
|
33
|
+
| `count` | Count selected field values; if `FieldID` is omitted, count rows. |
|
|
34
|
+
| `distinct_count` | Count distinct selected field values. |
|
|
35
|
+
|
|
36
|
+
Multiple measures are allowed in one chart widget. Use stable `Name` aliases so the returned data can be read without guessing.
|
|
37
|
+
|
|
38
|
+
Fastfail rule: unsupported aggregate names are invalid request bodies. Do not silently rewrite them to `count`, do not retry with a guessed aggregate, and do not save the widget until the `Aggregate` value is one of the supported values above.
|
|
39
|
+
|
|
40
|
+
Grouped-statistics evidence must include the requested dimension column in returned rows. If `widget preview-data` or user-side `widget data` returns only measure columns such as totals and counts, that is total-only data, not grouped data.
|
|
@@ -167,6 +167,148 @@ export const adminCommands = [
|
|
|
167
167
|
"queryParams": [],
|
|
168
168
|
"responseType": "boolean"
|
|
169
169
|
},
|
|
170
|
+
{
|
|
171
|
+
"scope": "admin",
|
|
172
|
+
"module": "dashboard",
|
|
173
|
+
"functionName": "getDashboardList",
|
|
174
|
+
"commandPath": [
|
|
175
|
+
"dashboard",
|
|
176
|
+
"list"
|
|
177
|
+
],
|
|
178
|
+
"method": "GET",
|
|
179
|
+
"endpoint": "/api/apps/:app_id/dashboard",
|
|
180
|
+
"pathParams": [
|
|
181
|
+
{
|
|
182
|
+
"param": "app_id",
|
|
183
|
+
"flag": "app-id"
|
|
184
|
+
}
|
|
185
|
+
],
|
|
186
|
+
"controller": "Dashboard.GetList",
|
|
187
|
+
"requestType": null,
|
|
188
|
+
"queryParams": [],
|
|
189
|
+
"responseType": "DashboardGetListRespVO"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"scope": "admin",
|
|
193
|
+
"module": "dashboard",
|
|
194
|
+
"functionName": "createDashboard",
|
|
195
|
+
"commandPath": [
|
|
196
|
+
"dashboard",
|
|
197
|
+
"create"
|
|
198
|
+
],
|
|
199
|
+
"method": "POST",
|
|
200
|
+
"endpoint": "/api/apps/:app_id/dashboard",
|
|
201
|
+
"pathParams": [
|
|
202
|
+
{
|
|
203
|
+
"param": "app_id",
|
|
204
|
+
"flag": "app-id"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"controller": "Dashboard.Create",
|
|
208
|
+
"requestType": "DashboardCreateReqVO",
|
|
209
|
+
"queryParams": [],
|
|
210
|
+
"responseType": "DashboardCreateRespVO"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"scope": "admin",
|
|
214
|
+
"module": "dashboard",
|
|
215
|
+
"functionName": "getDashboardOptions",
|
|
216
|
+
"commandPath": [
|
|
217
|
+
"dashboard",
|
|
218
|
+
"get-options"
|
|
219
|
+
],
|
|
220
|
+
"method": "GET",
|
|
221
|
+
"endpoint": "/api/apps/:app_id/dashboard/:dashboard_id/options",
|
|
222
|
+
"pathParams": [
|
|
223
|
+
{
|
|
224
|
+
"param": "app_id",
|
|
225
|
+
"flag": "app-id"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"param": "dashboard_id",
|
|
229
|
+
"flag": "dashboard-id"
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"controller": "Dashboard.FetchOptions",
|
|
233
|
+
"requestType": null,
|
|
234
|
+
"queryParams": [],
|
|
235
|
+
"responseType": "DashboardFetchOptionsRespVO"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"scope": "admin",
|
|
239
|
+
"module": "dashboard",
|
|
240
|
+
"functionName": "updateDashboardOptions",
|
|
241
|
+
"commandPath": [
|
|
242
|
+
"dashboard",
|
|
243
|
+
"update-options"
|
|
244
|
+
],
|
|
245
|
+
"method": "PUT",
|
|
246
|
+
"endpoint": "/api/apps/:app_id/dashboard/:dashboard_id/options",
|
|
247
|
+
"pathParams": [
|
|
248
|
+
{
|
|
249
|
+
"param": "app_id",
|
|
250
|
+
"flag": "app-id"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"param": "dashboard_id",
|
|
254
|
+
"flag": "dashboard-id"
|
|
255
|
+
}
|
|
256
|
+
],
|
|
257
|
+
"controller": "Dashboard.UpdateOptions",
|
|
258
|
+
"requestType": "DashboardUpdateOptionsReqVO",
|
|
259
|
+
"queryParams": [],
|
|
260
|
+
"responseType": "DashboardUpdateOptionsRespVO"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"scope": "admin",
|
|
264
|
+
"module": "dashboard",
|
|
265
|
+
"functionName": "updateDashboardLayout",
|
|
266
|
+
"commandPath": [
|
|
267
|
+
"dashboard",
|
|
268
|
+
"update-layout"
|
|
269
|
+
],
|
|
270
|
+
"method": "PUT",
|
|
271
|
+
"endpoint": "/api/apps/:app_id/dashboard/:dashboard_id/layout",
|
|
272
|
+
"pathParams": [
|
|
273
|
+
{
|
|
274
|
+
"param": "app_id",
|
|
275
|
+
"flag": "app-id"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"param": "dashboard_id",
|
|
279
|
+
"flag": "dashboard-id"
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
"controller": "Dashboard.UpdateLayout",
|
|
283
|
+
"requestType": "DashboardUpdateLayoutReqVO",
|
|
284
|
+
"queryParams": [],
|
|
285
|
+
"responseType": "DashboardUpdateLayoutRespVO"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"scope": "admin",
|
|
289
|
+
"module": "dashboard",
|
|
290
|
+
"functionName": "updateDashboardTitle",
|
|
291
|
+
"commandPath": [
|
|
292
|
+
"dashboard",
|
|
293
|
+
"rename"
|
|
294
|
+
],
|
|
295
|
+
"method": "PUT",
|
|
296
|
+
"endpoint": "/api/apps/:app_id/dashboard/:dashboard_id/label",
|
|
297
|
+
"pathParams": [
|
|
298
|
+
{
|
|
299
|
+
"param": "app_id",
|
|
300
|
+
"flag": "app-id"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"param": "dashboard_id",
|
|
304
|
+
"flag": "dashboard-id"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"controller": "Dashboard.UpdateTitle",
|
|
308
|
+
"requestType": "DashboardUpdateTitleReqVO",
|
|
309
|
+
"queryParams": [],
|
|
310
|
+
"responseType": "DashboardUpdateTitleRespVO"
|
|
311
|
+
},
|
|
170
312
|
{
|
|
171
313
|
"scope": "admin",
|
|
172
314
|
"module": "table",
|
|
@@ -602,6 +744,188 @@ export const adminCommands = [
|
|
|
602
744
|
"requestType": "EntityWorkflowUpdateReqVO",
|
|
603
745
|
"queryParams": [],
|
|
604
746
|
"responseType": "EntityWorkflowUpdateRespVO"
|
|
747
|
+
},
|
|
748
|
+
{
|
|
749
|
+
"scope": "admin",
|
|
750
|
+
"module": "widget",
|
|
751
|
+
"functionName": "widgetsList",
|
|
752
|
+
"commandPath": [
|
|
753
|
+
"widget",
|
|
754
|
+
"list"
|
|
755
|
+
],
|
|
756
|
+
"method": "GET",
|
|
757
|
+
"endpoint": "/api/apps/:app_id/widgets",
|
|
758
|
+
"pathParams": [
|
|
759
|
+
{
|
|
760
|
+
"param": "app_id",
|
|
761
|
+
"flag": "app-id"
|
|
762
|
+
}
|
|
763
|
+
],
|
|
764
|
+
"controller": "App.WidgetsList",
|
|
765
|
+
"requestType": null,
|
|
766
|
+
"queryParams": [
|
|
767
|
+
{
|
|
768
|
+
"key": "type",
|
|
769
|
+
"flag": "type",
|
|
770
|
+
"type": "string",
|
|
771
|
+
"hasDefault": true
|
|
772
|
+
},
|
|
773
|
+
{
|
|
774
|
+
"key": "dashboard_id",
|
|
775
|
+
"flag": "dashboard-id",
|
|
776
|
+
"type": "number",
|
|
777
|
+
"hasDefault": true
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"key": "ingress_id",
|
|
781
|
+
"flag": "ingress-id",
|
|
782
|
+
"type": "number",
|
|
783
|
+
"hasDefault": true
|
|
784
|
+
}
|
|
785
|
+
],
|
|
786
|
+
"responseType": "AppWidgetsListRespVO"
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
"scope": "admin",
|
|
790
|
+
"module": "widget",
|
|
791
|
+
"functionName": "getWidgets",
|
|
792
|
+
"commandPath": [
|
|
793
|
+
"widget",
|
|
794
|
+
"get"
|
|
795
|
+
],
|
|
796
|
+
"method": "GET",
|
|
797
|
+
"endpoint": "/api/apps/:app_id/widgets/:widgets_id",
|
|
798
|
+
"pathParams": [
|
|
799
|
+
{
|
|
800
|
+
"param": "app_id",
|
|
801
|
+
"flag": "app-id"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
"param": "widgets_id",
|
|
805
|
+
"flag": "widget-id"
|
|
806
|
+
}
|
|
807
|
+
],
|
|
808
|
+
"controller": "App.GetWidgets",
|
|
809
|
+
"requestType": null,
|
|
810
|
+
"queryParams": [],
|
|
811
|
+
"responseType": "AppGetWidgetsRespVO"
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"scope": "admin",
|
|
815
|
+
"module": "widget",
|
|
816
|
+
"functionName": "newWidgets",
|
|
817
|
+
"commandPath": [
|
|
818
|
+
"widget",
|
|
819
|
+
"create"
|
|
820
|
+
],
|
|
821
|
+
"method": "POST",
|
|
822
|
+
"endpoint": "/api/apps/:app_id/widgets",
|
|
823
|
+
"pathParams": [
|
|
824
|
+
{
|
|
825
|
+
"param": "app_id",
|
|
826
|
+
"flag": "app-id"
|
|
827
|
+
}
|
|
828
|
+
],
|
|
829
|
+
"controller": "App.NewWidgets",
|
|
830
|
+
"requestType": "AppNewWidgetsReqVO",
|
|
831
|
+
"queryParams": [],
|
|
832
|
+
"responseType": "AppNewWidgetsRespVO"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"scope": "admin",
|
|
836
|
+
"module": "widget",
|
|
837
|
+
"functionName": "updateWidgets",
|
|
838
|
+
"commandPath": [
|
|
839
|
+
"widget",
|
|
840
|
+
"update"
|
|
841
|
+
],
|
|
842
|
+
"method": "PUT",
|
|
843
|
+
"endpoint": "/api/apps/:app_id/widgets/:widgets_id",
|
|
844
|
+
"pathParams": [
|
|
845
|
+
{
|
|
846
|
+
"param": "app_id",
|
|
847
|
+
"flag": "app-id"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"param": "widgets_id",
|
|
851
|
+
"flag": "widget-id"
|
|
852
|
+
}
|
|
853
|
+
],
|
|
854
|
+
"controller": "App.UpdateWidgets",
|
|
855
|
+
"requestType": "AppUpdateWidgetsReqVO",
|
|
856
|
+
"queryParams": [],
|
|
857
|
+
"responseType": "AppUpdateWidgetsRespVO"
|
|
858
|
+
},
|
|
859
|
+
{
|
|
860
|
+
"scope": "admin",
|
|
861
|
+
"module": "widget",
|
|
862
|
+
"functionName": "updateWidgetsIngressOptions",
|
|
863
|
+
"commandPath": [
|
|
864
|
+
"widget",
|
|
865
|
+
"update-ingress-options"
|
|
866
|
+
],
|
|
867
|
+
"method": "PUT",
|
|
868
|
+
"endpoint": "/api/apps/:app_id/widgets/:widgets_id/ingress-options",
|
|
869
|
+
"pathParams": [
|
|
870
|
+
{
|
|
871
|
+
"param": "app_id",
|
|
872
|
+
"flag": "app-id"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"param": "widgets_id",
|
|
876
|
+
"flag": "widget-id"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
"controller": "App.UpdateWidgetsIngressOptions",
|
|
880
|
+
"requestType": "AppUpdateWidgetsIngressOptionsReqVO",
|
|
881
|
+
"queryParams": [],
|
|
882
|
+
"responseType": "AppUpdateWidgetsIngressOptionsRespVO"
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
"scope": "admin",
|
|
886
|
+
"module": "widget",
|
|
887
|
+
"functionName": "previewWidgetsData",
|
|
888
|
+
"commandPath": [
|
|
889
|
+
"widget",
|
|
890
|
+
"preview-data"
|
|
891
|
+
],
|
|
892
|
+
"method": "POST",
|
|
893
|
+
"endpoint": "/api/apps/:app_id/widgets-preview",
|
|
894
|
+
"pathParams": [
|
|
895
|
+
{
|
|
896
|
+
"param": "app_id",
|
|
897
|
+
"flag": "app-id"
|
|
898
|
+
}
|
|
899
|
+
],
|
|
900
|
+
"controller": "App.PreviewWidgetsData",
|
|
901
|
+
"requestType": "AppPreviewWidgetsDataReqVO",
|
|
902
|
+
"queryParams": [],
|
|
903
|
+
"responseType": "AppPreviewWidgetsDataRespVO"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
"scope": "admin",
|
|
907
|
+
"module": "widget",
|
|
908
|
+
"functionName": "deleteWidgets",
|
|
909
|
+
"commandPath": [
|
|
910
|
+
"widget",
|
|
911
|
+
"delete"
|
|
912
|
+
],
|
|
913
|
+
"method": "DELETE",
|
|
914
|
+
"endpoint": "/api/apps/:app_id/widgets/:widgets_id",
|
|
915
|
+
"pathParams": [
|
|
916
|
+
{
|
|
917
|
+
"param": "app_id",
|
|
918
|
+
"flag": "app-id"
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
"param": "widgets_id",
|
|
922
|
+
"flag": "widget-id"
|
|
923
|
+
}
|
|
924
|
+
],
|
|
925
|
+
"controller": "App.DeleteWidgets",
|
|
926
|
+
"requestType": null,
|
|
927
|
+
"queryParams": [],
|
|
928
|
+
"responseType": "boolean"
|
|
605
929
|
}
|
|
606
930
|
] as const
|
|
607
931
|
|
|
@@ -629,6 +953,56 @@ export const userCommands = [
|
|
|
629
953
|
],
|
|
630
954
|
"responseType": "GlobalActionEntryRespVO"
|
|
631
955
|
},
|
|
956
|
+
{
|
|
957
|
+
"scope": "user",
|
|
958
|
+
"module": "dashboard",
|
|
959
|
+
"functionName": "getDashboard",
|
|
960
|
+
"commandPath": [
|
|
961
|
+
"dashboard",
|
|
962
|
+
"get"
|
|
963
|
+
],
|
|
964
|
+
"method": "GET",
|
|
965
|
+
"endpoint": "/api/dashboard/:app_id/:dashboard_id",
|
|
966
|
+
"pathParams": [
|
|
967
|
+
{
|
|
968
|
+
"param": "app_id",
|
|
969
|
+
"flag": "app-id"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"param": "dashboard_id",
|
|
973
|
+
"flag": "dashboard-id"
|
|
974
|
+
}
|
|
975
|
+
],
|
|
976
|
+
"controller": "UserAction.DashboardGet",
|
|
977
|
+
"requestType": null,
|
|
978
|
+
"queryParams": [],
|
|
979
|
+
"responseType": "DashboardGetRespVO"
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
"scope": "user",
|
|
983
|
+
"module": "dashboard",
|
|
984
|
+
"functionName": "getDashboardWidgets",
|
|
985
|
+
"commandPath": [
|
|
986
|
+
"dashboard",
|
|
987
|
+
"widgets"
|
|
988
|
+
],
|
|
989
|
+
"method": "GET",
|
|
990
|
+
"endpoint": "/api/dashboard/:app_id/:dashboard_id/widgets",
|
|
991
|
+
"pathParams": [
|
|
992
|
+
{
|
|
993
|
+
"param": "app_id",
|
|
994
|
+
"flag": "app-id"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"param": "dashboard_id",
|
|
998
|
+
"flag": "dashboard-id"
|
|
999
|
+
}
|
|
1000
|
+
],
|
|
1001
|
+
"controller": "UserAction.DashboardWidgets",
|
|
1002
|
+
"requestType": null,
|
|
1003
|
+
"queryParams": [],
|
|
1004
|
+
"responseType": "DashboardWidgets[]"
|
|
1005
|
+
},
|
|
632
1006
|
{
|
|
633
1007
|
"scope": "user",
|
|
634
1008
|
"module": "table",
|
|
@@ -1050,6 +1424,27 @@ export const userCommands = [
|
|
|
1050
1424
|
"queryParams": [],
|
|
1051
1425
|
"responseType": "MobileUploadCheckRespVO"
|
|
1052
1426
|
},
|
|
1427
|
+
{
|
|
1428
|
+
"scope": "user",
|
|
1429
|
+
"module": "widget",
|
|
1430
|
+
"functionName": "fetchWidgetsData",
|
|
1431
|
+
"commandPath": [
|
|
1432
|
+
"widget",
|
|
1433
|
+
"data"
|
|
1434
|
+
],
|
|
1435
|
+
"method": "POST",
|
|
1436
|
+
"endpoint": "/api/apps/:app_id/widgets-data",
|
|
1437
|
+
"pathParams": [
|
|
1438
|
+
{
|
|
1439
|
+
"param": "app_id",
|
|
1440
|
+
"flag": "app-id"
|
|
1441
|
+
}
|
|
1442
|
+
],
|
|
1443
|
+
"controller": "UserAction.FetchWidgetsData",
|
|
1444
|
+
"requestType": "FetchWidgetsDataReqVO",
|
|
1445
|
+
"queryParams": [],
|
|
1446
|
+
"responseType": "FetchWidgetsDataRespVO"
|
|
1447
|
+
},
|
|
1053
1448
|
{
|
|
1054
1449
|
"scope": "user",
|
|
1055
1450
|
"module": "profile",
|
|
@@ -346,6 +346,128 @@ export const helpExamplesIndex = {
|
|
|
346
346
|
}
|
|
347
347
|
]
|
|
348
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
|
+
},
|
|
349
471
|
"user.row.bulk-update": {
|
|
350
472
|
"command": [
|
|
351
473
|
"row",
|