@hcmai/sdk 0.21.11 → 0.21.13
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/dist/index.d.ts +3 -1
- package/dist/index.js +315 -38
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2463,6 +2463,8 @@ interface WorkspaceFileItem {
|
|
|
2463
2463
|
fileType?: string;
|
|
2464
2464
|
fileSize?: number;
|
|
2465
2465
|
lastModified?: number | string | null;
|
|
2466
|
+
/** Actual committed text, present on create/save-content responses only. */
|
|
2467
|
+
content?: string;
|
|
2466
2468
|
}
|
|
2467
2469
|
interface WorkspaceFileContent {
|
|
2468
2470
|
workspaceKey: string;
|
|
@@ -3084,7 +3086,7 @@ interface SaveMetaResult {
|
|
|
3084
3086
|
declare function saveTenantMeta(http: AxiosInstance, path: string, content: string): Promise<SaveMetaResult>;
|
|
3085
3087
|
declare function deleteTenantMeta(http: AxiosInstance, path: string): Promise<SaveMetaResult>;
|
|
3086
3088
|
|
|
3087
|
-
declare const META_SCHEMA_SOURCE_COMMIT = "
|
|
3089
|
+
declare const META_SCHEMA_SOURCE_COMMIT = "2d4b4a9ee24111c6ff425f88d109b2eddf811b51";
|
|
3088
3090
|
|
|
3089
3091
|
type MetaIssueSeverity = 'error' | 'warn';
|
|
3090
3092
|
interface MetaIssue {
|
package/dist/index.js
CHANGED
|
@@ -4501,15 +4501,26 @@ function toWorkspaceFileItem(value) {
|
|
|
4501
4501
|
relativePath: stringOr(obj.relativePath),
|
|
4502
4502
|
fileType: stringOrUndefined(obj.fileType),
|
|
4503
4503
|
fileSize: numberOr(obj.fileSize, 0),
|
|
4504
|
+
content: typeof obj.content === "string" ? obj.content : void 0,
|
|
4504
4505
|
lastModified: primitiveOrNull(obj.lastModified)
|
|
4505
4506
|
};
|
|
4506
4507
|
}
|
|
4507
4508
|
function toWorkspaceFileContent(value) {
|
|
4508
4509
|
const obj = asRecord(value);
|
|
4510
|
+
if (typeof obj.content !== "string") {
|
|
4511
|
+
throw new CliError({
|
|
4512
|
+
code: "NETWORK_ERROR" /* NETWORK_ERROR */,
|
|
4513
|
+
message: "\u5DE5\u4F5C\u533A load-content \u54CD\u5E94\u7F3A\u5C11\u5B57\u7B26\u4E32 content\uFF0C\u65E0\u6CD5\u786E\u8BA4\u8FDC\u7AEF\u5185\u5BB9\u3002",
|
|
4514
|
+
context: {
|
|
4515
|
+
reason: "INVALID_WORKSPACE_FILE_CONTENT",
|
|
4516
|
+
nextStep: "\u68C0\u67E5\u670D\u52A1\u7AEF load-content \u56DE\u6267\u540E\u91CD\u65B0\u8BFB\u53D6\uFF1B\u4E0D\u80FD\u5C06\u7F3A\u5931\u6B63\u6587\u5F53\u4F5C\u7A7A\u6587\u4EF6\u7EE7\u7EED\u63A8\u9001\u3002"
|
|
4517
|
+
}
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4509
4520
|
return {
|
|
4510
4521
|
workspaceKey: stringOr(obj.workspaceKey),
|
|
4511
4522
|
relativePath: stringOr(obj.relativePath),
|
|
4512
|
-
content:
|
|
4523
|
+
content: obj.content,
|
|
4513
4524
|
fileType: stringOrUndefined(obj.fileType)
|
|
4514
4525
|
};
|
|
4515
4526
|
}
|
|
@@ -7157,7 +7168,7 @@ async function deleteTenantMeta(http, path24) {
|
|
|
7157
7168
|
import yaml9 from "js-yaml";
|
|
7158
7169
|
|
|
7159
7170
|
// src/meta/generated/meta-schemas.ts
|
|
7160
|
-
var META_SCHEMA_SOURCE_COMMIT = "
|
|
7171
|
+
var META_SCHEMA_SOURCE_COMMIT = "2d4b4a9ee24111c6ff425f88d109b2eddf811b51";
|
|
7161
7172
|
var META_SCHEMAS = {
|
|
7162
7173
|
list: {
|
|
7163
7174
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -7173,6 +7184,19 @@ var META_SCHEMAS = {
|
|
|
7173
7184
|
}
|
|
7174
7185
|
}
|
|
7175
7186
|
},
|
|
7187
|
+
"IconField": {
|
|
7188
|
+
"type": "object",
|
|
7189
|
+
"properties": {
|
|
7190
|
+
"field": {
|
|
7191
|
+
"type": "string",
|
|
7192
|
+
"description": "\u672C\u5217\u8868 fields[].key"
|
|
7193
|
+
},
|
|
7194
|
+
"icon": {
|
|
7195
|
+
"type": "string",
|
|
7196
|
+
"description": "\u56FE\u6807\u540D\uFF0C\u53D6\u503C\u89C1\u6240\u5728\u69FD\u4F4D\u8BF4\u660E"
|
|
7197
|
+
}
|
|
7198
|
+
}
|
|
7199
|
+
},
|
|
7176
7200
|
"JsonNode": {
|
|
7177
7201
|
"type": "object"
|
|
7178
7202
|
},
|
|
@@ -8313,6 +8337,105 @@ var META_SCHEMAS = {
|
|
|
8313
8337
|
},
|
|
8314
8338
|
"description": "\u884C\u4E3A\u80FD\u529B\u5F00\u5173;\u524D\u7AEF ListView \u636E\u6B64\u51B3\u5B9A\u6E32\u67D3\u4EC0\u4E48(\u66FF\u4EE3\u6309 kind \u5206\u53C9)\u3002\u7F3A\u7701\u89C6\u4F5C\u5168\u5F00,\u5411\u540E\u517C\u5BB9\u3002\u8BE6\u89C1 CapabilitiesMeta"
|
|
8315
8339
|
},
|
|
8340
|
+
"cardRow": {
|
|
8341
|
+
"type": "object",
|
|
8342
|
+
"properties": {
|
|
8343
|
+
"avatar": {
|
|
8344
|
+
"type": "string",
|
|
8345
|
+
"description": "\u5934\u50CF\u5B57\u6BB5 key\uFF1A\u56FE\u7247\u5730\u5740 / /api \u8DEF\u5F84 / \u6587\u6863 id\uFF1B\u7A7A\u3001\u65E0\u6743\u6216\u52A0\u8F7D\u5931\u8D25\u663E\u793A\u6807\u9898\u9996\u5B57",
|
|
8346
|
+
"minLength": 1
|
|
8347
|
+
},
|
|
8348
|
+
"badges": {
|
|
8349
|
+
"description": "\u6807\u9898\u53F3\u4FA7\u6807\u7B7E\u533A\u5B57\u6BB5 key \u5217\u8868\uFF1B\u6309\u5B57\u6BB5 mask \u7740\u8272\uFF0C\u7A7A\u503C\u6216 mask \u6807\u7B7E\u4E3A\u7A7A\u4E0D\u663E\u793A",
|
|
8350
|
+
"type": "array",
|
|
8351
|
+
"items": {
|
|
8352
|
+
"type": "string",
|
|
8353
|
+
"minLength": 1
|
|
8354
|
+
},
|
|
8355
|
+
"minItems": 1
|
|
8356
|
+
},
|
|
8357
|
+
"footer": {
|
|
8358
|
+
"description": "\u53F3\u4E0B\u89D2\u7070\u8272\u5C0F\u5B57\u5B57\u6BB5 key \u5217\u8868\uFF0C\u7A7A\u503C\u8DF3\u8FC7",
|
|
8359
|
+
"type": "array",
|
|
8360
|
+
"items": {
|
|
8361
|
+
"type": "string",
|
|
8362
|
+
"minLength": 1
|
|
8363
|
+
},
|
|
8364
|
+
"minItems": 1
|
|
8365
|
+
},
|
|
8366
|
+
"hints": {
|
|
8367
|
+
"description": "\u6807\u9898\u53F3\u4FA7\u56FE\u6807\uFF0C\u60AC\u505C\u663E\u793A\u503C\uFF1Bicon \u53D6 phone/email/location/time/info",
|
|
8368
|
+
"type": "array",
|
|
8369
|
+
"items": {
|
|
8370
|
+
"type": "object",
|
|
8371
|
+
"additionalProperties": false,
|
|
8372
|
+
"required": ["field"],
|
|
8373
|
+
"properties": {
|
|
8374
|
+
"field": {
|
|
8375
|
+
"type": "string",
|
|
8376
|
+
"minLength": 1
|
|
8377
|
+
},
|
|
8378
|
+
"icon": {
|
|
8379
|
+
"type": "string",
|
|
8380
|
+
"enum": ["phone", "email", "location", "time", "info"]
|
|
8381
|
+
}
|
|
8382
|
+
}
|
|
8383
|
+
},
|
|
8384
|
+
"minItems": 1
|
|
8385
|
+
},
|
|
8386
|
+
"lines": {
|
|
8387
|
+
"description": "\u591A\u884C\u4FE1\u606F\uFF1A\u6BCF\u884C\u4E00\u7EC4\u5B57\u6BB5 key\uFF0C\u7AD6\u7EBF\u5206\u9694\uFF0C\u7A7A\u503C\u8DF3\u8FC7",
|
|
8388
|
+
"type": "array",
|
|
8389
|
+
"items": {
|
|
8390
|
+
"type": "array",
|
|
8391
|
+
"items": {
|
|
8392
|
+
"type": "string",
|
|
8393
|
+
"minLength": 1
|
|
8394
|
+
},
|
|
8395
|
+
"minItems": 1
|
|
8396
|
+
},
|
|
8397
|
+
"minItems": 1
|
|
8398
|
+
},
|
|
8399
|
+
"marker": {
|
|
8400
|
+
"type": "string",
|
|
8401
|
+
"description": "\u6807\u9898\u524D\u63D0\u9192\u5706\u70B9\u7684\u5E03\u5C14\u5B57\u6BB5 key\uFF08\u5982\u672A\u8BFB\uFF09\uFF1B\u503C\u4E3A\u771F\u663E\u793A",
|
|
8402
|
+
"minLength": 1
|
|
8403
|
+
},
|
|
8404
|
+
"summary": {
|
|
8405
|
+
"description": "\u53F3\u4FA7\u6458\u8981\u533A\uFF0C\u6BCF\u6BB5\u4E00\u4E2A\u5B57\u6BB5\uFF08\u53EF\u591A\u884C\u6587\u5B57\uFF09\uFF1Bicon \u53D6 education/work/project/info",
|
|
8406
|
+
"type": "array",
|
|
8407
|
+
"items": {
|
|
8408
|
+
"type": "object",
|
|
8409
|
+
"additionalProperties": false,
|
|
8410
|
+
"required": ["field"],
|
|
8411
|
+
"properties": {
|
|
8412
|
+
"field": {
|
|
8413
|
+
"type": "string",
|
|
8414
|
+
"minLength": 1
|
|
8415
|
+
},
|
|
8416
|
+
"icon": {
|
|
8417
|
+
"type": "string",
|
|
8418
|
+
"enum": ["education", "work", "project", "info"]
|
|
8419
|
+
}
|
|
8420
|
+
}
|
|
8421
|
+
},
|
|
8422
|
+
"minItems": 1
|
|
8423
|
+
},
|
|
8424
|
+
"tags": {
|
|
8425
|
+
"type": "string",
|
|
8426
|
+
"description": "\u5C0F\u6807\u7B7E\u884C\uFF1A\u6570\u7EC4\u5B57\u6BB5 key\uFF0C\u6BCF\u4E2A\u5143\u7D20\u4E00\u4E2A\u6807\u7B7E",
|
|
8427
|
+
"minLength": 1
|
|
8428
|
+
},
|
|
8429
|
+
"title": {
|
|
8430
|
+
"type": "string",
|
|
8431
|
+
"description": "\u4E3B\u6807\u9898\u5B57\u6BB5 key\uFF08\u5FC5\u586B\uFF09\uFF1B\u5B57\u6BB5\u7684 clickActionKey \u7167\u5E38\u751F\u6548",
|
|
8432
|
+
"minLength": 1
|
|
8433
|
+
}
|
|
8434
|
+
},
|
|
8435
|
+
"description": "\u5361\u7247\u884C\u6A21\u677F;\u58F0\u660E\u540E card \u89C6\u56FE\u6539\u4E3A\u4E00\u884C\u4E00\u5F20\u5361,\u69FD\u4F4D\u503C\u4E3A\u672C\u5217\u8868 fields[].key\u3002\u9700 frontend capability 1.57.0",
|
|
8436
|
+
"required": ["title"],
|
|
8437
|
+
"additionalProperties": false
|
|
8438
|
+
},
|
|
8316
8439
|
"defaultSort": {
|
|
8317
8440
|
"description": "\u9ED8\u8BA4\u6392\u5E8F;\u5F62\u5982 [{field:'name',order:'asc'},...]\u3002\u5220\u9664\u8BF7\u7528 {__remove:true}",
|
|
8318
8441
|
"type": "array",
|
|
@@ -8345,15 +8468,9 @@ var META_SCHEMAS = {
|
|
|
8345
8468
|
"type": "string",
|
|
8346
8469
|
"enum": ["left", "center", "right"]
|
|
8347
8470
|
},
|
|
8348
|
-
"autoGenerate": {
|
|
8349
|
-
"type": "boolean"
|
|
8350
|
-
},
|
|
8351
8471
|
"clickActionKey": {
|
|
8352
8472
|
"type": "string"
|
|
8353
8473
|
},
|
|
8354
|
-
"codeRuleConfigurable": {
|
|
8355
|
-
"type": "boolean"
|
|
8356
|
-
},
|
|
8357
8474
|
"component": {
|
|
8358
8475
|
"type": "string"
|
|
8359
8476
|
},
|
|
@@ -8507,6 +8624,10 @@ var META_SCHEMAS = {
|
|
|
8507
8624
|
},
|
|
8508
8625
|
"description": "\u5217\u8868\u5916\u5C42\u5E03\u5C40,\u5982 tree-list(\u5DE6\u6811\u53F3\u5217\u8868)\u3002\u8BE6\u89C1 ListLayout \u7C7B\u578B"
|
|
8509
8626
|
},
|
|
8627
|
+
"metaPluginRefreshFilters": {
|
|
8628
|
+
"type": "boolean",
|
|
8629
|
+
"description": "\u52A8\u6001\u5217\u63D2\u4EF6\u53C2\u6570\u53D8\u5316\u65F6\u662F\u5426\u8FDE\u540C\u7B5B\u9009\u914D\u7F6E\u4E00\u8D77\u91CD\u53D6;\u9ED8\u8BA4 false \u53EA\u91CD\u53D6\u5217"
|
|
8630
|
+
},
|
|
8510
8631
|
"mobileCard": {
|
|
8511
8632
|
"type": "object",
|
|
8512
8633
|
"properties": {
|
|
@@ -8639,11 +8760,33 @@ var META_SCHEMAS = {
|
|
|
8639
8760
|
"showEmptyGroups": {
|
|
8640
8761
|
"type": "boolean",
|
|
8641
8762
|
"description": "\u662F\u5426\u663E\u793A\u8BA1\u6570\u4E3A 0 \u7684\u5DF2\u77E5\u5206\u7EC4(\u9ED8\u8BA4 false)"
|
|
8763
|
+
},
|
|
8764
|
+
"source": {
|
|
8765
|
+
"type": "object",
|
|
8766
|
+
"properties": {
|
|
8767
|
+
"action": {
|
|
8768
|
+
"type": "string",
|
|
8769
|
+
"description": "\u7ED3\u6784\u751F\u6210\u5668\u7684\u952E;\u4E1A\u52A1\u53EF\u53E6\u4EE5\u540C\u540D\u7C7B\u52A8\u4F5C\u590D\u7528\u540C\u4E00\u751F\u6210\u5668",
|
|
8770
|
+
"minLength": 1
|
|
8771
|
+
},
|
|
8772
|
+
"model": {
|
|
8773
|
+
"type": "string",
|
|
8774
|
+
"description": "\u7ED3\u6784\u751F\u6210\u5668\u6240\u5C5E\u6A21\u578B",
|
|
8775
|
+
"minLength": 1
|
|
8776
|
+
}
|
|
8777
|
+
},
|
|
8778
|
+
"description": "\u9875\u7B7E\u7ED3\u6784\u7531\u4E1A\u52A1\u7ED3\u6784\u751F\u6210\u5668\u63D0\u4F9B(\u4E0E groupField \u4E8C\u9009\u4E00,capabilityVersion \u2265 1.56.0);\u524D\u7AEF\u8C03 POST /list/statBarTree,\u4EBA\u6570\u4ECD\u7531\u5E73\u53F0\u6309\u5217\u8868\u540C\u53E3\u5F84\u8BA1\u6570",
|
|
8779
|
+
"additionalProperties": false,
|
|
8780
|
+
"required": ["model", "action"]
|
|
8642
8781
|
}
|
|
8643
8782
|
},
|
|
8644
|
-
"description": "\u5217\u8868\u9876\u90E8\u7EDF\u8BA1 Tab \u914D\u7F6E;\u6309 groupField \u805A\u5408\u8BA1\u6570
|
|
8783
|
+
"description": "\u5217\u8868\u9876\u90E8\u7EDF\u8BA1 Tab \u914D\u7F6E;\u6309 groupField \u805A\u5408\u8BA1\u6570(\u70B9\u51FB Tab \u9644\u52A0\u8FC7\u6EE4\u6761\u4EF6),\u6216\u58F0\u660E source \u7531\u4E1A\u52A1\u7ED3\u6784\u751F\u6210\u5668\u7ED9\u51FA\u9875\u7B7E\u6811(\u4EBA\u6570\u4ECD\u7531\u5E73\u53F0\u6309\u5217\u8868\u540C\u53E3\u5F84\u8BA1\u6570)",
|
|
8645
8784
|
"additionalProperties": false,
|
|
8646
|
-
"
|
|
8785
|
+
"anyOf": [{
|
|
8786
|
+
"required": ["groupField"]
|
|
8787
|
+
}, {
|
|
8788
|
+
"required": ["source"]
|
|
8789
|
+
}]
|
|
8647
8790
|
},
|
|
8648
8791
|
"toolbar": {
|
|
8649
8792
|
"type": "object",
|
|
@@ -9284,12 +9427,6 @@ var META_SCHEMAS = {
|
|
|
9284
9427
|
"items": {
|
|
9285
9428
|
"type": "object",
|
|
9286
9429
|
"properties": {
|
|
9287
|
-
"autoGenerate": {
|
|
9288
|
-
"type": "boolean"
|
|
9289
|
-
},
|
|
9290
|
-
"codeRuleConfigurable": {
|
|
9291
|
-
"type": "boolean"
|
|
9292
|
-
},
|
|
9293
9430
|
"component": {
|
|
9294
9431
|
"type": "string"
|
|
9295
9432
|
},
|
|
@@ -10011,12 +10148,6 @@ var META_SCHEMAS = {
|
|
|
10011
10148
|
"items": {
|
|
10012
10149
|
"type": "object",
|
|
10013
10150
|
"properties": {
|
|
10014
|
-
"autoGenerate": {
|
|
10015
|
-
"type": "boolean"
|
|
10016
|
-
},
|
|
10017
|
-
"codeRuleConfigurable": {
|
|
10018
|
-
"type": "boolean"
|
|
10019
|
-
},
|
|
10020
10151
|
"component": {
|
|
10021
10152
|
"type": "string"
|
|
10022
10153
|
},
|
|
@@ -10097,15 +10228,9 @@ var META_SCHEMAS = {
|
|
|
10097
10228
|
"items": {
|
|
10098
10229
|
"type": "object",
|
|
10099
10230
|
"properties": {
|
|
10100
|
-
"autoGenerate": {
|
|
10101
|
-
"type": "boolean"
|
|
10102
|
-
},
|
|
10103
10231
|
"bindsEffectiveDate": {
|
|
10104
10232
|
"type": "boolean"
|
|
10105
10233
|
},
|
|
10106
|
-
"codeRuleConfigurable": {
|
|
10107
|
-
"type": "boolean"
|
|
10108
|
-
},
|
|
10109
10234
|
"component": {
|
|
10110
10235
|
"type": "string"
|
|
10111
10236
|
},
|
|
@@ -10510,16 +10635,10 @@ var META_SCHEMAS = {
|
|
|
10510
10635
|
"items": {
|
|
10511
10636
|
"type": "object",
|
|
10512
10637
|
"properties": {
|
|
10513
|
-
"autoGenerate": {
|
|
10514
|
-
"type": "boolean"
|
|
10515
|
-
},
|
|
10516
10638
|
"bareTextOperator": {
|
|
10517
10639
|
"type": ["string", "null"],
|
|
10518
10640
|
"enum": ["contains", "eq", null]
|
|
10519
10641
|
},
|
|
10520
|
-
"codeRuleConfigurable": {
|
|
10521
|
-
"type": "boolean"
|
|
10522
|
-
},
|
|
10523
10642
|
"columnDefinition": {
|
|
10524
10643
|
"type": "string"
|
|
10525
10644
|
},
|
|
@@ -11257,6 +11376,37 @@ var META_SCHEMAS = {
|
|
|
11257
11376
|
"label": {
|
|
11258
11377
|
"type": "string"
|
|
11259
11378
|
},
|
|
11379
|
+
"menuFormFilters": {
|
|
11380
|
+
"type": "array",
|
|
11381
|
+
"items": {
|
|
11382
|
+
"type": "object",
|
|
11383
|
+
"additionalProperties": false,
|
|
11384
|
+
"required": ["param", "field"],
|
|
11385
|
+
"properties": {
|
|
11386
|
+
"param": {
|
|
11387
|
+
"type": "string",
|
|
11388
|
+
"minLength": 1,
|
|
11389
|
+
"description": "\u5DE6\u680F\u8868\u5355\u9879 key"
|
|
11390
|
+
},
|
|
11391
|
+
"field": {
|
|
11392
|
+
"type": "string",
|
|
11393
|
+
"minLength": 1,
|
|
11394
|
+
"description": "\u672C\u5217\u8868\u6A21\u578B\u4E0A\u53EF\u7B5B\u9009\u7684\u5B57\u6BB5"
|
|
11395
|
+
}
|
|
11396
|
+
}
|
|
11397
|
+
},
|
|
11398
|
+
"minItems": 1,
|
|
11399
|
+
"description": "\u5DE6\u680F\u7B5B\u9009\u8868\u5355(menu.source.form)\u7684\u503C\u5E76\u8FDB\u672C\u5217\u8868\u6761\u4EF6:\u5355\u503C eq\u3001\u6570\u7EC4 in\u3001\u7A7A\u4E0D\u52A0,\u4E0E\u5DE6\u680F\u9009\u4E2D\u6761\u4EF6\u5E73\u94FA\u5728\u540C\u4E00\u4E2A\u9876\u5C42\u300C\u5E76\u4E14\u300D\u7EC4\u3002\u9700 frontend capability 1.57.0"
|
|
11400
|
+
},
|
|
11401
|
+
"metaPlugin": {
|
|
11402
|
+
"type": "string"
|
|
11403
|
+
},
|
|
11404
|
+
"metaPluginFilterKeys": {
|
|
11405
|
+
"type": "array",
|
|
11406
|
+
"items": {
|
|
11407
|
+
"type": "string"
|
|
11408
|
+
}
|
|
11409
|
+
},
|
|
11260
11410
|
"model": {
|
|
11261
11411
|
"type": "string"
|
|
11262
11412
|
},
|
|
@@ -11364,9 +11514,23 @@ var META_SCHEMAS = {
|
|
|
11364
11514
|
}
|
|
11365
11515
|
}
|
|
11366
11516
|
},
|
|
11517
|
+
"Map(String,Object)": {
|
|
11518
|
+
"type": "object"
|
|
11519
|
+
},
|
|
11367
11520
|
"Map(String,String)": {
|
|
11368
11521
|
"type": "object"
|
|
11369
11522
|
},
|
|
11523
|
+
"MenuFormFilter": {
|
|
11524
|
+
"type": "object",
|
|
11525
|
+
"properties": {
|
|
11526
|
+
"field": {
|
|
11527
|
+
"type": "string"
|
|
11528
|
+
},
|
|
11529
|
+
"param": {
|
|
11530
|
+
"type": "string"
|
|
11531
|
+
}
|
|
11532
|
+
}
|
|
11533
|
+
},
|
|
11370
11534
|
"RelationConfig": {
|
|
11371
11535
|
"type": "object",
|
|
11372
11536
|
"properties": {
|
|
@@ -11604,9 +11768,6 @@ var META_SCHEMAS = {
|
|
|
11604
11768
|
}
|
|
11605
11769
|
}
|
|
11606
11770
|
},
|
|
11607
|
-
"Map(String,Object)": {
|
|
11608
|
-
"type": "object"
|
|
11609
|
-
},
|
|
11610
11771
|
"MasterNavigationConfig": {
|
|
11611
11772
|
"type": "object",
|
|
11612
11773
|
"properties": {
|
|
@@ -11806,6 +11967,78 @@ var META_SCHEMAS = {
|
|
|
11806
11967
|
"type": "boolean",
|
|
11807
11968
|
"description": "style=list \u65F6\u662F\u5426\u5728\u52A8\u6001\u5206\u7C7B\u9876\u90E8\u5C55\u793A\u2018\u5168\u90E8\u2019\u9879"
|
|
11808
11969
|
},
|
|
11970
|
+
"source": {
|
|
11971
|
+
"type": "object",
|
|
11972
|
+
"additionalProperties": false,
|
|
11973
|
+
"required": ["model", "action"],
|
|
11974
|
+
"description": "style=list \u65F6\u5DE6\u4FA7\u5217\u8868\u6539\u7531\u4E1A\u52A1\u7C7B\u52A8\u4F5C\u63D0\u4F9B;\u52A8\u4F5C\u8FD4\u56DE {items:[{key,label,count?}],allCount?,appliedParams?,notice?},count \u7F3A\u7701\u4E0D\u663E\u793A\u6570\u5B57;\u9009\u300C\u5168\u90E8\u300D\u65F6\u53F3\u4FA7\u6761\u4EF6\u4E3A targetField in [\u5168\u90E8 key]\u3002\u4E0D\u914D\u7F6E\u6CBF\u7528\u6309 master \u6A21\u578B\u53D6\u6570",
|
|
11975
|
+
"properties": {
|
|
11976
|
+
"model": {
|
|
11977
|
+
"type": "string",
|
|
11978
|
+
"minLength": 1,
|
|
11979
|
+
"description": "\u7C7B\u52A8\u4F5C\u6240\u5728\u6A21\u578B"
|
|
11980
|
+
},
|
|
11981
|
+
"action": {
|
|
11982
|
+
"type": "string",
|
|
11983
|
+
"minLength": 1,
|
|
11984
|
+
"description": "\u7C7B\u52A8\u4F5C\u540D"
|
|
11985
|
+
},
|
|
11986
|
+
"countLabel": {
|
|
11987
|
+
"type": "string",
|
|
11988
|
+
"minLength": 1,
|
|
11989
|
+
"description": "\u6570\u5B57\u7684\u542B\u4E49,\u60AC\u505C\u663E\u793A,\u5982\u300C\u5728\u9014\u300D"
|
|
11990
|
+
},
|
|
11991
|
+
"form": {
|
|
11992
|
+
"type": "object",
|
|
11993
|
+
"additionalProperties": false,
|
|
11994
|
+
"required": ["fields"],
|
|
11995
|
+
"description": "\u5DE6\u680F\u7B5B\u9009\u8868\u5355;fields \u5199\u6CD5\u540C\u52A8\u4F5C\u53C2\u6570\u8868\u5355 formSchema.fields,\u8868\u5355\u503C\u4F5C\u4E3A GET \u53C2\u6570\u4F20\u7ED9 source \u52A8\u4F5C;\u52A8\u4F5C\u53EF\u8FD4\u56DE appliedParams \u56DE\u586B\u3001notice \u8BF4\u660E\u3002\u9700 frontend capability 1.57.0",
|
|
11996
|
+
"properties": {
|
|
11997
|
+
"title": {
|
|
11998
|
+
"type": "string",
|
|
11999
|
+
"minLength": 1,
|
|
12000
|
+
"description": "\u8868\u5355\u6807\u9898;\u6709\u5219\u663E\u793A\u6807\u9898\u884C\u4E0E\u6536\u8D77/\u5C55\u5F00"
|
|
12001
|
+
},
|
|
12002
|
+
"fields": {
|
|
12003
|
+
"type": "array",
|
|
12004
|
+
"minItems": 1,
|
|
12005
|
+
"items": {
|
|
12006
|
+
"type": "object",
|
|
12007
|
+
"required": ["key", "label", "component"],
|
|
12008
|
+
"properties": {
|
|
12009
|
+
"key": {
|
|
12010
|
+
"type": "string",
|
|
12011
|
+
"minLength": 1
|
|
12012
|
+
},
|
|
12013
|
+
"label": {
|
|
12014
|
+
"type": "string",
|
|
12015
|
+
"minLength": 1
|
|
12016
|
+
},
|
|
12017
|
+
"component": {
|
|
12018
|
+
"type": "string",
|
|
12019
|
+
"minLength": 1
|
|
12020
|
+
},
|
|
12021
|
+
"visibleWhen": {
|
|
12022
|
+
"type": "object",
|
|
12023
|
+
"required": ["field", "operator"],
|
|
12024
|
+
"properties": {
|
|
12025
|
+
"field": {
|
|
12026
|
+
"type": "string",
|
|
12027
|
+
"minLength": 1
|
|
12028
|
+
},
|
|
12029
|
+
"operator": {
|
|
12030
|
+
"type": "string",
|
|
12031
|
+
"enum": ["eq", "ne", "in", "notIn"]
|
|
12032
|
+
}
|
|
12033
|
+
}
|
|
12034
|
+
}
|
|
12035
|
+
}
|
|
12036
|
+
}
|
|
12037
|
+
}
|
|
12038
|
+
}
|
|
12039
|
+
}
|
|
12040
|
+
}
|
|
12041
|
+
},
|
|
11809
12042
|
"style": {
|
|
11810
12043
|
"type": "string",
|
|
11811
12044
|
"description": "\u83DC\u5355\u5C55\u793A\u98CE\u683C\uFF1Amenu=\u9759\u6001\u83DC\u5355\uFF0Ctabs=\u6807\u7B7E\u9875\uFF0Clist=\u52A8\u6001\u5206\u7C7B\u5217\u8868\uFF0Csteps=\u5411\u5BFC\u6B65\u9AA4\u6761\uFF08\u4E00\u4E2A menu.groups \u9879\u4E00\u4E2A\u9636\u6BB5\uFF0C\u9636\u6BB5\u5185\u591A\u5B50\u96C6\u964D\u4E3A\u4E8C\u7EA7\u9875\u7B7E\uFF0C\u6545 details \u6570\u53EF\u591A\u4E8E groups \u6570\uFF09\u3002enum \u662F\u624B\u5DE5\u6536\u7A84\uFF08generator \u53EA\u4EA7\u51FA type:string\uFF09\uFF0C\u52FF\u76F2\u8DD1 generateMetaSchema \u8986\u76D6\u3002",
|
|
@@ -13250,14 +13483,20 @@ function metaKindFromPath(metaPath2) {
|
|
|
13250
13483
|
if (parts.length < 2) return "model";
|
|
13251
13484
|
return parts[1];
|
|
13252
13485
|
}
|
|
13486
|
+
var RETIRED_CODE_RULE_HINTS = {
|
|
13487
|
+
autoGenerate: "\u6B64\u7F16\u7801\u5143\u6570\u636E\u5C5E\u6027\u5DF2\u9000\u5F79\uFF1B\u8BF7\u6309\u79DF\u6237\u542F\u7528\u7684\u7F16\u7801\u89C4\u5219\u5904\u7406\uFF0C\u65E0\u89C4\u5219\u65F6\u624B\u5DE5\u6307\u5B9A\u7F16\u7801",
|
|
13488
|
+
codeRuleConfigurable: "\u6B64\u7F16\u7801\u5143\u6570\u636E\u5C5E\u6027\u5DF2\u9000\u5F79\uFF1B\u8BF7\u6309\u79DF\u6237\u542F\u7528\u7684\u7F16\u7801\u89C4\u5219\u5904\u7406\uFF0C\u65E0\u89C4\u5219\u65F6\u624B\u5DE5\u6307\u5B9A\u7F16\u7801"
|
|
13489
|
+
};
|
|
13253
13490
|
var ALIAS_HINTS = {
|
|
13254
13491
|
list: {
|
|
13492
|
+
...RETIRED_CODE_RULE_HINTS,
|
|
13255
13493
|
hide: "\u5217\u8868\u5C42\u7684\u663E\u9690\u952E\u662F `visible`\uFF08\u8BED\u4E49\u76F8\u53CD\uFF1A`hide: true` \u21D2 `visible: false`\uFF09",
|
|
13256
13494
|
hidden: "\u5217\u8868\u5C42\u7684\u663E\u9690\u952E\u662F `visible`\uFF08\u8BED\u4E49\u76F8\u53CD\uFF09",
|
|
13257
13495
|
title: "\u5217\u6807\u9898\u7528 `label`",
|
|
13258
13496
|
displayName: "\u5217\u6807\u9898\u7528 `label`"
|
|
13259
13497
|
},
|
|
13260
13498
|
model: {
|
|
13499
|
+
...RETIRED_CODE_RULE_HINTS,
|
|
13261
13500
|
// 模型字段层的显示名键是 `name`:`ModelFieldMeta` 上根本没有 `label` 属性、也没有
|
|
13262
13501
|
// `@JsonAlias("label")`,写上去 Jackson 静默丢弃(`FAIL_ON_UNKNOWN_PROPERTIES=false`)。
|
|
13263
13502
|
// `label` 在 `enums[]` / `relations[]` 这类子对象里是合法的,所以只在字段项这一层提醒。
|
|
@@ -13266,11 +13505,14 @@ var ALIAS_HINTS = {
|
|
|
13266
13505
|
displayName: "\u6A21\u578B\u5B57\u6BB5\u5C42\u7684\u663E\u793A\u540D\u952E\u662F `name`"
|
|
13267
13506
|
},
|
|
13268
13507
|
info: {
|
|
13508
|
+
...RETIRED_CODE_RULE_HINTS,
|
|
13269
13509
|
hide: "\u8BE6\u60C5/\u8868\u5355\u5C42\u7684\u663E\u9690\u952E\u662F `hidden`",
|
|
13270
13510
|
visible: "\u8BE6\u60C5/\u8868\u5355\u5C42\u7684\u663E\u9690\u952E\u662F `hidden`\uFF08\u8BED\u4E49\u76F8\u53CD\uFF1A`visible: false` \u21D2 `hidden: true`\uFF09",
|
|
13271
13511
|
title: "\u5B57\u6BB5\u6807\u9898\u7528 `label`",
|
|
13272
13512
|
displayName: "\u5B57\u6BB5\u6807\u9898\u7528 `label`"
|
|
13273
|
-
}
|
|
13513
|
+
},
|
|
13514
|
+
view: { ...RETIRED_CODE_RULE_HINTS },
|
|
13515
|
+
filter: { ...RETIRED_CODE_RULE_HINTS }
|
|
13274
13516
|
};
|
|
13275
13517
|
function resolveRef(root, schema) {
|
|
13276
13518
|
let cur = schema;
|
|
@@ -13459,6 +13701,40 @@ function walk2(root, schema, value, segs, kind, issues, depth) {
|
|
|
13459
13701
|
}
|
|
13460
13702
|
}
|
|
13461
13703
|
}
|
|
13704
|
+
function validateScriptActionNames(doc, issues) {
|
|
13705
|
+
if (!doc || typeof doc !== "object" || !Array.isArray(doc.actions))
|
|
13706
|
+
return;
|
|
13707
|
+
const reserved = /* @__PURE__ */ new Set(["list", "get", "create", "update", "delete"]);
|
|
13708
|
+
const visited = /* @__PURE__ */ new Set();
|
|
13709
|
+
const visit = (raw, path24) => {
|
|
13710
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw) || visited.has(raw)) return;
|
|
13711
|
+
visited.add(raw);
|
|
13712
|
+
const action3 = raw;
|
|
13713
|
+
const type = typeof action3.type === "string" ? action3.type.toLowerCase() : action3.type;
|
|
13714
|
+
if (type === "script" && typeof action3.key === "string" && reserved.has(action3.key.trim().toLowerCase())) {
|
|
13715
|
+
issues.push({
|
|
13716
|
+
severity: "error",
|
|
13717
|
+
path: `${path24}.key`,
|
|
13718
|
+
message: `E_SCRIPT_ACTION_RESERVED_KEY: \u811A\u672C Action key '${action3.key}' \u4E0E CRUD \u4FDD\u7559\u540D\u51B2\u7A81\uFF08list/get/create/update/delete\uFF09`,
|
|
13719
|
+
hint: "\u6539\u7528\u4E1A\u52A1\u8BED\u4E49 key\uFF08\u5982 createBusinessRequest\uFF09\uFF0C\u5E76\u663E\u5F0F\u6388\u6743 action:<key>\uFF1BCRUD \u6743\u9650\u4E0E\u81EA\u5B9A\u4E49 Action \u6743\u9650\u72EC\u7ACB"
|
|
13720
|
+
});
|
|
13721
|
+
}
|
|
13722
|
+
if (type != null && type !== "composite") return;
|
|
13723
|
+
const composite = action3.composite;
|
|
13724
|
+
if (!composite || typeof composite !== "object") return;
|
|
13725
|
+
const steps = composite.steps;
|
|
13726
|
+
if (!Array.isArray(steps)) return;
|
|
13727
|
+
steps.forEach((step, index) => {
|
|
13728
|
+
const stepPath = `${path24}.composite.steps[${index}]`;
|
|
13729
|
+
visit(step, stepPath);
|
|
13730
|
+
if (step && typeof step === "object" && !Object.hasOwn(step, "type")) {
|
|
13731
|
+
visit(step.action, `${stepPath}.action`);
|
|
13732
|
+
}
|
|
13733
|
+
});
|
|
13734
|
+
};
|
|
13735
|
+
const actions = doc.actions;
|
|
13736
|
+
actions.forEach((action3, index) => visit(action3, `actions[${index}]`));
|
|
13737
|
+
}
|
|
13462
13738
|
function validateMetaContent(metaPath2, content) {
|
|
13463
13739
|
const issues = [];
|
|
13464
13740
|
const kind = metaKindFromPath(metaPath2);
|
|
@@ -13509,6 +13785,7 @@ function validateMetaContent(metaPath2, content) {
|
|
|
13509
13785
|
});
|
|
13510
13786
|
return mk();
|
|
13511
13787
|
}
|
|
13788
|
+
validateScriptActionNames(doc, issues);
|
|
13512
13789
|
walk2(schema, schema, doc, [], kind, issues, 0);
|
|
13513
13790
|
const rawLines = content.split("\n");
|
|
13514
13791
|
for (const issue of issues) {
|