@byted-apaas/server-sdk-node 1.1.23-beta.9 → 1.1.23

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.
Files changed (131) hide show
  1. package/package.json +2 -2
  2. package/application/application.d.ts +0 -33
  3. package/application/application.js +0 -2
  4. package/application/function/function.d.ts +0 -14
  5. package/application/function/function.js +0 -20
  6. package/application/impl/common.d.ts +0 -2
  7. package/application/impl/common.js +0 -52
  8. package/application/impl/impl.d.ts +0 -19
  9. package/application/impl/impl.js +0 -45
  10. package/common/structs.d.ts +0 -15
  11. package/common/structs.js +0 -21
  12. package/constants/constants.d.ts +0 -13
  13. package/constants/constants.js +0 -18
  14. package/context/context.d.ts +0 -44
  15. package/context/context.js +0 -25
  16. package/context/db/db.d.ts +0 -110
  17. package/context/db/db.js +0 -2
  18. package/context/db/impl/IObject.d.ts +0 -303
  19. package/context/db/impl/IObject.js +0 -5
  20. package/context/db/impl/IObjectV3.d.ts +0 -239
  21. package/context/db/impl/IObjectV3.js +0 -5
  22. package/context/db/impl/db.d.ts +0 -62
  23. package/context/db/impl/db.js +0 -84
  24. package/context/db/impl/dbV3.d.ts +0 -35
  25. package/context/db/impl/dbV3.js +0 -50
  26. package/context/db/impl/object.d.ts +0 -123
  27. package/context/db/impl/object.js +0 -1008
  28. package/context/db/impl/oql/ioql.d.ts +0 -14
  29. package/context/db/impl/oql/ioql.js +0 -4
  30. package/context/db/impl/oql/oql.d.ts +0 -14
  31. package/context/db/impl/oql/oql.js +0 -39
  32. package/context/db/impl/order.d.ts +0 -9
  33. package/context/db/impl/order.js +0 -15
  34. package/context/db/impl/propertiesStore.d.ts +0 -8
  35. package/context/db/impl/propertiesStore.js +0 -29
  36. package/context/db/impl/queryBuilder.d.ts +0 -33
  37. package/context/db/impl/queryBuilder.js +0 -72
  38. package/context/db/impl/transaction/index.d.ts +0 -25
  39. package/context/db/impl/transaction/index.js +0 -300
  40. package/context/db/impl/transaction/operation.d.ts +0 -27
  41. package/context/db/impl/transaction/operation.js +0 -69
  42. package/context/db/impl/transaction.d.ts +0 -70
  43. package/context/db/impl/transaction.js +0 -4
  44. package/context/globalConfig/globalConfig.d.ts +0 -7
  45. package/context/globalConfig/globalConfig.js +0 -16
  46. package/context/integration/IIntegration.d.ts +0 -30
  47. package/context/integration/IIntegration.js +0 -4
  48. package/context/integration/impl/integration.d.ts +0 -16
  49. package/context/integration/impl/integration.js +0 -62
  50. package/context/metadata/components/common.d.ts +0 -6
  51. package/context/metadata/components/common.js +0 -17
  52. package/context/metadata/components/components.d.ts +0 -12
  53. package/context/metadata/components/components.js +0 -19
  54. package/context/metadata/components/desktop/list.d.ts +0 -16
  55. package/context/metadata/components/desktop/list.js +0 -402
  56. package/context/metadata/components/desktop/recordDetail.d.ts +0 -11
  57. package/context/metadata/components/desktop/recordDetail.js +0 -53
  58. package/context/metadata/components/mobile/list.d.ts +0 -24
  59. package/context/metadata/components/mobile/list.js +0 -145
  60. package/context/metadata/metadata.d.ts +0 -63
  61. package/context/metadata/metadata.js +0 -125
  62. package/context/metadata/objects/fields.d.ts +0 -158
  63. package/context/metadata/objects/fields.js +0 -369
  64. package/context/metadata/objects/fields.util.d.ts +0 -52
  65. package/context/metadata/objects/fields.util.js +0 -420
  66. package/context/metadata/objects/fieldsV3.d.ts +0 -159
  67. package/context/metadata/objects/fieldsV3.js +0 -369
  68. package/context/metadata/objects/objects.d.ts +0 -11
  69. package/context/metadata/objects/objects.js +0 -20
  70. package/context/metadata/types/common.d.ts +0 -11
  71. package/context/metadata/types/common.js +0 -33
  72. package/context/metadata/types/components.d.ts +0 -90
  73. package/context/metadata/types/components.js +0 -4
  74. package/context/metadata/types/objects.d.ts +0 -246
  75. package/context/metadata/types/objects.js +0 -4
  76. package/context/metadata/types/objectsV3.d.ts +0 -128
  77. package/context/metadata/types/objectsV3.js +0 -4
  78. package/context/msg/msg.d.ts +0 -38
  79. package/context/msg/msg.js +0 -35
  80. package/context/resources/IResources.d.ts +0 -68
  81. package/context/resources/IResources.js +0 -2
  82. package/context/resources/impl/resources.d.ts +0 -42
  83. package/context/resources/impl/resources.js +0 -161
  84. package/context/tasks/tasks.d.ts +0 -33
  85. package/context/tasks/tasks.js +0 -139
  86. package/data/index.d.ts +0 -27
  87. package/data/index.js +0 -4
  88. package/global/application/flow/flow.d.ts +0 -99
  89. package/global/application/flow/flow.js +0 -8
  90. package/global/application/flow/impl/flow.d.ts +0 -20
  91. package/global/application/flow/impl/flow.js +0 -56
  92. package/global/application/globalVar/globalVar.d.ts +0 -7
  93. package/global/application/globalVar/globalVar.js +0 -2
  94. package/global/global.d.ts +0 -70
  95. package/global/global.js +0 -3
  96. package/hooks/api.d.ts +0 -65
  97. package/hooks/api.js +0 -347
  98. package/hooks/hooks.d.ts +0 -1
  99. package/hooks/hooks.js +0 -107
  100. package/kunlun/kunlun.d.ts +0 -55
  101. package/kunlun/kunlun.js +0 -58
  102. package/kunlun/operator/IOperator.d.ts +0 -158
  103. package/kunlun/operator/IOperator.js +0 -4
  104. package/kunlun/operator/impl/expression.d.ts +0 -75
  105. package/kunlun/operator/impl/expression.js +0 -96
  106. package/kunlun/operator/impl/logic.d.ts +0 -68
  107. package/kunlun/operator/impl/logic.js +0 -573
  108. package/kunlun/operator/impl/logicV2.d.ts +0 -59
  109. package/kunlun/operator/impl/logicV2.js +0 -197
  110. package/kunlun/operator/impl/operator.d.ts +0 -179
  111. package/kunlun/operator/impl/operator.js +0 -222
  112. package/kunlun/operator/impl/operatorV2.d.ts +0 -180
  113. package/kunlun/operator/impl/operatorV2.js +0 -216
  114. package/lib/core.d.ts +0 -4
  115. package/lib/core.js +0 -19
  116. package/request/common.d.ts +0 -13
  117. package/request/common.js +0 -88
  118. package/request/constants.d.ts +0 -12
  119. package/request/constants.js +0 -29
  120. package/request/faasinfra.d.ts +0 -8
  121. package/request/faasinfra.js +0 -146
  122. package/request/interface.d.ts +0 -121
  123. package/request/interface.js +0 -30
  124. package/request/openapi.d.ts +0 -84
  125. package/request/openapi.js +0 -1529
  126. package/request/structs.d.ts +0 -99
  127. package/request/structs.js +0 -15
  128. package/types/types.d.ts +0 -79
  129. package/types/types.js +0 -4
  130. package/version/version.d.ts +0 -2
  131. package/version/version.js +0 -8
@@ -1,158 +0,0 @@
1
- import { _Cond, _BooleanCond, _LogicalCond } from '../../types/types';
2
- import { UserDataType } from './impl/expression';
3
- export interface IOperator {
4
- /**
5
- * 逻辑与
6
- * @param conditions 多个条件,用逗号分隔
7
- * @example
8
- * ```
9
- * context.db.object('_user').where(kunlun.operator.and({
10
- * age: '22'
11
- * },{
12
- * gender: 'male'
13
- * }))
14
- * ```
15
- */
16
- and<T>(...conditions: (_Cond<T> | _BooleanCond<T>)[]): _LogicalCond<T>;
17
- /**
18
- * 逻辑或
19
- * @param conditions 多个条件,用逗号分隔
20
- * @example
21
- * ```
22
- * context.db.object('_user').where(kunlun.operator.or({
23
- * age: '22'
24
- * },{
25
- * age: '25'
26
- * }))
27
- * ```
28
- */
29
- or<T>(...conditions: (_Cond<T> | _BooleanCond<T>)[]): _LogicalCond<T>;
30
- /**
31
- * 包含
32
- * @param value 判定是否包含的文本值
33
- * @example
34
- * ```
35
- * context.db.object('_user').where({_name: kunlun.operator.contain('a')})
36
- * ```
37
- */
38
- contain<T>(value: UserDataType): _BooleanCond<T>;
39
- /**
40
- * 不包含
41
- * @param value 判定是否不包含的文本值
42
- * @example
43
- * ```
44
- * context.db.object('_user').where({_name: kunlun.operator.notContain('a')})
45
- * ```
46
- */
47
- notContain<T>(value: UserDataType): _BooleanCond<T>;
48
- /**
49
- * 无需入参,判断是否为空
50
- * @example
51
- * ```
52
- * context.db.object('_user').where({employeeType: kunlun.operator.empty()})
53
- * ```
54
- */
55
- empty(): _BooleanCond<any>;
56
- /**
57
- * 无需入参,判断是否为空
58
- * @example
59
- * ```
60
- * context.db.object('_user').where({employeeType: kunlun.operator.notEmpty()})
61
- * ```
62
- */
63
- notEmpty(): _BooleanCond<any>;
64
- /**
65
- * 等于
66
- * @param value 判定是否相等的值
67
- * @example
68
- * ```
69
- * context.db.object('_user').where({age: kunlun.operator.eq(20)})
70
- * ```
71
- */
72
- eq<T>(value: UserDataType): _BooleanCond<T>;
73
- /**
74
- * 不等于
75
- * @param value 判定是否不相等的值
76
- * @example
77
- * ```
78
- * context.db.object('_user').where({age: kunlun.operator.neq(20)})
79
- * ```
80
- */
81
- neq<T>(value: UserDataType): _BooleanCond<T>;
82
- /**
83
- * 大于或晚于
84
- * @param value 判定是否大于或晚于的值
85
- * @example
86
- * ```
87
- * kunlun.operator.gt(new Date('2020-11-26').getTime())
88
- * ```
89
- */
90
- gt<T>(value: number | Date): _BooleanCond<T>;
91
- /**
92
- * 大于等于或晚于等于
93
- * @param value 判定是否大于等于或晚于等于的值
94
- * @example
95
- * ```
96
- * kunlun.operator.gte(new Date('2020-11-26').getTime())
97
- * ```
98
- */
99
- gte<T>(value: number | Date): _BooleanCond<T>;
100
- /**
101
- * 小于或早于
102
- * @param value 判定是否小于或早于的值
103
- * @example
104
- * ```
105
- * kunlun.operator.lt(new Date('2020-11-26').getTime())
106
- * ```
107
- */
108
- lt<T>(value: number | Date): _BooleanCond<T>;
109
- /**
110
- * 小于等于或早于等于
111
- * @param value 判定是否小于等于或早于等于的值
112
- * @example
113
- * ```
114
- * kunlun.operator.lte(new Date('2020-11-26').getTime())
115
- * ```
116
- */
117
- lte<T>(value: number | Date): _BooleanCond<T>;
118
- /**
119
- * 存在于给定的数组内
120
- * @param values 判定是否存在于的一组值,用数组传递
121
- */
122
- in<T>(values: UserDataType[]): _BooleanCond<T>;
123
- /**
124
- * 存在于给定的数组内
125
- * @param values 判定是否存在于的一组值,用逗号分隔
126
- */
127
- in<T>(...values: UserDataType[]): _BooleanCond<T>;
128
- /**
129
- * 不存在于给定的数组内
130
- * @param values 判定是否不存在于的一组值,用数组传递
131
- */
132
- notIn<T>(values: UserDataType[]): _BooleanCond<T>;
133
- /**
134
- * 不存在于给定的数组内
135
- * @param values 判定是否不存在于的一组值,用逗号分隔
136
- */
137
- notIn<T>(...values: UserDataType[]): _BooleanCond<T>;
138
- /**
139
- * 存在给定的多个值中的任何一个值
140
- * @param values 判定是否不存在于的一组值,用逗号分隔
141
- */
142
- hasAnyOf<T>(values: number[] | string[]): _BooleanCond<T>;
143
- /**
144
- * 存在给定的多个值中的任何一个值
145
- * @param values 判定是否不存在于的一组值,用逗号分隔
146
- */
147
- hasAnyOf<T>(...values: number[] | string[]): _BooleanCond<T>;
148
- /**
149
- * 不存在给定的多个值中的任何值
150
- * @param values 判定是否不存在于的一组值,用逗号分隔
151
- */
152
- hasNoneOf<T>(values: number[] | string[]): _BooleanCond<T>;
153
- /**
154
- * 不存在给定的多个值中的任何值
155
- * @param values 判定是否不存在于的一组值,用逗号分隔
156
- */
157
- hasNoneOf<T>(...values: number[] | string[]): _BooleanCond<T>;
158
- }
@@ -1,4 +0,0 @@
1
- "use strict";
2
- // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
- // SPDX-License-Identifier: MIT
4
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,75 +0,0 @@
1
- export type UserDataType = null | string | boolean | number | Date | object;
2
- export declare class Expression {
3
- index: number;
4
- left: ExpressionField;
5
- operator: string;
6
- right: ExpressionField;
7
- constructor(left: ExpressionField, operator: string, right: ExpressionField, index: number);
8
- }
9
- type SettingType = {
10
- data?: UserDataType;
11
- fieldPath?: PathType[];
12
- };
13
- export type PathType = {
14
- objectApiName: string;
15
- fieldApiName: string;
16
- extendLogicTags: string[];
17
- };
18
- /**
19
- * 总共有4种类型,当前仅支持constant,metadataVariable
20
- *
21
- * constant:不可为左值
22
- * metadataVariable
23
- * function
24
- * customizedVariable
25
- */
26
- declare class ExpressionField {
27
- type: string;
28
- settings: SettingType;
29
- constructor(type: string, settings: SettingType);
30
- }
31
- /**
32
- * 常量表达式字段
33
- *
34
- * 比如在 condition: user.name equal 'bob' 中,'bob' 将被构建为 ConstantExpressionField
35
- */
36
- export declare class ConstantExpressionField extends ExpressionField {
37
- constructor(data: UserDataType);
38
- }
39
- /**
40
- * 元数据表达式字段
41
- *
42
- * 比如在 condition: user.name equal 'bob' 中,'user.name' 将被构建为 MetadataExpressionField
43
- */
44
- export declare class MetadataExpressionField extends ExpressionField {
45
- constructor(objectApiName: string, fieldApiName: string);
46
- }
47
- export declare class ExpressionV3 {
48
- index: number;
49
- left: ExpressionFieldV3;
50
- operator: string;
51
- right: ExpressionFieldV3;
52
- constructor(left: ExpressionFieldV3, operator: string, right: ExpressionFieldV3, index: number);
53
- }
54
- declare class ExpressionFieldV3 {
55
- type: string;
56
- settings: string;
57
- constructor(type: string, settings: string);
58
- }
59
- /**
60
- * 常量表达式字段
61
- *
62
- * 比如在 condition: user.name equal 'bob' 中,'bob' 将被构建为 ConstantExpressionField
63
- */
64
- export declare class ConstantExpressionFieldV3 extends ExpressionFieldV3 {
65
- constructor(data?: UserDataType);
66
- }
67
- /**
68
- * 元数据表达式字段
69
- *
70
- * 比如在 condition: user.name equal 'bob' 中,'user.name' 将被构建为 MetadataExpressionField
71
- */
72
- export declare class MetadataExpressionFieldV3 extends ExpressionFieldV3 {
73
- constructor(filedPath?: PathType[]);
74
- }
75
- export {};
@@ -1,96 +0,0 @@
1
- "use strict";
2
- // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
- // SPDX-License-Identifier: MIT
4
- Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.MetadataExpressionFieldV3 = exports.ConstantExpressionFieldV3 = exports.ExpressionV3 = exports.MetadataExpressionField = exports.ConstantExpressionField = exports.Expression = void 0;
6
- class Expression {
7
- constructor(left, operator, right, index) {
8
- this.index = index;
9
- this.left = left;
10
- this.operator = operator;
11
- this.right = right;
12
- }
13
- }
14
- exports.Expression = Expression;
15
- /**
16
- * 总共有4种类型,当前仅支持constant,metadataVariable
17
- *
18
- * constant:不可为左值
19
- * metadataVariable
20
- * function
21
- * customizedVariable
22
- */
23
- class ExpressionField {
24
- constructor(type, settings) {
25
- this.type = type;
26
- this.settings = settings;
27
- }
28
- }
29
- /**
30
- * 常量表达式字段
31
- *
32
- * 比如在 condition: user.name equal 'bob' 中,'bob' 将被构建为 ConstantExpressionField
33
- */
34
- class ConstantExpressionField extends ExpressionField {
35
- constructor(data) {
36
- super('constant', { data });
37
- }
38
- }
39
- exports.ConstantExpressionField = ConstantExpressionField;
40
- /**
41
- * 元数据表达式字段
42
- *
43
- * 比如在 condition: user.name equal 'bob' 中,'user.name' 将被构建为 MetadataExpressionField
44
- */
45
- class MetadataExpressionField extends ExpressionField {
46
- constructor(objectApiName, fieldApiName) {
47
- super('metadataVariable', {
48
- 'fieldPath': [{
49
- objectApiName: objectApiName,
50
- fieldApiName: fieldApiName,
51
- extendLogicTags: [],
52
- }]
53
- });
54
- }
55
- }
56
- exports.MetadataExpressionField = MetadataExpressionField;
57
- class ExpressionV3 {
58
- constructor(left, operator, right, index) {
59
- this.index = index;
60
- this.left = left;
61
- this.operator = operator;
62
- this.right = right;
63
- }
64
- }
65
- exports.ExpressionV3 = ExpressionV3;
66
- class ExpressionFieldV3 {
67
- constructor(type, settings) {
68
- this.type = type;
69
- this.settings = settings;
70
- }
71
- }
72
- /**
73
- * 常量表达式字段
74
- *
75
- * 比如在 condition: user.name equal 'bob' 中,'bob' 将被构建为 ConstantExpressionField
76
- */
77
- class ConstantExpressionFieldV3 extends ExpressionFieldV3 {
78
- constructor(data) {
79
- const d = { 'data': data };
80
- super('constant', JSON.stringify(d));
81
- }
82
- }
83
- exports.ConstantExpressionFieldV3 = ConstantExpressionFieldV3;
84
- /**
85
- * 元数据表达式字段
86
- *
87
- * 比如在 condition: user.name equal 'bob' 中,'user.name' 将被构建为 MetadataExpressionField
88
- */
89
- class MetadataExpressionFieldV3 extends ExpressionFieldV3 {
90
- constructor(filedPath) {
91
- const filedPathV3 = filedPath.map(({ extendLogicTags, ...item }) => item);
92
- const fp = { 'fieldPath': filedPathV3 };
93
- super('metadataVariable', JSON.stringify(fp));
94
- }
95
- }
96
- exports.MetadataExpressionFieldV3 = MetadataExpressionFieldV3;
@@ -1,68 +0,0 @@
1
- import { Expression, UserDataType, ExpressionV3 } from './expression';
2
- export declare class Condition {
3
- left: string;
4
- right: Condition | UserDataType;
5
- op: string;
6
- /**
7
- *
8
- * @param objectApiName 对象的ApiName
9
- * @param fieldApiName 字段的ApiName,指左值,即key
10
- * @param index 条件的排序
11
- * @returns {Expression}
12
- */
13
- toExpression(objectApiName: string, fieldApiName: string, index: number): Expression;
14
- constructor(left: string, right: Condition | UserDataType, op?: string);
15
- }
16
- export type Criterion = {
17
- conditions: Expression[];
18
- logic: string;
19
- };
20
- export type CriterionV3 = {
21
- conditions: ExpressionV3[];
22
- expression: string;
23
- };
24
- /**
25
- * 构造 criterion
26
- *
27
- * @param logic
28
- * @param objectApiName
29
- * @param maxId 添加 _id>maxId 条件,为 -1 表示不使用该参数
30
- */
31
- export declare function buildCriterion(logic: Logic, objectApiName: string): Criterion;
32
- export declare function buildExpression(objectApiName: string, left: string, right: Condition | UserDataType, index?: number): Expression;
33
- /**
34
- * 在 criterion 中添加 _id>maxId 的判断条件
35
- *
36
- * @param criterion
37
- * @param apiName
38
- * @param maxId 添加 _id>maxId 条件
39
- */
40
- export declare function addIDCriterion(criterion: Criterion, apiName: string, maxId: number): Criterion;
41
- /**
42
- * 构造 convertCriterionToCriterionV3
43
- *
44
- * @param criterion v1 版本的条件
45
- */
46
- export declare function convertCriterionToCriterionV3(criterion: Criterion): CriterionV3;
47
- export declare class Logic {
48
- value: string;
49
- expressions: {
50
- [index: string]: any;
51
- };
52
- logics: Logic[];
53
- constructor(expressions?: {
54
- [index: string]: any;
55
- }, logicValue?: string);
56
- /**
57
- * 处理:右值包含逻辑表达式and|or的情况
58
- *
59
- * @param expressions
60
- * @param lookupField
61
- */
62
- handleRightLogic(expressions: {
63
- [index: string]: any;
64
- }, lookupField?: string): void;
65
- addLogic(logic: Logic): void;
66
- }
67
- export declare function buildLogic(param: (Logic | object)[], logicValue?: string): Logic;
68
- export declare function handleCriterion(criterion: Criterion): Promise<Criterion>;