@carthooks/arcubase-cli 0.1.23 → 0.1.24
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 +27 -0
- package/bundle/arcubase.mjs +27 -0
- package/dist/generated/help_examples.generated.d.ts +14 -0
- package/dist/generated/help_examples.generated.d.ts.map +1 -1
- package/dist/generated/help_examples.generated.js +27 -0
- package/package.json +3 -3
- package/sdk-dist/docs/runtime-reference/dashboard.md +8 -0
- package/sdk-dist/docs/runtime-reference/help-examples/admin/dashboard/update-options.json +23 -0
- package/sdk-dist/generated/help_examples.generated.ts +27 -0
- package/src/generated/help_examples.generated.ts +27 -0
- package/src/tests/help.test.ts +11 -0
|
@@ -18360,6 +18360,33 @@ var helpExamplesIndex = {
|
|
|
18360
18360
|
}
|
|
18361
18361
|
]
|
|
18362
18362
|
},
|
|
18363
|
+
"admin.dashboard.update-options": {
|
|
18364
|
+
"command": [
|
|
18365
|
+
"dashboard",
|
|
18366
|
+
"update-options"
|
|
18367
|
+
],
|
|
18368
|
+
"examples": [
|
|
18369
|
+
{
|
|
18370
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
18371
|
+
"body": {
|
|
18372
|
+
"changed": [
|
|
18373
|
+
"users"
|
|
18374
|
+
],
|
|
18375
|
+
"users": [
|
|
18376
|
+
{
|
|
18377
|
+
"type": "user",
|
|
18378
|
+
"id": 2188889901
|
|
18379
|
+
}
|
|
18380
|
+
]
|
|
18381
|
+
},
|
|
18382
|
+
"notes": [
|
|
18383
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
18384
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
18385
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
18386
|
+
]
|
|
18387
|
+
}
|
|
18388
|
+
]
|
|
18389
|
+
},
|
|
18363
18390
|
"admin.widget.create": {
|
|
18364
18391
|
"command": [
|
|
18365
18392
|
"widget",
|
package/bundle/arcubase.mjs
CHANGED
|
@@ -18360,6 +18360,33 @@ var helpExamplesIndex = {
|
|
|
18360
18360
|
}
|
|
18361
18361
|
]
|
|
18362
18362
|
},
|
|
18363
|
+
"admin.dashboard.update-options": {
|
|
18364
|
+
"command": [
|
|
18365
|
+
"dashboard",
|
|
18366
|
+
"update-options"
|
|
18367
|
+
],
|
|
18368
|
+
"examples": [
|
|
18369
|
+
{
|
|
18370
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
18371
|
+
"body": {
|
|
18372
|
+
"changed": [
|
|
18373
|
+
"users"
|
|
18374
|
+
],
|
|
18375
|
+
"users": [
|
|
18376
|
+
{
|
|
18377
|
+
"type": "user",
|
|
18378
|
+
"id": 2188889901
|
|
18379
|
+
}
|
|
18380
|
+
]
|
|
18381
|
+
},
|
|
18382
|
+
"notes": [
|
|
18383
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
18384
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
18385
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
18386
|
+
]
|
|
18387
|
+
}
|
|
18388
|
+
]
|
|
18389
|
+
},
|
|
18363
18390
|
"admin.widget.create": {
|
|
18364
18391
|
"command": [
|
|
18365
18392
|
"widget",
|
|
@@ -262,6 +262,20 @@ export declare const helpExamplesIndex: {
|
|
|
262
262
|
readonly notes: readonly ["the request body is a top-level array", "do not wrap the array as {\"layout\":[...]}"];
|
|
263
263
|
}];
|
|
264
264
|
};
|
|
265
|
+
readonly "admin.dashboard.update-options": {
|
|
266
|
+
readonly command: readonly ["dashboard", "update-options"];
|
|
267
|
+
readonly examples: readonly [{
|
|
268
|
+
readonly title: "make a dashboard visible to one Arcubase user";
|
|
269
|
+
readonly body: {
|
|
270
|
+
readonly changed: readonly ["users"];
|
|
271
|
+
readonly users: readonly [{
|
|
272
|
+
readonly type: "user";
|
|
273
|
+
readonly id: 2188889901;
|
|
274
|
+
}];
|
|
275
|
+
};
|
|
276
|
+
readonly notes: readonly ["dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users", "use the currentSpeaker.arcubaseUserId value for the current human speaker", "after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"];
|
|
277
|
+
}];
|
|
278
|
+
};
|
|
265
279
|
readonly "admin.widget.create": {
|
|
266
280
|
readonly command: readonly ["widget", "create"];
|
|
267
281
|
readonly examples: readonly [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help_examples.generated.d.ts","sourceRoot":"","sources":["../../src/generated/help_examples.generated.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB
|
|
1
|
+
{"version":3,"file":"help_examples.generated.d.ts","sourceRoot":"","sources":["../../src/generated/help_examples.generated.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsoBgF,CAAA"}
|
|
@@ -363,6 +363,33 @@ export const helpExamplesIndex = {
|
|
|
363
363
|
}
|
|
364
364
|
]
|
|
365
365
|
},
|
|
366
|
+
"admin.dashboard.update-options": {
|
|
367
|
+
"command": [
|
|
368
|
+
"dashboard",
|
|
369
|
+
"update-options"
|
|
370
|
+
],
|
|
371
|
+
"examples": [
|
|
372
|
+
{
|
|
373
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
374
|
+
"body": {
|
|
375
|
+
"changed": [
|
|
376
|
+
"users"
|
|
377
|
+
],
|
|
378
|
+
"users": [
|
|
379
|
+
{
|
|
380
|
+
"type": "user",
|
|
381
|
+
"id": 2188889901
|
|
382
|
+
}
|
|
383
|
+
]
|
|
384
|
+
},
|
|
385
|
+
"notes": [
|
|
386
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
387
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
388
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
]
|
|
392
|
+
},
|
|
366
393
|
"admin.widget.create": {
|
|
367
394
|
"command": [
|
|
368
395
|
"widget",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carthooks/arcubase-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "Arcubase runtime CLI for admin and user command execution",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
".": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"bin": {
|
|
12
|
-
"arcubase-admin": "
|
|
13
|
-
"arcubase": "
|
|
12
|
+
"arcubase-admin": "dist/bin/arcubase-admin.js",
|
|
13
|
+
"arcubase": "dist/bin/arcubase.js"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
@@ -11,6 +11,14 @@ User dashboard discovery:
|
|
|
11
11
|
|
|
12
12
|
Use `arcubase-admin dashboard list`, `arcubase-admin dashboard create`, `arcubase-admin dashboard get-options`, `arcubase-admin dashboard update-options`, `arcubase-admin dashboard update-layout`, and `arcubase-admin dashboard rename` to manage dashboards as an admin.
|
|
13
13
|
|
|
14
|
+
Dashboard visibility:
|
|
15
|
+
|
|
16
|
+
- A dashboard is user-visible only when its options include a matching user scope.
|
|
17
|
+
- After `dashboard create`, call `dashboard update-options` with `{"changed":["users"],"users":[{"type":"user","id":<arcubaseUserId>}]}`
|
|
18
|
+
for the current or target Arcubase user.
|
|
19
|
+
- For the current BotWorks human speaker, use `currentSpeaker.arcubaseUserId`; do not call organization lookup only to resolve yourself.
|
|
20
|
+
- Before claiming a normal user can see a dashboard, run user-side `arcubase app get --app-id <app_id>` and require `dashboards[]` to include that dashboard.
|
|
21
|
+
|
|
14
22
|
Dashboard title updates use body `{"name":"..."}`.
|
|
15
23
|
|
|
16
24
|
Dashboard layout updates use a top-level JSON array of layout positions, not an object wrapper. Example:
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scope": "admin",
|
|
3
|
+
"command": ["dashboard", "update-options"],
|
|
4
|
+
"examples": [
|
|
5
|
+
{
|
|
6
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
7
|
+
"body": {
|
|
8
|
+
"changed": ["users"],
|
|
9
|
+
"users": [
|
|
10
|
+
{
|
|
11
|
+
"type": "user",
|
|
12
|
+
"id": 2188889901
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"notes": [
|
|
17
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
18
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
19
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -370,6 +370,33 @@ export const helpExamplesIndex = {
|
|
|
370
370
|
}
|
|
371
371
|
]
|
|
372
372
|
},
|
|
373
|
+
"admin.dashboard.update-options": {
|
|
374
|
+
"command": [
|
|
375
|
+
"dashboard",
|
|
376
|
+
"update-options"
|
|
377
|
+
],
|
|
378
|
+
"examples": [
|
|
379
|
+
{
|
|
380
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
381
|
+
"body": {
|
|
382
|
+
"changed": [
|
|
383
|
+
"users"
|
|
384
|
+
],
|
|
385
|
+
"users": [
|
|
386
|
+
{
|
|
387
|
+
"type": "user",
|
|
388
|
+
"id": 2188889901
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"notes": [
|
|
393
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
394
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
395
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
373
400
|
"admin.widget.create": {
|
|
374
401
|
"command": [
|
|
375
402
|
"widget",
|
|
@@ -370,6 +370,33 @@ export const helpExamplesIndex = {
|
|
|
370
370
|
}
|
|
371
371
|
]
|
|
372
372
|
},
|
|
373
|
+
"admin.dashboard.update-options": {
|
|
374
|
+
"command": [
|
|
375
|
+
"dashboard",
|
|
376
|
+
"update-options"
|
|
377
|
+
],
|
|
378
|
+
"examples": [
|
|
379
|
+
{
|
|
380
|
+
"title": "make a dashboard visible to one Arcubase user",
|
|
381
|
+
"body": {
|
|
382
|
+
"changed": [
|
|
383
|
+
"users"
|
|
384
|
+
],
|
|
385
|
+
"users": [
|
|
386
|
+
{
|
|
387
|
+
"type": "user",
|
|
388
|
+
"id": 2188889901
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
"notes": [
|
|
393
|
+
"dashboard visibility is controlled by DashboardUpdateOptionsReqVO.users",
|
|
394
|
+
"use the currentSpeaker.arcubaseUserId value for the current human speaker",
|
|
395
|
+
"after updating, verify from the user side with arcubase app get and require dashboards to include the dashboard"
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
373
400
|
"admin.widget.create": {
|
|
374
401
|
"command": [
|
|
375
402
|
"widget",
|
package/src/tests/help.test.ts
CHANGED
|
@@ -220,6 +220,17 @@ test('admin dashboard update-layout help-examples show top-level layout array',
|
|
|
220
220
|
assert.match(out.text, /do not wrap the array/)
|
|
221
221
|
})
|
|
222
222
|
|
|
223
|
+
test('admin dashboard update-options help-examples show user visibility scope', async () => {
|
|
224
|
+
const out = await executeCLI('admin', ['dashboard', 'update-options', '--help-examples'], env as any, async () => new Response('{}'))
|
|
225
|
+
assert.equal(out.kind, 'help')
|
|
226
|
+
assert.match(out.text, /arcubase-admin dashboard update-options --help-examples/)
|
|
227
|
+
assert.match(out.text, /"changed":\["users"\]/)
|
|
228
|
+
assert.match(out.text, /"users":\[\{"type":"user","id":2188889901\}\]/)
|
|
229
|
+
assert.match(out.text, /currentSpeaker\.arcubaseUserId/)
|
|
230
|
+
assert.match(out.text, /verify from the user side with arcubase app get/)
|
|
231
|
+
assert.doesNotMatch(out.text, /"type":"member"/)
|
|
232
|
+
})
|
|
233
|
+
|
|
223
234
|
test('admin widget preview-data help-examples show chart query body without widget id', async () => {
|
|
224
235
|
const out = await executeCLI('admin', ['widget', 'preview-data', '--help-examples'], env as any, async () => new Response('{}'))
|
|
225
236
|
assert.equal(out.kind, 'help')
|