@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.
- package/README.md +7 -0
- package/application/application.d.ts +9 -7
- package/application/application.js +1 -0
- package/application/application.js.map +1 -0
- package/application/function/function.d.ts +1 -1
- package/application/function/function.js +1 -1
- package/application/function/function.js.map +1 -0
- package/application/impl/common.d.ts +1 -1
- package/application/impl/common.js +14 -12
- package/application/impl/common.js.map +1 -0
- package/application/impl/impl.d.ts +8 -6
- package/application/impl/impl.js +7 -4
- package/application/impl/impl.js.map +1 -0
- package/constants/constants.js +5 -4
- package/constants/constants.js.map +1 -0
- package/context/context.d.ts +8 -38
- package/context/context.js +3 -2
- package/context/context.js.map +1 -0
- package/context/db/db.d.ts +11 -19
- package/context/db/db.js +1 -0
- package/context/db/db.js.map +1 -0
- package/context/db/impl/IObject.d.ts +37 -37
- package/context/db/impl/IObject.js +1 -0
- package/context/db/impl/IObject.js.map +1 -0
- package/context/db/impl/db.d.ts +9 -9
- package/context/db/impl/db.js +7 -6
- package/context/db/impl/db.js.map +1 -0
- package/context/db/impl/object.js +48 -47
- package/context/db/impl/object.js.map +1 -0
- package/context/db/impl/oql/ioql.js +1 -0
- package/context/db/impl/oql/ioql.js.map +1 -0
- package/context/db/impl/oql/oql.d.ts +1 -1
- package/context/db/impl/oql/oql.js +1 -0
- package/context/db/impl/oql/oql.js.map +1 -0
- package/context/db/impl/order.js +2 -1
- package/context/db/impl/order.js.map +1 -0
- package/context/db/impl/propertiesStore.js +2 -1
- package/context/db/impl/propertiesStore.js.map +1 -0
- package/context/db/impl/queryBuilder.js +1 -0
- package/context/db/impl/queryBuilder.js.map +1 -0
- package/context/db/impl/transaction/index.d.ts +1 -1
- package/context/db/impl/transaction/index.js +47 -45
- package/context/db/impl/transaction/index.js.map +1 -0
- package/context/db/impl/transaction/operation.js +1 -0
- package/context/db/impl/transaction/operation.js.map +1 -0
- package/context/db/impl/transaction.d.ts +0 -5
- package/context/db/impl/transaction.js +1 -0
- package/context/db/impl/transaction.js.map +1 -0
- package/context/globalConfig/globalConfig.js +1 -0
- package/context/globalConfig/globalConfig.js.map +1 -0
- package/context/integration/IIntegration.d.ts +30 -0
- package/context/integration/IIntegration.js +5 -0
- package/context/integration/IIntegration.js.map +1 -0
- package/context/integration/impl/integration.d.ts +16 -0
- package/context/integration/impl/integration.js +63 -0
- package/context/integration/impl/integration.js.map +1 -0
- package/context/metadata/components/common.js +4 -3
- package/context/metadata/components/common.js.map +1 -0
- package/context/metadata/components/components.d.ts +4 -4
- package/context/metadata/components/components.js +1 -0
- package/context/metadata/components/components.js.map +1 -0
- package/context/metadata/components/desktop/list.d.ts +3 -3
- package/context/metadata/components/desktop/list.js +24 -23
- package/context/metadata/components/desktop/list.js.map +1 -0
- package/context/metadata/components/desktop/recordDetail.d.ts +2 -2
- package/context/metadata/components/desktop/recordDetail.js +1 -0
- package/context/metadata/components/desktop/recordDetail.js.map +1 -0
- package/context/metadata/components/mobile/list.d.ts +4 -4
- package/context/metadata/components/mobile/list.js +2 -1
- package/context/metadata/components/mobile/list.js.map +1 -0
- package/context/metadata/metadata.d.ts +5 -6
- package/context/metadata/metadata.js +6 -6
- package/context/metadata/metadata.js.map +1 -0
- package/context/metadata/objects/fields.d.ts +6 -6
- package/context/metadata/objects/fields.js +58 -57
- package/context/metadata/objects/fields.js.map +1 -0
- package/context/metadata/objects/fields.util.d.ts +3 -3
- package/context/metadata/objects/fields.util.js +22 -21
- package/context/metadata/objects/fields.util.js.map +1 -0
- package/context/metadata/objects/objects.d.ts +1 -1
- package/context/metadata/objects/objects.js +2 -1
- package/context/metadata/objects/objects.js.map +1 -0
- package/context/metadata/types/common.js +1 -0
- package/context/metadata/types/common.js.map +1 -0
- package/context/metadata/types/components.d.ts +5 -5
- package/context/metadata/types/components.js +1 -0
- package/context/metadata/types/components.js.map +1 -0
- package/context/metadata/types/objects.d.ts +88 -88
- package/context/metadata/types/objects.js +1 -0
- package/context/metadata/types/objects.js.map +1 -0
- package/context/msg/msg.d.ts +2 -2
- package/context/msg/msg.js +1 -0
- package/context/msg/msg.js.map +1 -0
- package/context/resources/IResources.d.ts +2 -2
- package/context/resources/IResources.js +1 -0
- package/context/resources/IResources.js.map +1 -0
- package/context/resources/impl/resources.d.ts +4 -4
- package/context/resources/impl/resources.js +4 -3
- package/context/resources/impl/resources.js.map +1 -0
- package/context/tasks/tasks.d.ts +3 -3
- package/context/tasks/tasks.js +6 -5
- package/context/tasks/tasks.js.map +1 -0
- package/data/index.d.ts +2 -2
- package/data/index.js +1 -0
- package/data/index.js.map +1 -0
- package/global/application/flow/flow.d.ts +85 -0
- package/global/application/flow/flow.js +3 -0
- package/global/application/flow/flow.js.map +1 -0
- package/global/global.d.ts +88 -0
- package/global/global.js +4 -0
- package/global/global.js.map +1 -0
- package/hooks/api.d.ts +12 -7
- package/hooks/api.js +29 -23
- package/hooks/api.js.map +1 -0
- package/hooks/hooks.js +42 -0
- package/hooks/hooks.js.map +1 -0
- package/kunlun/kunlun.d.ts +5 -5
- package/kunlun/kunlun.js +1 -0
- package/kunlun/kunlun.js.map +1 -0
- package/kunlun/operator/IOperator.d.ts +16 -16
- package/kunlun/operator/IOperator.js +1 -0
- package/kunlun/operator/IOperator.js.map +1 -0
- package/kunlun/operator/impl/expression.d.ts +2 -2
- package/kunlun/operator/impl/expression.js +6 -5
- package/kunlun/operator/impl/expression.js.map +1 -0
- package/kunlun/operator/impl/logic.js +49 -31
- package/kunlun/operator/impl/logic.js.map +1 -0
- package/kunlun/operator/impl/logicV2.d.ts +2 -2
- package/kunlun/operator/impl/logicV2.js +13 -13
- package/kunlun/operator/impl/logicV2.js.map +1 -0
- package/kunlun/operator/impl/operator.d.ts +17 -17
- package/kunlun/operator/impl/operator.js +39 -38
- package/kunlun/operator/impl/operator.js.map +1 -0
- package/kunlun/operator/impl/operatorV2.d.ts +17 -17
- package/kunlun/operator/impl/operatorV2.js +39 -38
- package/kunlun/operator/impl/operatorV2.js.map +1 -0
- package/lib/core.d.ts +3 -3
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -0
- package/log/app.access.log +0 -0
- package/log/app.call.log +0 -0
- package/log/app.log +0 -0
- package/package.json +2 -2
- package/request/common.d.ts +1 -1
- package/request/common.js +5 -3
- package/request/common.js.map +1 -0
- package/request/constants.d.ts +1 -1
- package/request/constants.js +7 -6
- package/request/constants.js.map +1 -0
- package/request/faasinfra.d.ts +1 -1
- package/request/faasinfra.js +42 -251
- package/request/faasinfra.js.map +1 -0
- package/request/innerapi.d.ts +12 -8
- package/request/innerapi.js +173 -57
- package/request/innerapi.js.map +1 -0
- package/request/interface.d.ts +68 -54
- package/request/interface.js +9 -9
- package/request/interface.js.map +1 -0
- package/request/openapi.d.ts +12 -8
- package/request/openapi.js +215 -149
- package/request/openapi.js.map +1 -0
- package/types/types.js +1 -0
- package/types/types.js.map +1 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I18ns } from
|
|
1
|
+
import { I18ns } from './common';
|
|
2
2
|
export interface BaseFieldType {
|
|
3
3
|
type: string;
|
|
4
4
|
apiName: string;
|
|
@@ -40,13 +40,13 @@ export type SubOptionType = {
|
|
|
40
40
|
label: I18ns;
|
|
41
41
|
apiName: string;
|
|
42
42
|
description: I18ns;
|
|
43
|
-
color: (
|
|
43
|
+
color: ('grey' | 'blue' | 'cyan' | 'green' | 'yellow' | 'orange' | 'red' | 'magenta' | 'purple' | 'blueMagenta');
|
|
44
44
|
active: boolean;
|
|
45
45
|
};
|
|
46
46
|
export interface OptionType extends BaseFieldType {
|
|
47
47
|
required: boolean;
|
|
48
48
|
multiple: boolean;
|
|
49
|
-
optionSource: (
|
|
49
|
+
optionSource: ('custom' | 'global');
|
|
50
50
|
globalOptionApiName: string;
|
|
51
51
|
optionList: SubOptionType[];
|
|
52
52
|
}
|
|
@@ -64,19 +64,19 @@ export interface Boolean extends BaseFieldType {
|
|
|
64
64
|
defaultValue: boolean;
|
|
65
65
|
}
|
|
66
66
|
export interface AvatarOrLogo extends BaseFieldType {
|
|
67
|
-
displayStyle: (
|
|
67
|
+
displayStyle: ('square' | 'round');
|
|
68
68
|
}
|
|
69
69
|
export interface SortConditionType {
|
|
70
70
|
fieldApiName: string;
|
|
71
|
-
sort: (
|
|
71
|
+
sort: ('asc' | 'desc');
|
|
72
72
|
}
|
|
73
73
|
type ConditionType = {
|
|
74
74
|
left: {
|
|
75
75
|
objectApiName: string;
|
|
76
76
|
fieldApiName: string;
|
|
77
77
|
};
|
|
78
|
-
operator: (
|
|
79
|
-
valueType: (
|
|
78
|
+
operator: ('eq' | 'neq' | 'in' | 'notIn' | 'empty' | 'notEmpty' | 'lte' | 'gte' | 'hasAllOf' | 'hasNoneOf' | 'hasAnyOf');
|
|
79
|
+
valueType: ('reference' | 'specified');
|
|
80
80
|
right: (object | string);
|
|
81
81
|
};
|
|
82
82
|
type CriterionType = {
|
|
@@ -95,7 +95,7 @@ export interface Lookup extends BaseFieldType {
|
|
|
95
95
|
multiple: boolean;
|
|
96
96
|
objectApiName: string;
|
|
97
97
|
hierarchy: boolean;
|
|
98
|
-
displayStyle: (
|
|
98
|
+
displayStyle: ('search' | 'dropDown' | 'tree');
|
|
99
99
|
sortConditions: SortConditionType[];
|
|
100
100
|
filter: FilterType[];
|
|
101
101
|
}
|
|
@@ -104,7 +104,7 @@ export interface FormulaType extends BaseFieldType {
|
|
|
104
104
|
formula: I18ns;
|
|
105
105
|
}
|
|
106
106
|
export interface AutoIDType extends BaseFieldType {
|
|
107
|
-
generateMethod: (
|
|
107
|
+
generateMethod: ('random' | 'incremental');
|
|
108
108
|
digitsNumber: number;
|
|
109
109
|
prefix: string;
|
|
110
110
|
suffix: string;
|
|
@@ -136,91 +136,91 @@ export interface ExtractSingleRecordType extends BaseFieldType {
|
|
|
136
136
|
recordPosition: number;
|
|
137
137
|
}
|
|
138
138
|
export type FieldType = {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
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
177
|
};
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
'options': {
|
|
179
|
+
'name': I18ns;
|
|
180
|
+
'api_name': string;
|
|
181
|
+
'description': I18ns;
|
|
182
|
+
'color_id': string;
|
|
183
|
+
'active': boolean;
|
|
184
184
|
}[];
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
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
210
|
}[];
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
211
|
+
'filter_record': {
|
|
212
|
+
'index': number;
|
|
213
|
+
'type': string;
|
|
214
214
|
};
|
|
215
|
-
|
|
215
|
+
'is_extract': boolean;
|
|
216
216
|
};
|
|
217
217
|
};
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
218
|
+
'unique_type': number;
|
|
219
|
+
'updated_at': number;
|
|
220
|
+
'updated_by': {
|
|
221
|
+
'avatar': object;
|
|
222
|
+
'id': number;
|
|
223
|
+
'name': string;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
226
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"objects.js","sourceRoot":"","sources":["objects.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+BAA+B"}
|
package/context/msg/msg.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as common from
|
|
1
|
+
import * as common from '@byted-apaas/server-common-node';
|
|
2
2
|
import Multilingual = common.fieldType.Multilingual;
|
|
3
|
-
export type _IconType =
|
|
3
|
+
export type _IconType = 'success' | 'error' | 'progress' | 'info';
|
|
4
4
|
export declare class _NotifyCenter {
|
|
5
5
|
/**
|
|
6
6
|
* 消息中心推送消息
|
package/context/msg/msg.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg.js","sourceRoot":"","sources":["msg.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+BAA+B;;;AAE/B,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { Stream } from
|
|
4
|
-
import { UploadFileResp } from
|
|
3
|
+
import { Stream } from 'stream';
|
|
4
|
+
import { UploadFileResp } from '../../request/interface';
|
|
5
5
|
export interface _FileInfo {
|
|
6
6
|
id: string;
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IResources.js","sourceRoot":"","sources":["IResources.ts"],"names":[],"mappings":""}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
|
-
import { Stream } from
|
|
4
|
-
import { _FileInfo, _IKunlunFile, _IOpenSDKFile, UploadAvatarResult, FileUploadResult } from
|
|
5
|
-
import * as Request from
|
|
6
|
-
import { AppCtx } from
|
|
3
|
+
import { Stream } from 'stream';
|
|
4
|
+
import { _FileInfo, _IKunlunFile, _IOpenSDKFile, UploadAvatarResult, FileUploadResult } from '../IResources';
|
|
5
|
+
import * as Request from '../../../request/interface';
|
|
6
|
+
import { AppCtx } from '../../../application/application';
|
|
7
7
|
export declare class _KunlunOpenSDKFile implements _IOpenSDKFile {
|
|
8
8
|
appCtx: AppCtx;
|
|
9
9
|
constructor(appCtx: AppCtx);
|
|
@@ -95,14 +95,14 @@ class _KunlunOpenSDKFile {
|
|
|
95
95
|
exports._KunlunOpenSDKFile = _KunlunOpenSDKFile;
|
|
96
96
|
class _KunlunFile {
|
|
97
97
|
async download(fileTokenOrInfo, filePath) {
|
|
98
|
-
if (typeof (fileTokenOrInfo) ===
|
|
98
|
+
if (typeof (fileTokenOrInfo) === 'string') {
|
|
99
99
|
return await Request.GetInstance().downloadFileByToken(fileTokenOrInfo, filePath);
|
|
100
100
|
}
|
|
101
|
-
else if (typeof (fileTokenOrInfo) ===
|
|
101
|
+
else if (typeof (fileTokenOrInfo) === 'object') {
|
|
102
102
|
if (!fileTokenOrInfo.id) {
|
|
103
103
|
throw new exceptions.InvalidParamError(`The value of fileInfo.id is empty`);
|
|
104
104
|
}
|
|
105
|
-
if (typeof (fileTokenOrInfo.id) !==
|
|
105
|
+
if (typeof (fileTokenOrInfo.id) !== 'string') {
|
|
106
106
|
throw new exceptions.InvalidParamError(`The type of fileInfo.id should be string, but ${typeof (fileTokenOrInfo)}`);
|
|
107
107
|
}
|
|
108
108
|
let tokenListStr = await Request.GetInstance().mGetFileToken([fileTokenOrInfo.id]);
|
|
@@ -159,3 +159,4 @@ class _Resources {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
exports._Resources = _Resources;
|
|
162
|
+
//# sourceMappingURL=resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["resources.ts"],"names":[],"mappings":";AAAA,sDAAsD;AACtD,+BAA+B;;;AAE/B,mCAAgC;AAEhC,sDAAsD;AACtD,6DAAoE;AACpE,0DAAyD;AAEzD,qEAAgE;AAEhE,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;AAErC,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzB,MAAa,kBAAkB;IAG3B,YAAY,MAAc;QACtB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAKD,KAAK,CAAC,MAAM,CAAC,QAAgB,EAAE,MAAgC;QAC3D,2BAA2B;QAC3B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;YAC9B,MAAM,IAAI,UAAU,CAA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BAAkB,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;CACJ;AAND,8CAMC;AAED;;GAEG;AACH,MAAa,UAAU;IAInB;QACI,IAAI,CAAC,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC;IAClC,CAAC;CAEJ;AARD,gCAQC"}
|
package/context/tasks/tasks.d.ts
CHANGED
|
@@ -25,9 +25,9 @@ export declare class Tasks<cf> {
|
|
|
25
25
|
* 创建分布式任务
|
|
26
26
|
* @param dataset 待处理数据组成的数组
|
|
27
27
|
* @param handlerFunc 用于处理数据集的全局函数的 API name
|
|
28
|
-
* @param progressCallbackFunc 任务进度发生变化时回调的全局函数的 API name,可通过传入
|
|
29
|
-
* @param completedCallbackFunc 任务完成时回调的全局函数的 API name,可通过传入
|
|
28
|
+
* @param progressCallbackFunc 任务进度发生变化时回调的全局函数的 API name,可通过传入 '' / null / undefined 跳过此步骤
|
|
29
|
+
* @param completedCallbackFunc 任务完成时回调的全局函数的 API name,可通过传入 '' / null / undefined 跳过此步骤
|
|
30
30
|
* @param options 高级配置参数,可选
|
|
31
31
|
*/
|
|
32
|
-
createDistributedTask(dataset: any[], handlerFunc: cf, progressCallbackFunc: cf |
|
|
32
|
+
createDistributedTask(dataset: any[], handlerFunc: cf, progressCallbackFunc: cf | '' | null | undefined, completedCallbackFunc: cf | '' | null | undefined, options?: _Options): Promise<number>;
|
|
33
33
|
}
|
package/context/tasks/tasks.js
CHANGED
|
@@ -75,8 +75,8 @@ class Tasks {
|
|
|
75
75
|
* 创建分布式任务
|
|
76
76
|
* @param dataset 待处理数据组成的数组
|
|
77
77
|
* @param handlerFunc 用于处理数据集的全局函数的 API name
|
|
78
|
-
* @param progressCallbackFunc 任务进度发生变化时回调的全局函数的 API name,可通过传入
|
|
79
|
-
* @param completedCallbackFunc 任务完成时回调的全局函数的 API name,可通过传入
|
|
78
|
+
* @param progressCallbackFunc 任务进度发生变化时回调的全局函数的 API name,可通过传入 '' / null / undefined 跳过此步骤
|
|
79
|
+
* @param completedCallbackFunc 任务完成时回调的全局函数的 API name,可通过传入 '' / null / undefined 跳过此步骤
|
|
80
80
|
* @param options 高级配置参数,可选
|
|
81
81
|
*/
|
|
82
82
|
async createDistributedTask(dataset, handlerFunc, progressCallbackFunc, completedCallbackFunc, options) {
|
|
@@ -84,7 +84,7 @@ class Tasks {
|
|
|
84
84
|
throw new exceptions.InvalidParamError("Local debugging isn't supported for distributed tasks. You can only deploy them to the cloud");
|
|
85
85
|
}
|
|
86
86
|
if (utils.getDistributedHandleMask()) {
|
|
87
|
-
throw new exceptions.InvalidParamError(
|
|
87
|
+
throw new exceptions.InvalidParamError('Does not support creating distributed tasks in handler function and progress callback function');
|
|
88
88
|
}
|
|
89
89
|
// dataset
|
|
90
90
|
if (!(dataset instanceof Array)) {
|
|
@@ -96,14 +96,14 @@ class Tasks {
|
|
|
96
96
|
}
|
|
97
97
|
// progressCallbackFunc
|
|
98
98
|
if (progressCallbackFunc === null || progressCallbackFunc === undefined) {
|
|
99
|
-
progressCallbackFunc =
|
|
99
|
+
progressCallbackFunc = '';
|
|
100
100
|
}
|
|
101
101
|
if (typeof progressCallbackFunc !== 'string') {
|
|
102
102
|
throw new exceptions.InvalidParamError(`parameter progressCallbackFunc is not string`);
|
|
103
103
|
}
|
|
104
104
|
// completedCallbackFunc
|
|
105
105
|
if (completedCallbackFunc === null || completedCallbackFunc === undefined) {
|
|
106
|
-
completedCallbackFunc =
|
|
106
|
+
completedCallbackFunc = '';
|
|
107
107
|
}
|
|
108
108
|
if (typeof completedCallbackFunc !== 'string') {
|
|
109
109
|
throw new exceptions.InvalidParamError(`parameter completedCallbackFunc is not string`);
|
|
@@ -137,3 +137,4 @@ class Tasks {
|
|
|
137
137
|
;
|
|
138
138
|
}
|
|
139
139
|
exports.Tasks = Tasks;
|
|
140
|
+
//# sourceMappingURL=tasks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["tasks.ts"],"names":[],"m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pC;QACD,IAAI,CAAC,OAAO,OAAO,CAAC,oBAAoB,KAAK,QAAQ,CAAC,IAAI,OAAO,CAAC,oBAAoB,IAAI,CAAC,IAAI,OAAO,CAAC,oBAAoB,GAAG,GAAG,EAAE;YAC/H,MAAM,IAAI,UAAU,CAAC,iBAAiB,CAAC,8EAA8E,CAAC,CAAC;SAC1H;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE;YACrB,OAAO,OAAO,CAAC,oBAAoB,EAAE,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAC;SAC9I;QACD,OAAO,OAAO,CAAC,oBAAoB,EAAE,CAAC,sBAAsB,CAAC,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAC/I,CAAC;IAAA,CAAC;CACL;AArID,sBAqIC"}
|
package/data/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export interface workflowVariables {
|
|
2
2
|
}
|
|
3
|
-
export type globalFuncNames =
|
|
3
|
+
export type globalFuncNames = 'a' | 'b';
|
|
4
4
|
export interface globalVariablesMap {
|
|
5
5
|
a: string;
|
|
6
6
|
b: string;
|
|
@@ -13,7 +13,7 @@ export interface metadataMap {
|
|
|
13
13
|
_user: User;
|
|
14
14
|
_department: Department;
|
|
15
15
|
}
|
|
16
|
-
export type currentObjApiName =
|
|
16
|
+
export type currentObjApiName = '_user';
|
|
17
17
|
interface User {
|
|
18
18
|
_name: string;
|
|
19
19
|
_id: number;
|
package/data/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAsC,CAAC;AAMtC,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export interface Flow {
|
|
2
|
+
/**
|
|
3
|
+
* 获取流程实例人工任务详情列表
|
|
4
|
+
* @param executionId
|
|
5
|
+
*/
|
|
6
|
+
getExecutionUserTaskInfo: (executionId: number) => Promise<FlowTaskInfo[]>;
|
|
7
|
+
/**
|
|
8
|
+
* 执行流程
|
|
9
|
+
* @param APIName 流程的 APIName
|
|
10
|
+
* @param options 流程执行选项
|
|
11
|
+
* - params 流程入参
|
|
12
|
+
* @constructor
|
|
13
|
+
*/
|
|
14
|
+
execute: (APIName: string, options?: ExecuteOptions) => Promise<ExecutionResult>;
|
|
15
|
+
/**
|
|
16
|
+
* 撤销流程实例 (仅支持撤销包含人工任务的流程实例)
|
|
17
|
+
* @param executionId 流程实例 Id
|
|
18
|
+
* @param options 撤销选项 reason: 多语原因
|
|
19
|
+
* @constructor
|
|
20
|
+
*/
|
|
21
|
+
revokeExecution: (executionId: number, options: RevokeExecutionOptions) => Promise<void>;
|
|
22
|
+
/**
|
|
23
|
+
* 获取流程实例信息
|
|
24
|
+
* @param executionId 流程实例 Id
|
|
25
|
+
* @constructor
|
|
26
|
+
*/
|
|
27
|
+
getExecutionInfo: (executionId: number) => Promise<ExecutionInfo>;
|
|
28
|
+
}
|
|
29
|
+
export interface Execution {
|
|
30
|
+
/**
|
|
31
|
+
* 流程实例 id (函数被流程调用时有值)
|
|
32
|
+
*/
|
|
33
|
+
id: number;
|
|
34
|
+
}
|
|
35
|
+
export interface ExecuteOptions {
|
|
36
|
+
params: Record<string, any>;
|
|
37
|
+
}
|
|
38
|
+
export interface ExecutionResult {
|
|
39
|
+
executionId: number;
|
|
40
|
+
status: ExecutionStatusType;
|
|
41
|
+
data: Record<string, any>;
|
|
42
|
+
errCode?: string;
|
|
43
|
+
errMsg?: string;
|
|
44
|
+
}
|
|
45
|
+
export type ExecutionStatusType = 'wait' | 'in_process' | 'end' | 'rejected' | 'canceled' | 'failed' | 'agreed';
|
|
46
|
+
export interface RevokeExecutionOptions {
|
|
47
|
+
reason?: NewMultilingual;
|
|
48
|
+
}
|
|
49
|
+
export interface ExecutionInfo {
|
|
50
|
+
status: ExecutionStatusType;
|
|
51
|
+
data: Record<string, any>;
|
|
52
|
+
errCode?: string;
|
|
53
|
+
errMsg?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface FlowTaskInfo {
|
|
56
|
+
taskId: number;
|
|
57
|
+
label: NewMultilingual;
|
|
58
|
+
taskType: TaskType;
|
|
59
|
+
taskStatus: TaskStatus;
|
|
60
|
+
opinionList: TaskOpinion[];
|
|
61
|
+
assigneeList: FlowUser[];
|
|
62
|
+
startedTime: number;
|
|
63
|
+
completedTime?: number;
|
|
64
|
+
}
|
|
65
|
+
export type TaskType = 'form' | 'approval' | 'CC';
|
|
66
|
+
export type TaskStatus = 'in_process' | 'completed' | 'canceled' | 'failed' | 'auto_end' | 'agreed' | 'rejected';
|
|
67
|
+
export interface NewMultilingual {
|
|
68
|
+
en_US?: string;
|
|
69
|
+
zh_CN?: string;
|
|
70
|
+
}
|
|
71
|
+
export interface FlowUserAvatar {
|
|
72
|
+
url: string;
|
|
73
|
+
}
|
|
74
|
+
export interface FlowUser {
|
|
75
|
+
userId: number;
|
|
76
|
+
feishuOpenId: string;
|
|
77
|
+
userName: NewMultilingual;
|
|
78
|
+
}
|
|
79
|
+
export interface TaskOpinion {
|
|
80
|
+
user: FlowUser;
|
|
81
|
+
feishuOpenId: number;
|
|
82
|
+
opinionResult?: string;
|
|
83
|
+
submitTime: number;
|
|
84
|
+
opinionContent?: string;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flow.js","sourceRoot":"","sources":["flow.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { IOperator } from '../kunlun/operator/IOperator';
|
|
2
|
+
import { GMTOffset as GMT } from '@byted-apaas/server-common-node/constants/timeZone';
|
|
3
|
+
import { area2code } from '@byted-apaas/server-common-node/constants/countryCode';
|
|
4
|
+
import * as common from '@byted-apaas/server-common-node';
|
|
5
|
+
import { Flow } from './application/flow/flow';
|
|
6
|
+
import { _Resources } from '../context/resources/impl/resources';
|
|
7
|
+
import { Message } from '../context/msg/msg';
|
|
8
|
+
import { _IIntegration } from '../context/integration/IIntegration';
|
|
9
|
+
declare global {
|
|
10
|
+
export namespace application {
|
|
11
|
+
/**
|
|
12
|
+
* 操作 flow
|
|
13
|
+
*/
|
|
14
|
+
let flow: Flow;
|
|
15
|
+
/**
|
|
16
|
+
* 静态资源类操作
|
|
17
|
+
*/
|
|
18
|
+
let resources: _Resources;
|
|
19
|
+
/**
|
|
20
|
+
* 向消息中心推送及更新消息
|
|
21
|
+
*/
|
|
22
|
+
let msg: Message;
|
|
23
|
+
/**
|
|
24
|
+
* 指令操作符
|
|
25
|
+
*/
|
|
26
|
+
let operator: IOperator;
|
|
27
|
+
/**
|
|
28
|
+
* 常量
|
|
29
|
+
*/
|
|
30
|
+
namespace constants {
|
|
31
|
+
/**
|
|
32
|
+
* 引用时区信息
|
|
33
|
+
*/
|
|
34
|
+
let GMTOffset: typeof GMT;
|
|
35
|
+
/**
|
|
36
|
+
* 引用国际区号
|
|
37
|
+
*/
|
|
38
|
+
let countryCode: typeof area2code;
|
|
39
|
+
/**
|
|
40
|
+
* 错误码
|
|
41
|
+
*/
|
|
42
|
+
const errorCode: {
|
|
43
|
+
RATE_LIMIT_ERROR: string;
|
|
44
|
+
Flows_NoPermission: string;
|
|
45
|
+
Flows_NotExist: string;
|
|
46
|
+
Flows_ExecutionNotExist: string;
|
|
47
|
+
Flows_NotSupportCallFlowType: string;
|
|
48
|
+
Flows_NotSupportRevokeFlow: string;
|
|
49
|
+
Flows_NoReqInputParamErr: string;
|
|
50
|
+
Flows_InvalidParamErr: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* 生成复杂数据结构
|
|
54
|
+
*/
|
|
55
|
+
namespace type {
|
|
56
|
+
export import Multilingual = common.fieldType.Multilingual;
|
|
57
|
+
export import Phone = common.fieldType.Phone;
|
|
58
|
+
export import Date = common.fieldType.Date;
|
|
59
|
+
export import DateTime = common.fieldType.DateTime;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* PublicAPI 功能
|
|
64
|
+
*/
|
|
65
|
+
namespace publicAPI {
|
|
66
|
+
/**
|
|
67
|
+
* 设置返回 header
|
|
68
|
+
* @param keyOrObject 要设置的 header 的 key 或对象
|
|
69
|
+
* @param value 要设置的 header 的 value,当 keyOrObject 为 key 时,该字段有效
|
|
70
|
+
*/
|
|
71
|
+
function setResponseHeader(keyOrObject: string | object, value?: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* 重定向
|
|
74
|
+
* @param location 目标 url
|
|
75
|
+
*/
|
|
76
|
+
function setRedirectLocation(location: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* 请求方法
|
|
79
|
+
*/
|
|
80
|
+
const method: string;
|
|
81
|
+
/**
|
|
82
|
+
* 请求头
|
|
83
|
+
*/
|
|
84
|
+
const headers: Record<string, string>;
|
|
85
|
+
}
|
|
86
|
+
const integration: _IIntegration;
|
|
87
|
+
}
|
|
88
|
+
}
|
package/global/global.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.js","sourceRoot":"","sources":["global.ts"],"names":[],"mappings":";;AAGA,0DAA0D"}
|