@byted-apaas/server-sdk-node 1.0.17 → 1.1.1

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 (163) hide show
  1. package/README.md +7 -0
  2. package/application/application.d.ts +9 -7
  3. package/application/application.js +1 -0
  4. package/application/application.js.map +1 -0
  5. package/application/function/function.d.ts +1 -1
  6. package/application/function/function.js +1 -1
  7. package/application/function/function.js.map +1 -0
  8. package/application/impl/common.d.ts +1 -1
  9. package/application/impl/common.js +14 -12
  10. package/application/impl/common.js.map +1 -0
  11. package/application/impl/impl.d.ts +8 -6
  12. package/application/impl/impl.js +7 -4
  13. package/application/impl/impl.js.map +1 -0
  14. package/constants/constants.js +5 -4
  15. package/constants/constants.js.map +1 -0
  16. package/context/context.d.ts +8 -38
  17. package/context/context.js +3 -2
  18. package/context/context.js.map +1 -0
  19. package/context/db/db.d.ts +11 -19
  20. package/context/db/db.js +1 -0
  21. package/context/db/db.js.map +1 -0
  22. package/context/db/impl/IObject.d.ts +37 -37
  23. package/context/db/impl/IObject.js +1 -0
  24. package/context/db/impl/IObject.js.map +1 -0
  25. package/context/db/impl/db.d.ts +9 -9
  26. package/context/db/impl/db.js +7 -6
  27. package/context/db/impl/db.js.map +1 -0
  28. package/context/db/impl/object.js +48 -47
  29. package/context/db/impl/object.js.map +1 -0
  30. package/context/db/impl/oql/ioql.js +1 -0
  31. package/context/db/impl/oql/ioql.js.map +1 -0
  32. package/context/db/impl/oql/oql.d.ts +1 -1
  33. package/context/db/impl/oql/oql.js +1 -0
  34. package/context/db/impl/oql/oql.js.map +1 -0
  35. package/context/db/impl/order.js +2 -1
  36. package/context/db/impl/order.js.map +1 -0
  37. package/context/db/impl/propertiesStore.js +2 -1
  38. package/context/db/impl/propertiesStore.js.map +1 -0
  39. package/context/db/impl/queryBuilder.js +1 -0
  40. package/context/db/impl/queryBuilder.js.map +1 -0
  41. package/context/db/impl/transaction/index.d.ts +1 -1
  42. package/context/db/impl/transaction/index.js +47 -45
  43. package/context/db/impl/transaction/index.js.map +1 -0
  44. package/context/db/impl/transaction/operation.js +1 -0
  45. package/context/db/impl/transaction/operation.js.map +1 -0
  46. package/context/db/impl/transaction.d.ts +0 -5
  47. package/context/db/impl/transaction.js +1 -0
  48. package/context/db/impl/transaction.js.map +1 -0
  49. package/context/globalConfig/globalConfig.js +1 -0
  50. package/context/globalConfig/globalConfig.js.map +1 -0
  51. package/context/integration/IIntegration.d.ts +30 -0
  52. package/context/integration/IIntegration.js +5 -0
  53. package/context/integration/IIntegration.js.map +1 -0
  54. package/context/integration/impl/integration.d.ts +16 -0
  55. package/context/integration/impl/integration.js +63 -0
  56. package/context/integration/impl/integration.js.map +1 -0
  57. package/context/metadata/components/common.js +4 -3
  58. package/context/metadata/components/common.js.map +1 -0
  59. package/context/metadata/components/components.d.ts +4 -4
  60. package/context/metadata/components/components.js +1 -0
  61. package/context/metadata/components/components.js.map +1 -0
  62. package/context/metadata/components/desktop/list.d.ts +3 -3
  63. package/context/metadata/components/desktop/list.js +24 -23
  64. package/context/metadata/components/desktop/list.js.map +1 -0
  65. package/context/metadata/components/desktop/recordDetail.d.ts +2 -2
  66. package/context/metadata/components/desktop/recordDetail.js +1 -0
  67. package/context/metadata/components/desktop/recordDetail.js.map +1 -0
  68. package/context/metadata/components/mobile/list.d.ts +4 -4
  69. package/context/metadata/components/mobile/list.js +2 -1
  70. package/context/metadata/components/mobile/list.js.map +1 -0
  71. package/context/metadata/metadata.d.ts +5 -6
  72. package/context/metadata/metadata.js +6 -6
  73. package/context/metadata/metadata.js.map +1 -0
  74. package/context/metadata/objects/fields.d.ts +6 -6
  75. package/context/metadata/objects/fields.js +58 -57
  76. package/context/metadata/objects/fields.js.map +1 -0
  77. package/context/metadata/objects/fields.util.d.ts +3 -3
  78. package/context/metadata/objects/fields.util.js +22 -21
  79. package/context/metadata/objects/fields.util.js.map +1 -0
  80. package/context/metadata/objects/objects.d.ts +1 -1
  81. package/context/metadata/objects/objects.js +2 -1
  82. package/context/metadata/objects/objects.js.map +1 -0
  83. package/context/metadata/types/common.js +1 -0
  84. package/context/metadata/types/common.js.map +1 -0
  85. package/context/metadata/types/components.d.ts +5 -5
  86. package/context/metadata/types/components.js +1 -0
  87. package/context/metadata/types/components.js.map +1 -0
  88. package/context/metadata/types/objects.d.ts +88 -88
  89. package/context/metadata/types/objects.js +1 -0
  90. package/context/metadata/types/objects.js.map +1 -0
  91. package/context/msg/msg.d.ts +2 -2
  92. package/context/msg/msg.js +1 -0
  93. package/context/msg/msg.js.map +1 -0
  94. package/context/resources/IResources.d.ts +2 -2
  95. package/context/resources/IResources.js +1 -0
  96. package/context/resources/IResources.js.map +1 -0
  97. package/context/resources/impl/resources.d.ts +4 -4
  98. package/context/resources/impl/resources.js +4 -3
  99. package/context/resources/impl/resources.js.map +1 -0
  100. package/context/tasks/tasks.d.ts +3 -3
  101. package/context/tasks/tasks.js +6 -5
  102. package/context/tasks/tasks.js.map +1 -0
  103. package/data/index.d.ts +2 -2
  104. package/data/index.js +1 -0
  105. package/data/index.js.map +1 -0
  106. package/global/application/flow/flow.d.ts +85 -0
  107. package/global/application/flow/flow.js +3 -0
  108. package/global/application/flow/flow.js.map +1 -0
  109. package/global/global.d.ts +88 -0
  110. package/global/global.js +4 -0
  111. package/global/global.js.map +1 -0
  112. package/hooks/api.d.ts +12 -7
  113. package/hooks/api.js +29 -23
  114. package/hooks/api.js.map +1 -0
  115. package/hooks/hooks.js +42 -0
  116. package/hooks/hooks.js.map +1 -0
  117. package/kunlun/kunlun.d.ts +5 -5
  118. package/kunlun/kunlun.js +1 -0
  119. package/kunlun/kunlun.js.map +1 -0
  120. package/kunlun/operator/IOperator.d.ts +16 -16
  121. package/kunlun/operator/IOperator.js +1 -0
  122. package/kunlun/operator/IOperator.js.map +1 -0
  123. package/kunlun/operator/impl/expression.d.ts +2 -2
  124. package/kunlun/operator/impl/expression.js +6 -5
  125. package/kunlun/operator/impl/expression.js.map +1 -0
  126. package/kunlun/operator/impl/logic.js +49 -31
  127. package/kunlun/operator/impl/logic.js.map +1 -0
  128. package/kunlun/operator/impl/logicV2.d.ts +2 -2
  129. package/kunlun/operator/impl/logicV2.js +13 -13
  130. package/kunlun/operator/impl/logicV2.js.map +1 -0
  131. package/kunlun/operator/impl/operator.d.ts +17 -17
  132. package/kunlun/operator/impl/operator.js +39 -38
  133. package/kunlun/operator/impl/operator.js.map +1 -0
  134. package/kunlun/operator/impl/operatorV2.d.ts +17 -17
  135. package/kunlun/operator/impl/operatorV2.js +39 -38
  136. package/kunlun/operator/impl/operatorV2.js.map +1 -0
  137. package/lib/core.d.ts +3 -3
  138. package/lib/core.js +1 -0
  139. package/lib/core.js.map +1 -0
  140. package/log/app.access.log +0 -0
  141. package/log/app.call.log +0 -0
  142. package/log/app.log +0 -0
  143. package/package.json +2 -2
  144. package/request/common.d.ts +1 -1
  145. package/request/common.js +5 -3
  146. package/request/common.js.map +1 -0
  147. package/request/constants.d.ts +1 -1
  148. package/request/constants.js +7 -6
  149. package/request/constants.js.map +1 -0
  150. package/request/faasinfra.d.ts +1 -1
  151. package/request/faasinfra.js +42 -251
  152. package/request/faasinfra.js.map +1 -0
  153. package/request/innerapi.d.ts +12 -8
  154. package/request/innerapi.js +173 -57
  155. package/request/innerapi.js.map +1 -0
  156. package/request/interface.d.ts +68 -54
  157. package/request/interface.js +9 -9
  158. package/request/interface.js.map +1 -0
  159. package/request/openapi.d.ts +12 -8
  160. package/request/openapi.js +215 -149
  161. package/request/openapi.js.map +1 -0
  162. package/types/types.js +1 -0
  163. package/types/types.js.map +1 -0
@@ -6,24 +6,24 @@ exports.Operator = exports.operates = void 0;
6
6
  const server_common_node_1 = require("@byted-apaas/server-common-node");
7
7
  const logic_1 = require("./logic");
8
8
  exports.operates = {
9
- AND: "and",
10
- OR: "or",
11
- EMTPY: "isEmpty",
12
- NOT_EMTPY: "isNotEmpty",
13
- EQ: "equals",
14
- NEQ: "notEquals",
15
- LT: "lessThan",
16
- LTE: "lessThanOrEquals",
17
- GT: "greaterThan",
18
- GTE: "greaterThanOrEquals",
19
- CONTAIN: "contains",
20
- NOT_CONTAIN: "notContains",
21
- IN: "isAnyOf",
22
- NIN: "isNoneOf",
23
- HAS_ANY_OF: "hasAnyOf",
24
- HAS_NONE_OF: "hasNoneOf",
25
- isOnOrBefore: "isOnOrBefore",
26
- isOnOrAfter: "isOnOrAfter",
9
+ AND: 'and',
10
+ OR: 'or',
11
+ EMTPY: 'isEmpty',
12
+ NOT_EMTPY: 'isNotEmpty',
13
+ EQ: 'equals',
14
+ NEQ: 'notEquals',
15
+ LT: 'lessThan',
16
+ LTE: 'lessThanOrEquals',
17
+ GT: 'greaterThan',
18
+ GTE: 'greaterThanOrEquals',
19
+ CONTAIN: 'contains',
20
+ NOT_CONTAIN: 'notContains',
21
+ IN: 'isAnyOf',
22
+ NIN: 'isNoneOf',
23
+ HAS_ANY_OF: 'hasAnyOf',
24
+ HAS_NONE_OF: 'hasNoneOf',
25
+ isOnOrBefore: 'isOnOrBefore',
26
+ isOnOrAfter: 'isOnOrAfter',
27
27
  };
28
28
  class Operator {
29
29
  /**
@@ -31,10 +31,10 @@ class Operator {
31
31
  * @param conditions 多个条件,用逗号分隔
32
32
  * @example
33
33
  * ```
34
- * context.db.object("_user").where(kunlun.operator.and({
35
- * age: "22"
34
+ * context.db.object('_user').where(kunlun.operator.and({
35
+ * age: '22'
36
36
  * },{
37
- * gender: "male"
37
+ * gender: 'male'
38
38
  * }))
39
39
  * ```
40
40
  */
@@ -50,10 +50,10 @@ class Operator {
50
50
  * @param conditions 多个条件,用逗号分隔
51
51
  * @example
52
52
  * ```
53
- * context.db.object("_user").where(kunlun.operator.or({
54
- * age: "22"
53
+ * context.db.object('_user').where(kunlun.operator.or({
54
+ * age: '22'
55
55
  * },{
56
- * age: "25"
56
+ * age: '25'
57
57
  * }))
58
58
  * ```
59
59
  */
@@ -69,7 +69,7 @@ class Operator {
69
69
  * @param value 判定是否包含的文本值
70
70
  * @example
71
71
  * ```
72
- * context.db.object("_user").where({_name: kunlun.operator.contain("a")})
72
+ * context.db.object('_user').where({_name: kunlun.operator.contain('a')})
73
73
  * ```
74
74
  */
75
75
  contain(value) {
@@ -81,7 +81,7 @@ class Operator {
81
81
  * @param value 判定是否不包含的文本值
82
82
  * @example
83
83
  * ```
84
- * context.db.object("_user").where({_name: kunlun.operator.notContain("a")})
84
+ * context.db.object('_user').where({_name: kunlun.operator.notContain('a')})
85
85
  * ```
86
86
  */
87
87
  notContain(value) {
@@ -92,7 +92,7 @@ class Operator {
92
92
  * 无需入参,判断是否为空
93
93
  * @example
94
94
  * ```
95
- * context.db.object("_user").where({employeeType: kunlun.operator.empty()})
95
+ * context.db.object('_user').where({employeeType: kunlun.operator.empty()})
96
96
  * ```
97
97
  */
98
98
  empty() {
@@ -103,7 +103,7 @@ class Operator {
103
103
  * 无需入参,判断是否为空
104
104
  * @example
105
105
  * ```
106
- * context.db.object("_user").where({employeeType: kunlun.operator.notEmpty()})
106
+ * context.db.object('_user').where({employeeType: kunlun.operator.notEmpty()})
107
107
  * ```
108
108
  */
109
109
  notEmpty() {
@@ -115,7 +115,7 @@ class Operator {
115
115
  * @param value 判定是否相等的值
116
116
  * @example
117
117
  * ```
118
- * context.db.object("_user").where({age: kunlun.operator.eq(20)})
118
+ * context.db.object('_user').where({age: kunlun.operator.eq(20)})
119
119
  * ```
120
120
  */
121
121
  eq(value) {
@@ -127,7 +127,7 @@ class Operator {
127
127
  * @param value 判定是否不相等的值
128
128
  * @example
129
129
  * ```
130
- * context.db.object("_user").where({age: kunlun.operator.neq(20)})
130
+ * context.db.object('_user').where({age: kunlun.operator.neq(20)})
131
131
  * ```
132
132
  */
133
133
  neq(value) {
@@ -139,7 +139,7 @@ class Operator {
139
139
  * @param value 判定是否大于或晚于的值
140
140
  * @example
141
141
  * ```
142
- * kunlun.operator.gt(new Date("2020-11-26").getTime())
142
+ * kunlun.operator.gt(new Date('2020-11-26').getTime())
143
143
  * ```
144
144
  */
145
145
  gt(value) {
@@ -151,7 +151,7 @@ class Operator {
151
151
  * @param value 判定是否大于等于或晚于等于的值
152
152
  * @example
153
153
  * ```
154
- * kunlun.operator.gte(new Date("2020-11-26").getTime())
154
+ * kunlun.operator.gte(new Date('2020-11-26').getTime())
155
155
  * ```
156
156
  */
157
157
  gte(value) {
@@ -163,7 +163,7 @@ class Operator {
163
163
  * @param value 判定是否小于或早于的值
164
164
  * @example
165
165
  * ```
166
- * kunlun.operator.lt(new Date("2020-11-26").getTime())
166
+ * kunlun.operator.lt(new Date('2020-11-26').getTime())
167
167
  * ```
168
168
  */
169
169
  lt(value) {
@@ -175,7 +175,7 @@ class Operator {
175
175
  * @param value 判定是否小于等于或早于等于的值
176
176
  * @example
177
177
  * ```
178
- * kunlun.operator.lte(new Date("2020-11-26").getTime())
178
+ * kunlun.operator.lte(new Date('2020-11-26').getTime())
179
179
  * ```
180
180
  */
181
181
  lte(value) {
@@ -186,7 +186,7 @@ class Operator {
186
186
  value = !value ? [] : value;
187
187
  const argList = server_common_node_1.utils.argsToList(value, restValues);
188
188
  if (argList.length === 0) {
189
- throw new server_common_node_1.exceptions.InvalidParamError("can not IN empty list");
189
+ throw new server_common_node_1.exceptions.InvalidParamError('can not IN empty list');
190
190
  }
191
191
  return new logic_1.Condition(null, argList, exports.operates.IN);
192
192
  }
@@ -195,7 +195,7 @@ class Operator {
195
195
  value = !value ? [] : value;
196
196
  const argList = server_common_node_1.utils.argsToList(value, restValues);
197
197
  if (argList.length === 0) {
198
- throw new server_common_node_1.exceptions.InvalidParamError("can not NOT_IN empty list");
198
+ throw new server_common_node_1.exceptions.InvalidParamError('can not NOT_IN empty list');
199
199
  }
200
200
  return new logic_1.Condition(null, argList, exports.operates.NIN);
201
201
  }
@@ -204,7 +204,7 @@ class Operator {
204
204
  value = !value ? [] : value;
205
205
  const argList = server_common_node_1.utils.argsToList(value, restValues);
206
206
  if (argList.length === 0) {
207
- throw new server_common_node_1.exceptions.InvalidParamError("can not HAS_ANY_OF empty list");
207
+ throw new server_common_node_1.exceptions.InvalidParamError('can not HAS_ANY_OF empty list');
208
208
  }
209
209
  return new logic_1.Condition(null, argList, exports.operates.HAS_ANY_OF);
210
210
  }
@@ -213,10 +213,11 @@ class Operator {
213
213
  value = !value ? [] : value;
214
214
  const argList = server_common_node_1.utils.argsToList(value, restValues);
215
215
  if (argList.length === 0) {
216
- throw new server_common_node_1.exceptions.InvalidParamError("can not HAS_NONE_OF empty list");
216
+ throw new server_common_node_1.exceptions.InvalidParamError('can not HAS_NONE_OF empty list');
217
217
  }
218
218
  return new logic_1.Condition(null, argList, exports.operates.HAS_NONE_OF);
219
219
  }
220
220
  ;
221
221
  }
222
222
  exports.Operator = Operator;
223
+ //# sourceMappingURL=operator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operator.js","sourceRoot":"","sources":["operator.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+BAA+B;;;AAI/B,wEAAmE;AACnE,mCAA+C;AAGlC,QAAA,QAAQ,GAAG;IACpB,GAAG,EAAE,KAAK;IACV,EAAE,EAAE,IAAI;IAER,KAAK,EAAE,SAAS;IAChB,SAAS,EAAE,YAAY;IAEvB,EAAE,EAAE,QAAQ;IACZ,GAAG,EAAE,WAAW;IAChB,EAAE,EAAE,UAAU;IACd,GAAG,EAAE,kBAAkB;IACvB,EAAE,EAAE,aAAa;IACjB,GAAG,EAAE,qBAAqB;IAE1B,OAAO,EAAE,UAAU;IACnB,WAAW,EAAE,aAAa;IAE1B,EAAE,EAAE,SAAS;IACb,GAAG,EAAE,UAAU;IAEf,UAAU,EAAE,UAAU;IACtB,WAAW,EAAE,WAAW;IAExB,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;CAC7B,CAAA;AAED,MAAa,QAAQ;IACjB;;;;;;;;;;;OAWG;IACH,GAAG,CAAI,GAAG,UAA0C;QAChD,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;YACvB,OAAO,IAAI,CAAC;SACf;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perator } from "../IOperator";
2
+ import { IOperator } from '../IOperator';
3
3
  import { LogicalExpression } from './logicV2';
4
4
  import { UserDataType } from './expression';
5
5
  export declare const operates: {
@@ -28,10 +28,10 @@ export declare class OperatorV2<T> implements IOperator {
28
28
  * @param conditions 多个条件,用逗号分隔
29
29
  * @example
30
30
  * ```
31
- * context.db.object("_user").where(kunlun.operator.and({
32
- * age: "22"
31
+ * context.db.object('_user').where(kunlun.operator.and({
32
+ * age: '22'
33
33
  * },{
34
- * gender: "male"
34
+ * gender: 'male'
35
35
  * }))
36
36
  * ```
37
37
  */
@@ -41,10 +41,10 @@ export declare class OperatorV2<T> implements IOperator {
41
41
  * @param conditions 多个条件,用逗号分隔
42
42
  * @example
43
43
  * ```
44
- * context.db.object("_user").where(kunlun.operator.or({
45
- * age: "22"
44
+ * context.db.object('_user').where(kunlun.operator.or({
45
+ * age: '22'
46
46
  * },{
47
- * age: "25"
47
+ * age: '25'
48
48
  * }))
49
49
  * ```
50
50
  */
@@ -54,7 +54,7 @@ export declare class OperatorV2<T> implements IOperator {
54
54
  * @param value 判定是否包含的文本值
55
55
  * @example
56
56
  * ```
57
- * context.db.object("_user").where({_name: kunlun.operator.contain("a")})
57
+ * context.db.object('_user').where({_name: kunlun.operator.contain('a')})
58
58
  * ```
59
59
  */
60
60
  contain<T>(value: UserDataType): _BooleanCond<T>;
@@ -63,7 +63,7 @@ export declare class OperatorV2<T> implements IOperator {
63
63
  * @param value 判定是否不包含的文本值
64
64
  * @example
65
65
  * ```
66
- * context.db.object("_user").where({_name: kunlun.operator.notContain("a")})
66
+ * context.db.object('_user').where({_name: kunlun.operator.notContain('a')})
67
67
  * ```
68
68
  */
69
69
  notContain<T>(value: UserDataType): _BooleanCond<T>;
@@ -71,7 +71,7 @@ export declare class OperatorV2<T> implements IOperator {
71
71
  * 无需入参,判断是否为空
72
72
  * @example
73
73
  * ```
74
- * context.db.object("_user").where({employeeType: kunlun.operator.empty()})
74
+ * context.db.object('_user').where({employeeType: kunlun.operator.empty()})
75
75
  * ```
76
76
  */
77
77
  empty(): _BooleanCond<undefined>;
@@ -79,7 +79,7 @@ export declare class OperatorV2<T> implements IOperator {
79
79
  * 无需入参,判断是否为空
80
80
  * @example
81
81
  * ```
82
- * context.db.object("_user").where({employeeType: kunlun.operator.notEmpty()})
82
+ * context.db.object('_user').where({employeeType: kunlun.operator.notEmpty()})
83
83
  * ```
84
84
  */
85
85
  notEmpty(): _BooleanCond<undefined>;
@@ -88,7 +88,7 @@ export declare class OperatorV2<T> implements IOperator {
88
88
  * @param value 判定是否相等的值
89
89
  * @example
90
90
  * ```
91
- * context.db.object("_user").where({age: kunlun.operator.eq(20)})
91
+ * context.db.object('_user').where({age: kunlun.operator.eq(20)})
92
92
  * ```
93
93
  */
94
94
  eq<T>(value: UserDataType): _BooleanCond<T>;
@@ -97,7 +97,7 @@ export declare class OperatorV2<T> implements IOperator {
97
97
  * @param value 判定是否不相等的值
98
98
  * @example
99
99
  * ```
100
- * context.db.object("_user").where({age: kunlun.operator.neq(20)})
100
+ * context.db.object('_user').where({age: kunlun.operator.neq(20)})
101
101
  * ```
102
102
  */
103
103
  neq<T>(value: UserDataType): _BooleanCond<T>;
@@ -106,7 +106,7 @@ export declare class OperatorV2<T> implements IOperator {
106
106
  * @param value 判定是否大于或晚于的值
107
107
  * @example
108
108
  * ```
109
- * kunlun.operator.gt(new Date("2020-11-26").getTime())
109
+ * kunlun.operator.gt(new Date('2020-11-26').getTime())
110
110
  * ```
111
111
  */
112
112
  gt<T>(value: number | Date): _BooleanCond<T>;
@@ -115,7 +115,7 @@ export declare class OperatorV2<T> implements IOperator {
115
115
  * @param value 判定是否大于等于或晚于等于的值
116
116
  * @example
117
117
  * ```
118
- * kunlun.operator.gte(new Date("2020-11-26").getTime())
118
+ * kunlun.operator.gte(new Date('2020-11-26').getTime())
119
119
  * ```
120
120
  */
121
121
  gte<T>(value: number | Date): _BooleanCond<T>;
@@ -124,7 +124,7 @@ export declare class OperatorV2<T> implements IOperator {
124
124
  * @param value 判定是否小于或早于的值
125
125
  * @example
126
126
  * ```
127
- * kunlun.operator.lt(new Date("2020-11-26").getTime())
127
+ * kunlun.operator.lt(new Date('2020-11-26').getTime())
128
128
  * ```
129
129
  */
130
130
  lt<T>(value: number | Date): _BooleanCond<T>;
@@ -133,7 +133,7 @@ export declare class OperatorV2<T> implements IOperator {
133
133
  * @param value 判定是否小于等于或早于等于的值
134
134
  * @example
135
135
  * ```
136
- * kunlun.operator.lte(new Date("2020-11-26").getTime())
136
+ * kunlun.operator.lte(new Date('2020-11-26').getTime())
137
137
  * ```
138
138
  */
139
139
  lte<T>(value: number | Date): _BooleanCond<T>;
@@ -4,24 +4,24 @@ exports.OperatorV2 = exports.operates = void 0;
4
4
  const server_common_node_1 = require("@byted-apaas/server-common-node");
5
5
  const logicV2_1 = require("./logicV2");
6
6
  exports.operates = {
7
- AND: "and",
8
- OR: "or",
9
- EMPTY: "isEmpty",
10
- NOT_EMPTY: "isNotEmpty",
11
- EQ: "equals",
12
- NEQ: "notEquals",
13
- LT: "lessThan",
14
- LTE: "lessThanOrEquals",
15
- GT: "greaterThan",
16
- GTE: "greaterThanOrEquals",
17
- CONTAIN: "contains",
18
- NOT_CONTAIN: "notContains",
19
- IN: "isAnyOf",
20
- NIN: "isNoneOf",
21
- HAS_ANY_OF: "hasAnyOf",
22
- HAS_NONE_OF: "hasNoneOf",
23
- isOnOrBefore: "lt",
24
- isOnOrAfter: "gt",
7
+ AND: 'and',
8
+ OR: 'or',
9
+ EMPTY: 'isEmpty',
10
+ NOT_EMPTY: 'isNotEmpty',
11
+ EQ: 'equals',
12
+ NEQ: 'notEquals',
13
+ LT: 'lessThan',
14
+ LTE: 'lessThanOrEquals',
15
+ GT: 'greaterThan',
16
+ GTE: 'greaterThanOrEquals',
17
+ CONTAIN: 'contains',
18
+ NOT_CONTAIN: 'notContains',
19
+ IN: 'isAnyOf',
20
+ NIN: 'isNoneOf',
21
+ HAS_ANY_OF: 'hasAnyOf',
22
+ HAS_NONE_OF: 'hasNoneOf',
23
+ isOnOrBefore: 'lt',
24
+ isOnOrAfter: 'gt',
25
25
  };
26
26
  class OperatorV2 {
27
27
  /**
@@ -29,10 +29,10 @@ class OperatorV2 {
29
29
  * @param conditions 多个条件,用逗号分隔
30
30
  * @example
31
31
  * ```
32
- * context.db.object("_user").where(kunlun.operator.and({
33
- * age: "22"
32
+ * context.db.object('_user').where(kunlun.operator.and({
33
+ * age: '22'
34
34
  * },{
35
- * gender: "male"
35
+ * gender: 'male'
36
36
  * }))
37
37
  * ```
38
38
  */
@@ -46,10 +46,10 @@ class OperatorV2 {
46
46
  * @param conditions 多个条件,用逗号分隔
47
47
  * @example
48
48
  * ```
49
- * context.db.object("_user").where(kunlun.operator.or({
50
- * age: "22"
49
+ * context.db.object('_user').where(kunlun.operator.or({
50
+ * age: '22'
51
51
  * },{
52
- * age: "25"
52
+ * age: '25'
53
53
  * }))
54
54
  * ```
55
55
  */
@@ -63,7 +63,7 @@ class OperatorV2 {
63
63
  * @param value 判定是否包含的文本值
64
64
  * @example
65
65
  * ```
66
- * context.db.object("_user").where({_name: kunlun.operator.contain("a")})
66
+ * context.db.object('_user').where({_name: kunlun.operator.contain('a')})
67
67
  * ```
68
68
  */
69
69
  contain(value) {
@@ -75,7 +75,7 @@ class OperatorV2 {
75
75
  * @param value 判定是否不包含的文本值
76
76
  * @example
77
77
  * ```
78
- * context.db.object("_user").where({_name: kunlun.operator.notContain("a")})
78
+ * context.db.object('_user').where({_name: kunlun.operator.notContain('a')})
79
79
  * ```
80
80
  */
81
81
  notContain(value) {
@@ -86,7 +86,7 @@ class OperatorV2 {
86
86
  * 无需入参,判断是否为空
87
87
  * @example
88
88
  * ```
89
- * context.db.object("_user").where({employeeType: kunlun.operator.empty()})
89
+ * context.db.object('_user').where({employeeType: kunlun.operator.empty()})
90
90
  * ```
91
91
  */
92
92
  empty() {
@@ -97,7 +97,7 @@ class OperatorV2 {
97
97
  * 无需入参,判断是否为空
98
98
  * @example
99
99
  * ```
100
- * context.db.object("_user").where({employeeType: kunlun.operator.notEmpty()})
100
+ * context.db.object('_user').where({employeeType: kunlun.operator.notEmpty()})
101
101
  * ```
102
102
  */
103
103
  notEmpty() {
@@ -109,7 +109,7 @@ class OperatorV2 {
109
109
  * @param value 判定是否相等的值
110
110
  * @example
111
111
  * ```
112
- * context.db.object("_user").where({age: kunlun.operator.eq(20)})
112
+ * context.db.object('_user').where({age: kunlun.operator.eq(20)})
113
113
  * ```
114
114
  */
115
115
  eq(value) {
@@ -121,7 +121,7 @@ class OperatorV2 {
121
121
  * @param value 判定是否不相等的值
122
122
  * @example
123
123
  * ```
124
- * context.db.object("_user").where({age: kunlun.operator.neq(20)})
124
+ * context.db.object('_user').where({age: kunlun.operator.neq(20)})
125
125
  * ```
126
126
  */
127
127
  neq(value) {
@@ -133,7 +133,7 @@ class OperatorV2 {
133
133
  * @param value 判定是否大于或晚于的值
134
134
  * @example
135
135
  * ```
136
- * kunlun.operator.gt(new Date("2020-11-26").getTime())
136
+ * kunlun.operator.gt(new Date('2020-11-26').getTime())
137
137
  * ```
138
138
  */
139
139
  gt(value) {
@@ -145,7 +145,7 @@ class OperatorV2 {
145
145
  * @param value 判定是否大于等于或晚于等于的值
146
146
  * @example
147
147
  * ```
148
- * kunlun.operator.gte(new Date("2020-11-26").getTime())
148
+ * kunlun.operator.gte(new Date('2020-11-26').getTime())
149
149
  * ```
150
150
  */
151
151
  gte(value) {
@@ -157,7 +157,7 @@ class OperatorV2 {
157
157
  * @param value 判定是否小于或早于的值
158
158
  * @example
159
159
  * ```
160
- * kunlun.operator.lt(new Date("2020-11-26").getTime())
160
+ * kunlun.operator.lt(new Date('2020-11-26').getTime())
161
161
  * ```
162
162
  */
163
163
  lt(value) {
@@ -169,7 +169,7 @@ class OperatorV2 {
169
169
  * @param value 判定是否小于等于或早于等于的值
170
170
  * @example
171
171
  * ```
172
- * kunlun.operator.lte(new Date("2020-11-26").getTime())
172
+ * kunlun.operator.lte(new Date('2020-11-26').getTime())
173
173
  * ```
174
174
  */
175
175
  lte(value) {
@@ -180,7 +180,7 @@ class OperatorV2 {
180
180
  value = !value ? [] : value;
181
181
  const argList = server_common_node_1.utils.argsToList(value, restValues);
182
182
  if (argList.length === 0) {
183
- throw new server_common_node_1.exceptions.InvalidParamError("can not IN empty list");
183
+ throw new server_common_node_1.exceptions.InvalidParamError('can not IN empty list');
184
184
  }
185
185
  return new logicV2_1.ArithmeticExpression(null, exports.operates.IN, argList);
186
186
  }
@@ -189,7 +189,7 @@ class OperatorV2 {
189
189
  value = !value ? [] : value;
190
190
  const argList = server_common_node_1.utils.argsToList(value, restValues);
191
191
  if (argList.length === 0) {
192
- throw new server_common_node_1.exceptions.InvalidParamError("can not NOT_IN empty list");
192
+ throw new server_common_node_1.exceptions.InvalidParamError('can not NOT_IN empty list');
193
193
  }
194
194
  return new logicV2_1.ArithmeticExpression(null, exports.operates.NIN, argList);
195
195
  }
@@ -198,7 +198,7 @@ class OperatorV2 {
198
198
  value = !value ? [] : value;
199
199
  const argList = server_common_node_1.utils.argsToList(value, restValues);
200
200
  if (argList.length === 0) {
201
- throw new server_common_node_1.exceptions.InvalidParamError("can not HAS_ANY_OF empty list");
201
+ throw new server_common_node_1.exceptions.InvalidParamError('can not HAS_ANY_OF empty list');
202
202
  }
203
203
  return new logicV2_1.ArithmeticExpression(null, exports.operates.HAS_ANY_OF, argList);
204
204
  }
@@ -207,10 +207,11 @@ class OperatorV2 {
207
207
  value = !value ? [] : value;
208
208
  const argList = server_common_node_1.utils.argsToList(value, restValues);
209
209
  if (argList.length === 0) {
210
- throw new server_common_node_1.exceptions.InvalidParamError("can not HAS_NONE_OF empty list");
210
+ throw new server_common_node_1.exceptions.InvalidParamError('can not HAS_NONE_OF empty list');
211
211
  }
212
212
  return new logicV2_1.ArithmeticExpression(null, exports.operates.HAS_NONE_OF, argList);
213
213
  }
214
214
  ;
215
215
  }
216
216
  exports.OperatorV2 = OperatorV2;
217
+ //# sourceMappingURL=operator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0BAAK,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,+BAAU,CAAC,iBAAiB,CAAC,+BAA+B,CAAC,CAAC;SAC3E;QACD,OAAO,IAAI,8BAAoB,CAAC,IAAI,EAAE,gBAAQ,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IACxE,CAAC;IAAA,CAAC;IAYF,SAAS,CAAI,KAA8C,EAAE,GAAG,UAA+B;QAC3F,KAAK,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5B,MAAM,OAAO,GAAG,0BAAK,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,MAAM,IAAI,+BAAU,CAAC,iBAAiB,CAAC,gCAAgC,CAAC,CAAC;SAC5E;QACD,OAAO,IAAI,8BAAoB,CAAC,IAAI,EAAE,gBAAQ,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IACzE,CAAC;IAAA,CAAC;CACL;AAvND,gCAuNC"}
package/lib/core.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * as hooks from "../hooks/hooks";
1
+ export * as hooks from '../hooks/hooks';
2
2
  export declare const isNewSystemProxyFunc: boolean;
3
- export { kunlun } from "../kunlun/kunlun";
4
- export { db, resources, msg, tasks, cloudfunction, microservice, workflow, metaData, Application } from "../hooks/api";
3
+ export { kunlun } from '../kunlun/kunlun';
4
+ export { db, resources, msg, tasks, cloudfunction, microservice, workflow, metaData, Application } from '../hooks/api';
package/lib/core.js CHANGED
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "microservice", { enumerable: true, get: function
17
17
  Object.defineProperty(exports, "workflow", { enumerable: true, get: function () { return api_1.workflow; } });
18
18
  Object.defineProperty(exports, "metaData", { enumerable: true, get: function () { return api_1.metaData; } });
19
19
  Object.defineProperty(exports, "Application", { enumerable: true, get: function () { return api_1.Application; } });
20
+ //# sourceMappingURL=core.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["core.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+BAA+B;;;AAE/B,0CAAuC;AAC1B,QAAA,oBAAoB,GAAY,IAAI,CAAC;AAClD,2CAAwC;AAAhC,gGAAA,MAAM,OAAA;AACd,oCAAqH;AAA7G,yFAAA,EAAE,OAAA;AAAE,gGAAA,SAAS,OAAA;AAAE,0FAAA,GAAG,OAAA;AAAE,4FAAA,KAAK,OAAA;AAAE,oGAAA,aAAa,OAAA;AAAE,mGAAA,YAAY,OAAA;AAAE,+FAAA,QAAQ,OAAA;AAAE,+FAAA,QAAQ,OAAA;AAAE,kGAAA,WAAW,OAAA"}
File without changes
File without changes
package/log/app.log ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byted-apaas/server-sdk-node",
3
- "version": "1.0.17",
3
+ "version": "1.1.1",
4
4
  "description": "aPaaS Server SDK",
5
5
  "author": "zhouwexin <zhouwexin@bytedance.com>",
6
6
  "homepage": "",
@@ -12,7 +12,7 @@
12
12
  "pre-build": "rm -rf build && tsc"
13
13
  },
14
14
  "dependencies": {
15
- "@byted-apaas/server-common-node": "^1.0.15",
15
+ "@byted-apaas/server-common-node": "^1.0.16",
16
16
  "@jorgeferrero/stream-to-buffer": "^2.0.6",
17
17
  "dayjs": "^1.9.6",
18
18
  "form-data": "^3.0.0",
@@ -1,4 +1,4 @@
1
- import { AppCtx } from "../application/application";
1
+ import { AppCtx } from '../application/application';
2
2
  export declare function getDebugExtraInfo(): Record<string, string>;
3
3
  export declare function getTriggerCtx(): any;
4
4
  export declare function transMapToFlowVariable(params: Record<string, any>): {
package/request/common.js CHANGED
@@ -10,13 +10,14 @@ const common_1 = require("../application/impl/common");
10
10
  const utils = common.utils;
11
11
  const checkUtils = common.checkUtils;
12
12
  const exceptions = common.exceptions;
13
- const nodeCls = require("node-cls");
13
+ // eslint-disable-next-line @typescript-eslint/no-require-imports
14
+ const nodeCls = require('node-cls');
14
15
  function checkLoopCtx(reqCtx) {
15
16
  return reqCtx && reqCtx.loopMasks && Array.isArray(reqCtx.loopMasks);
16
17
  }
17
18
  function getDebugExtraInfo() {
18
19
  let extra = {
19
- "FunctionFrameVersion": "FunctionFrameV2",
20
+ 'FunctionFrameVersion': 'FunctionFrameV2',
20
21
  };
21
22
  if (utils.isDebug()) {
22
23
  extra.DebugInfo = utils.getDebugCode();
@@ -66,7 +67,7 @@ exports.transFlowVariableToMap = transFlowVariableToMap;
66
67
  async function getTenantInfo(appCtx) {
67
68
  if (!appCtx) {
68
69
  appCtx = {
69
- mode: "faasSDK",
70
+ mode: 'faasSDK',
70
71
  credential: new credential_1.AppCredential(utils.getClientId(), utils.getClientSecret(), true)
71
72
  };
72
73
  }
@@ -85,3 +86,4 @@ async function getNamespaceForOpenAndFaaSSDK() {
85
86
  return utils.getNamespaceFromCtx();
86
87
  }
87
88
  exports.getNamespaceForOpenAndFaaSSDK = getNamespaceForOpenAndFaaSSDK;
89
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":";;;AAAA,mFAA4E;AAC5E,0DAA0D;AAC1D,2CAAwC;AAExC,sFAAoF;AACpF,iFAAmF;AACnF,uDAA4D;AAE5D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;AAC3B,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AACrC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAErC,iEAAiE;AACjE,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAGpC,SAAS,YAAY,CAAC,MAAW;IAC7B,OAAO,MAAM,IAAI,MAAM,CAAC,SAAS,IAAI,KAAK,CAAC,OA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@@
1
- import { GetHttpConfig, PostHttpConfig } from "@byted-apaas/server-common-node/http/config";
1
+ import { GetHttpConfig, PostHttpConfig } from '@byted-apaas/server-common-node/http/config';
2
2
  export declare const metricsMethodKeys: Record<string, string>;
3
3
  export declare const openapiHttpPath: {
4
4
  getBatchAttachmentToken: PostHttpConfig;