@sparqjs/schema-protocol 0.1.0
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/condition.d.ts +10 -0
- package/dist/condition.d.ts.map +1 -0
- package/dist/condition.js +23 -0
- package/dist/condition.js.map +1 -0
- package/dist/field-options.d.ts +10 -0
- package/dist/field-options.d.ts.map +1 -0
- package/dist/field-options.js +16 -0
- package/dist/field-options.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/types.d.ts +1678 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +20 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ConditionOperator } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 条件协议支持的稳定操作符集合。
|
|
4
|
+
*/
|
|
5
|
+
export declare const CONDITION_OPERATORS: readonly ["eq", "neq", "gt", "gte", "lt", "lte", "contains", "in", "not_in", "empty", "not_empty"];
|
|
6
|
+
/**
|
|
7
|
+
* 判断值是否是受支持的条件操作符。
|
|
8
|
+
*/
|
|
9
|
+
export declare function isConditionOperator(value: unknown): value is ConditionOperator;
|
|
10
|
+
//# sourceMappingURL=condition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;GAEG;AACH,eAAO,MAAM,mBAAmB,oGAYiB,CAAA;AAEjD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,iBAAiB,CAE9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 条件协议支持的稳定操作符集合。
|
|
3
|
+
*/
|
|
4
|
+
export const CONDITION_OPERATORS = [
|
|
5
|
+
'eq',
|
|
6
|
+
'neq',
|
|
7
|
+
'gt',
|
|
8
|
+
'gte',
|
|
9
|
+
'lt',
|
|
10
|
+
'lte',
|
|
11
|
+
'contains',
|
|
12
|
+
'in',
|
|
13
|
+
'not_in',
|
|
14
|
+
'empty',
|
|
15
|
+
'not_empty',
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* 判断值是否是受支持的条件操作符。
|
|
19
|
+
*/
|
|
20
|
+
export function isConditionOperator(value) {
|
|
21
|
+
return typeof value === 'string' && CONDITION_OPERATORS.includes(value);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=condition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition.js","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,UAAU;IACV,IAAI;IACJ,QAAQ;IACR,OAAO;IACP,WAAW;CACkC,CAAA;AAEjD;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,KAAc;IAC9C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAA0B,CAAC,CAAA;AAChG,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FieldOptionsMode } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 字段选项来源模式集合。
|
|
4
|
+
*/
|
|
5
|
+
export declare const FIELD_OPTIONS_MODES: readonly ["static", "dictionary", "reference", "remote"];
|
|
6
|
+
/**
|
|
7
|
+
* 判断值是否是受支持的字段选项来源模式。
|
|
8
|
+
*/
|
|
9
|
+
export declare function isFieldOptionsMode(value: unknown): value is FieldOptionsMode;
|
|
10
|
+
//# sourceMappingURL=field-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-options.d.ts","sourceRoot":"","sources":["../src/field-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C;;GAEG;AACH,eAAO,MAAM,mBAAmB,0DAKgB,CAAA;AAEhD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 字段选项来源模式集合。
|
|
3
|
+
*/
|
|
4
|
+
export const FIELD_OPTIONS_MODES = [
|
|
5
|
+
'static',
|
|
6
|
+
'dictionary',
|
|
7
|
+
'reference',
|
|
8
|
+
'remote',
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* 判断值是否是受支持的字段选项来源模式。
|
|
12
|
+
*/
|
|
13
|
+
export function isFieldOptionsMode(value) {
|
|
14
|
+
return typeof value === 'string' && FIELD_OPTIONS_MODES.includes(value);
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=field-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-options.js","sourceRoot":"","sources":["../src/field-options.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,QAAQ;IACR,YAAY;IACZ,WAAW;IACX,QAAQ;CACoC,CAAA;AAEhD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,CAAC,KAAyB,CAAC,CAAA;AAC/F,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,SAAS,CAAA"}
|