@byted-apaas/server-sdk-node 0.0.2-beta.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 (215) hide show
  1. package/LICENSE.md +0 -0
  2. package/README.md +1 -0
  3. package/application/application.d.ts +27 -0
  4. package/application/application.js +3 -0
  5. package/application/application.js.map +1 -0
  6. package/application/application.ts +40 -0
  7. package/application/function/function.d.ts +14 -0
  8. package/application/function/function.js +22 -0
  9. package/application/function/function.js.map +1 -0
  10. package/application/function/function.ts +37 -0
  11. package/application/impl/common.d.ts +2 -0
  12. package/application/impl/common.js +51 -0
  13. package/application/impl/common.js.map +1 -0
  14. package/application/impl/common.ts +50 -0
  15. package/application/impl/impl.d.ts +16 -0
  16. package/application/impl/impl.js +39 -0
  17. package/application/impl/impl.js.map +1 -0
  18. package/application/impl/impl.ts +48 -0
  19. package/constants/constants.d.ts +10 -0
  20. package/constants/constants.js +14 -0
  21. package/constants/constants.js.map +1 -0
  22. package/constants/constants.ts +12 -0
  23. package/context/context.d.ts +74 -0
  24. package/context/context.js +24 -0
  25. package/context/context.js.map +1 -0
  26. package/context/context.ts +127 -0
  27. package/context/db/db.d.ts +73 -0
  28. package/context/db/db.js +3 -0
  29. package/context/db/db.js.map +1 -0
  30. package/context/db/db.ts +77 -0
  31. package/context/db/impl/IObject.d.ts +251 -0
  32. package/context/db/impl/IObject.js +4 -0
  33. package/context/db/impl/IObject.js.map +1 -0
  34. package/context/db/impl/IObject.ts +244 -0
  35. package/context/db/impl/db.d.ts +61 -0
  36. package/context/db/impl/db.js +87 -0
  37. package/context/db/impl/db.js.map +1 -0
  38. package/context/db/impl/db.ts +95 -0
  39. package/context/db/impl/object.d.ts +92 -0
  40. package/context/db/impl/object.js +523 -0
  41. package/context/db/impl/object.js.map +1 -0
  42. package/context/db/impl/object.ts +628 -0
  43. package/context/db/impl/oql/ioql.d.ts +6 -0
  44. package/context/db/impl/oql/ioql.js +3 -0
  45. package/context/db/impl/oql/ioql.js.map +1 -0
  46. package/context/db/impl/oql/ioql.ts +6 -0
  47. package/context/db/impl/oql/oql.d.ts +8 -0
  48. package/context/db/impl/oql/oql.js +20 -0
  49. package/context/db/impl/oql/oql.js.map +1 -0
  50. package/context/db/impl/oql/oql.ts +22 -0
  51. package/context/db/impl/order.d.ts +9 -0
  52. package/context/db/impl/order.js +14 -0
  53. package/context/db/impl/order.js.map +1 -0
  54. package/context/db/impl/order.ts +16 -0
  55. package/context/db/impl/propertiesStore.d.ts +8 -0
  56. package/context/db/impl/propertiesStore.js +28 -0
  57. package/context/db/impl/propertiesStore.js.map +1 -0
  58. package/context/db/impl/propertiesStore.ts +28 -0
  59. package/context/db/impl/queryBuilder.d.ts +29 -0
  60. package/context/db/impl/queryBuilder.js +77 -0
  61. package/context/db/impl/queryBuilder.js.map +1 -0
  62. package/context/db/impl/queryBuilder.ts +103 -0
  63. package/context/db/impl/transaction/index.d.ts +20 -0
  64. package/context/db/impl/transaction/index.js +276 -0
  65. package/context/db/impl/transaction/index.js.map +1 -0
  66. package/context/db/impl/transaction/index.ts +337 -0
  67. package/context/db/impl/transaction/operation.d.ts +27 -0
  68. package/context/db/impl/transaction/operation.js +70 -0
  69. package/context/db/impl/transaction/operation.js.map +1 -0
  70. package/context/db/impl/transaction/operation.ts +72 -0
  71. package/context/db/impl/transaction.d.ts +67 -0
  72. package/context/db/impl/transaction.js +3 -0
  73. package/context/db/impl/transaction.js.map +1 -0
  74. package/context/db/impl/transaction.ts +76 -0
  75. package/context/globalConfig/globalConfig.d.ts +7 -0
  76. package/context/globalConfig/globalConfig.js +15 -0
  77. package/context/globalConfig/globalConfig.js.map +1 -0
  78. package/context/globalConfig/globalConfig.ts +11 -0
  79. package/context/metadata/components/common.d.ts +6 -0
  80. package/context/metadata/components/common.js +16 -0
  81. package/context/metadata/components/common.js.map +1 -0
  82. package/context/metadata/components/common.ts +19 -0
  83. package/context/metadata/components/components.d.ts +12 -0
  84. package/context/metadata/components/components.js +18 -0
  85. package/context/metadata/components/components.js.map +1 -0
  86. package/context/metadata/components/components.ts +19 -0
  87. package/context/metadata/components/desktop/list.d.ts +16 -0
  88. package/context/metadata/components/desktop/list.js +403 -0
  89. package/context/metadata/components/desktop/list.js.map +1 -0
  90. package/context/metadata/components/desktop/list.ts +457 -0
  91. package/context/metadata/components/desktop/recordDetail.d.ts +11 -0
  92. package/context/metadata/components/desktop/recordDetail.js +52 -0
  93. package/context/metadata/components/desktop/recordDetail.js.map +1 -0
  94. package/context/metadata/components/desktop/recordDetail.ts +64 -0
  95. package/context/metadata/components/mobile/list.d.ts +24 -0
  96. package/context/metadata/components/mobile/list.js +144 -0
  97. package/context/metadata/components/mobile/list.js.map +1 -0
  98. package/context/metadata/components/mobile/list.ts +176 -0
  99. package/context/metadata/metadata.d.ts +61 -0
  100. package/context/metadata/metadata.js +102 -0
  101. package/context/metadata/metadata.js.map +1 -0
  102. package/context/metadata/metadata.ts +175 -0
  103. package/context/metadata/objects/fields.d.ts +130 -0
  104. package/context/metadata/objects/fields.js +333 -0
  105. package/context/metadata/objects/fields.js.map +1 -0
  106. package/context/metadata/objects/fields.ts +454 -0
  107. package/context/metadata/objects/fields.util.d.ts +40 -0
  108. package/context/metadata/objects/fields.util.js +320 -0
  109. package/context/metadata/objects/fields.util.js.map +1 -0
  110. package/context/metadata/objects/fields.util.ts +360 -0
  111. package/context/metadata/objects/objects.d.ts +11 -0
  112. package/context/metadata/objects/objects.js +19 -0
  113. package/context/metadata/objects/objects.js.map +1 -0
  114. package/context/metadata/objects/objects.ts +27 -0
  115. package/context/metadata/types/common.d.ts +6 -0
  116. package/context/metadata/types/common.js +8 -0
  117. package/context/metadata/types/common.js.map +1 -0
  118. package/context/metadata/types/common.ts +10 -0
  119. package/context/metadata/types/components.d.ts +90 -0
  120. package/context/metadata/types/components.js +3 -0
  121. package/context/metadata/types/components.js.map +1 -0
  122. package/context/metadata/types/components.ts +105 -0
  123. package/context/metadata/types/objects.d.ts +226 -0
  124. package/context/metadata/types/objects.js +3 -0
  125. package/context/metadata/types/objects.js.map +1 -0
  126. package/context/metadata/types/objects.ts +251 -0
  127. package/context/msg/msg.d.ts +38 -0
  128. package/context/msg/msg.js +34 -0
  129. package/context/msg/msg.js.map +1 -0
  130. package/context/msg/msg.ts +49 -0
  131. package/context/resources/IResources.d.ts +66 -0
  132. package/context/resources/IResources.js +3 -0
  133. package/context/resources/IResources.js.map +1 -0
  134. package/context/resources/IResources.ts +73 -0
  135. package/context/resources/impl/resources.d.ts +42 -0
  136. package/context/resources/impl/resources.js +149 -0
  137. package/context/resources/impl/resources.js.map +1 -0
  138. package/context/resources/impl/resources.ts +170 -0
  139. package/context/tasks/tasks.d.ts +33 -0
  140. package/context/tasks/tasks.js +140 -0
  141. package/context/tasks/tasks.js.map +1 -0
  142. package/context/tasks/tasks.ts +159 -0
  143. package/data/index.d.ts +27 -0
  144. package/data/index.js +5 -0
  145. package/data/index.js.map +1 -0
  146. package/data/index.ts +30 -0
  147. package/hooks/api.d.ts +61 -0
  148. package/hooks/api.js +328 -0
  149. package/hooks/api.js.map +1 -0
  150. package/hooks/api.ts +341 -0
  151. package/hooks/hooks.d.ts +1 -0
  152. package/hooks/hooks.js +89 -0
  153. package/hooks/hooks.js.map +1 -0
  154. package/hooks/hooks.ts +100 -0
  155. package/kunlun/kunlun.d.ts +55 -0
  156. package/kunlun/kunlun.js +57 -0
  157. package/kunlun/kunlun.js.map +1 -0
  158. package/kunlun/kunlun.ts +69 -0
  159. package/kunlun/operator/IOperator.d.ts +158 -0
  160. package/kunlun/operator/IOperator.js +3 -0
  161. package/kunlun/operator/IOperator.js.map +1 -0
  162. package/kunlun/operator/IOperator.ts +163 -0
  163. package/kunlun/operator/impl/expression.d.ts +47 -0
  164. package/kunlun/operator/impl/expression.js +55 -0
  165. package/kunlun/operator/impl/expression.js.map +1 -0
  166. package/kunlun/operator/impl/expression.ts +71 -0
  167. package/kunlun/operator/impl/logic.d.ts +50 -0
  168. package/kunlun/operator/impl/logic.js +508 -0
  169. package/kunlun/operator/impl/logic.js.map +1 -0
  170. package/kunlun/operator/impl/logic.ts +595 -0
  171. package/kunlun/operator/impl/logicV2.d.ts +58 -0
  172. package/kunlun/operator/impl/logicV2.js +201 -0
  173. package/kunlun/operator/impl/logicV2.js.map +1 -0
  174. package/kunlun/operator/impl/logicV2.ts +254 -0
  175. package/kunlun/operator/impl/operator.d.ts +179 -0
  176. package/kunlun/operator/impl/operator.js +221 -0
  177. package/kunlun/operator/impl/operator.js.map +1 -0
  178. package/kunlun/operator/impl/operator.ts +255 -0
  179. package/kunlun/operator/impl/operatorV2.d.ts +180 -0
  180. package/kunlun/operator/impl/operatorV2.js +217 -0
  181. package/kunlun/operator/impl/operatorV2.js.map +1 -0
  182. package/kunlun/operator/impl/operatorV2.ts +249 -0
  183. package/lib/core.d.ts +4 -0
  184. package/lib/core.js +18 -0
  185. package/lib/core.js.map +1 -0
  186. package/lib/core.ts +4 -0
  187. package/package.json +50 -0
  188. package/request/common.d.ts +13 -0
  189. package/request/common.js +88 -0
  190. package/request/common.js.map +1 -0
  191. package/request/common.ts +91 -0
  192. package/request/constants.d.ts +10 -0
  193. package/request/constants.js +26 -0
  194. package/request/constants.js.map +1 -0
  195. package/request/constants.ts +25 -0
  196. package/request/faasinfra.d.ts +8 -0
  197. package/request/faasinfra.js +359 -0
  198. package/request/faasinfra.js.map +1 -0
  199. package/request/faasinfra.ts +393 -0
  200. package/request/innerapi.d.ts +67 -0
  201. package/request/innerapi.js +1411 -0
  202. package/request/innerapi.js.map +1 -0
  203. package/request/innerapi.ts +1645 -0
  204. package/request/interface.d.ts +95 -0
  205. package/request/interface.js +40 -0
  206. package/request/interface.js.map +1 -0
  207. package/request/interface.ts +166 -0
  208. package/request/openapi.d.ts +69 -0
  209. package/request/openapi.js +1013 -0
  210. package/request/openapi.js.map +1 -0
  211. package/request/openapi.ts +1220 -0
  212. package/types/types.d.ts +79 -0
  213. package/types/types.js +3 -0
  214. package/types/types.js.map +1 -0
  215. package/types/types.ts +105 -0
@@ -0,0 +1,226 @@
1
+ import { I18ns } from "./common";
2
+ export interface BaseFieldType {
3
+ type: string;
4
+ apiName: string;
5
+ label: I18ns;
6
+ }
7
+ export interface KTextFieldType extends BaseFieldType {
8
+ required: boolean;
9
+ unique: boolean;
10
+ caseSensitive: boolean;
11
+ multiline: boolean;
12
+ maxLength: number;
13
+ validationRegex: string;
14
+ errorMsg: I18ns;
15
+ }
16
+ export interface RichTextType extends BaseFieldType {
17
+ required: boolean;
18
+ maxLength: number;
19
+ }
20
+ export interface MultilingualType extends BaseFieldType {
21
+ required: boolean;
22
+ unique: boolean;
23
+ caseSensitive: boolean;
24
+ multiline: boolean;
25
+ maxLength: number;
26
+ }
27
+ export interface NumberType extends BaseFieldType {
28
+ required: boolean;
29
+ unique: boolean;
30
+ displayAsPercentage: boolean;
31
+ decimalPlacesNumber: number;
32
+ }
33
+ export interface KDateType extends BaseFieldType {
34
+ required: boolean;
35
+ }
36
+ export interface DateTimeType extends BaseFieldType {
37
+ required: boolean;
38
+ }
39
+ export declare type SubOptionType = {
40
+ label: I18ns;
41
+ apiName: string;
42
+ description: I18ns;
43
+ color: ("grey" | "blue" | "cyan" | "green" | "yellow" | "orange" | "red" | "magenta" | "purple" | "blueMagenta");
44
+ active: boolean;
45
+ };
46
+ export interface OptionType extends BaseFieldType {
47
+ required: boolean;
48
+ multiple: boolean;
49
+ optionSource: ("custom" | "global");
50
+ globalOptionApiName: string;
51
+ optionList: SubOptionType[];
52
+ }
53
+ export interface Email extends BaseFieldType {
54
+ required: boolean;
55
+ unique: boolean;
56
+ }
57
+ export interface MobileNumber extends BaseFieldType {
58
+ required: boolean;
59
+ unique: boolean;
60
+ }
61
+ export interface Boolean extends BaseFieldType {
62
+ descriptionWhenTrue: I18ns;
63
+ descriptionWhenFalse: I18ns;
64
+ defaultValue: boolean;
65
+ }
66
+ export interface AvatarOrLogo extends BaseFieldType {
67
+ displayStyle: ("square" | "round");
68
+ }
69
+ export interface SortConditionType {
70
+ fieldApiName: string;
71
+ sort: ("asc" | "desc");
72
+ }
73
+ declare type ConditionType = {
74
+ left: {
75
+ objectApiName: string;
76
+ fieldApiName: string;
77
+ };
78
+ operator: ("eq" | "neq" | "in" | "notIn" | "empty" | "notEmpty" | "lte" | "gte" | "hasAllOf" | "hasNoneOf" | "hasAnyOf");
79
+ valueType: ("reference" | "specified");
80
+ right: (object | string);
81
+ };
82
+ declare type CriterionType = {
83
+ conditions: ConditionType[];
84
+ logic: string;
85
+ };
86
+ export declare type FilterType = {
87
+ label: string;
88
+ needTriggerCriterion: boolean;
89
+ triggerCriterion: CriterionType;
90
+ criterion: CriterionType;
91
+ errorMsg: I18ns;
92
+ };
93
+ export interface Lookup extends BaseFieldType {
94
+ required: boolean;
95
+ multiple: boolean;
96
+ objectApiName: string;
97
+ hierarchy: boolean;
98
+ displayStyle: ("search" | "dropDown" | "tree");
99
+ sortConditions: SortConditionType[];
100
+ filter: FilterType[];
101
+ }
102
+ export interface FormulaType extends BaseFieldType {
103
+ returnType: string;
104
+ formula: I18ns;
105
+ }
106
+ export interface AutoIDType extends BaseFieldType {
107
+ generateMethod: ("random" | "incremental");
108
+ digitsNumber: number;
109
+ prefix: string;
110
+ suffix: string;
111
+ }
112
+ export interface ReferenceFieldType extends BaseFieldType {
113
+ guideFieldApiName: string;
114
+ fieldApiName: string;
115
+ }
116
+ export interface FileType extends BaseFieldType {
117
+ required: boolean;
118
+ multiple: boolean;
119
+ fileTypes: string[];
120
+ }
121
+ export interface BackLookuType extends BaseFieldType {
122
+ objectApiName: string;
123
+ fieldApiName: string;
124
+ }
125
+ export interface CompositeType extends BaseFieldType {
126
+ compositeTypeApiName: string;
127
+ subFields: BaseFieldType[];
128
+ required: boolean;
129
+ multiple: boolean;
130
+ }
131
+ export interface ExtractSingleRecordType extends BaseFieldType {
132
+ compositeTypeApiName: string;
133
+ subFields: BaseFieldType[];
134
+ filter: FilterType[];
135
+ sortConditions: SortConditionType[];
136
+ recordPosition: number;
137
+ }
138
+ export declare type FieldType = {
139
+ "allow_search": boolean;
140
+ "api_name": string;
141
+ "calculated": boolean;
142
+ "description": I18ns;
143
+ "domain": number;
144
+ "encryption_mode": string;
145
+ "field_permission": number;
146
+ "formula_id": number;
147
+ "id": number;
148
+ "indexed": number;
149
+ "inherit_settings": object;
150
+ "is_encrypted": boolean;
151
+ "is_inherit": boolean;
152
+ "is_progress_field": boolean;
153
+ "label": I18ns;
154
+ "namespace": string;
155
+ "object_api_name": string;
156
+ "object_id": number;
157
+ "order": number;
158
+ "required": boolean;
159
+ "tenant_id": number;
160
+ "type": {
161
+ "name": string;
162
+ "settings": {
163
+ "multiline": boolean;
164
+ "text_version": number;
165
+ "decimal_places": number;
166
+ "display_as_percentage": boolean;
167
+ "placeholder": object;
168
+ "max_length": number;
169
+ "regexp_expression": string;
170
+ "regexp_err_msg": I18ns;
171
+ "is_array": boolean;
172
+ "option_type": string;
173
+ "related_to_global_option": {
174
+ "apiName": string;
175
+ "id": number;
176
+ "name": string;
177
+ };
178
+ "options": {
179
+ "name": I18ns;
180
+ "api_name": string;
181
+ "description": I18ns;
182
+ "color_id": string;
183
+ "active": boolean;
184
+ }[];
185
+ "description_if_true": I18ns;
186
+ "description_if_false": I18ns;
187
+ "display_style": string;
188
+ "default_value": boolean;
189
+ "referenced_object_api_name": string;
190
+ "is_hierarchy": boolean;
191
+ "return_type": string;
192
+ "formulas": I18ns;
193
+ "generation_method": string;
194
+ "digits": number;
195
+ "prefix": string;
196
+ "suffix": string;
197
+ "target_referenced_object_api_name": string;
198
+ "target_reference_field_api_name": string;
199
+ "multiple": boolean;
200
+ "mime_types": string[];
201
+ "related_to_object_api_name": string;
202
+ "related_to_field_api_name": string;
203
+ "related_to_api_name": string;
204
+ "related_to_fields": object[];
205
+ "filter": FilterType[];
206
+ "sort": {
207
+ "field": string;
208
+ "type": "string";
209
+ "direction": ("asc" | "desc");
210
+ }[];
211
+ "filter_record": {
212
+ "index": number;
213
+ "type": string;
214
+ };
215
+ "is_extract": boolean;
216
+ };
217
+ };
218
+ "unique_type": number;
219
+ "updated_at": number;
220
+ "updated_by": {
221
+ "avatar": object;
222
+ "id": number;
223
+ "name": string;
224
+ };
225
+ };
226
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=objects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"objects.js","sourceRoot":"","sources":["objects.ts"],"names":[],"mappings":""}
@@ -0,0 +1,251 @@
1
+ import {I18ns} from "./common";
2
+
3
+ export interface BaseFieldType {
4
+ type: string;
5
+ apiName: string;
6
+ label: I18ns;
7
+ }
8
+
9
+ export interface KTextFieldType extends BaseFieldType {
10
+ required: boolean; // 默认值:false
11
+ unique: boolean; // 默认值:false
12
+ caseSensitive: boolean; // unique 为 false 时生效,默认值:true
13
+ multiline: boolean; // 默认值:false
14
+ maxLength: number; // 默认值:1000
15
+ validationRegex: string; // 正则校验的表达式
16
+ errorMsg: I18ns;
17
+ }
18
+
19
+ export interface RichTextType extends BaseFieldType {
20
+ required: boolean; // 默认值:false
21
+ maxLength: number;
22
+ }
23
+
24
+ export interface MultilingualType extends BaseFieldType {
25
+ required: boolean; // 默认值:false
26
+ unique: boolean; // 默认值:false
27
+ caseSensitive: boolean; // unique 为 ture 时生效,默认值:true
28
+ multiline: boolean; // 默认值:false
29
+ maxLength: number; // 默认值:1000
30
+ }
31
+
32
+ export interface NumberType extends BaseFieldType {
33
+ required: boolean; // 默认值:false
34
+ unique: boolean; // 默认值:false
35
+ displayAsPercentage: boolean; // 默认值:false
36
+ decimalPlacesNumber: number;
37
+ }
38
+
39
+ export interface KDateType extends BaseFieldType {
40
+ required: boolean; // 默认值:false
41
+ }
42
+
43
+ export interface DateTimeType extends BaseFieldType {
44
+ required: boolean; // 默认值:false
45
+ }
46
+
47
+ export type SubOptionType = {
48
+ label: I18ns;
49
+ apiName: string;
50
+ description: I18ns;
51
+ color: ("grey" | "blue" | "cyan" | "green" | "yellow" | "orange" | "red" | "magenta" | "purple" | "blueMagenta"); // 按色阶顺序给默认值
52
+ active: boolean; // 默认值: true
53
+ }
54
+
55
+ export interface OptionType extends BaseFieldType {
56
+ required: boolean; // 默认值:false
57
+ multiple: boolean; // 默认值:false
58
+ optionSource: ("custom" | "global"); // 对应选项字段的「选项来源」属性(分为「自定义选项」和「使用全局选项), 默认值:"custom"
59
+ globalOptionApiName: string; // 关联全局选项的 apiName(创建字段时,设定 optionSource 为 "custom",则无需传入,且生成的元数据中不包含该属性)
60
+ optionList: SubOptionType[];
61
+ }
62
+
63
+ export interface Email extends BaseFieldType {
64
+ required: boolean; // 默认值:false
65
+ unique: boolean; // 默认值:false
66
+ }
67
+
68
+ export interface MobileNumber extends BaseFieldType {
69
+ required: boolean; // 默认值:false
70
+ unique: boolean; // 默认值:false
71
+ }
72
+
73
+ export interface Boolean extends BaseFieldType {
74
+ descriptionWhenTrue: I18ns;
75
+ descriptionWhenFalse: I18ns;
76
+ defaultValue: boolean;
77
+ }
78
+
79
+ export interface AvatarOrLogo extends BaseFieldType {
80
+ displayStyle: ("square" | "round"); // 默认值:"square"
81
+ }
82
+
83
+ export interface SortConditionType {
84
+ fieldApiName: string;
85
+ sort: ("asc" | "desc") // 默认值:"asc"
86
+ }
87
+
88
+ type ConditionType = {
89
+ left: {
90
+ objectApiName: string;
91
+ fieldApiName: string;
92
+ };
93
+ operator: ("eq" | "neq" | "in" | "notIn" | "empty" | "notEmpty" | "lte" | "gte" | "hasAllOf" | "hasNoneOf" | "hasAnyOf");
94
+ valueType: ("reference" | "specified");
95
+ right: (object | string); // 当 valueType 为 "reference" 时,值类型同 left 属性;若为 "specified",值类型则为固定的字符串值
96
+ }
97
+
98
+ type CriterionType = {
99
+ conditions: ConditionType[]; // filter 条件
100
+ logic: string;
101
+ }
102
+
103
+ export type FilterType = {
104
+ label: string; // 对应为查找字段设置过滤条件中的「名称」属性
105
+ needTriggerCriterion: boolean; // 默认值:false
106
+ triggerCriterion: CriterionType
107
+ criterion: CriterionType
108
+ errorMsg: I18ns;
109
+ }
110
+
111
+ export interface Lookup extends BaseFieldType {
112
+ required: boolean; // 默认值:false
113
+ multiple: boolean; // 默认值:false,对应查找字段的「关联记录数」属性(分为「单条」和「多条」)
114
+ objectApiName: string; // 字段 look up 的对象
115
+ hierarchy: boolean; // 默认值:false,multiple 为 false 时生效
116
+ displayStyle: ("search" | "dropDown" | "tree"); // 默认值:"dropDown",对应查找字段的「关联记录展示方式」属性,仅当 hierarchy 为 true 时才可设置为 "tree"
117
+ sortConditions: SortConditionType[];
118
+ filter: FilterType[];
119
+ }
120
+
121
+ export interface FormulaType extends BaseFieldType {
122
+ returnType: string; // 对应公式字段的「公式返回值类型」属性
123
+ formula: I18ns;
124
+ }
125
+
126
+ export interface AutoIDType extends BaseFieldType {
127
+ generateMethod: ("random" | "incremental"); // 默认值: "random"
128
+ digitsNumber: number;
129
+ prefix: string;
130
+ suffix: string;
131
+ }
132
+
133
+ export interface ReferenceFieldType extends BaseFieldType {
134
+ guideFieldApiName: string;
135
+ fieldApiName: string;
136
+ }
137
+
138
+ export interface FileType extends BaseFieldType {
139
+ required: boolean; // 默认值: false
140
+ multiple: boolean; // 默认值: false
141
+ fileTypes: string[]; // 支持 "jpeg"|"jpg"|"png"|"gif"|"pdf"|"docx"|"doc"|"xlsx"|"xls"|"pptx"|"ppt"|"csv"|"txt"|"json"|"mp4"|"zip"|"rar",同时支持 "*.doc" 的描述方式,当为空数组,或 null、undefined 时,默认支持「全部类型」
142
+ }
143
+
144
+ export interface BackLookuType extends BaseFieldType {
145
+ objectApiName: string;
146
+ fieldApiName: string; // 由于下游提供仍是 api ID 版本,因此禁用
147
+ }
148
+
149
+ export interface CompositeType extends BaseFieldType {
150
+ compositeTypeApiName: string; // 关联组合类型的 apiName,「主子对象」需求调整后,将不存在该 key
151
+ subFields: BaseFieldType[]; // 组合类型中的子字段的元数据
152
+ required: boolean; // 默认值: false
153
+ multiple: boolean; // 默认值: false
154
+ }
155
+
156
+ export interface ExtractSingleRecordType extends BaseFieldType {
157
+ compositeTypeApiName: string; // 关联组合类型的 apiName,「主子对象」需求调整后,将调整为「子表单」类型字段的 apiName
158
+ subFields: BaseFieldType[]; // 组合类型中的子字段的元数据
159
+ filter: FilterType[];
160
+ sortConditions: SortConditionType[];
161
+ recordPosition: number; // 默认值: 1,对应多值取单值字段的「返回记录」(分为「第一条」、「最后一条」和「第 {{n}} 条」),取值为正整数时为相应位置的记录,取值为 -1 时为「最后一条」记录
162
+ }
163
+
164
+ export type FieldType = {
165
+ "allow_search": boolean,
166
+ "api_name": string,
167
+ "calculated": boolean,
168
+ "description": I18ns,
169
+ "domain": number,
170
+ "encryption_mode": string,
171
+ "field_permission": number,
172
+ "formula_id": number,
173
+ "id": number,
174
+ "indexed": number,
175
+ "inherit_settings": object,
176
+ "is_encrypted": boolean,
177
+ "is_inherit": boolean,
178
+ "is_progress_field": boolean,
179
+ "label": I18ns,
180
+ "namespace": string,
181
+ "object_api_name": string,
182
+ "object_id": number,
183
+ "order": number,
184
+ "required": boolean,
185
+ "tenant_id": number,
186
+ "type": {
187
+ "name": string,
188
+ "settings": {
189
+ "multiline": boolean,
190
+ "text_version": number,
191
+ "decimal_places": number,
192
+ "display_as_percentage": boolean,
193
+ "placeholder": object,
194
+ "max_length": number,
195
+ "regexp_expression": string,
196
+ "regexp_err_msg": I18ns,
197
+ "is_array": boolean,
198
+ "option_type": string,
199
+ "related_to_global_option": {
200
+ "apiName": string,
201
+ "id": number,
202
+ "name": string,
203
+ },
204
+ "options": {
205
+ "name": I18ns,
206
+ "api_name": string,
207
+ "description": I18ns,
208
+ "color_id": string,
209
+ "active": boolean,
210
+ }[],
211
+ "description_if_true": I18ns,
212
+ "description_if_false": I18ns,
213
+ "display_style": string,
214
+ "default_value": boolean,
215
+ "referenced_object_api_name": string,
216
+ "is_hierarchy": boolean,
217
+ "return_type": string,
218
+ "formulas": I18ns,
219
+ "generation_method": string,
220
+ "digits": number,
221
+ "prefix": string,
222
+ "suffix": string,
223
+ "target_referenced_object_api_name": string,
224
+ "target_reference_field_api_name": string,
225
+ "multiple": boolean,
226
+ "mime_types": string[],
227
+ "related_to_object_api_name": string,
228
+ "related_to_field_api_name": string,
229
+ "related_to_api_name": string,
230
+ "related_to_fields": object[],
231
+ "filter": FilterType[],
232
+ "sort": {
233
+ "field": string,
234
+ "type": "string",
235
+ "direction": ("asc" | "desc")
236
+ }[],
237
+ "filter_record": {
238
+ "index": number,
239
+ "type": string,
240
+ },
241
+ "is_extract": boolean,
242
+ }
243
+ },
244
+ "unique_type": number,
245
+ "updated_at": number,
246
+ "updated_by": {
247
+ "avatar": object,
248
+ "id": number,
249
+ "name": string,
250
+ },
251
+ }
@@ -0,0 +1,38 @@
1
+ import * as common from "@byted-apaas/server-common-node";
2
+ import Multilingual = common.fieldType.Multilingual;
3
+ export declare type _IconType = "success" | "error" | "progress" | "info";
4
+ export declare class _NotifyCenter {
5
+ /**
6
+ * 消息中心推送消息
7
+ * @param msg 消息
8
+ */
9
+ create(msg: {
10
+ icon: _IconType;
11
+ percent: Number;
12
+ target_users: number[];
13
+ title: Multilingual;
14
+ detail: Multilingual;
15
+ }): Promise<number>;
16
+ /**
17
+ * 消息中心更新消息
18
+ * @param msgId 消息 ID
19
+ * @param msg 消息
20
+ */
21
+ update(msgId: number, msg: {
22
+ icon?: _IconType;
23
+ percent?: Number;
24
+ target_users?: number[];
25
+ title?: Multilingual;
26
+ detail?: Multilingual;
27
+ }): Promise<void>;
28
+ }
29
+ /**
30
+ * 消息类
31
+ */
32
+ export declare class Message {
33
+ /**
34
+ * 消息中心
35
+ */
36
+ notifyCenter: _NotifyCenter;
37
+ constructor();
38
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Message = exports._NotifyCenter = void 0;
4
+ const Request = require("../../request/interface");
5
+ class _NotifyCenter {
6
+ /**
7
+ * 消息中心推送消息
8
+ * @param msg 消息
9
+ */
10
+ async create(msg) {
11
+ return await Request.GetInstance().createMessage(msg);
12
+ }
13
+ ;
14
+ /**
15
+ * 消息中心更新消息
16
+ * @param msgId 消息 ID
17
+ * @param msg 消息
18
+ */
19
+ async update(msgId, msg) {
20
+ return await Request.GetInstance().updateMessage(msgId, msg);
21
+ }
22
+ ;
23
+ }
24
+ exports._NotifyCenter = _NotifyCenter;
25
+ /**
26
+ * 消息类
27
+ */
28
+ class Message {
29
+ constructor() {
30
+ this.notifyCenter = new _NotifyCenter();
31
+ }
32
+ }
33
+ exports.Message = Message;
34
+ //# sourceMappingURL=msg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg.js","sourceRoot":"","sources":["msg.ts"],"names":[],"mappings":";;;AAAA,mDAAmD;AAMnD,MAAa,aAAa;IACtB;;;OAGG;IACI,KAAK,CAAC,MAAM,CAAC,GAMnB;QACG,OAAO,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC;IAAA,CAAC;IACF;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,GAMlC;QACG,OAAO,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IACjE,CAAC;IAAA,CAAC;CACL;AA5BD,sCA4BC;AAED;;GAEG;AACH,MAAa,OAAO;IAMhB;QACI,IAAI,CAAC,YAAY,GAAG,IAAI,aAAa,EAAE,CAAC;IAC5C,CAAC;CACJ;AATD,0BASC"}
@@ -0,0 +1,49 @@
1
+ import * as Request from "../../request/interface";
2
+ import * as common from "@byted-apaas/server-common-node"
3
+ import Multilingual = common.fieldType.Multilingual
4
+
5
+ export type _IconType = "success" | "error" | "progress" | "info"
6
+
7
+ export class _NotifyCenter {
8
+ /**
9
+ * 消息中心推送消息
10
+ * @param msg 消息
11
+ */
12
+ public async create(msg: {
13
+ icon: _IconType,
14
+ percent: Number,
15
+ target_users: number[],
16
+ title: Multilingual,
17
+ detail: Multilingual,
18
+ }): Promise<number> {
19
+ return await Request.GetInstance().createMessage(msg);
20
+ };
21
+ /**
22
+ * 消息中心更新消息
23
+ * @param msgId 消息 ID
24
+ * @param msg 消息
25
+ */
26
+ public async update(msgId: number, msg: {
27
+ icon?: _IconType,
28
+ percent?: Number,
29
+ target_users?: number[],
30
+ title?: Multilingual,
31
+ detail?: Multilingual,
32
+ }): Promise<void> {
33
+ return await Request.GetInstance().updateMessage(msgId, msg);
34
+ };
35
+ }
36
+
37
+ /**
38
+ * 消息类
39
+ */
40
+ export class Message {
41
+ /**
42
+ * 消息中心
43
+ */
44
+ notifyCenter: _NotifyCenter;
45
+
46
+ constructor() {
47
+ this.notifyCenter = new _NotifyCenter();
48
+ }
49
+ }
@@ -0,0 +1,66 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ import { Stream } from "stream";
4
+ import { UploadFileResp } from "../../request/interface";
5
+ export interface _FileInfo {
6
+ id: string;
7
+ }
8
+ export interface _IKunlunFile {
9
+ /**
10
+ * 上传文件
11
+ * @param filePath 文件路径
12
+ * @param expire 文件过期时间,可选,单位:秒
13
+ */
14
+ upload(filePath: string, expire?: number): Promise<UploadFileResp>;
15
+ /**
16
+ * 上传文件
17
+ * @param stream 文件流
18
+ * @param expire 文件过期时间,可选,单位:秒
19
+ */
20
+ upload(stream: Stream, expire?: number): Promise<UploadFileResp>;
21
+ /**
22
+ * 下载文件
23
+ * @param fileToken 文件令牌
24
+ */
25
+ download(fileToken: string): Promise<Buffer>;
26
+ /**
27
+ * 下载文件
28
+ * @param fileToken 文件令牌
29
+ * @param filePath 文件保存的路径
30
+ */
31
+ download(fileToken: string, filePath: string): Promise<void>;
32
+ /**
33
+ * 下载文件
34
+ * @param fileInfo 文件信息
35
+ */
36
+ download(fileInfo: _FileInfo): Promise<Buffer>;
37
+ /**
38
+ * 下载文件
39
+ * @param fileInfo 文件信息
40
+ * @param filePath 文件保存的路径
41
+ */
42
+ download(fileInfo: _FileInfo, filePath: string): Promise<void>;
43
+ }
44
+ export declare type FileUploadResult = {
45
+ fileId: string;
46
+ type: string;
47
+ name: string;
48
+ size: number;
49
+ };
50
+ export declare type UploadAvatarResult = {
51
+ ImageId: string;
52
+ PreviewImageId: string;
53
+ };
54
+ export interface _IOpenSDKFile {
55
+ Upload(fileName: string, path: string): Promise<FileUploadResult>;
56
+ Upload(fileName: string, reader: Stream): Promise<FileUploadResult>;
57
+ Upload(fileName: string, buffer: Buffer): Promise<FileUploadResult>;
58
+ UploadAvatar(fileName: string, path: string): Promise<UploadAvatarResult>;
59
+ UploadAvatar(fileName: string, reader: Stream): Promise<UploadAvatarResult>;
60
+ UploadAvatar(fileName: string, buffer: Buffer): Promise<UploadAvatarResult>;
61
+ Download(fileID: string): Promise<Buffer>;
62
+ DownloadAvatar(imageID: string): Promise<Buffer>;
63
+ }
64
+ export interface _IOpenSDKResources {
65
+ file: _IOpenSDKFile;
66
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IResources.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IResources.js","sourceRoot":"","sources":["IResources.ts"],"names":[],"mappings":""}