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

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/application/application.d.ts +33 -0
  2. package/application/application.js +2 -0
  3. package/application/function/function.d.ts +14 -0
  4. package/application/function/function.js +20 -0
  5. package/application/impl/common.d.ts +2 -0
  6. package/application/impl/common.js +52 -0
  7. package/application/impl/impl.d.ts +19 -0
  8. package/application/impl/impl.js +45 -0
  9. package/common/structs.d.ts +15 -0
  10. package/common/structs.js +21 -0
  11. package/constants/constants.d.ts +13 -0
  12. package/constants/constants.js +18 -0
  13. package/context/context.d.ts +44 -0
  14. package/context/context.js +25 -0
  15. package/context/db/db.d.ts +110 -0
  16. package/context/db/db.js +2 -0
  17. package/context/db/impl/IObject.d.ts +303 -0
  18. package/context/db/impl/IObject.js +5 -0
  19. package/context/db/impl/IObjectV3.d.ts +239 -0
  20. package/context/db/impl/IObjectV3.js +5 -0
  21. package/context/db/impl/db.d.ts +62 -0
  22. package/context/db/impl/db.js +84 -0
  23. package/context/db/impl/dbV3.d.ts +35 -0
  24. package/context/db/impl/dbV3.js +50 -0
  25. package/context/db/impl/object.d.ts +123 -0
  26. package/context/db/impl/object.js +1008 -0
  27. package/context/db/impl/oql/ioql.d.ts +14 -0
  28. package/context/db/impl/oql/ioql.js +4 -0
  29. package/context/db/impl/oql/oql.d.ts +14 -0
  30. package/context/db/impl/oql/oql.js +39 -0
  31. package/context/db/impl/order.d.ts +9 -0
  32. package/context/db/impl/order.js +15 -0
  33. package/context/db/impl/propertiesStore.d.ts +8 -0
  34. package/context/db/impl/propertiesStore.js +29 -0
  35. package/context/db/impl/queryBuilder.d.ts +33 -0
  36. package/context/db/impl/queryBuilder.js +72 -0
  37. package/context/db/impl/transaction/index.d.ts +25 -0
  38. package/context/db/impl/transaction/index.js +300 -0
  39. package/context/db/impl/transaction/operation.d.ts +27 -0
  40. package/context/db/impl/transaction/operation.js +69 -0
  41. package/context/db/impl/transaction.d.ts +70 -0
  42. package/context/db/impl/transaction.js +4 -0
  43. package/context/globalConfig/globalConfig.d.ts +7 -0
  44. package/context/globalConfig/globalConfig.js +16 -0
  45. package/context/integration/IIntegration.d.ts +30 -0
  46. package/context/integration/IIntegration.js +4 -0
  47. package/context/integration/impl/integration.d.ts +16 -0
  48. package/context/integration/impl/integration.js +62 -0
  49. package/context/metadata/components/common.d.ts +6 -0
  50. package/context/metadata/components/common.js +17 -0
  51. package/context/metadata/components/components.d.ts +12 -0
  52. package/context/metadata/components/components.js +19 -0
  53. package/context/metadata/components/desktop/list.d.ts +16 -0
  54. package/context/metadata/components/desktop/list.js +402 -0
  55. package/context/metadata/components/desktop/recordDetail.d.ts +11 -0
  56. package/context/metadata/components/desktop/recordDetail.js +53 -0
  57. package/context/metadata/components/mobile/list.d.ts +24 -0
  58. package/context/metadata/components/mobile/list.js +145 -0
  59. package/context/metadata/metadata.d.ts +63 -0
  60. package/context/metadata/metadata.js +125 -0
  61. package/context/metadata/objects/fields.d.ts +158 -0
  62. package/context/metadata/objects/fields.js +369 -0
  63. package/context/metadata/objects/fields.util.d.ts +52 -0
  64. package/context/metadata/objects/fields.util.js +420 -0
  65. package/context/metadata/objects/fieldsV3.d.ts +159 -0
  66. package/context/metadata/objects/fieldsV3.js +369 -0
  67. package/context/metadata/objects/objects.d.ts +11 -0
  68. package/context/metadata/objects/objects.js +20 -0
  69. package/context/metadata/types/common.d.ts +11 -0
  70. package/context/metadata/types/common.js +33 -0
  71. package/context/metadata/types/components.d.ts +90 -0
  72. package/context/metadata/types/components.js +4 -0
  73. package/context/metadata/types/objects.d.ts +246 -0
  74. package/context/metadata/types/objects.js +4 -0
  75. package/context/metadata/types/objectsV3.d.ts +128 -0
  76. package/context/metadata/types/objectsV3.js +4 -0
  77. package/context/msg/msg.d.ts +38 -0
  78. package/context/msg/msg.js +35 -0
  79. package/context/resources/IResources.d.ts +68 -0
  80. package/context/resources/IResources.js +2 -0
  81. package/context/resources/impl/resources.d.ts +42 -0
  82. package/context/resources/impl/resources.js +161 -0
  83. package/context/tasks/tasks.d.ts +33 -0
  84. package/context/tasks/tasks.js +139 -0
  85. package/data/index.d.ts +27 -0
  86. package/data/index.js +4 -0
  87. package/global/application/flow/flow.d.ts +99 -0
  88. package/global/application/flow/flow.js +8 -0
  89. package/global/application/flow/impl/flow.d.ts +20 -0
  90. package/global/application/flow/impl/flow.js +56 -0
  91. package/global/application/globalVar/globalVar.d.ts +7 -0
  92. package/global/application/globalVar/globalVar.js +2 -0
  93. package/global/global.d.ts +70 -0
  94. package/global/global.js +3 -0
  95. package/hooks/api.d.ts +65 -0
  96. package/hooks/api.js +347 -0
  97. package/hooks/hooks.d.ts +1 -0
  98. package/hooks/hooks.js +107 -0
  99. package/kunlun/kunlun.d.ts +55 -0
  100. package/kunlun/kunlun.js +58 -0
  101. package/kunlun/operator/IOperator.d.ts +158 -0
  102. package/kunlun/operator/IOperator.js +4 -0
  103. package/kunlun/operator/impl/expression.d.ts +75 -0
  104. package/kunlun/operator/impl/expression.js +96 -0
  105. package/kunlun/operator/impl/logic.d.ts +68 -0
  106. package/kunlun/operator/impl/logic.js +573 -0
  107. package/kunlun/operator/impl/logicV2.d.ts +59 -0
  108. package/kunlun/operator/impl/logicV2.js +197 -0
  109. package/kunlun/operator/impl/operator.d.ts +179 -0
  110. package/kunlun/operator/impl/operator.js +222 -0
  111. package/kunlun/operator/impl/operatorV2.d.ts +180 -0
  112. package/kunlun/operator/impl/operatorV2.js +216 -0
  113. package/lib/core.d.ts +4 -0
  114. package/lib/core.js +19 -0
  115. package/package.json +1 -1
  116. package/request/common.d.ts +13 -0
  117. package/request/common.js +88 -0
  118. package/request/constants.d.ts +12 -0
  119. package/request/constants.js +29 -0
  120. package/request/faasinfra.d.ts +8 -0
  121. package/request/faasinfra.js +146 -0
  122. package/request/interface.d.ts +121 -0
  123. package/request/interface.js +30 -0
  124. package/request/openapi.d.ts +84 -0
  125. package/request/openapi.js +1533 -0
  126. package/request/structs.d.ts +99 -0
  127. package/request/structs.js +15 -0
  128. package/types/types.d.ts +79 -0
  129. package/types/types.js +4 -0
  130. package/version/version.d.ts +2 -0
  131. package/version/version.js +8 -0
@@ -0,0 +1,99 @@
1
+ export interface IApprovalInstanceListReq {
2
+ start_time?: number;
3
+ end_time?: number;
4
+ page_size?: number;
5
+ page_token?: string;
6
+ }
7
+ export interface IGetApprovalInstanceListResp {
8
+ approval_instance_ids: number[];
9
+ page_token: string;
10
+ count: number;
11
+ has_more: boolean;
12
+ }
13
+ export interface IGetApprovalInstanceResp {
14
+ approval_instance: {
15
+ id: number;
16
+ label: Record<string, string>;
17
+ initiator: number;
18
+ instance_start_time: number;
19
+ status: string;
20
+ tasks: {
21
+ id: number;
22
+ task_type: string;
23
+ task_status: string;
24
+ task_start_time: number;
25
+ task_end_time: number;
26
+ form_data: string;
27
+ approval_logic: string;
28
+ approvers: number[];
29
+ assigners: number[];
30
+ task_url: string;
31
+ }[];
32
+ comments: {
33
+ id: number;
34
+ commenter: number;
35
+ content: string;
36
+ create_at: number;
37
+ update_at: number;
38
+ }[];
39
+ };
40
+ }
41
+ export interface IApprovalInstanceReq {
42
+ includes: string;
43
+ }
44
+ export interface IApprovalInstanceListOptions {
45
+ startTime?: number;
46
+ endTime?: number;
47
+ pageSize?: number;
48
+ pageToken?: string;
49
+ }
50
+ export interface IApprovalInstanceList {
51
+ approvalInstanceIds: number[];
52
+ pageToken: string;
53
+ count: number;
54
+ hasMore: boolean;
55
+ }
56
+ export declare enum ApprovalInstanceStatus {
57
+ IN_PROCESS = "in_process",
58
+ AGREED = "agreed",
59
+ INPROCESS = "rejected",
60
+ CANCELED = "canceled",
61
+ FAILED = "failed",
62
+ COMPLETED = "completed",
63
+ UNSTARTED = "unstarted",
64
+ AUTO_END = "auto_end",
65
+ TERMINATED = "terminated"
66
+ }
67
+ export interface IApprovalInstance {
68
+ id: number;
69
+ label: Record<string, string>;
70
+ initiator: number;
71
+ instanceStartTime: number;
72
+ status: string;
73
+ tasks: IApprovalTask[];
74
+ comments: IApprovalComment[];
75
+ }
76
+ export interface IApprovalComment {
77
+ id: number;
78
+ commenter: number;
79
+ content: string;
80
+ createAt: number;
81
+ updateAt: number;
82
+ }
83
+ export interface IApprovalTask {
84
+ id: number;
85
+ taskType: string;
86
+ taskStatus: string;
87
+ taskStartTime: number;
88
+ taskEndTime: number;
89
+ formData: string;
90
+ approvalLogic: string;
91
+ approvers: number[];
92
+ assigners: number[];
93
+ taskURL: string;
94
+ }
95
+ export interface IGetApprovalInstanceOptions {
96
+ approvalInstanceId: number;
97
+ includeFormData?: boolean;
98
+ includeContent?: boolean;
99
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApprovalInstanceStatus = void 0;
4
+ var ApprovalInstanceStatus;
5
+ (function (ApprovalInstanceStatus) {
6
+ ApprovalInstanceStatus["IN_PROCESS"] = "in_process";
7
+ ApprovalInstanceStatus["AGREED"] = "agreed";
8
+ ApprovalInstanceStatus["INPROCESS"] = "rejected";
9
+ ApprovalInstanceStatus["CANCELED"] = "canceled";
10
+ ApprovalInstanceStatus["FAILED"] = "failed";
11
+ ApprovalInstanceStatus["COMPLETED"] = "completed";
12
+ ApprovalInstanceStatus["UNSTARTED"] = "unstarted";
13
+ ApprovalInstanceStatus["AUTO_END"] = "auto_end";
14
+ ApprovalInstanceStatus["TERMINATED"] = "terminated";
15
+ })(ApprovalInstanceStatus = exports.ApprovalInstanceStatus || (exports.ApprovalInstanceStatus = {}));
@@ -0,0 +1,79 @@
1
+ export type _BooleanCond<T> = {};
2
+ export type _LogicalCond<T> = {};
3
+ type _LookupCond = number | {
4
+ _id: number;
5
+ };
6
+ type _MultiLookupCond = _LookupCond[];
7
+ type PartialCompositeType<T> = Partial<{
8
+ [K in keyof T]: T[K] extends _LookupField[] ? _MultiLookupCond : T[K] extends _LookupField ? _LookupCond : Partial<T[K]>;
9
+ }>;
10
+ type _FieldCond<T> = T extends _LookupField[] ? _MultiLookupCond : T extends _LookupField ? _LookupCond : PartialCompositeType<T>;
11
+ type _FirstLevelFieldCond<T> = Partial<{
12
+ [K in keyof T]: T[K] extends _LookupField ? _FieldCond<T[K]> : T[K];
13
+ }>;
14
+ type _KCond<T> = Partial<{
15
+ [K in keyof T]: _FieldCond<T[K]> | _BooleanCond<T[K]> | _LogicalCond<T[K]>;
16
+ }>;
17
+ type _WhereKCond<T> = Partial<{
18
+ [K in keyof T]: _FirstLevelFieldCond<T[K]> | _BooleanCond<T[K]> | _LogicalCond<T[K]>;
19
+ }>;
20
+ export type _Cond<T> = _KCond<T> | _LogicalCond<Partial<T>>;
21
+ export type _WhereCond<T> = _WhereKCond<T> | _LogicalCond<Partial<T>>;
22
+ export type _Record<T> = {
23
+ [K in keyof T]: T[K] extends _LookupField ? _LookupFieldRet : T[K];
24
+ };
25
+ export type _CondRequireID<T> = _Cond<T> & {
26
+ _id: number | string;
27
+ };
28
+ interface _LookupFieldRet {
29
+ /**
30
+ * 名称:_id
31
+ *
32
+ * 类型:数字 / Number
33
+ *
34
+ * 格式:number
35
+ */
36
+ _id: number;
37
+ /**
38
+ * 名称:角色名 / _name
39
+ *
40
+ * 类型:文本 / Text | 多语 / Multilingual
41
+ *
42
+ * 格式:string | {language_code: 1033|2052, text: string}[]
43
+ */
44
+ _name: string | {
45
+ language_code: 1033 | 2052;
46
+ text: string;
47
+ }[];
48
+ is_deleted: boolean;
49
+ }
50
+ interface _LookupField {
51
+ _id: number;
52
+ }
53
+ import { metadataMap, currentObjApiName } from '../data/index';
54
+ /**
55
+ * target record 被使用于 workflow 场景下
56
+ */
57
+ export interface TargetRecord {
58
+ /**
59
+ * workflow 被触发时,原始的记录信息
60
+ */
61
+ original: metadataMap[currentObjApiName];
62
+ /**
63
+ * workflow 运行到当前位置的记录信息
64
+ */
65
+ proposed: metadataMap[currentObjApiName];
66
+ }
67
+ export interface TriggerOld {
68
+ /**
69
+ * 更新前的记录数据
70
+ */
71
+ old: metadataMap[currentObjApiName];
72
+ }
73
+ export interface TriggerNew {
74
+ /**
75
+ * 创建或更新后的记录数据
76
+ */
77
+ new: metadataMap[currentObjApiName];
78
+ }
79
+ export {};
package/types/types.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // Copyright 2022 ByteDance Ltd. and/or its affiliates
3
+ // SPDX-License-Identifier: MIT
4
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export declare const SDKName: any;
2
+ export declare const SDKVersion: any;
@@ -0,0 +1,8 @@
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.SDKVersion = exports.SDKName = void 0;
6
+ const packageJson = require('.././package.json');
7
+ exports.SDKName = packageJson.name;
8
+ exports.SDKVersion = packageJson.version;