@hcmai/sdk 0.25.1 → 0.25.3
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 +1 -1
- package/dist/index.js +49 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3244,7 +3244,7 @@ interface SaveMetaResult {
|
|
|
3244
3244
|
declare function saveTenantMeta(http: AxiosInstance, path: string, content: string): Promise<SaveMetaResult>;
|
|
3245
3245
|
declare function deleteTenantMeta(http: AxiosInstance, path: string): Promise<SaveMetaResult>;
|
|
3246
3246
|
|
|
3247
|
-
declare const META_SCHEMA_SOURCE_COMMIT = "
|
|
3247
|
+
declare const META_SCHEMA_SOURCE_COMMIT = "6b872a5b3749147cd4fed9dd1a1598e5876c8c76";
|
|
3248
3248
|
|
|
3249
3249
|
type MetaIssueSeverity = 'error' | 'warn';
|
|
3250
3250
|
interface MetaIssue {
|
package/dist/index.js
CHANGED
|
@@ -1680,6 +1680,13 @@ function isUnaryOperator(op) {
|
|
|
1680
1680
|
function normalizeOrders(sort) {
|
|
1681
1681
|
if (sort === void 0) return void 0;
|
|
1682
1682
|
return sort.map((item) => {
|
|
1683
|
+
if (!isPlainObject(item)) throw new Error("sort item must be an object");
|
|
1684
|
+
const allowedKeys = /* @__PURE__ */ new Set(["field", "direction", "dir", "order", "desc", "nulls"]);
|
|
1685
|
+
const unknown = Object.keys(item).filter((key) => !allowedKeys.has(key));
|
|
1686
|
+
if (unknown.length) throw new Error(`sort item has unsupported attributes: ${unknown.join(", ")}`);
|
|
1687
|
+
if (item.nulls !== void 0 && item.nulls !== "FIRST" && item.nulls !== "LAST") {
|
|
1688
|
+
throw new Error("sort nulls must be FIRST or LAST");
|
|
1689
|
+
}
|
|
1683
1690
|
const field = item.field;
|
|
1684
1691
|
if (typeof field !== "string" || field.trim() === "") {
|
|
1685
1692
|
throw new Error("sort item requires non-empty field");
|
|
@@ -1689,7 +1696,7 @@ function normalizeOrders(sort) {
|
|
|
1689
1696
|
if (direction !== "asc" && direction !== "desc") {
|
|
1690
1697
|
throw new Error(`sort direction must be asc or desc; got "${rawDirection}"`);
|
|
1691
1698
|
}
|
|
1692
|
-
return { field, direction };
|
|
1699
|
+
return { field, direction, ...item.nulls !== void 0 ? { nulls: item.nulls } : {} };
|
|
1693
1700
|
});
|
|
1694
1701
|
}
|
|
1695
1702
|
function isPlainObject(value) {
|
|
@@ -7526,7 +7533,7 @@ async function deleteTenantMeta(http, path24) {
|
|
|
7526
7533
|
import yaml9 from "js-yaml";
|
|
7527
7534
|
|
|
7528
7535
|
// src/meta/generated/meta-schemas.ts
|
|
7529
|
-
var META_SCHEMA_SOURCE_COMMIT = "
|
|
7536
|
+
var META_SCHEMA_SOURCE_COMMIT = "6b872a5b3749147cd4fed9dd1a1598e5876c8c76";
|
|
7530
7537
|
var META_SCHEMAS = {
|
|
7531
7538
|
list: {
|
|
7532
7539
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
@@ -7993,6 +8000,33 @@ var META_SCHEMAS = {
|
|
|
7993
8000
|
"Map(String,String)": {
|
|
7994
8001
|
"type": "object"
|
|
7995
8002
|
},
|
|
8003
|
+
"DefaultSortItem": {
|
|
8004
|
+
"type": "object",
|
|
8005
|
+
"properties": {
|
|
8006
|
+
"field": {
|
|
8007
|
+
"type": "string",
|
|
8008
|
+
"minLength": 1
|
|
8009
|
+
},
|
|
8010
|
+
"order": {
|
|
8011
|
+
"type": "string",
|
|
8012
|
+
"pattern": "^([aA][sS][cC]|[dD][eE][sS][cC])$"
|
|
8013
|
+
},
|
|
8014
|
+
"nulls": {
|
|
8015
|
+
"type": "string",
|
|
8016
|
+
"enum": ["FIRST", "LAST"]
|
|
8017
|
+
},
|
|
8018
|
+
"key": {
|
|
8019
|
+
"type": "string"
|
|
8020
|
+
},
|
|
8021
|
+
"__remove": {
|
|
8022
|
+
"type": "boolean"
|
|
8023
|
+
},
|
|
8024
|
+
"__replace": {
|
|
8025
|
+
"type": "boolean"
|
|
8026
|
+
}
|
|
8027
|
+
},
|
|
8028
|
+
"additionalProperties": false
|
|
8029
|
+
},
|
|
7996
8030
|
"MobileCardSlot": {
|
|
7997
8031
|
"oneOf": [{
|
|
7998
8032
|
"type": "string",
|
|
@@ -8374,6 +8408,10 @@ var META_SCHEMAS = {
|
|
|
8374
8408
|
"type": "string",
|
|
8375
8409
|
"enum": ["qrcode"],
|
|
8376
8410
|
"description": "qrcode\uFF1A\u503C\u662F\u94FE\u63A5\u65F6\u540C\u65F6\u753B\u4E8C\u7EF4\u7801\uFF08ADR-413 \u7AEF\u81EA\u68C0\u5165\u53E3\u9996\u7528\uFF09\u3002"
|
|
8411
|
+
},
|
|
8412
|
+
"copyable": {
|
|
8413
|
+
"type": "boolean",
|
|
8414
|
+
"description": "true\uFF1A\u503C\u5355\u72EC\u6210\u5757\uFF08\u7B49\u5BBD\u5B57\u4F53\uFF09\uFF0C\u65C1\u8FB9\u7ED9\u300C\u590D\u5236\u300D\uFF0C\u590D\u5236\u7684\u662F\u503C\u672C\u8EAB\u3001\u4E0D\u542B\u6807\u7B7E\uFF1B\u7F3A\u7701 false\uFF0C\u6E32\u67D3\u4E0D\u53D8\uFF08#5296 \u5D4C\u5165\u5E94\u7528\u7B7E\u540D\u5BC6\u94A5\u9996\u7528\uFF09\u3002"
|
|
8377
8415
|
}
|
|
8378
8416
|
},
|
|
8379
8417
|
"required": ["key", "label"]
|
|
@@ -8857,10 +8895,10 @@ var META_SCHEMAS = {
|
|
|
8857
8895
|
"additionalProperties": false
|
|
8858
8896
|
},
|
|
8859
8897
|
"defaultSort": {
|
|
8860
|
-
"description": "\u9ED8\u8BA4\u6392\u5E8F;\u5F62\u5982 [{field:'name',order:'asc'},...]\u3002\u5220\u9664\u8BF7\u7528 {__remove:true}",
|
|
8898
|
+
"description": "\u9ED8\u8BA4\u6392\u5E8F;\u5F62\u5982 [{field:'name',order:'asc',nulls:'LAST'},...]\uFF0Cnulls \u53EF\u9009 FIRST/LAST\uFF0C\u7F3A\u7701\u4FDD\u7559\u65E2\u6709\u987A\u5E8F\u3002\u5220\u9664\u8BF7\u7528 {__remove:true}",
|
|
8861
8899
|
"type": "array",
|
|
8862
8900
|
"items": {
|
|
8863
|
-
"$ref": "#/$defs/
|
|
8901
|
+
"$ref": "#/$defs/DefaultSortItem"
|
|
8864
8902
|
}
|
|
8865
8903
|
},
|
|
8866
8904
|
"description": {
|
|
@@ -11066,6 +11104,13 @@ var META_SCHEMAS = {
|
|
|
11066
11104
|
"items": {
|
|
11067
11105
|
"type": "object",
|
|
11068
11106
|
"properties": {
|
|
11107
|
+
"channels": {
|
|
11108
|
+
"type": "array",
|
|
11109
|
+
"items": {
|
|
11110
|
+
"type": "string",
|
|
11111
|
+
"enum": ["INTERACTIVE", "AI", "FLOW"]
|
|
11112
|
+
}
|
|
11113
|
+
},
|
|
11069
11114
|
"confirm": {
|
|
11070
11115
|
"type": "string",
|
|
11071
11116
|
"enum": ["DEFAULT", "REQUIRED", "SKIP"]
|