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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/package.json +2 -2
  2. package/application/application.d.ts +0 -33
  3. package/application/application.js +0 -2
  4. package/application/function/function.d.ts +0 -14
  5. package/application/function/function.js +0 -20
  6. package/application/impl/common.d.ts +0 -2
  7. package/application/impl/common.js +0 -52
  8. package/application/impl/impl.d.ts +0 -19
  9. package/application/impl/impl.js +0 -45
  10. package/common/structs.d.ts +0 -15
  11. package/common/structs.js +0 -21
  12. package/constants/constants.d.ts +0 -13
  13. package/constants/constants.js +0 -18
  14. package/context/context.d.ts +0 -44
  15. package/context/context.js +0 -25
  16. package/context/db/db.d.ts +0 -110
  17. package/context/db/db.js +0 -2
  18. package/context/db/impl/IObject.d.ts +0 -303
  19. package/context/db/impl/IObject.js +0 -5
  20. package/context/db/impl/IObjectV3.d.ts +0 -239
  21. package/context/db/impl/IObjectV3.js +0 -5
  22. package/context/db/impl/db.d.ts +0 -62
  23. package/context/db/impl/db.js +0 -84
  24. package/context/db/impl/dbV3.d.ts +0 -35
  25. package/context/db/impl/dbV3.js +0 -50
  26. package/context/db/impl/object.d.ts +0 -123
  27. package/context/db/impl/object.js +0 -1008
  28. package/context/db/impl/oql/ioql.d.ts +0 -14
  29. package/context/db/impl/oql/ioql.js +0 -4
  30. package/context/db/impl/oql/oql.d.ts +0 -14
  31. package/context/db/impl/oql/oql.js +0 -39
  32. package/context/db/impl/order.d.ts +0 -9
  33. package/context/db/impl/order.js +0 -15
  34. package/context/db/impl/propertiesStore.d.ts +0 -8
  35. package/context/db/impl/propertiesStore.js +0 -29
  36. package/context/db/impl/queryBuilder.d.ts +0 -33
  37. package/context/db/impl/queryBuilder.js +0 -72
  38. package/context/db/impl/transaction/index.d.ts +0 -25
  39. package/context/db/impl/transaction/index.js +0 -300
  40. package/context/db/impl/transaction/operation.d.ts +0 -27
  41. package/context/db/impl/transaction/operation.js +0 -69
  42. package/context/db/impl/transaction.d.ts +0 -70
  43. package/context/db/impl/transaction.js +0 -4
  44. package/context/globalConfig/globalConfig.d.ts +0 -7
  45. package/context/globalConfig/globalConfig.js +0 -16
  46. package/context/integration/IIntegration.d.ts +0 -30
  47. package/context/integration/IIntegration.js +0 -4
  48. package/context/integration/impl/integration.d.ts +0 -16
  49. package/context/integration/impl/integration.js +0 -62
  50. package/context/metadata/components/common.d.ts +0 -6
  51. package/context/metadata/components/common.js +0 -17
  52. package/context/metadata/components/components.d.ts +0 -12
  53. package/context/metadata/components/components.js +0 -19
  54. package/context/metadata/components/desktop/list.d.ts +0 -16
  55. package/context/metadata/components/desktop/list.js +0 -402
  56. package/context/metadata/components/desktop/recordDetail.d.ts +0 -11
  57. package/context/metadata/components/desktop/recordDetail.js +0 -53
  58. package/context/metadata/components/mobile/list.d.ts +0 -24
  59. package/context/metadata/components/mobile/list.js +0 -145
  60. package/context/metadata/metadata.d.ts +0 -63
  61. package/context/metadata/metadata.js +0 -125
  62. package/context/metadata/objects/fields.d.ts +0 -158
  63. package/context/metadata/objects/fields.js +0 -369
  64. package/context/metadata/objects/fields.util.d.ts +0 -52
  65. package/context/metadata/objects/fields.util.js +0 -420
  66. package/context/metadata/objects/fieldsV3.d.ts +0 -159
  67. package/context/metadata/objects/fieldsV3.js +0 -369
  68. package/context/metadata/objects/objects.d.ts +0 -11
  69. package/context/metadata/objects/objects.js +0 -20
  70. package/context/metadata/types/common.d.ts +0 -11
  71. package/context/metadata/types/common.js +0 -33
  72. package/context/metadata/types/components.d.ts +0 -90
  73. package/context/metadata/types/components.js +0 -4
  74. package/context/metadata/types/objects.d.ts +0 -246
  75. package/context/metadata/types/objects.js +0 -4
  76. package/context/metadata/types/objectsV3.d.ts +0 -128
  77. package/context/metadata/types/objectsV3.js +0 -4
  78. package/context/msg/msg.d.ts +0 -38
  79. package/context/msg/msg.js +0 -35
  80. package/context/resources/IResources.d.ts +0 -68
  81. package/context/resources/IResources.js +0 -2
  82. package/context/resources/impl/resources.d.ts +0 -42
  83. package/context/resources/impl/resources.js +0 -161
  84. package/context/tasks/tasks.d.ts +0 -33
  85. package/context/tasks/tasks.js +0 -139
  86. package/data/index.d.ts +0 -27
  87. package/data/index.js +0 -4
  88. package/global/application/flow/flow.d.ts +0 -99
  89. package/global/application/flow/flow.js +0 -8
  90. package/global/application/flow/impl/flow.d.ts +0 -20
  91. package/global/application/flow/impl/flow.js +0 -56
  92. package/global/application/globalVar/globalVar.d.ts +0 -7
  93. package/global/application/globalVar/globalVar.js +0 -2
  94. package/global/global.d.ts +0 -70
  95. package/global/global.js +0 -3
  96. package/hooks/api.d.ts +0 -65
  97. package/hooks/api.js +0 -347
  98. package/hooks/hooks.d.ts +0 -1
  99. package/hooks/hooks.js +0 -107
  100. package/kunlun/kunlun.d.ts +0 -55
  101. package/kunlun/kunlun.js +0 -58
  102. package/kunlun/operator/IOperator.d.ts +0 -158
  103. package/kunlun/operator/IOperator.js +0 -4
  104. package/kunlun/operator/impl/expression.d.ts +0 -75
  105. package/kunlun/operator/impl/expression.js +0 -96
  106. package/kunlun/operator/impl/logic.d.ts +0 -68
  107. package/kunlun/operator/impl/logic.js +0 -573
  108. package/kunlun/operator/impl/logicV2.d.ts +0 -59
  109. package/kunlun/operator/impl/logicV2.js +0 -197
  110. package/kunlun/operator/impl/operator.d.ts +0 -179
  111. package/kunlun/operator/impl/operator.js +0 -222
  112. package/kunlun/operator/impl/operatorV2.d.ts +0 -180
  113. package/kunlun/operator/impl/operatorV2.js +0 -216
  114. package/lib/core.d.ts +0 -4
  115. package/lib/core.js +0 -19
  116. package/request/common.d.ts +0 -13
  117. package/request/common.js +0 -88
  118. package/request/constants.d.ts +0 -12
  119. package/request/constants.js +0 -29
  120. package/request/faasinfra.d.ts +0 -8
  121. package/request/faasinfra.js +0 -146
  122. package/request/interface.d.ts +0 -121
  123. package/request/interface.js +0 -30
  124. package/request/openapi.d.ts +0 -84
  125. package/request/openapi.js +0 -1529
  126. package/request/structs.d.ts +0 -99
  127. package/request/structs.js +0 -15
  128. package/types/types.d.ts +0 -79
  129. package/types/types.js +0 -4
  130. package/version/version.d.ts +0 -2
  131. package/version/version.js +0 -8
@@ -1,146 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FaaSInfraRequest = void 0;
4
- const common = require("@byted-apaas/server-common-node");
5
- const headers = common.constants.headers;
6
- const commonHttp = common.http;
7
- const faasinfra = common.http.faasinfra;
8
- const faasinfraHttpPath = common.http.faasinfraHttpPath;
9
- const replaceKeys = common.http.replaceKeys;
10
- const exceptions = common.exceptions;
11
- const utils = common.utils;
12
- // eslint-disable-next-line @typescript-eslint/no-require-imports
13
- const nodeCls = require('node-cls'); //nolint:byted_s_ts_no_require_imports
14
- const loopMasksKey = headers.loopMasksKey;
15
- const loopCtxKey = headers.loopCtxKey;
16
- const url_1 = require("url");
17
- const exceptions_1 = require("@byted-apaas/server-common-node/utils/exceptions");
18
- class FaaSInfraRequest {
19
- constructor() {
20
- }
21
- async createDistributeTaskV1(dataset, handlerFunc, progressCallbackFunc, completedCallbackFunc, options) {
22
- // 1.获取 options
23
- let config = commonHttp.getOptions(null, faasinfraHttpPath.createDistributedTask);
24
- // 2.构造url
25
- let urlPath = config._reqPath.replace(replaceKeys.namespace, utils.getNamespaceFromCtx());
26
- // 3.请求
27
- config.json = {
28
- 'domainName': utils.getTenantNameFromCtx(),
29
- 'namespace': utils.getNamespaceFromCtx(),
30
- 'userId': utils.getUserIDFromCtx(),
31
- dataset,
32
- handlerFunc,
33
- progressCallbackFunc,
34
- completedCallbackFunc,
35
- options,
36
- };
37
- let task_id = utils.getTriggerTaskID();
38
- if (task_id) {
39
- config.json[headers.triggerTaskId] = task_id;
40
- }
41
- let loopCtx = nodeCls.get(loopCtxKey);
42
- if (checkLoopCtx(loopCtx)) {
43
- config.json[loopMasksKey] = loopCtx.loopMasks;
44
- if (!utils.isMicroservice() && (handlerFunc !== '' && config.json[loopMasksKey].includes(utils.handleFuncName({}, handlerFunc))) ||
45
- (progressCallbackFunc !== '' && config.json[loopMasksKey].includes(utils.handleFuncName({}, progressCallbackFunc))) ||
46
- (completedCallbackFunc !== '' && config.json[loopMasksKey].includes(utils.handleFuncName({}, completedCallbackFunc)))) {
47
- throw new exceptions.InvalidParamError('Task execution forms a loop.');
48
- }
49
- }
50
- return await faasinfra.doRequest(null, urlPath, config);
51
- }
52
- async createDistributeTaskV2(dataset, handlerFunc, progressCallbackFunc, completedCallbackFunc, options) {
53
- // 1.获取 options
54
- let config = commonHttp.getOptions(null, faasinfraHttpPath.createDistributedTaskV2);
55
- // 2.构造url
56
- let urlPath = config._reqPath.replace(replaceKeys.namespace, utils.getNamespaceFromCtx());
57
- // 3.请求
58
- config.json = {
59
- 'domainName': utils.getTenantNameFromCtx(),
60
- 'namespace': utils.getNamespaceFromCtx(),
61
- 'userId': utils.getUserIDFromCtx(),
62
- dataset,
63
- handlerFunc,
64
- progressCallbackFunc,
65
- completedCallbackFunc,
66
- options,
67
- 'extra': getDebugExtraInfo(),
68
- };
69
- let task_id = utils.getTriggerTaskID();
70
- if (task_id) {
71
- config.json[headers.triggerTaskId] = task_id;
72
- }
73
- let loopCtx = nodeCls.get(loopCtxKey);
74
- if (checkLoopCtx(loopCtx)) {
75
- config.json[loopMasksKey] = loopCtx.loopMasks;
76
- if ((handlerFunc !== '' && config.json[loopMasksKey].includes(handlerFunc)) ||
77
- (progressCallbackFunc !== '' && config.json[loopMasksKey].includes(progressCallbackFunc)) ||
78
- (completedCallbackFunc !== '' && config.json[loopMasksKey].includes(completedCallbackFunc))) {
79
- throw new exceptions.InvalidParamError(`Task execution forms a loop.`);
80
- }
81
- }
82
- return await faasinfra.doRequest(null, urlPath, config);
83
- }
84
- async invokeMicroserviceSync(apiName, path, method, body) {
85
- let reqPath = faasinfraHttpPath.invokeMicroserviceSync;
86
- let options = commonHttp.getOptions(null, reqPath);
87
- let urlPath = options._reqPath.replace(replaceKeys.namespace, utils.getNamespaceFromCtx());
88
- options.json = {
89
- 'microserviceId': apiName,
90
- path,
91
- method,
92
- 'query': parseQueryParams(path),
93
- };
94
- // 处理 body 参数
95
- if (method.toUpperCase() !== 'GET') {
96
- options.json.body = JSON.stringify(body);
97
- }
98
- return await faasinfra.doRequest(null, urlPath, options);
99
- }
100
- async invokeMicroserviceAsync(apiName, path, method, body) {
101
- let reqPath = faasinfraHttpPath.invokeMicroserviceAsync;
102
- let options = commonHttp.getOptions(null, reqPath);
103
- let urlPath = options._reqPath.replace(replaceKeys.namespace, utils.getNamespaceFromCtx());
104
- options.json = {
105
- 'microserviceId': apiName,
106
- path,
107
- method,
108
- 'query': parseQueryParams(path),
109
- };
110
- // 处理 body 参数
111
- if (method.toUpperCase() !== 'GET') {
112
- options.json.body = JSON.stringify(body);
113
- }
114
- return await faasinfra.doRequest(null, urlPath, options);
115
- }
116
- }
117
- exports.FaaSInfraRequest = FaaSInfraRequest;
118
- function getDebugExtraInfo() {
119
- let extra = {
120
- 'FunctionFrameVersion': 'FunctionFrameV2',
121
- };
122
- if (utils.isDebug()) {
123
- extra.DebugInfo = utils.getDebugCode();
124
- }
125
- return extra;
126
- }
127
- function checkLoopCtx(reqCtx) {
128
- return reqCtx && reqCtx.loopMasks && Array.isArray(reqCtx.loopMasks);
129
- }
130
- function parseQueryParams(path) {
131
- let params = {};
132
- const url = new url_1.URL(path, 'https://aa.bb.cc');
133
- for (let [k, v] of url.searchParams.entries()) {
134
- if (typeof (k) !== 'string') {
135
- throw new exceptions_1.InternalError(`The type of k should be string, but ${typeof (k)}`);
136
- }
137
- if (typeof (v) !== 'string') {
138
- throw new exceptions_1.InternalError(`The type of v should be string, but ${typeof (v)}`);
139
- }
140
- params[k] = v.split(',');
141
- }
142
- if (Object.keys(params).length === 0) {
143
- return undefined;
144
- }
145
- return params;
146
- }
@@ -1,121 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { Criterion, CriterionV3 } from '../kunlun/operator/impl/logic';
4
- import { Stream } from 'stream';
5
- import { ExecutionInfo, ExecutionResult, RevokeExecutionOptions } from '@byted-apaas/server-common-node/context/workflow/workflow';
6
- import { AppCtx } from '../application/application';
7
- import { Order } from '../context/db/impl/order';
8
- import { IApprovalInstance, IApprovalInstanceList, IApprovalInstanceListOptions, IGetApprovalInstanceOptions } from "./structs";
9
- export declare function GetHttpInstance(): IInnerAPIRequest;
10
- export declare function GetInstance(): IInnerAPIRequest;
11
- export declare function GetFaaSInfraInstance(): IFaaSInfraRequest;
12
- export type UploadFileResp = {
13
- id: string;
14
- token: string;
15
- size: bigint;
16
- mime_type: string;
17
- name: string;
18
- };
19
- export type OrderV2 = {
20
- field: string;
21
- direction: string;
22
- type: string;
23
- };
24
- export type OpenSDKGetRecordsReq = {
25
- limit: number;
26
- offset: number;
27
- fields: string[];
28
- quickSearch?: string;
29
- filter: any[];
30
- sort: OrderV2[];
31
- count: boolean;
32
- };
33
- export type AppAccessToken = {
34
- expire: number;
35
- appAccessToken: string;
36
- appId: string;
37
- };
38
- export type TenantAccessToken = {
39
- expire: number;
40
- tenantAccessToken: string;
41
- appId: string;
42
- };
43
- export interface IInnerAPIRequest extends IInnerAPIBaseRequest, IInnerAPIOpenSDKRequest {
44
- }
45
- export interface IInnerAPIBaseRequest {
46
- createRecordBySync: (objectApiName: string, record: object, authType: string) => any;
47
- createRecordBySyncV3: (objectApiName: string, record: object, authType: string) => any;
48
- updateRecordBySync: (objectApiName: string, recordID: number, record: object, authType: string) => any;
49
- updateRecordBySyncV3: (objectApiName: string, recordID: string, record: object, authType: string) => any;
50
- deleteRecordBySync: (objectApiName: string, recordID: number, authType: string) => any;
51
- deleteRecordBySyncV3: (objectApiName: string, recordID: string, authType: string) => any;
52
- createRecordsByAsync: (objectApiName: string, records: object[], authType: string) => any;
53
- updateRecordsByAsync: (objectApiName: string, recordMap: Record<number, object>, authType: string) => any;
54
- deleteRecordsByAsync: (objectApiName: string, recordIDs: number[], authType: string) => any;
55
- createRecordsBySync: (objectApiName: string, records: object[], authType: string) => any;
56
- createRecordsBySyncV3: (objectApiName: string, records: object[], authType: string) => any;
57
- updateRecordsBySync: (objectApiName: string, recordMap: Record<number, object>, authType: string) => Promise<Record<number, string>>;
58
- updateRecordsBySyncV3: (objectApiName: string, recordMap: object[], authType: string) => Promise<Record<string, string>>;
59
- deleteRecordsBySync: (objectApiName: string, recordIDs: number[], authType: string) => Promise<Record<number, string>>;
60
- deleteRecordsBySyncV3: (objectApiName: string, recordIDs: string[], authType: string) => Promise<Record<string, string>>;
61
- getRecordsOrCountByCriterion: (objectApiName: string, criterion: string | Criterion, fuzzySearch: any, order: Order[], ignoreBackLookupField: boolean, fieldApiNames: string[], offset: number, limit: number, needCount: boolean, authType: string) => any;
62
- getRecordsV3OrCounByCriterion: (objectApiName: string, criterion: string | CriterionV3, quickQuery: string, quickQueryFields: string[], order: Order[], fieldApiNames: string[], offset: number, limit: number, needCount: boolean, authType: string) => any;
63
- updateWorkflowVariables: (ctx: any, instanceId: number, variables: object, variableTypes: object) => Promise<void>;
64
- uploadFile: (data: Stream, expire: number, fileName?: string) => Promise<UploadFileResp>;
65
- downloadFileByID: (fileID: string, filePath?: string) => Promise<Buffer | undefined>;
66
- downloadFileByToken: (fileToken: string, filePath?: string) => Promise<Buffer | undefined>;
67
- createMessage: (msg: any) => Promise<number>;
68
- updateMessage: (msgId: number, msg: any) => Promise<void>;
69
- getFields: (objectApiName: string) => Promise<any>;
70
- getField: (objectApiName: string, fieldApiName: string) => Promise<any>;
71
- terminateWorkflowInstance: (workflowInstanceId: number, operator: number, reason: string) => Promise<void>;
72
- modifyRecordsWithTransaction: (placeholders: Record<string, number>, operations: object[], authType: string, version: string) => Promise<Map<string, number>>;
73
- getGlobalConfigByKey: <valueT>(key: string) => Promise<valueT>;
74
- oql: (oql: string, args: any[], namedArgs: Record<string, any>, authType: string) => Promise<string | any[]>;
75
- invokeFuncSync: (idOrName: {
76
- APIId?: string;
77
- APIName?: string;
78
- isInvokeByAPIName: boolean;
79
- }, params: any) => Promise<any>;
80
- createAsyncTaskV1: (idOrName: {
81
- APIId?: string;
82
- APIName?: string;
83
- isInvokeByAPIName: boolean;
84
- }, params: any) => Promise<any>;
85
- createAsyncTaskV2: (name: string, params: any) => Promise<any>;
86
- getExecutionUserTaskInfo: (executionId: bigint) => Promise<any>;
87
- executeFlow: (APIName: string, options: any, async: any) => Promise<ExecutionResult>;
88
- revokeExecution: (executionId: number, revokeOptions: RevokeExecutionOptions) => Promise<void>;
89
- getExecutionInfo: (executionId: number) => Promise<ExecutionInfo>;
90
- getTenantInfo: (appCtx: AppCtx) => Promise<any>;
91
- mGetFileToken: (ids: string[]) => Promise<string>;
92
- getIntegrationAppAccessToken: (apiName: string) => Promise<AppAccessToken>;
93
- getIntegrationTenantAccessToken: (apiName: string) => Promise<TenantAccessToken>;
94
- getDefaultIntegrationAppAccessToken: () => Promise<AppAccessToken>;
95
- getDefaultIntegrationTenantAccessToken: () => Promise<TenantAccessToken>;
96
- getApprovalInstanceList: (options?: IApprovalInstanceListOptions) => Promise<IApprovalInstanceList>;
97
- getApprovalInstance: (options: IGetApprovalInstanceOptions) => Promise<IApprovalInstance>;
98
- }
99
- export interface IInnerAPIOpenSDKRequest {
100
- openSDKCreateRecordBySync: (objectApiName: string, record: object) => any;
101
- openSDKUpdateRecordBySync: (objectApiName: string, recordID: number, record: object) => any;
102
- openSDKDeleteRecordBySync: (objectApiName: string, recordID: number) => any;
103
- openSDKCreateRecordsBySync: (objectApiName: string, records: object[]) => any;
104
- openSDKUpdateRecordsBySync: (objectApiName: string, recordMap: Record<number, object>) => any;
105
- openSDKDeleteRecordsBySync: (objectApiName: string, recordIDs: number[]) => any;
106
- openSDKGetRecords: (objectApiName: string, param: OpenSDKGetRecordsReq) => any;
107
- openSDKUploadFile: (fileName: string, data: Buffer) => any;
108
- openSDKUploadAvatar: (fileName: string, data: Buffer) => any;
109
- openSDKDownloadAvatar: (imageID: string) => any;
110
- invokeFuncWithAuth: (idOrName: {
111
- APIId?: string;
112
- APIName?: string;
113
- isInvokeByAPIName: boolean;
114
- }, params: any) => Promise<any>;
115
- }
116
- export interface IFaaSInfraRequest {
117
- createDistributeTaskV1: (dataset: any, handlerFunc: string, progressCallbackFunc: string, completedCallbackFunc: string, options: any) => Promise<any>;
118
- createDistributeTaskV2: (dataset: any, handlerFunc: string, progressCallbackFunc: string, completedCallbackFunc: string, options: any) => Promise<any>;
119
- invokeMicroserviceSync: (apiName: string, path: string, method: string, body: any) => Promise<any>;
120
- invokeMicroserviceAsync: (apiName: string, path: string, method: string, body: any) => Promise<any>;
121
- }
@@ -1,30 +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.GetFaaSInfraInstance = exports.GetInstance = exports.GetHttpInstance = void 0;
6
- const openapi_1 = require("./openapi");
7
- const faasinfra_1 = require("./faasinfra");
8
- const version_1 = require("../version/version");
9
- const server_common_node_1 = require("@byted-apaas/server-common-node");
10
- const requestInstanceMap = {
11
- 'httpRequest': null,
12
- 'rpcRequest': null,
13
- };
14
- function GetHttpInstance() {
15
- if (!requestInstanceMap.httpRequest) {
16
- requestInstanceMap.httpRequest = new openapi_1.RequestHttp();
17
- // 设置 SDK 版本信息到请求上下文,用于埋点上报
18
- server_common_node_1.utils.setSDKInfo(version_1.SDKName, version_1.SDKVersion);
19
- }
20
- return requestInstanceMap.httpRequest;
21
- }
22
- exports.GetHttpInstance = GetHttpInstance;
23
- function GetInstance() {
24
- return GetHttpInstance();
25
- }
26
- exports.GetInstance = GetInstance;
27
- function GetFaaSInfraInstance() {
28
- return new faasinfra_1.FaaSInfraRequest();
29
- }
30
- exports.GetFaaSInfraInstance = GetFaaSInfraInstance;
@@ -1,84 +0,0 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- import { Stream } from 'stream';
4
- import { Order } from '../context/db/impl/order';
5
- import { Criterion, CriterionV3 } from '../kunlun/operator/impl/logic';
6
- import { IInnerAPIRequest, OpenSDKGetRecordsReq, UploadFileResp } from './interface';
7
- import { ExecutionInfo, ExecutionResult, RevokeExecutionOptions } from '@byted-apaas/server-common-node/context/workflow/workflow';
8
- import { AppCtx } from '../application/application';
9
- import { IApprovalInstance, IApprovalInstanceListOptions, IApprovalInstanceList, IGetApprovalInstanceOptions } from "./structs";
10
- export declare function updateWorkflowVariables(ctx: any, instanceId: number, variables: object, variableTypes: object): Promise<void>;
11
- export declare class RequestHttp implements IInnerAPIRequest {
12
- constructor();
13
- updateWorkflowVariables(ctx: any, instanceId: number, variables: object, variableTypes: object): any;
14
- createRecordBySync(objectApiName: string, record: object, authType: string): any;
15
- createRecordBySyncV3(objectApiName: string, record: object, authType: string): any;
16
- updateRecordBySync(objectApiName: string, recordID: number, record: object, authType: string): any;
17
- updateRecordBySyncV3(objectApiName: string, recordID: string, record: object, authType: string): any;
18
- deleteRecordBySync(objectApiName: string, recordID: number, authType: string): any;
19
- deleteRecordBySyncV3(objectApiName: string, recordID: string, authType: string): any;
20
- createRecordsByAsync(objectApiName: string, records: object[], authType: string): any;
21
- updateRecordsByAsync(objectApiName: string, recordMap: Record<number, object>, authType: string): any;
22
- deleteRecordsByAsync(objectApiName: string, recordIDs: number[], authType: string): any;
23
- createRecordsBySync(objectApiName: string, records: object[], authType: string): any;
24
- createRecordsBySyncV3(objectApiName: string, records: object[], authType: string): any;
25
- updateRecordsBySync(objectApiName: string, recordMap: Record<number, object>, authType: string): Promise<Record<number, string>>;
26
- updateRecordsBySyncV3(objectApiName: string, records: object[], authType: string): Promise<Record<string, string>>;
27
- deleteRecordsBySync(objectApiName: string, recordIDs: number[], authType: string): Promise<Record<number, string>>;
28
- deleteRecordsBySyncV3(objectApiName: string, recordIDs: string[], authType: string): Promise<Record<string, string>>;
29
- getRecordsOrCountByCriterion(objectApiName: string, criterion: string | Criterion, order: Order[], fuzzySearch: any, ignoreBackLookupField: boolean, fieldApiNames: string[], offset: number, limit: number, needCount: boolean, authType: string): any;
30
- getRecordsV3OrCounByCriterion(objectApiName: string, criterion: string | CriterionV3, quickQuery: string, quickQueryFields: string[], order: Order[], fieldApiNames: string[], offset: number, limit: number, needCount: boolean, authType: string): any;
31
- uploadFile(data: Stream, expire: number, fileName?: string): Promise<UploadFileResp>;
32
- downloadFileByID(fileID: string, filePath?: string): Promise<undefined | Buffer>;
33
- downloadFileByToken(fileToken: string, filePath?: string): Promise<Buffer | undefined>;
34
- createMessage(msg: any): Promise<number>;
35
- updateMessage(msgId: number, msg: any): Promise<void>;
36
- getFields(objectApiName: string): any;
37
- getField(objectApiName: string, fieldApiName: string): any;
38
- terminateWorkflowInstance(workflowInstanceId: number, operator: number, reason: string): any;
39
- modifyRecordsWithTransaction(placeholders: Record<string, number>, operations: object[], authType: string, version: string): Promise<Map<string, number>>;
40
- getGlobalConfigByKey<valueT>(key: string): Promise<valueT>;
41
- oql(oql: string, args: any[], namedArgs: Record<string, any>, authType: string): any;
42
- invokeFuncSync(idOrName: {
43
- APIId?: string;
44
- APIName?: string;
45
- isInvokeByAPIName: boolean;
46
- }, params: any): Promise<any>;
47
- invokeFuncWithAuth(idOrName: {
48
- APIId?: string;
49
- APIName?: string;
50
- isInvokeByAPIName: boolean;
51
- }, params: any): Promise<any>;
52
- createAsyncTaskV1(idOrName: {
53
- APIId?: string;
54
- APIName?: string;
55
- isInvokeByAPIName: boolean;
56
- }, params: any): Promise<any>;
57
- createAsyncTaskV2(name: string, params: any): Promise<any>;
58
- getExecutionUserTaskInfo(executionId: bigint): Promise<any>;
59
- executeFlow(apiName: string, options: any, async: any): Promise<ExecutionResult>;
60
- revokeExecution(executionId: number, revokeOptions: RevokeExecutionOptions): Promise<void>;
61
- getExecutionInfo(executionId: number): Promise<ExecutionInfo>;
62
- getTenantInfo(appCtx: AppCtx): Promise<any>;
63
- mGetFileToken(ids: string[]): Promise<string>;
64
- getIntegrationAppAccessToken(apiName: string): Promise<any>;
65
- getIntegrationTenantAccessToken(apiName: string): Promise<any>;
66
- getDefaultIntegrationAppAccessToken(): Promise<any>;
67
- getDefaultIntegrationTenantAccessToken(): Promise<any>;
68
- openSDKCreateRecordBySync(objectApiName: string, record: object): any;
69
- openSDKUpdateRecordBySync(objectApiName: string, recordID: number, record: object): any;
70
- openSDKDeleteRecordBySync(objectApiName: string, recordID: number): any;
71
- openSDKCreateRecordsBySync(objectApiName: string, records: object[]): any;
72
- openSDKUpdateRecordsBySync(objectApiName: string, recordMap: Record<number, object>): any;
73
- openSDKDeleteRecordsBySync(objectApiName: string, recordIDs: number[]): any;
74
- openSDKGetRecords(objectApiName: string, param: OpenSDKGetRecordsReq): Promise<any | number>;
75
- openSDKUploadFile(fileName: string, data: Buffer): any;
76
- openSDKUploadAvatar(fileName: string, data: Buffer): any;
77
- openSDKDownloadAvatar(imageID: string): Promise<Buffer>;
78
- getApprovalInstanceList(params?: IApprovalInstanceListOptions): Promise<IApprovalInstanceList>;
79
- getApprovalInstance(params: IGetApprovalInstanceOptions): Promise<IApprovalInstance>;
80
- }
81
- export declare function getExecutionUserTaskInfo(executionId: bigint): Promise<any>;
82
- export declare function executeFlow(apiName: string, option: any, async: any): Promise<ExecutionResult>;
83
- export declare function revokeExecution(executionId: number, revokeOptions: RevokeExecutionOptions): Promise<void>;
84
- export declare function getExecutionInfo(executionId: number): Promise<ExecutionInfo>;