@byted-apaas/server-sdk-node 1.1.23-beta.8 → 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,369 +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.getFieldClassV3 = exports.parseFieldV3 = exports.parseFieldsV3 = exports.RollupV3 = exports.RegionV3 = exports.DecimalV3 = exports.BigintV3 = exports.RichTextV3 = exports.ExtractSingleRecordV3 = exports.CompositeTypeV3 = exports.BackLookupV3 = exports.FileV3 = exports.ReferenceFieldV3 = exports.AutoIDV3 = exports.FormulaV3 = exports.LookupV3 = exports.AvatarOrLogoV3 = exports.BooleanV3 = exports.MobileNumberV3 = exports.EmailV3 = exports.OptionV3 = exports.DateTimeV3 = exports.DateV3 = exports.NumberV3 = exports.MultilingualV3 = exports.TextV3 = void 0;
6
- const fieldsUtil = require("./fields.util");
7
- const common_1 = require("../types/common");
8
- class MetadataFieldV3 {
9
- constructor(type, field) {
10
- this.type = type;
11
- this.apiName = field.api_name;
12
- this.label = (0, common_1.transI18nsToMultilingualV3)(field.label);
13
- }
14
- }
15
- class KTextV3 extends MetadataFieldV3 {
16
- constructor(field) {
17
- if (!field) {
18
- return;
19
- }
20
- super('text', field);
21
- this.required = field.required;
22
- this.unique = fieldsUtil.getUnique(field);
23
- this.caseSensitive = fieldsUtil.getCaseSensitive(field);
24
- this.multiline = fieldsUtil.getMultiline(field);
25
- this.maxLength = fieldsUtil.getMaxLength(field);
26
- this.validationRegex = fieldsUtil.getRegexpExpression(field);
27
- this.errorMsg = (0, common_1.transI18nsToMultilingualV3)(fieldsUtil.getRegexpErrMsg(field));
28
- }
29
- }
30
- exports.TextV3 = KTextV3;
31
- class RichTextV3 extends MetadataFieldV3 {
32
- constructor(field) {
33
- if (!field) {
34
- return;
35
- }
36
- super('richText', field);
37
- this.maxLength = fieldsUtil.getMaxLength(field);
38
- this.required = field.required;
39
- }
40
- }
41
- exports.RichTextV3 = RichTextV3;
42
- class MultilingualV3 extends MetadataFieldV3 {
43
- constructor(field) {
44
- if (!field) {
45
- return;
46
- }
47
- super('multilingual', field);
48
- this.required = field.required;
49
- this.unique = fieldsUtil.getUnique(field);
50
- this.caseSensitive = fieldsUtil.getCaseSensitive(field);
51
- this.multiline = fieldsUtil.getMultiline(field);
52
- this.maxLength = fieldsUtil.getMaxLength(field);
53
- }
54
- }
55
- exports.MultilingualV3 = MultilingualV3;
56
- class NumberV3 extends MetadataFieldV3 {
57
- constructor(field) {
58
- if (!field) {
59
- return;
60
- }
61
- super('number', field);
62
- this.required = field.required;
63
- this.unique = fieldsUtil.getUnique(field);
64
- this.displayAsPercentage = fieldsUtil.getDisplayAsPercentage(field);
65
- this.decimalPlacesNumber = fieldsUtil.getDecimalPlaces(field);
66
- }
67
- }
68
- exports.NumberV3 = NumberV3;
69
- class BigintV3 extends MetadataFieldV3 {
70
- constructor(field) {
71
- if (!field) {
72
- return;
73
- }
74
- super('bigint', field);
75
- this.required = field.required;
76
- this.unique = fieldsUtil.getUnique(field);
77
- }
78
- }
79
- exports.BigintV3 = BigintV3;
80
- class DecimalV3 extends MetadataFieldV3 {
81
- constructor(field) {
82
- if (!field) {
83
- return;
84
- }
85
- super('decimal', field);
86
- this.required = field.required;
87
- this.unique = fieldsUtil.getUnique(field);
88
- this.displayAsPercentage = fieldsUtil.getDisplayAsPercentage(field);
89
- this.decimalPlacesNumber = fieldsUtil.getDecimalPlaces(field);
90
- }
91
- }
92
- exports.DecimalV3 = DecimalV3;
93
- class KDateV3 extends MetadataFieldV3 {
94
- constructor(field) {
95
- if (!field) {
96
- return;
97
- }
98
- super('date', field);
99
- this.required = field.required;
100
- }
101
- }
102
- exports.DateV3 = KDateV3;
103
- class DateTimeV3 extends MetadataFieldV3 {
104
- constructor(field) {
105
- if (!field) {
106
- return;
107
- }
108
- super('dateTime', field);
109
- this.required = field.required;
110
- }
111
- }
112
- exports.DateTimeV3 = DateTimeV3;
113
- class OptionV3 extends MetadataFieldV3 {
114
- constructor(field) {
115
- if (!field) {
116
- return;
117
- }
118
- super('option', field);
119
- this.required = field.required;
120
- this.multiple = fieldsUtil.getMultiple(field);
121
- this.optionSource = fieldsUtil.getOptionSource(field);
122
- this.globalOptionApiName = fieldsUtil.getGlobalOptionApiName(field);
123
- this.optionList = fieldsUtil.getOptionListV3(field);
124
- }
125
- }
126
- exports.OptionV3 = OptionV3;
127
- class EmailV3 extends MetadataFieldV3 {
128
- constructor(field) {
129
- if (!field) {
130
- return;
131
- }
132
- super('email', field);
133
- this.required = field.required;
134
- this.unique = fieldsUtil.getUnique(field);
135
- }
136
- }
137
- exports.EmailV3 = EmailV3;
138
- class MobileNumberV3 extends MetadataFieldV3 {
139
- constructor(field) {
140
- if (!field) {
141
- return;
142
- }
143
- super('mobileNumber', field);
144
- this.required = field.required;
145
- this.unique = fieldsUtil.getUnique(field);
146
- }
147
- }
148
- exports.MobileNumberV3 = MobileNumberV3;
149
- class BooleanV3 extends MetadataFieldV3 {
150
- constructor(field) {
151
- if (!field) {
152
- return;
153
- }
154
- super('boolean', field);
155
- this.unique = fieldsUtil.getUnique(field);
156
- this.descriptionWhenTrue = (0, common_1.transI18nsToMultilingualV3)(fieldsUtil.getDescriptionWhenTrue(field));
157
- this.descriptionWhenFalse = (0, common_1.transI18nsToMultilingualV3)(fieldsUtil.getDescriptionWhenFalse(field));
158
- this.defaultValue = fieldsUtil.getDefaultValue(field);
159
- }
160
- }
161
- exports.BooleanV3 = BooleanV3;
162
- class AvatarOrLogoV3 extends MetadataFieldV3 {
163
- constructor(field) {
164
- if (!field) {
165
- return;
166
- }
167
- super('avatarOrLogo', field);
168
- this.displayStyle = fieldsUtil.getDisplayStyle(field);
169
- }
170
- }
171
- exports.AvatarOrLogoV3 = AvatarOrLogoV3;
172
- class LookupV3 extends MetadataFieldV3 {
173
- constructor(field) {
174
- if (!field) {
175
- return;
176
- }
177
- super('lookup', field);
178
- this.required = field.required;
179
- this.multiple = fieldsUtil.getMultiple(field);
180
- this.objectApiName = fieldsUtil.getLookupRefObjectApiName(field);
181
- this.hierarchy = fieldsUtil.getLookupIsHierarchy(field);
182
- this.displayStyle = fieldsUtil.getLookupDisplayStyle(field);
183
- // TODO
184
- this.sortConditions = fieldsUtil.getSettingsSort(field);
185
- this.filter = [];
186
- }
187
- }
188
- exports.LookupV3 = LookupV3;
189
- class FormulaV3 extends MetadataFieldV3 {
190
- constructor(field) {
191
- if (!field) {
192
- return;
193
- }
194
- super('formula', field);
195
- this.returnType = fieldsUtil.getReturnType(field);
196
- this.formula = (0, common_1.transI18nsToMultilingualV3)(fieldsUtil.getFormula(field));
197
- }
198
- }
199
- exports.FormulaV3 = FormulaV3;
200
- class AutoIDV3 extends MetadataFieldV3 {
201
- constructor(field) {
202
- if (!field) {
203
- return;
204
- }
205
- super('autoId', field);
206
- this.generateMethod = fieldsUtil.getGenerateMethod(field);
207
- this.digitsNumber = fieldsUtil.getDigitsNumber(field);
208
- this.prefix = fieldsUtil.getPrefix(field);
209
- this.suffix = fieldsUtil.getSuffix(field);
210
- }
211
- }
212
- exports.AutoIDV3 = AutoIDV3;
213
- class ReferenceFieldV3 extends MetadataFieldV3 {
214
- constructor(field) {
215
- if (!field) {
216
- return;
217
- }
218
- super('referenceField', field);
219
- // TODO: check objectApiName to guideFieldApiName
220
- this.guideFieldApiName = fieldsUtil.getReferenceObjectApiName(field);
221
- this.fieldApiName = fieldsUtil.getReferenceFieldApiName(field);
222
- }
223
- }
224
- exports.ReferenceFieldV3 = ReferenceFieldV3;
225
- class RollupV3 extends MetadataFieldV3 {
226
- constructor(field) {
227
- if (!field) {
228
- return;
229
- }
230
- super('rollup', field);
231
- this.rollupType = fieldsUtil.getRollupType(field);
232
- this.rollupObjectApiName = fieldsUtil.getRollupObjectApiName(field);
233
- this.rollupFieldApiName = fieldsUtil.getRollupFieldApiName(field);
234
- this.rollupLookupFieldApiName = fieldsUtil.getRollupLookupFieldApiName(field);
235
- this.filter = fieldsUtil.getRollupFilter(field);
236
- }
237
- }
238
- exports.RollupV3 = RollupV3;
239
- class RegionV3 extends MetadataFieldV3 {
240
- constructor(field) {
241
- if (!field) {
242
- return;
243
- }
244
- super('region', field);
245
- this.required = field.required;
246
- this.multiple = fieldsUtil.getSettingsMultiple(field);
247
- this.optionLevel = fieldsUtil.getRegionOptionLevel(field);
248
- this.strictLevel = fieldsUtil.getRegionStrictLeve(field);
249
- this.filter = fieldsUtil.getRegionSettingsFilterV3(field);
250
- }
251
- }
252
- exports.RegionV3 = RegionV3;
253
- class FileV3 extends MetadataFieldV3 {
254
- constructor(field) {
255
- if (!field) {
256
- return;
257
- }
258
- super('file', field);
259
- this.required = field.required;
260
- this.multiple = fieldsUtil.getFileMultiple(field);
261
- this.fileTypes = fieldsUtil.getFileTypes(field);
262
- }
263
- }
264
- exports.FileV3 = FileV3;
265
- class BackLookupV3 extends MetadataFieldV3 {
266
- // objectApiName: string; // TODO 由于下游提供仍是 api ID 版本,因此禁用
267
- // fieldApiName: string; // 由于下游提供仍是 api ID 版本,因此禁用
268
- constructor(field) {
269
- if (!field) {
270
- return;
271
- }
272
- super('backLookup', field);
273
- // TODO 由于下游提供仍是 api ID 版本,因此禁用
274
- // this.objectApiName = fieldsUtil.getBackLookupObjectApiName(field);
275
- // this.fieldApiName = fieldsUtil.getBackLookupFieldApiName(field); // TODO metadata返回值为空
276
- }
277
- }
278
- exports.BackLookupV3 = BackLookupV3;
279
- class CompositeTypeV3 extends MetadataFieldV3 {
280
- constructor(field) {
281
- if (!field) {
282
- return;
283
- }
284
- super('compositeType', field);
285
- this.required = field.required;
286
- this.multiple = fieldsUtil.getSettingsMultiple(field);
287
- this.compositeTypeApiName = fieldsUtil.getCompositeTypeApiName(field);
288
- // TODO 字段类型转换
289
- this.subFields = parseFieldsV3(fieldsUtil.getCompositeTypeSubFields(field));
290
- }
291
- }
292
- exports.CompositeTypeV3 = CompositeTypeV3;
293
- class ExtractSingleRecordV3 extends MetadataFieldV3 {
294
- constructor(field) {
295
- if (!field) {
296
- return;
297
- }
298
- super('extractSingleRecord', field);
299
- this.compositeTypeApiName = fieldsUtil.getCompositeTypeApiName(field);
300
- // TODO 字段类型转换
301
- this.subFields = parseFieldsV3(fieldsUtil.getCompositeTypeSubFields(field));
302
- this.filter = fieldsUtil.getSettingsFilterV3(field);
303
- this.sortConditions = fieldsUtil.getSettingsSort(field);
304
- this.recordPosition = fieldsUtil.getRecordPosition(field);
305
- }
306
- }
307
- exports.ExtractSingleRecordV3 = ExtractSingleRecordV3;
308
- function getCompositeTypeClass(field) {
309
- if (field && field.type && field.type.settings && field.type.settings.is_extract) {
310
- return ExtractSingleRecordV3;
311
- }
312
- return CompositeTypeV3;
313
- }
314
- function parseFieldsV3(inputFields) {
315
- if (!inputFields || !Array.isArray(inputFields)) {
316
- return [];
317
- }
318
- let fields = [];
319
- for (let field of inputFields) {
320
- const fieldClass = getFieldClassV3(field);
321
- if (!fieldClass) {
322
- continue;
323
- }
324
- fields.push(new fieldClass(field));
325
- }
326
- return fields;
327
- }
328
- exports.parseFieldsV3 = parseFieldsV3;
329
- function parseFieldV3(field) {
330
- const fieldClass = getFieldClassV3(field);
331
- if (fieldClass) {
332
- return new fieldClass(field);
333
- }
334
- return null;
335
- }
336
- exports.parseFieldV3 = parseFieldV3;
337
- function getFieldClassV3(field) {
338
- if (field && field.type && field.type.name) {
339
- if (field.type.name === 'compositeType') {
340
- return getCompositeTypeClass(field);
341
- }
342
- return type2fieldTypeV3[field.type.name];
343
- }
344
- return null;
345
- }
346
- exports.getFieldClassV3 = getFieldClassV3;
347
- const type2fieldTypeV3 = {
348
- 'text': KTextV3,
349
- 'multilingual': MultilingualV3,
350
- 'float': NumberV3,
351
- 'date': KDateV3,
352
- 'datetime': DateTimeV3,
353
- 'enum': OptionV3,
354
- 'email': EmailV3,
355
- 'phone': MobileNumberV3,
356
- 'boolean': BooleanV3,
357
- 'avatar': AvatarOrLogoV3,
358
- 'lookup': LookupV3,
359
- 'formula': FormulaV3,
360
- 'auto_number': AutoIDV3,
361
- 'reference_field': ReferenceFieldV3,
362
- 'attachment': FileV3,
363
- 'back_lookup': BackLookupV3,
364
- 'richText': RichTextV3,
365
- 'bigint': BigintV3,
366
- 'decimal': DecimalV3,
367
- 'rollup': RollupV3,
368
- 'region': RegionV3,
369
- };
@@ -1,11 +0,0 @@
1
- import { I18ns } from '../types/common';
2
- declare class Objects {
3
- label: I18ns;
4
- apiName: string;
5
- displayName: string;
6
- searchSupplementaryInfo: any[];
7
- searchableFields: any[];
8
- fields: any[];
9
- constructor(obj: Record<string, any>);
10
- }
11
- export { Objects as Object, };
@@ -1,20 +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.Object = void 0;
6
- const fields = require("./fields");
7
- class Objects {
8
- constructor(obj) {
9
- if (!obj) {
10
- return;
11
- }
12
- this.label = obj.label;
13
- this.apiName = obj.api_name;
14
- this.displayName = '';
15
- this.searchSupplementaryInfo = [];
16
- this.searchableFields = [];
17
- this.fields = fields.parseFields(obj.fields);
18
- }
19
- }
20
- exports.Object = Objects;
@@ -1,11 +0,0 @@
1
- export type I18n = {
2
- language_code: number;
3
- text: string;
4
- };
5
- export type I18ns = I18n[];
6
- export declare function isNullOrUndefined(param: any): boolean;
7
- export declare function transI18nsToMultilingualV3(i18ns: I18ns): MultilingualTypeV3;
8
- export interface MultilingualTypeV3 {
9
- zh_CN: string;
10
- en_US: string;
11
- }
@@ -1,33 +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.transI18nsToMultilingualV3 = exports.isNullOrUndefined = void 0;
6
- function isNullOrUndefined(param) {
7
- return param === null || param === undefined;
8
- }
9
- exports.isNullOrUndefined = isNullOrUndefined;
10
- function transI18nsToMultilingualV3(i18ns) {
11
- if (i18ns === null || i18ns === undefined) {
12
- return null;
13
- }
14
- let multilingual = { zh_CN: '', en_US: '' };
15
- for (const i18n of i18ns) {
16
- switch (i18n.language_code) {
17
- case languageCode.zh_CN:
18
- multilingual.zh_CN = i18n.text;
19
- break;
20
- case languageCode.en_US:
21
- multilingual.en_US = i18n.text;
22
- break;
23
- default:
24
- break;
25
- }
26
- }
27
- return multilingual;
28
- }
29
- exports.transI18nsToMultilingualV3 = transI18nsToMultilingualV3;
30
- const languageCode = {
31
- zh_CN: 2052,
32
- en_US: 1033,
33
- };
@@ -1,90 +0,0 @@
1
- import { I18ns } from './common';
2
- export type SelectFieldType = {
3
- fieldPath: {
4
- objectApiName: string;
5
- fieldApiName: string;
6
- }[];
7
- };
8
- export type FieldApiType = {
9
- type?: string;
10
- fieldApiName: string;
11
- alias?: I18ns;
12
- concatText?: {
13
- zh_CN?: Object[];
14
- en_US?: Object[];
15
- };
16
- color?: string;
17
- };
18
- export type UIMetaFilterType = {
19
- conditions: Object[];
20
- logic: string;
21
- };
22
- export type UIMetaSortConditionsType = {
23
- fieldApiName: string;
24
- sort: string;
25
- };
26
- export type DeskListTitleField = {
27
- fieldApiName: string;
28
- };
29
- export type DeskListSubtitleField = {
30
- type?: ('field' | 'concatText');
31
- fieldApiName: string;
32
- alias: I18ns;
33
- concatText?: {
34
- zh_CN: ConcatTextType[];
35
- en_US: ConcatTextType[];
36
- };
37
- };
38
- export type DeskListDetailField = {
39
- fieldApiName: string;
40
- alias: I18ns;
41
- };
42
- export type UIMetaDesktopType = {
43
- isCompositeType: boolean;
44
- titleAreaText: I18ns;
45
- objectApiName: string;
46
- titleFields: FieldApiType[];
47
- subtitleFields: FieldApiType[];
48
- detailFields: FieldApiType[];
49
- filter: UIMetaFilterType;
50
- sortConditions: UIMetaSortConditionsType[];
51
- };
52
- export type UIMetaLangType = {
53
- dataType: string;
54
- fieldApiName: string;
55
- text: string;
56
- };
57
- export type ConcatTextType = {
58
- dataType: 'fieldApiName' | 'text';
59
- fieldApiName: string;
60
- text: string;
61
- };
62
- export type UIMetaMobileType = {
63
- pageType?: ('app' | 'record_page');
64
- pageApiName: string;
65
- componentName: string;
66
- titleAreaText: I18ns;
67
- objectApiName: string;
68
- listItems: MobileListItem;
69
- filter: UIMetaFilterType;
70
- sortConditions: UIMetaSortConditionsType[];
71
- };
72
- export type MobileListField = {
73
- fieldApiName: string;
74
- hiddenWhenEmpty?: boolean;
75
- };
76
- export type MobileListItem = {
77
- avatar: {
78
- active: boolean;
79
- fieldApiName: string;
80
- };
81
- titleFields: {
82
- fieldApiName: string;
83
- }[];
84
- tagFields: {
85
- fieldApiName: string;
86
- color: 'grey' | 'blue' | 'cyan' | 'green' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'blueMagenta';
87
- }[];
88
- subtitleFields: MobileListField[];
89
- detailFields: MobileListField[];
90
- };
@@ -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 });