@carthooks/arcubase-cli 0.1.4 → 0.1.6
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 +188 -210
- package/bundle/arcubase.mjs +188 -210
- package/dist/generated/command_registry.generated.d.ts +36 -112
- package/dist/generated/command_registry.generated.d.ts.map +1 -1
- package/dist/generated/command_registry.generated.js +40 -163
- package/dist/generated/type_index.generated.d.ts +0 -12
- package/dist/generated/type_index.generated.d.ts.map +1 -1
- package/dist/generated/type_index.generated.js +0 -12
- package/dist/generated/zod_registry.generated.d.ts +1 -19
- package/dist/generated/zod_registry.generated.d.ts.map +1 -1
- package/dist/generated/zod_registry.generated.js +0 -21
- package/dist/runtime/command_registry.d.ts +19 -1
- package/dist/runtime/command_registry.d.ts.map +1 -1
- package/dist/runtime/command_registry.js +19 -1
- package/dist/runtime/execute.d.ts.map +1 -1
- package/dist/runtime/execute.js +119 -9
- package/dist/runtime/zod_registry.d.ts.map +1 -1
- package/dist/runtime/zod_registry.js +24 -7
- package/dist/tests/command_registry.test.js +11 -4
- package/dist/tests/execute_validation.test.js +72 -17
- package/dist/tests/help.test.js +16 -9
- package/package.json +1 -1
- package/sdk-dist/api/admin/app.ts +8 -1
- package/sdk-dist/docs/runtime-reference/README.md +24 -16
- package/sdk-dist/docs/runtime-reference/app-discovery.md +84 -0
- package/sdk-dist/docs/runtime-reference/entity-schema/README.md +2 -2
- package/sdk-dist/docs/runtime-reference/entity-schema/subform.md +2 -2
- package/sdk-dist/docs/runtime-reference/entity-schema.md +2 -2
- package/sdk-dist/docs/runtime-reference/examples/README.md +1 -1
- package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +4 -4
- package/sdk-dist/docs/runtime-reference/examples/oms-01/app-overview.md +1 -1
- package/sdk-dist/docs/runtime-reference/row-crud.md +6 -6
- package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +5 -5
- package/sdk-dist/docs/runtime-reference/table-lifecycle.md +24 -8
- package/sdk-dist/docs/runtime-reference/uploads.md +1 -1
- package/sdk-dist/generated/command_registry.generated.ts +40 -163
- package/sdk-dist/generated/type_index.generated.ts +0 -12
- package/sdk-dist/generated/zod_registry.generated.ts +0 -36
- package/sdk-dist/types/app.ts +7 -0
- package/src/generated/command_registry.generated.ts +40 -163
- package/src/generated/type_index.generated.ts +0 -12
- package/src/generated/zod_registry.generated.ts +0 -36
- package/src/runtime/command_registry.ts +38 -2
- package/src/runtime/execute.ts +127 -9
- package/src/runtime/zod_registry.ts +25 -7
- package/src/tests/command_registry.test.ts +13 -4
- package/src/tests/execute_validation.test.ts +78 -17
- package/src/tests/help.test.ts +17 -9
- package/sdk-dist/docs/runtime-reference/workflow/README.md +0 -19
package/bundle/arcubase.mjs
CHANGED
|
@@ -227,6 +227,22 @@ var adminCommands = [
|
|
|
227
227
|
"scalarParams": [],
|
|
228
228
|
"responseType": "AppCreateByTenantsRespVO"
|
|
229
229
|
},
|
|
230
|
+
{
|
|
231
|
+
"scope": "admin",
|
|
232
|
+
"module": "app",
|
|
233
|
+
"functionName": "listApps",
|
|
234
|
+
"commandPath": [
|
|
235
|
+
"app",
|
|
236
|
+
"list-apps"
|
|
237
|
+
],
|
|
238
|
+
"method": "GET",
|
|
239
|
+
"endpoint": "/apps",
|
|
240
|
+
"endpointParams": [],
|
|
241
|
+
"controller": "App.ListApps",
|
|
242
|
+
"requestType": null,
|
|
243
|
+
"scalarParams": [],
|
|
244
|
+
"responseType": "AppListRespVO"
|
|
245
|
+
},
|
|
230
246
|
{
|
|
231
247
|
"scope": "admin",
|
|
232
248
|
"module": "app",
|
|
@@ -3232,88 +3248,6 @@ var adminCommands = [
|
|
|
3232
3248
|
}
|
|
3233
3249
|
],
|
|
3234
3250
|
"responseType": "TenantUsageDailyRespVO"
|
|
3235
|
-
},
|
|
3236
|
-
{
|
|
3237
|
-
"scope": "admin",
|
|
3238
|
-
"module": "workflow",
|
|
3239
|
-
"functionName": "deployEntityWorkflow",
|
|
3240
|
-
"commandPath": [
|
|
3241
|
-
"workflow",
|
|
3242
|
-
"deploy-entity-workflow"
|
|
3243
|
-
],
|
|
3244
|
-
"method": "POST",
|
|
3245
|
-
"endpoint": "/apps/:app_id/entity/:entity_id/workflow/deploy",
|
|
3246
|
-
"endpointParams": [
|
|
3247
|
-
"app_id",
|
|
3248
|
-
"entity_id"
|
|
3249
|
-
],
|
|
3250
|
-
"controller": "Entity.WorkflowDeploy",
|
|
3251
|
-
"requestType": "EntityWorkflowDeployReqVO",
|
|
3252
|
-
"scalarParams": [],
|
|
3253
|
-
"responseType": "EntityWorkflowDeployRespVO"
|
|
3254
|
-
},
|
|
3255
|
-
{
|
|
3256
|
-
"scope": "admin",
|
|
3257
|
-
"module": "workflow",
|
|
3258
|
-
"functionName": "getEntityWorkflow",
|
|
3259
|
-
"commandPath": [
|
|
3260
|
-
"workflow",
|
|
3261
|
-
"get-entity-workflow"
|
|
3262
|
-
],
|
|
3263
|
-
"method": "GET",
|
|
3264
|
-
"endpoint": "/apps/:app_id/entity/:entity_id/workflow",
|
|
3265
|
-
"endpointParams": [
|
|
3266
|
-
"app_id",
|
|
3267
|
-
"entity_id"
|
|
3268
|
-
],
|
|
3269
|
-
"controller": "Entity.WorkflowGet",
|
|
3270
|
-
"requestType": null,
|
|
3271
|
-
"scalarParams": [
|
|
3272
|
-
{
|
|
3273
|
-
"name": "workingId",
|
|
3274
|
-
"type": "string",
|
|
3275
|
-
"hasDefault": true
|
|
3276
|
-
}
|
|
3277
|
-
],
|
|
3278
|
-
"responseType": "EntityWorkflowGetRespVO"
|
|
3279
|
-
},
|
|
3280
|
-
{
|
|
3281
|
-
"scope": "admin",
|
|
3282
|
-
"module": "workflow",
|
|
3283
|
-
"functionName": "createEntityWorkflowVersion",
|
|
3284
|
-
"commandPath": [
|
|
3285
|
-
"workflow",
|
|
3286
|
-
"create-entity-workflow-version"
|
|
3287
|
-
],
|
|
3288
|
-
"method": "POST",
|
|
3289
|
-
"endpoint": "/apps/:app_id/entity/:entity_id/workflow/new",
|
|
3290
|
-
"endpointParams": [
|
|
3291
|
-
"app_id",
|
|
3292
|
-
"entity_id"
|
|
3293
|
-
],
|
|
3294
|
-
"controller": "Entity.WorkflowNewVersion",
|
|
3295
|
-
"requestType": null,
|
|
3296
|
-
"scalarParams": [],
|
|
3297
|
-
"responseType": "EntityWorkflowNewVersionRespVO"
|
|
3298
|
-
},
|
|
3299
|
-
{
|
|
3300
|
-
"scope": "admin",
|
|
3301
|
-
"module": "workflow",
|
|
3302
|
-
"functionName": "updateEntityWorkflow",
|
|
3303
|
-
"commandPath": [
|
|
3304
|
-
"workflow",
|
|
3305
|
-
"update-entity-workflow"
|
|
3306
|
-
],
|
|
3307
|
-
"method": "POST",
|
|
3308
|
-
"endpoint": "/apps/:app_id/entity/:entity_id/workflow",
|
|
3309
|
-
"endpointParams": [
|
|
3310
|
-
"app_id",
|
|
3311
|
-
"entity_id"
|
|
3312
|
-
],
|
|
3313
|
-
"controller": "Entity.WorkflowUpdate",
|
|
3314
|
-
"requestType": "EntityWorkflowUpdateReqVO",
|
|
3315
|
-
"scalarParams": [],
|
|
3316
|
-
"responseType": "EntityWorkflowUpdateRespVO"
|
|
3317
3251
|
}
|
|
3318
3252
|
];
|
|
3319
3253
|
var userCommands = [
|
|
@@ -4430,10 +4364,10 @@ var userCommands = [
|
|
|
4430
4364
|
},
|
|
4431
4365
|
{
|
|
4432
4366
|
"scope": "user",
|
|
4433
|
-
"module": "
|
|
4367
|
+
"module": "rows",
|
|
4434
4368
|
"functionName": "putEntityQueryKeeper",
|
|
4435
4369
|
"commandPath": [
|
|
4436
|
-
"
|
|
4370
|
+
"rows",
|
|
4437
4371
|
"put-entity-query-keeper"
|
|
4438
4372
|
],
|
|
4439
4373
|
"method": "POST",
|
|
@@ -4449,10 +4383,10 @@ var userCommands = [
|
|
|
4449
4383
|
},
|
|
4450
4384
|
{
|
|
4451
4385
|
"scope": "user",
|
|
4452
|
-
"module": "
|
|
4386
|
+
"module": "rows",
|
|
4453
4387
|
"functionName": "queryEntity",
|
|
4454
4388
|
"commandPath": [
|
|
4455
|
-
"
|
|
4389
|
+
"rows",
|
|
4456
4390
|
"query-entity"
|
|
4457
4391
|
],
|
|
4458
4392
|
"method": "POST",
|
|
@@ -4468,10 +4402,10 @@ var userCommands = [
|
|
|
4468
4402
|
},
|
|
4469
4403
|
{
|
|
4470
4404
|
"scope": "user",
|
|
4471
|
-
"module": "
|
|
4405
|
+
"module": "rows",
|
|
4472
4406
|
"functionName": "filterEntityQuery",
|
|
4473
4407
|
"commandPath": [
|
|
4474
|
-
"
|
|
4408
|
+
"rows",
|
|
4475
4409
|
"filter-entity-query"
|
|
4476
4410
|
],
|
|
4477
4411
|
"method": "POST",
|
|
@@ -4487,10 +4421,10 @@ var userCommands = [
|
|
|
4487
4421
|
},
|
|
4488
4422
|
{
|
|
4489
4423
|
"scope": "user",
|
|
4490
|
-
"module": "
|
|
4424
|
+
"module": "rows",
|
|
4491
4425
|
"functionName": "queryEntitySelection",
|
|
4492
4426
|
"commandPath": [
|
|
4493
|
-
"
|
|
4427
|
+
"rows",
|
|
4494
4428
|
"query-entity-selection"
|
|
4495
4429
|
],
|
|
4496
4430
|
"method": "POST",
|
|
@@ -4507,29 +4441,10 @@ var userCommands = [
|
|
|
4507
4441
|
},
|
|
4508
4442
|
{
|
|
4509
4443
|
"scope": "user",
|
|
4510
|
-
"module": "
|
|
4511
|
-
"functionName": "resolveEntityWorkflow",
|
|
4512
|
-
"commandPath": [
|
|
4513
|
-
"workflow",
|
|
4514
|
-
"resolve-entity-workflow"
|
|
4515
|
-
],
|
|
4516
|
-
"method": "POST",
|
|
4517
|
-
"endpoint": "/entity/:app_id/:entity_id/resolve-workflow",
|
|
4518
|
-
"endpointParams": [
|
|
4519
|
-
"app_id",
|
|
4520
|
-
"entity_id"
|
|
4521
|
-
],
|
|
4522
|
-
"controller": "UserAction.EntityResolveWorkflow",
|
|
4523
|
-
"requestType": "EntityResolveWorkflowReqVO",
|
|
4524
|
-
"scalarParams": [],
|
|
4525
|
-
"responseType": "EntityResolveWorkflowRespVO"
|
|
4526
|
-
},
|
|
4527
|
-
{
|
|
4528
|
-
"scope": "user",
|
|
4529
|
-
"module": "workflow",
|
|
4444
|
+
"module": "rows",
|
|
4530
4445
|
"functionName": "getEntityRow",
|
|
4531
4446
|
"commandPath": [
|
|
4532
|
-
"
|
|
4447
|
+
"rows",
|
|
4533
4448
|
"get-entity-row"
|
|
4534
4449
|
],
|
|
4535
4450
|
"method": "GET",
|
|
@@ -4552,10 +4467,10 @@ var userCommands = [
|
|
|
4552
4467
|
},
|
|
4553
4468
|
{
|
|
4554
4469
|
"scope": "user",
|
|
4555
|
-
"module": "
|
|
4470
|
+
"module": "rows",
|
|
4556
4471
|
"functionName": "deleteEntityRow",
|
|
4557
4472
|
"commandPath": [
|
|
4558
|
-
"
|
|
4473
|
+
"rows",
|
|
4559
4474
|
"delete-entity-row"
|
|
4560
4475
|
],
|
|
4561
4476
|
"method": "POST",
|
|
@@ -4571,10 +4486,10 @@ var userCommands = [
|
|
|
4571
4486
|
},
|
|
4572
4487
|
{
|
|
4573
4488
|
"scope": "user",
|
|
4574
|
-
"module": "
|
|
4489
|
+
"module": "rows",
|
|
4575
4490
|
"functionName": "restoreEntityRow",
|
|
4576
4491
|
"commandPath": [
|
|
4577
|
-
"
|
|
4492
|
+
"rows",
|
|
4578
4493
|
"restore-entity-row"
|
|
4579
4494
|
],
|
|
4580
4495
|
"method": "POST",
|
|
@@ -4590,10 +4505,10 @@ var userCommands = [
|
|
|
4590
4505
|
},
|
|
4591
4506
|
{
|
|
4592
4507
|
"scope": "user",
|
|
4593
|
-
"module": "
|
|
4508
|
+
"module": "rows",
|
|
4594
4509
|
"functionName": "updateEntityRow",
|
|
4595
4510
|
"commandPath": [
|
|
4596
|
-
"
|
|
4511
|
+
"rows",
|
|
4597
4512
|
"update-entity-row"
|
|
4598
4513
|
],
|
|
4599
4514
|
"method": "PUT",
|
|
@@ -4610,10 +4525,10 @@ var userCommands = [
|
|
|
4610
4525
|
},
|
|
4611
4526
|
{
|
|
4612
4527
|
"scope": "user",
|
|
4613
|
-
"module": "
|
|
4528
|
+
"module": "rows",
|
|
4614
4529
|
"functionName": "validateEntityUniq",
|
|
4615
4530
|
"commandPath": [
|
|
4616
|
-
"
|
|
4531
|
+
"rows",
|
|
4617
4532
|
"validate-entity-uniq"
|
|
4618
4533
|
],
|
|
4619
4534
|
"method": "POST",
|
|
@@ -4629,10 +4544,10 @@ var userCommands = [
|
|
|
4629
4544
|
},
|
|
4630
4545
|
{
|
|
4631
4546
|
"scope": "user",
|
|
4632
|
-
"module": "
|
|
4547
|
+
"module": "rows",
|
|
4633
4548
|
"functionName": "insertEntity",
|
|
4634
4549
|
"commandPath": [
|
|
4635
|
-
"
|
|
4550
|
+
"rows",
|
|
4636
4551
|
"insert-entity"
|
|
4637
4552
|
],
|
|
4638
4553
|
"method": "POST",
|
|
@@ -4648,10 +4563,10 @@ var userCommands = [
|
|
|
4648
4563
|
},
|
|
4649
4564
|
{
|
|
4650
4565
|
"scope": "user",
|
|
4651
|
-
"module": "
|
|
4566
|
+
"module": "rows",
|
|
4652
4567
|
"functionName": "prepareEntityInsert",
|
|
4653
4568
|
"commandPath": [
|
|
4654
|
-
"
|
|
4569
|
+
"rows",
|
|
4655
4570
|
"prepare-entity-insert"
|
|
4656
4571
|
],
|
|
4657
4572
|
"method": "POST",
|
|
@@ -4667,48 +4582,10 @@ var userCommands = [
|
|
|
4667
4582
|
},
|
|
4668
4583
|
{
|
|
4669
4584
|
"scope": "user",
|
|
4670
|
-
"module": "
|
|
4671
|
-
"functionName": "queryEntityWorkflowApproveUsers",
|
|
4672
|
-
"commandPath": [
|
|
4673
|
-
"workflow",
|
|
4674
|
-
"query-entity-workflow-approve-users"
|
|
4675
|
-
],
|
|
4676
|
-
"method": "POST",
|
|
4677
|
-
"endpoint": "/entity/:app_id/:entity_id/query-approve-users",
|
|
4678
|
-
"endpointParams": [
|
|
4679
|
-
"app_id",
|
|
4680
|
-
"entity_id"
|
|
4681
|
-
],
|
|
4682
|
-
"controller": "UserAction.EntityWorkflowApproveUsers",
|
|
4683
|
-
"requestType": null,
|
|
4684
|
-
"scalarParams": [],
|
|
4685
|
-
"responseType": "EntityWorkflowApproveUsersRespVO"
|
|
4686
|
-
},
|
|
4687
|
-
{
|
|
4688
|
-
"scope": "user",
|
|
4689
|
-
"module": "workflow",
|
|
4690
|
-
"functionName": "queryEntityWorkflowNodes",
|
|
4691
|
-
"commandPath": [
|
|
4692
|
-
"workflow",
|
|
4693
|
-
"query-entity-workflow-nodes"
|
|
4694
|
-
],
|
|
4695
|
-
"method": "POST",
|
|
4696
|
-
"endpoint": "/entity/:app_id/:entity_id/query-workflow-nodes",
|
|
4697
|
-
"endpointParams": [
|
|
4698
|
-
"app_id",
|
|
4699
|
-
"entity_id"
|
|
4700
|
-
],
|
|
4701
|
-
"controller": "UserAction.EntityWorkflowNodes",
|
|
4702
|
-
"requestType": null,
|
|
4703
|
-
"scalarParams": [],
|
|
4704
|
-
"responseType": "EntityWorkflowNodesRespVO"
|
|
4705
|
-
},
|
|
4706
|
-
{
|
|
4707
|
-
"scope": "user",
|
|
4708
|
-
"module": "workflow",
|
|
4585
|
+
"module": "rows",
|
|
4709
4586
|
"functionName": "getEntitySubformItems",
|
|
4710
4587
|
"commandPath": [
|
|
4711
|
-
"
|
|
4588
|
+
"rows",
|
|
4712
4589
|
"get-entity-subform-items"
|
|
4713
4590
|
],
|
|
4714
4591
|
"method": "POST",
|
|
@@ -4726,8 +4603,24 @@ var userCommands = [
|
|
|
4726
4603
|
];
|
|
4727
4604
|
|
|
4728
4605
|
// src/runtime/command_registry.ts
|
|
4606
|
+
var customAdminCommands = [
|
|
4607
|
+
{
|
|
4608
|
+
scope: "admin",
|
|
4609
|
+
module: "app",
|
|
4610
|
+
functionName: "inventory",
|
|
4611
|
+
commandPath: ["app", "inventory"],
|
|
4612
|
+
method: "GET",
|
|
4613
|
+
endpoint: "/apps",
|
|
4614
|
+
endpointParams: [],
|
|
4615
|
+
controller: "Runtime.AppInventory",
|
|
4616
|
+
requestType: null,
|
|
4617
|
+
scalarParams: [],
|
|
4618
|
+
responseType: "AppInventoryRespVO"
|
|
4619
|
+
}
|
|
4620
|
+
];
|
|
4621
|
+
var customUserCommands = [];
|
|
4729
4622
|
function listCommands(scope) {
|
|
4730
|
-
return scope === "admin" ? adminCommands : userCommands;
|
|
4623
|
+
return scope === "admin" ? [...adminCommands, ...customAdminCommands] : [...userCommands, ...customUserCommands];
|
|
4731
4624
|
}
|
|
4732
4625
|
function findCommand(scope, moduleName, commandName) {
|
|
4733
4626
|
return listCommands(scope).find((item) => item.commandPath[0] === moduleName && item.commandPath[1] === commandName) ?? null;
|
|
@@ -8973,7 +8866,6 @@ var EntityQueryLinkToValuesReqVOSchema = external_exports.lazy(() => external_ex
|
|
|
8973
8866
|
var EntityQueryRelationReqVOSchema = external_exports.lazy(() => external_exports.object({ "addition": external_exports.boolean().optional(), "data": external_exports.record(external_exports.string(), external_exports.any()).optional(), "entity": external_exports.boolean().optional(), "field_id": external_exports.number().optional(), "input": external_exports.string().optional(), "limit": external_exports.number().optional(), "offset": external_exports.number().optional(), "policies": external_exports.boolean().optional(), "query": external_exports.string().optional(), "total": external_exports.boolean().optional() }).strict());
|
|
8974
8867
|
var EntityQueryOrderVOSchema = external_exports.lazy(() => external_exports.object({ "column": external_exports.string().optional(), "order": external_exports.string().optional() }).strict());
|
|
8975
8868
|
var EntityQueryReqVOSchema = external_exports.lazy(() => external_exports.object({ "limit": external_exports.number().optional(), "offset": external_exports.number().optional(), "policy_id": external_exports.string().optional(), "search": external_exports.record(external_exports.string(), external_exports.any()).optional(), "sorts": external_exports.array(EntityQueryOrderVOSchema).optional(), "view_mode": external_exports.string().optional(), "withSubForm": external_exports.boolean().optional() }).strict());
|
|
8976
|
-
var EntityResolveWorkflowReqVOSchema = external_exports.lazy(() => external_exports.object({ "approve_users": external_exports.array(external_exports.number()).optional(), "closeCurrentTasks": external_exports.boolean().optional(), "node_id": external_exports.number().optional(), "policy_id": external_exports.string().optional(), "record_id": external_exports.number().optional(), "version_id": external_exports.number().optional() }).strict());
|
|
8977
8869
|
var EntitySaveCustomKeysFieldVOSchema = external_exports.lazy(() => external_exports.object({ "id": external_exports.number().optional(), "key": external_exports.string().optional() }).strict());
|
|
8978
8870
|
var EntitySaveCustomKeysReqVOSchema = external_exports.lazy(() => external_exports.array(EntitySaveCustomKeysFieldVOSchema));
|
|
8979
8871
|
var EntitySaveNameReqVOSchema = external_exports.lazy(() => external_exports.object({ "name": external_exports.string().optional() }).strict());
|
|
@@ -8996,20 +8888,6 @@ var EntityUpdateReqVOSchema = external_exports.lazy(() => external_exports.objec
|
|
|
8996
8888
|
var EntityUpdateSuccessScreenReqVOSchema = external_exports.lazy(() => external_exports.object({ "EnableDraft": external_exports.boolean().optional(), "EnableOffline": external_exports.boolean().optional(), "EnableSuccessScreen": external_exports.boolean().optional(), "SuccessScreen": external_exports.string().optional() }).strict());
|
|
8997
8889
|
var EntityValidateUniqFieldVOSchema = external_exports.lazy(() => external_exports.object({ "field_id": external_exports.number().optional(), "value": external_exports.string().optional() }).strict());
|
|
8998
8890
|
var EntityValidateUniqReqVOSchema = external_exports.lazy(() => external_exports.object({ "fields": external_exports.array(EntityValidateUniqFieldVOSchema).optional(), "record_id": external_exports.number().optional() }).strict());
|
|
8999
|
-
var ActionBulkUpdateActionSchema = external_exports.lazy(() => external_exports.object({ "number_add": external_exports.number().optional(), "number_mul": external_exports.number().optional(), "number_sub": external_exports.number().optional(), "text_append": external_exports.string().optional(), "text_prepend": external_exports.string().optional(), "text_replace": external_exports.string().optional(), "text_search": external_exports.string().optional(), "type": external_exports.string().optional(), "value": external_exports.any().optional() }).strict());
|
|
9000
|
-
var ActionBulkUpdateSchema = external_exports.lazy(() => external_exports.object({ "action": ActionBulkUpdateActionSchema.optional(), "id": external_exports.number().optional() }).strict());
|
|
9001
|
-
var WorkflowActionConfigSchema = external_exports.lazy(() => external_exports.object({ "enabled": external_exports.boolean().optional(), "options": external_exports.object({ "comment_required": external_exports.boolean().optional(), "desc": external_exports.string().optional(), "modifiers": external_exports.array(ActionBulkUpdateSchema).optional() }).strict().optional() }).strict());
|
|
9002
|
-
var WorkflowVoteTypeSchema = external_exports.lazy(() => external_exports.union([external_exports.literal(0), external_exports.literal(1)]));
|
|
9003
|
-
var NotificationWebhookConfigSchema = external_exports.lazy(() => external_exports.object({ "mode": NotificationPayloadModeSchema.optional(), "template": external_exports.string().optional(), "url": external_exports.string().optional(), "version": external_exports.string().optional() }).strict());
|
|
9004
|
-
var WorkflowConfigNodeSchema = external_exports.lazy(() => external_exports.object({ "data": external_exports.object({ "actions": external_exports.record(external_exports.string(), WorkflowActionConfigSchema).optional(), "approver_actions": external_exports.array(external_exports.number()).optional(), "approvers": external_exports.array(PermitUserScopeSchema).optional(), "auto_forward": external_exports.boolean().optional(), "cc": external_exports.array(PermitUserScopeSchema).optional(), "fields": external_exports.array(external_exports.number()).optional(), "notify_email": external_exports.boolean().optional(), "notify_email_tmpl": external_exports.object({ "body": external_exports.string().optional(), "subject": external_exports.string().optional() }).strict().optional(), "submit_condition": external_exports.array(external_exports.number()).optional(), "use_cc": external_exports.boolean().optional(), "vote_type": WorkflowVoteTypeSchema.optional(), "webhooks": external_exports.array(NotificationWebhookConfigSchema).optional() }).strict().optional(), "events": external_exports.array(external_exports.number()).optional(), "id": external_exports.string().optional(), "label": external_exports.string().optional(), "mode": external_exports.string().optional(), "position": external_exports.array(external_exports.number()).optional(), "type": external_exports.string().optional() }).strict());
|
|
9005
|
-
var WorkflowConfigDiagramSchema = external_exports.lazy(() => external_exports.object({ "edges": external_exports.array(external_exports.number()).optional(), "id_seq": external_exports.number().optional(), "nodes": external_exports.array(WorkflowConfigNodeSchema).optional(), "viewport": external_exports.array(external_exports.number()).optional() }).strict());
|
|
9006
|
-
var WorkflowAutoApproveRuleSchema = external_exports.lazy(() => external_exports.union([external_exports.literal(1), external_exports.literal(2), external_exports.literal(3)]));
|
|
9007
|
-
var WorkflowRetractRuleSchema = external_exports.lazy(() => external_exports.union([external_exports.literal(1), external_exports.literal(2), external_exports.literal(3)]));
|
|
9008
|
-
var WorkflowSLATriggerSchema = external_exports.lazy(() => external_exports.object({ "hasUpdateField": external_exports.boolean().optional(), "hasWebhook": external_exports.boolean().optional(), "modifiers": external_exports.array(ActionBulkUpdateSchema).optional(), "time_point": external_exports.number().optional(), "webhook": NotificationWebhookConfigSchema.optional() }).strict());
|
|
9009
|
-
var WorkflowSLAConfigSchema = external_exports.lazy(() => external_exports.object({ "ddl": external_exports.number().optional(), "enabled": external_exports.boolean().optional(), "id": external_exports.string().optional(), "name": external_exports.string().optional(), "nodes": external_exports.array(external_exports.string()).optional(), "triggers": external_exports.array(WorkflowSLATriggerSchema).optional() }).strict());
|
|
9010
|
-
var WorkflowOptionsSchema = external_exports.lazy(() => external_exports.object({ "allow_urge": external_exports.boolean().optional(), "allow_view_diagram": external_exports.boolean().optional(), "auto_approve_rule": WorkflowAutoApproveRuleSchema.optional(), "retract_rule": WorkflowRetractRuleSchema.optional(), "sla": external_exports.array(WorkflowSLAConfigSchema).optional() }).strict());
|
|
9011
|
-
var EntityWorkflowDeployReqVOSchema = external_exports.lazy(() => external_exports.object({ "diagram": WorkflowConfigDiagramSchema.optional(), "id": external_exports.number().optional(), "options": WorkflowOptionsSchema.optional() }).strict());
|
|
9012
|
-
var EntityWorkflowUpdateReqVOSchema = external_exports.lazy(() => external_exports.object({ "diagram": WorkflowConfigDiagramSchema.optional(), "id": external_exports.number().optional(), "options": WorkflowOptionsSchema.optional() }).strict());
|
|
9013
8891
|
var EntityUtilsQueryOrderSchema = external_exports.lazy(() => external_exports.object({ "column": external_exports.string().optional(), "order": external_exports.string().optional() }).strict());
|
|
9014
8892
|
var FetchWidgetsDataReqVOSchema = external_exports.lazy(() => external_exports.object({ "dashboard_id": external_exports.number().optional(), "ingress_hash_id": external_exports.string().optional(), "ingress_id": external_exports.number().optional(), "querys": external_exports.object({ "search": external_exports.record(external_exports.string(), external_exports.any()).optional(), "sorts": external_exports.array(EntityUtilsQueryOrderSchema).optional() }).strict().optional(), "type": WidgetsTypeCodeSchema.optional() }).strict());
|
|
9015
8893
|
var GetOrganizationTreeReqVOSchema = external_exports.lazy(() => external_exports.object({ "parent_id": external_exports.number().optional() }).strict());
|
|
@@ -9134,7 +9012,6 @@ var bodySchemas = {
|
|
|
9134
9012
|
"EntityQueryLinkToValuesReqVO": EntityQueryLinkToValuesReqVOSchema,
|
|
9135
9013
|
"EntityQueryRelationReqVO": EntityQueryRelationReqVOSchema,
|
|
9136
9014
|
"EntityQueryReqVO": EntityQueryReqVOSchema,
|
|
9137
|
-
"EntityResolveWorkflowReqVO": EntityResolveWorkflowReqVOSchema,
|
|
9138
9015
|
"EntitySaveCustomKeysReqVO": EntitySaveCustomKeysReqVOSchema,
|
|
9139
9016
|
"EntitySaveNameReqVO": EntitySaveNameReqVOSchema,
|
|
9140
9017
|
"EntitySaveReqVO": EntitySaveReqVOSchema,
|
|
@@ -9147,8 +9024,6 @@ var bodySchemas = {
|
|
|
9147
9024
|
"EntityUpdateReqVO": EntityUpdateReqVOSchema,
|
|
9148
9025
|
"EntityUpdateSuccessScreenReqVO": EntityUpdateSuccessScreenReqVOSchema,
|
|
9149
9026
|
"EntityValidateUniqReqVO": EntityValidateUniqReqVOSchema,
|
|
9150
|
-
"EntityWorkflowDeployReqVO": EntityWorkflowDeployReqVOSchema,
|
|
9151
|
-
"EntityWorkflowUpdateReqVO": EntityWorkflowUpdateReqVOSchema,
|
|
9152
9027
|
"FetchWidgetsDataReqVO": FetchWidgetsDataReqVOSchema,
|
|
9153
9028
|
"GetOrganizationTreeReqVO": GetOrganizationTreeReqVOSchema,
|
|
9154
9029
|
"GetOrganizationUsersReqVO": GetOrganizationUsersReqVOSchema,
|
|
@@ -9476,10 +9351,6 @@ var typeIndex = {
|
|
|
9476
9351
|
"file": "/opt/arcubase-sdk/types/user-action.ts",
|
|
9477
9352
|
"dependencies": []
|
|
9478
9353
|
},
|
|
9479
|
-
"EntityResolveWorkflowReqVO": {
|
|
9480
|
-
"file": "/opt/arcubase-sdk/types/user-action.ts",
|
|
9481
|
-
"dependencies": []
|
|
9482
|
-
},
|
|
9483
9354
|
"EntitySaveCustomKeysReqVO": {
|
|
9484
9355
|
"file": "/opt/arcubase-sdk/types/entity.ts",
|
|
9485
9356
|
"dependencies": [
|
|
@@ -9538,14 +9409,6 @@ var typeIndex = {
|
|
|
9538
9409
|
"file": "/opt/arcubase-sdk/types/common.ts",
|
|
9539
9410
|
"dependencies": []
|
|
9540
9411
|
},
|
|
9541
|
-
"EntityWorkflowDeployReqVO": {
|
|
9542
|
-
"file": "/opt/arcubase-sdk/types/workflow.ts",
|
|
9543
|
-
"dependencies": []
|
|
9544
|
-
},
|
|
9545
|
-
"EntityWorkflowUpdateReqVO": {
|
|
9546
|
-
"file": "/opt/arcubase-sdk/types/workflow.ts",
|
|
9547
|
-
"dependencies": []
|
|
9548
|
-
},
|
|
9549
9412
|
"FetchWidgetsDataReqVO": {
|
|
9550
9413
|
"file": "/opt/arcubase-sdk/types/user-action.ts",
|
|
9551
9414
|
"dependencies": []
|
|
@@ -10372,12 +10235,18 @@ var examplesIndexDocHint = {
|
|
|
10372
10235
|
title: "Examples index",
|
|
10373
10236
|
file: "/opt/arcubase-sdk/docs/runtime-reference/examples/README.md"
|
|
10374
10237
|
};
|
|
10238
|
+
var appDiscoveryDocHint = {
|
|
10239
|
+
title: "App discovery",
|
|
10240
|
+
file: "/opt/arcubase-sdk/docs/runtime-reference/app-discovery.md"
|
|
10241
|
+
};
|
|
10375
10242
|
var docHintIndex = {
|
|
10376
10243
|
AppCreateByTenantsReqVO: [
|
|
10244
|
+
appDiscoveryDocHint,
|
|
10377
10245
|
{ title: "Table lifecycle", file: "/opt/arcubase-sdk/docs/runtime-reference/table-lifecycle.md" },
|
|
10378
10246
|
examplesIndexDocHint
|
|
10379
10247
|
],
|
|
10380
10248
|
AppCreateEntityReqVO: [
|
|
10249
|
+
appDiscoveryDocHint,
|
|
10381
10250
|
{ title: "Table lifecycle", file: "/opt/arcubase-sdk/docs/runtime-reference/table-lifecycle.md" },
|
|
10382
10251
|
examplesIndexDocHint
|
|
10383
10252
|
],
|
|
@@ -10450,14 +10319,25 @@ function getDocHints(typeName) {
|
|
|
10450
10319
|
}
|
|
10451
10320
|
var commandDocHintIndex = {
|
|
10452
10321
|
"admin.app.createAppByTenants": [
|
|
10322
|
+
appDiscoveryDocHint,
|
|
10453
10323
|
{ title: "Table lifecycle", file: "/opt/arcubase-sdk/docs/runtime-reference/table-lifecycle.md" },
|
|
10454
10324
|
examplesIndexDocHint
|
|
10455
10325
|
],
|
|
10326
|
+
"admin.app.listApps": [
|
|
10327
|
+
appDiscoveryDocHint,
|
|
10328
|
+
examplesIndexDocHint
|
|
10329
|
+
],
|
|
10330
|
+
"admin.app.inventory": [
|
|
10331
|
+
appDiscoveryDocHint,
|
|
10332
|
+
examplesIndexDocHint
|
|
10333
|
+
],
|
|
10456
10334
|
"admin.app.createEntity": [
|
|
10335
|
+
appDiscoveryDocHint,
|
|
10457
10336
|
{ title: "Table lifecycle", file: "/opt/arcubase-sdk/docs/runtime-reference/table-lifecycle.md" },
|
|
10458
10337
|
examplesIndexDocHint
|
|
10459
10338
|
],
|
|
10460
10339
|
"admin.entity.adminGetEntityInfo": [
|
|
10340
|
+
appDiscoveryDocHint,
|
|
10461
10341
|
{ title: "Table lifecycle", file: "/opt/arcubase-sdk/docs/runtime-reference/table-lifecycle.md" },
|
|
10462
10342
|
examplesIndexDocHint
|
|
10463
10343
|
],
|
|
@@ -10467,34 +10347,34 @@ var commandDocHintIndex = {
|
|
|
10467
10347
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10468
10348
|
examplesIndexDocHint
|
|
10469
10349
|
],
|
|
10470
|
-
"user.
|
|
10350
|
+
"user.rows.insertEntity": [
|
|
10471
10351
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10472
10352
|
{ title: "Uploads", file: "/opt/arcubase-sdk/docs/runtime-reference/uploads.md" },
|
|
10473
10353
|
examplesIndexDocHint
|
|
10474
10354
|
],
|
|
10475
|
-
"user.
|
|
10355
|
+
"user.rows.queryEntity": [
|
|
10476
10356
|
{ title: "Search and bulk actions", file: "/opt/arcubase-sdk/docs/runtime-reference/search-and-bulk-actions.md" },
|
|
10477
10357
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10478
10358
|
examplesIndexDocHint
|
|
10479
10359
|
],
|
|
10480
|
-
"user.
|
|
10360
|
+
"user.rows.getEntityRow": [
|
|
10481
10361
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10482
10362
|
examplesIndexDocHint
|
|
10483
10363
|
],
|
|
10484
|
-
"user.
|
|
10364
|
+
"user.rows.updateEntityRow": [
|
|
10485
10365
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10486
10366
|
{ title: "Uploads", file: "/opt/arcubase-sdk/docs/runtime-reference/uploads.md" },
|
|
10487
10367
|
examplesIndexDocHint
|
|
10488
10368
|
],
|
|
10489
|
-
"user.
|
|
10369
|
+
"user.rows.queryEntitySelection": [
|
|
10490
10370
|
{ title: "Search and bulk actions", file: "/opt/arcubase-sdk/docs/runtime-reference/search-and-bulk-actions.md" },
|
|
10491
10371
|
examplesIndexDocHint
|
|
10492
10372
|
],
|
|
10493
|
-
"user.
|
|
10373
|
+
"user.rows.deleteEntityRow": [
|
|
10494
10374
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10495
10375
|
examplesIndexDocHint
|
|
10496
10376
|
],
|
|
10497
|
-
"user.
|
|
10377
|
+
"user.rows.restoreEntityRow": [
|
|
10498
10378
|
{ title: "Row CRUD", file: "/opt/arcubase-sdk/docs/runtime-reference/row-crud.md" },
|
|
10499
10379
|
examplesIndexDocHint
|
|
10500
10380
|
],
|
|
@@ -10649,13 +10529,103 @@ async function uploadLocalFile(env, sourcePath, options, fetchImpl = fetch) {
|
|
|
10649
10529
|
}
|
|
10650
10530
|
|
|
10651
10531
|
// src/runtime/execute.ts
|
|
10532
|
+
function parseJSONResponse2(raw) {
|
|
10533
|
+
if (!raw) return null;
|
|
10534
|
+
try {
|
|
10535
|
+
return JSON.parse(raw);
|
|
10536
|
+
} catch {
|
|
10537
|
+
return raw;
|
|
10538
|
+
}
|
|
10539
|
+
}
|
|
10540
|
+
function unwrapResponseData(payload) {
|
|
10541
|
+
return isRecord2(payload) && "data" in payload ? payload.data : payload;
|
|
10542
|
+
}
|
|
10543
|
+
function formatUpstreamError(payload) {
|
|
10544
|
+
if (typeof payload === "string") {
|
|
10545
|
+
return payload;
|
|
10546
|
+
}
|
|
10547
|
+
if (isRecord2(payload) && isRecord2(payload.error) && typeof payload.error.message === "string") {
|
|
10548
|
+
return payload.error.message;
|
|
10549
|
+
}
|
|
10550
|
+
return JSON.stringify(payload);
|
|
10551
|
+
}
|
|
10552
|
+
function extractApps(payload) {
|
|
10553
|
+
const data = unwrapResponseData(payload);
|
|
10554
|
+
if (!Array.isArray(data)) return [];
|
|
10555
|
+
return data.filter((item) => isRecord2(item)).filter((item) => item.id !== void 0 && typeof item.name === "string").map((item) => ({
|
|
10556
|
+
id: String(item.id),
|
|
10557
|
+
name: item.name
|
|
10558
|
+
}));
|
|
10559
|
+
}
|
|
10560
|
+
function extractEntities(payload) {
|
|
10561
|
+
const data = unwrapResponseData(payload);
|
|
10562
|
+
if (!Array.isArray(data)) return [];
|
|
10563
|
+
return data.filter((item) => isRecord2(item)).filter((item) => item.id !== void 0 && typeof item.name === "string").map((item) => ({
|
|
10564
|
+
id: String(item.id),
|
|
10565
|
+
name: item.name
|
|
10566
|
+
}));
|
|
10567
|
+
}
|
|
10568
|
+
async function executeAppInventory(runtimeEnv, fetchImpl) {
|
|
10569
|
+
const appsResponse = await fetchImpl(buildURL(runtimeEnv.ARCUBASE_BASE_URL, "/apps"), {
|
|
10570
|
+
method: "GET",
|
|
10571
|
+
headers: buildRequestHeaders(runtimeEnv)
|
|
10572
|
+
});
|
|
10573
|
+
const appsRaw = await appsResponse.text();
|
|
10574
|
+
const appsPayload = parseJSONResponse2(appsRaw);
|
|
10575
|
+
if (!appsResponse.ok) {
|
|
10576
|
+
throw new CLIError("UPSTREAM_REQUEST_FAILED", formatUpstreamError(appsPayload), 1);
|
|
10577
|
+
}
|
|
10578
|
+
if (isRecord2(appsPayload) && appsPayload.error) {
|
|
10579
|
+
throw new CLIError("UPSTREAM_BODY_ERROR", formatUpstreamError(appsPayload), 1, {
|
|
10580
|
+
endpoint: "/apps",
|
|
10581
|
+
method: "GET",
|
|
10582
|
+
upstreamError: appsPayload.error
|
|
10583
|
+
});
|
|
10584
|
+
}
|
|
10585
|
+
const apps = extractApps(appsPayload);
|
|
10586
|
+
const items = [];
|
|
10587
|
+
for (const app of apps) {
|
|
10588
|
+
const entitiesResponse = await fetchImpl(buildURL(runtimeEnv.ARCUBASE_BASE_URL, `/apps/${encodeURIComponent(app.id)}/entities`), {
|
|
10589
|
+
method: "POST",
|
|
10590
|
+
headers: {
|
|
10591
|
+
...buildRequestHeaders(runtimeEnv),
|
|
10592
|
+
"Content-Type": "application/json"
|
|
10593
|
+
},
|
|
10594
|
+
body: JSON.stringify({})
|
|
10595
|
+
});
|
|
10596
|
+
const entitiesRaw = await entitiesResponse.text();
|
|
10597
|
+
const entitiesPayload = parseJSONResponse2(entitiesRaw);
|
|
10598
|
+
if (!entitiesResponse.ok) {
|
|
10599
|
+
throw new CLIError("UPSTREAM_REQUEST_FAILED", formatUpstreamError(entitiesPayload), 1);
|
|
10600
|
+
}
|
|
10601
|
+
if (isRecord2(entitiesPayload) && entitiesPayload.error) {
|
|
10602
|
+
throw new CLIError("UPSTREAM_BODY_ERROR", formatUpstreamError(entitiesPayload), 1, {
|
|
10603
|
+
endpoint: `/apps/${app.id}/entities`,
|
|
10604
|
+
method: "POST",
|
|
10605
|
+
upstreamError: entitiesPayload.error
|
|
10606
|
+
});
|
|
10607
|
+
}
|
|
10608
|
+
items.push({
|
|
10609
|
+
...app,
|
|
10610
|
+
entities: extractEntities(entitiesPayload)
|
|
10611
|
+
});
|
|
10612
|
+
}
|
|
10613
|
+
return {
|
|
10614
|
+
kind: "result",
|
|
10615
|
+
commandPath: ["app", "inventory"],
|
|
10616
|
+
status: 200,
|
|
10617
|
+
data: {
|
|
10618
|
+
apps: items
|
|
10619
|
+
}
|
|
10620
|
+
};
|
|
10621
|
+
}
|
|
10652
10622
|
function renderRootHelp(scope) {
|
|
10653
10623
|
const binary = scope === "admin" ? "arcubase-admin" : "arcubase";
|
|
10654
10624
|
const items = listModules(scope).map((item) => ` - ${item}`);
|
|
10655
10625
|
return [
|
|
10656
10626
|
`${binary} <module> <command> [flags]`,
|
|
10657
10627
|
"",
|
|
10658
|
-
...scope === "admin" ? ["use arcubase-admin for app, entity shell, and schema management", ""] : ["use arcubase for
|
|
10628
|
+
...scope === "admin" ? ["use arcubase-admin for app, entity shell, and schema management", ""] : ["use arcubase for rows, search, selection actions, and bulk actions", ""],
|
|
10659
10629
|
"modules:",
|
|
10660
10630
|
...items,
|
|
10661
10631
|
...scope === "user" ? ["", "special commands:", " - upload <local-file>"] : []
|
|
@@ -10670,18 +10640,18 @@ function renderModuleHelp(scope, moduleName) {
|
|
|
10670
10640
|
return [
|
|
10671
10641
|
`${scope === "admin" ? "arcubase-admin" : "arcubase"} ${moduleName} <command> [flags]`,
|
|
10672
10642
|
"",
|
|
10673
|
-
...scope === "admin" ? ["use arcubase-admin for app, entity shell, and schema management", ""] : ["use arcubase for
|
|
10643
|
+
...scope === "admin" ? ["use arcubase-admin for app, entity shell, and schema management", ""] : ["use arcubase for rows, search, selection actions, and bulk actions", ""],
|
|
10674
10644
|
"commands:",
|
|
10675
10645
|
...items.map((item) => ` - ${item.commandPath[1]}`)
|
|
10676
10646
|
].join("\n");
|
|
10677
10647
|
}
|
|
10678
10648
|
function buildUnknownCommandDetails(scope, moduleName, commandName) {
|
|
10679
10649
|
const suggestions = findCommandSuggestions(moduleName, commandName).map((item) => `${item.binary} ${item.moduleName} ${item.commandName}`);
|
|
10680
|
-
if (scope === "admin" && moduleName === "workflow" && suggestions.some((item) => item.startsWith("arcubase
|
|
10650
|
+
if (scope === "admin" && moduleName === "workflow" && suggestions.some((item) => item.startsWith("arcubase rows "))) {
|
|
10681
10651
|
return {
|
|
10682
10652
|
suggestions,
|
|
10683
|
-
reason: `${moduleName} ${commandName} is a
|
|
10684
|
-
hint: `use: arcubase
|
|
10653
|
+
reason: `${moduleName} ${commandName} is not a valid command group; use arcubase rows for row operations`,
|
|
10654
|
+
hint: `use: arcubase rows ${commandName}`
|
|
10685
10655
|
};
|
|
10686
10656
|
}
|
|
10687
10657
|
return suggestions.length > 0 ? { suggestions } : void 0;
|
|
@@ -10706,8 +10676,13 @@ function renderCommandHelp(scope, moduleName, commandName) {
|
|
|
10706
10676
|
...scope === "admin" && moduleName === "entity" && commandName === "admin-save-entity" ? [
|
|
10707
10677
|
"next step:",
|
|
10708
10678
|
" - switch to arcubase for row operations",
|
|
10709
|
-
" - row insert: arcubase
|
|
10710
|
-
" - row query: arcubase
|
|
10679
|
+
" - row insert: arcubase rows insert-entity --app-id <app_id> --entity-id <entity_id> --body-file insert.json",
|
|
10680
|
+
" - row query: arcubase rows query-entity --app-id <app_id> --entity-id <entity_id> --body-file query.json"
|
|
10681
|
+
] : [],
|
|
10682
|
+
...scope === "admin" && moduleName === "app" && commandName === "inventory" ? [
|
|
10683
|
+
"purpose:",
|
|
10684
|
+
" - list all accessible apps and each app entity list in one call sequence",
|
|
10685
|
+
" - use this before asking the user for app_id"
|
|
10711
10686
|
] : [],
|
|
10712
10687
|
...docHints.length > 0 ? ["docs:", ...docHints.map((item) => ` - ${item.title}: ${item.file}`)] : []
|
|
10713
10688
|
].join("\n");
|
|
@@ -10900,7 +10875,7 @@ function validateActionSpecificBody(scope, command, flags, body) {
|
|
|
10900
10875
|
if (!isRecord2(body) || !command.requestType) {
|
|
10901
10876
|
return;
|
|
10902
10877
|
}
|
|
10903
|
-
if (command.module === "
|
|
10878
|
+
if (command.module === "rows" && command.functionName === "queryEntitySelection") {
|
|
10904
10879
|
const action = flagValue(flags, "action");
|
|
10905
10880
|
const selection = body.selection;
|
|
10906
10881
|
if (!isRecord2(selection) || typeof selection.type !== "string") {
|
|
@@ -10912,7 +10887,7 @@ function validateActionSpecificBody(scope, command, flags, body) {
|
|
|
10912
10887
|
if (action === "query") {
|
|
10913
10888
|
if (type === "condition") {
|
|
10914
10889
|
throwBodyValidationFailure(
|
|
10915
|
-
"selection.type=condition is not supported for action=query; use selection.type=ids or selection.type=all, or use
|
|
10890
|
+
"selection.type=condition is not supported for action=query; use selection.type=ids or selection.type=all, or use rows query-entity for search conditions",
|
|
10916
10891
|
command.requestType,
|
|
10917
10892
|
"body.selection.type",
|
|
10918
10893
|
scope,
|
|
@@ -10986,6 +10961,9 @@ async function executeCLI(scope, argv, env, fetchImpl = fetch) {
|
|
|
10986
10961
|
if (!command) {
|
|
10987
10962
|
throw new CLIError("UNKNOWN_COMMAND", `unknown command: ${moduleName} ${commandName}`, 2, buildUnknownCommandDetails(scope, moduleName, commandName));
|
|
10988
10963
|
}
|
|
10964
|
+
if (scope === "admin" && moduleName === "app" && commandName === "inventory") {
|
|
10965
|
+
return executeAppInventory(runtimeEnv, fetchImpl);
|
|
10966
|
+
}
|
|
10989
10967
|
const endpoint = normalizeExternalEndpoint(resolveEndpoint(command.endpoint, parsed.flags));
|
|
10990
10968
|
const scalarQuery = buildScalarQuery(command, parsed.flags);
|
|
10991
10969
|
const fileQuery = loadQueryFromFlags(parsed.flags);
|