@lark-project/js-sdk 0.0.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.
@@ -0,0 +1,323 @@
1
+
2
+ /**
3
+ * MIT License
4
+ * Copyright (c) 2023 Lark Technologies Pte. Ltd.
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+ * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
7
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+ */
9
+
10
+ var __async = (__this, __arguments, generator) => {
11
+ return new Promise((resolve, reject) => {
12
+ var fulfilled = (value) => {
13
+ try {
14
+ step(generator.next(value));
15
+ } catch (e) {
16
+ reject(e);
17
+ }
18
+ };
19
+ var rejected = (value) => {
20
+ try {
21
+ step(generator.throw(value));
22
+ } catch (e) {
23
+ reject(e);
24
+ }
25
+ };
26
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
27
+ step((generator = generator.apply(__this, __arguments)).next());
28
+ });
29
+ };
30
+
31
+ // src/constants.ts
32
+ var MEEGO_BIZ_HUB = "__MEEGO_BIZ_HUB__";
33
+ var IMPL_KEY = "__MEEGO_SDK_IMPL_KEY__";
34
+
35
+ // src/model/BaseModel.ts
36
+ var BaseModel = class {
37
+ };
38
+ IMPL_KEY;
39
+
40
+ // src/context/HostEnv.ts
41
+ var _a;
42
+ var HostEnv = class extends BaseModel {
43
+ /**
44
+ * 当前区域
45
+ */
46
+ // abstract locale: Locale;
47
+ };
48
+ _a = IMPL_KEY;
49
+ /**
50
+ * @internal
51
+ */
52
+ HostEnv[_a] = "hostEnv";
53
+
54
+ // src/context/Session.ts
55
+ var _a2;
56
+ var Session = class extends BaseModel {
57
+ };
58
+ _a2 = IMPL_KEY;
59
+ /**
60
+ * @internal
61
+ */
62
+ Session[_a2] = "session";
63
+
64
+ // src/context/Cursor.ts
65
+ var _a3;
66
+ var Cursor = class extends BaseModel {
67
+ };
68
+ _a3 = IMPL_KEY;
69
+ /**
70
+ * @internal
71
+ */
72
+ Cursor[_a3] = "cursor";
73
+
74
+ // src/model/Space.ts
75
+ var _a4;
76
+ var Space = class extends BaseModel {
77
+ /**
78
+ * 加载空间模型
79
+ * @param id 空间唯一标识
80
+ * @returns 空间实例(Promise)
81
+ */
82
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
83
+ static load(id) {
84
+ throw new Error("not implemented");
85
+ }
86
+ // /**
87
+ // * 监听当前空间数据变化
88
+ // * @param callback
89
+ // */
90
+ // abstract watch(callback: (next: Space) => void): unwatch;
91
+ };
92
+ _a4 = IMPL_KEY;
93
+ /**
94
+ * @internal
95
+ */
96
+ Space[_a4] = "Space";
97
+
98
+ // src/model/WorkObject.ts
99
+ var _a5;
100
+ var WorkObject = class extends BaseModel {
101
+ /**
102
+ * 加载工作项对象模型
103
+ * @param params
104
+ * spaceId 空间唯一标识
105
+ * workObjectId 工作项对象唯一标识
106
+ */
107
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
108
+ static load(params) {
109
+ throw new Error("not implemented");
110
+ }
111
+ // /**
112
+ // * 监听当前工作项对象数据变化
113
+ // * @param callback
114
+ // */
115
+ // abstract watch(callback: (next: WorkObject) => void): unwatch;
116
+ };
117
+ _a5 = IMPL_KEY;
118
+ /**
119
+ * @internal
120
+ */
121
+ WorkObject[_a5] = "WorkObject";
122
+
123
+ // src/model/WorkItem.ts
124
+ var _a6;
125
+ var WorkItem = class extends BaseModel {
126
+ /**
127
+ * 加载工作项实例模型
128
+ * @param params
129
+ * spaceId 空间唯一标识
130
+ * workObjectId 工作项对象唯一标识
131
+ * workItemId 工作项实例唯一标识
132
+ */
133
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
134
+ static load(params) {
135
+ throw new Error("not implemented");
136
+ }
137
+ };
138
+ _a6 = IMPL_KEY;
139
+ /**
140
+ * @internal
141
+ */
142
+ WorkItem[_a6] = "WorkItem";
143
+
144
+ // src/model/Field.ts
145
+ var _a7;
146
+ var Field = class extends BaseModel {
147
+ /**
148
+ * 加载字段模型
149
+ * @param id 字段唯一标识
150
+ * spaceId 空间唯一标识
151
+ * workObjectId 工作项对象唯一标识
152
+ * fieldId 字段唯一标识
153
+ */
154
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
155
+ static load(params) {
156
+ throw new Error("not implemented");
157
+ }
158
+ /**
159
+ * 读取字段的高级配置
160
+ */
161
+ // abstract getAdvancedConfig<T extends FieldType>(): AdvancedConfigs[T];
162
+ };
163
+ _a7 = IMPL_KEY;
164
+ /**
165
+ * @internal
166
+ */
167
+ Field[_a7] = "Field";
168
+
169
+ // src/client.ts
170
+ function getImplClass(decl, impls) {
171
+ return impls == null ? void 0 : impls[decl[IMPL_KEY]];
172
+ }
173
+ function getImplValue(decl, impls) {
174
+ return impls == null ? void 0 : impls[decl[IMPL_KEY]];
175
+ }
176
+ var _SDKClient = class {
177
+ /**
178
+ * 宿主环境
179
+ */
180
+ get hostEnv() {
181
+ return getImplValue(HostEnv, this._meegoBizHub);
182
+ }
183
+ /**
184
+ * 当前会话状态,如当前登录用户
185
+ */
186
+ get session() {
187
+ return getImplValue(Session, this._meegoBizHub);
188
+ }
189
+ /**
190
+ * 当前页面状态集合,如详情页选中的节点
191
+ */
192
+ get cursor() {
193
+ return getImplValue(Cursor, this._meegoBizHub);
194
+ }
195
+ /**
196
+ * 空间
197
+ */
198
+ get Space() {
199
+ return getImplClass(Space, this._meegoBizHub);
200
+ }
201
+ /**
202
+ * 工作项配置
203
+ */
204
+ get WorkObject() {
205
+ return getImplClass(WorkObject, this._meegoBizHub);
206
+ }
207
+ /**
208
+ * 工作项
209
+ */
210
+ get WorkItem() {
211
+ return getImplClass(WorkItem, this._meegoBizHub);
212
+ }
213
+ /**
214
+ * 字段
215
+ */
216
+ get Field() {
217
+ return getImplClass(Field, this._meegoBizHub);
218
+ }
219
+ /**
220
+ * JSSDK 初始化配置
221
+ * @param options 配置项
222
+ * @returns sdk
223
+ */
224
+ config(options) {
225
+ return __async(this, null, function* () {
226
+ if (typeof __MEEGO_BIZ_HUB__ !== "function") {
227
+ throw new Error("The application does not support the sdk");
228
+ }
229
+ this._meegoBizHub = __MEEGO_BIZ_HUB__({
230
+ sdkVersion: _SDKClient.version
231
+ });
232
+ yield this._meegoBizHub.configure({
233
+ pluginId: options.pluginId,
234
+ isDebug: options.isDebug,
235
+ version: _SDKClient.version
236
+ });
237
+ return this;
238
+ });
239
+ }
240
+ };
241
+ var SDKClient = _SDKClient;
242
+ /**
243
+ * SDK 版本号
244
+ */
245
+ SDKClient.version = "0.0.23";
246
+
247
+ // src/types/biz.ts
248
+ var FieldType = /* @__PURE__ */ ((FieldType2) => {
249
+ FieldType2["unknown"] = "unknown";
250
+ FieldType2["text"] = "text";
251
+ FieldType2["richText"] = "multi-text";
252
+ FieldType2["select"] = "select";
253
+ FieldType2["multiSelect"] = "multi-select";
254
+ FieldType2["treeSelect"] = "treeSelect";
255
+ FieldType2["treeMultiSelect"] = "tree-multi-select";
256
+ FieldType2["radio"] = "radio";
257
+ FieldType2["user"] = "user";
258
+ FieldType2["multiUser"] = "multi-user";
259
+ FieldType2["date"] = "date";
260
+ FieldType2["dateRange"] = "schedule";
261
+ FieldType2["simpleVoting"] = "vote-boolean";
262
+ FieldType2["singleVoting"] = "vote-option";
263
+ FieldType2["multiVoting"] = "vote-option-multi";
264
+ FieldType2["link"] = "link";
265
+ FieldType2["number"] = "number";
266
+ FieldType2["attachment"] = "multi-file";
267
+ FieldType2["bool"] = "bool";
268
+ FieldType2["singleSignal"] = "signal";
269
+ FieldType2["multiSignal"] = "multi-signal";
270
+ FieldType2["compoundField"] = "compound_field";
271
+ FieldType2["workitemRelatedSelect"] = "workitem_related_select";
272
+ FieldType2["workitemRelatedMultiSelect"] = "workitem_related_multi_select";
273
+ return FieldType2;
274
+ })(FieldType || {});
275
+ var FlowMode = /* @__PURE__ */ ((FlowMode2) => {
276
+ FlowMode2["workFlow"] = "workflow";
277
+ FlowMode2["stateFlow"] = "stateflow";
278
+ return FlowMode2;
279
+ })(FlowMode || {});
280
+
281
+ // src/types/features.ts
282
+ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
283
+ ButtonScene2[ButtonScene2["workItem"] = 3] = "workItem";
284
+ ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
285
+ return ButtonScene2;
286
+ })(ButtonScene || {});
287
+ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
288
+ InterceptionEvent2[InterceptionEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
289
+ InterceptionEvent2[InterceptionEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
290
+ InterceptionEvent2[InterceptionEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
291
+ InterceptionEvent2[InterceptionEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
292
+ InterceptionEvent2[InterceptionEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
293
+ InterceptionEvent2[InterceptionEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
294
+ InterceptionEvent2[InterceptionEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
295
+ InterceptionEvent2[InterceptionEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
296
+ InterceptionEvent2[InterceptionEvent2["FinishNode"] = 2001] = "FinishNode";
297
+ InterceptionEvent2[InterceptionEvent2["DeleteNode"] = 2002] = "DeleteNode";
298
+ InterceptionEvent2[InterceptionEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
299
+ InterceptionEvent2[InterceptionEvent2["RollBackNode"] = 2004] = "RollBackNode";
300
+ InterceptionEvent2[InterceptionEvent2["EditSchedule"] = 2005] = "EditSchedule";
301
+ InterceptionEvent2[InterceptionEvent2["UpdateState"] = 3001] = "UpdateState";
302
+ return InterceptionEvent2;
303
+ })(InterceptionEvent || {});
304
+
305
+ // src/index.ts
306
+ var src_default = SDKClient;
307
+ export {
308
+ ButtonScene,
309
+ Cursor,
310
+ Field,
311
+ FieldType,
312
+ FlowMode,
313
+ HostEnv,
314
+ IMPL_KEY,
315
+ InterceptionEvent,
316
+ MEEGO_BIZ_HUB,
317
+ SDKClient,
318
+ Session,
319
+ Space,
320
+ WorkItem,
321
+ WorkObject,
322
+ src_default as default
323
+ };
@@ -0,0 +1,361 @@
1
+
2
+ /**
3
+ * MIT License
4
+ * Copyright (c) 2023 Lark Technologies Pte. Ltd.
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+ * The above copyright notice and this permission notice, shall be included in all copies or substantial portions of the Software.
7
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var __async = (__this, __arguments, generator) => {
28
+ return new Promise((resolve, reject) => {
29
+ var fulfilled = (value) => {
30
+ try {
31
+ step(generator.next(value));
32
+ } catch (e) {
33
+ reject(e);
34
+ }
35
+ };
36
+ var rejected = (value) => {
37
+ try {
38
+ step(generator.throw(value));
39
+ } catch (e) {
40
+ reject(e);
41
+ }
42
+ };
43
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
44
+ step((generator = generator.apply(__this, __arguments)).next());
45
+ });
46
+ };
47
+
48
+ // src/index.ts
49
+ var src_exports = {};
50
+ __export(src_exports, {
51
+ ButtonScene: () => ButtonScene,
52
+ Cursor: () => Cursor,
53
+ Field: () => Field,
54
+ FieldType: () => FieldType,
55
+ FlowMode: () => FlowMode,
56
+ HostEnv: () => HostEnv,
57
+ IMPL_KEY: () => IMPL_KEY,
58
+ InterceptionEvent: () => InterceptionEvent,
59
+ MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
60
+ SDKClient: () => SDKClient,
61
+ Session: () => Session,
62
+ Space: () => Space,
63
+ WorkItem: () => WorkItem,
64
+ WorkObject: () => WorkObject,
65
+ default: () => src_default
66
+ });
67
+ module.exports = __toCommonJS(src_exports);
68
+
69
+ // src/constants.ts
70
+ var MEEGO_BIZ_HUB = "__MEEGO_BIZ_HUB__";
71
+ var IMPL_KEY = "__MEEGO_SDK_IMPL_KEY__";
72
+
73
+ // src/model/BaseModel.ts
74
+ var BaseModel = class {
75
+ };
76
+ IMPL_KEY;
77
+
78
+ // src/context/HostEnv.ts
79
+ var _a;
80
+ var HostEnv = class extends BaseModel {
81
+ /**
82
+ * 当前区域
83
+ */
84
+ // abstract locale: Locale;
85
+ };
86
+ _a = IMPL_KEY;
87
+ /**
88
+ * @internal
89
+ */
90
+ HostEnv[_a] = "hostEnv";
91
+
92
+ // src/context/Session.ts
93
+ var _a2;
94
+ var Session = class extends BaseModel {
95
+ };
96
+ _a2 = IMPL_KEY;
97
+ /**
98
+ * @internal
99
+ */
100
+ Session[_a2] = "session";
101
+
102
+ // src/context/Cursor.ts
103
+ var _a3;
104
+ var Cursor = class extends BaseModel {
105
+ };
106
+ _a3 = IMPL_KEY;
107
+ /**
108
+ * @internal
109
+ */
110
+ Cursor[_a3] = "cursor";
111
+
112
+ // src/model/Space.ts
113
+ var _a4;
114
+ var Space = class extends BaseModel {
115
+ /**
116
+ * 加载空间模型
117
+ * @param id 空间唯一标识
118
+ * @returns 空间实例(Promise)
119
+ */
120
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
121
+ static load(id) {
122
+ throw new Error("not implemented");
123
+ }
124
+ // /**
125
+ // * 监听当前空间数据变化
126
+ // * @param callback
127
+ // */
128
+ // abstract watch(callback: (next: Space) => void): unwatch;
129
+ };
130
+ _a4 = IMPL_KEY;
131
+ /**
132
+ * @internal
133
+ */
134
+ Space[_a4] = "Space";
135
+
136
+ // src/model/WorkObject.ts
137
+ var _a5;
138
+ var WorkObject = class extends BaseModel {
139
+ /**
140
+ * 加载工作项对象模型
141
+ * @param params
142
+ * spaceId 空间唯一标识
143
+ * workObjectId 工作项对象唯一标识
144
+ */
145
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
146
+ static load(params) {
147
+ throw new Error("not implemented");
148
+ }
149
+ // /**
150
+ // * 监听当前工作项对象数据变化
151
+ // * @param callback
152
+ // */
153
+ // abstract watch(callback: (next: WorkObject) => void): unwatch;
154
+ };
155
+ _a5 = IMPL_KEY;
156
+ /**
157
+ * @internal
158
+ */
159
+ WorkObject[_a5] = "WorkObject";
160
+
161
+ // src/model/WorkItem.ts
162
+ var _a6;
163
+ var WorkItem = class extends BaseModel {
164
+ /**
165
+ * 加载工作项实例模型
166
+ * @param params
167
+ * spaceId 空间唯一标识
168
+ * workObjectId 工作项对象唯一标识
169
+ * workItemId 工作项实例唯一标识
170
+ */
171
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
172
+ static load(params) {
173
+ throw new Error("not implemented");
174
+ }
175
+ };
176
+ _a6 = IMPL_KEY;
177
+ /**
178
+ * @internal
179
+ */
180
+ WorkItem[_a6] = "WorkItem";
181
+
182
+ // src/model/Field.ts
183
+ var _a7;
184
+ var Field = class extends BaseModel {
185
+ /**
186
+ * 加载字段模型
187
+ * @param id 字段唯一标识
188
+ * spaceId 空间唯一标识
189
+ * workObjectId 工作项对象唯一标识
190
+ * fieldId 字段唯一标识
191
+ */
192
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
193
+ static load(params) {
194
+ throw new Error("not implemented");
195
+ }
196
+ /**
197
+ * 读取字段的高级配置
198
+ */
199
+ // abstract getAdvancedConfig<T extends FieldType>(): AdvancedConfigs[T];
200
+ };
201
+ _a7 = IMPL_KEY;
202
+ /**
203
+ * @internal
204
+ */
205
+ Field[_a7] = "Field";
206
+
207
+ // src/client.ts
208
+ function getImplClass(decl, impls) {
209
+ return impls == null ? void 0 : impls[decl[IMPL_KEY]];
210
+ }
211
+ function getImplValue(decl, impls) {
212
+ return impls == null ? void 0 : impls[decl[IMPL_KEY]];
213
+ }
214
+ var _SDKClient = class {
215
+ /**
216
+ * 宿主环境
217
+ */
218
+ get hostEnv() {
219
+ return getImplValue(HostEnv, this._meegoBizHub);
220
+ }
221
+ /**
222
+ * 当前会话状态,如当前登录用户
223
+ */
224
+ get session() {
225
+ return getImplValue(Session, this._meegoBizHub);
226
+ }
227
+ /**
228
+ * 当前页面状态集合,如详情页选中的节点
229
+ */
230
+ get cursor() {
231
+ return getImplValue(Cursor, this._meegoBizHub);
232
+ }
233
+ /**
234
+ * 空间
235
+ */
236
+ get Space() {
237
+ return getImplClass(Space, this._meegoBizHub);
238
+ }
239
+ /**
240
+ * 工作项配置
241
+ */
242
+ get WorkObject() {
243
+ return getImplClass(WorkObject, this._meegoBizHub);
244
+ }
245
+ /**
246
+ * 工作项
247
+ */
248
+ get WorkItem() {
249
+ return getImplClass(WorkItem, this._meegoBizHub);
250
+ }
251
+ /**
252
+ * 字段
253
+ */
254
+ get Field() {
255
+ return getImplClass(Field, this._meegoBizHub);
256
+ }
257
+ /**
258
+ * JSSDK 初始化配置
259
+ * @param options 配置项
260
+ * @returns sdk
261
+ */
262
+ config(options) {
263
+ return __async(this, null, function* () {
264
+ if (typeof __MEEGO_BIZ_HUB__ !== "function") {
265
+ throw new Error("The application does not support the sdk");
266
+ }
267
+ this._meegoBizHub = __MEEGO_BIZ_HUB__({
268
+ sdkVersion: _SDKClient.version
269
+ });
270
+ yield this._meegoBizHub.configure({
271
+ pluginId: options.pluginId,
272
+ isDebug: options.isDebug,
273
+ version: _SDKClient.version
274
+ });
275
+ return this;
276
+ });
277
+ }
278
+ };
279
+ var SDKClient = _SDKClient;
280
+ /**
281
+ * SDK 版本号
282
+ */
283
+ SDKClient.version = "0.0.23";
284
+
285
+ // src/types/biz.ts
286
+ var FieldType = /* @__PURE__ */ ((FieldType2) => {
287
+ FieldType2["unknown"] = "unknown";
288
+ FieldType2["text"] = "text";
289
+ FieldType2["richText"] = "multi-text";
290
+ FieldType2["select"] = "select";
291
+ FieldType2["multiSelect"] = "multi-select";
292
+ FieldType2["treeSelect"] = "treeSelect";
293
+ FieldType2["treeMultiSelect"] = "tree-multi-select";
294
+ FieldType2["radio"] = "radio";
295
+ FieldType2["user"] = "user";
296
+ FieldType2["multiUser"] = "multi-user";
297
+ FieldType2["date"] = "date";
298
+ FieldType2["dateRange"] = "schedule";
299
+ FieldType2["simpleVoting"] = "vote-boolean";
300
+ FieldType2["singleVoting"] = "vote-option";
301
+ FieldType2["multiVoting"] = "vote-option-multi";
302
+ FieldType2["link"] = "link";
303
+ FieldType2["number"] = "number";
304
+ FieldType2["attachment"] = "multi-file";
305
+ FieldType2["bool"] = "bool";
306
+ FieldType2["singleSignal"] = "signal";
307
+ FieldType2["multiSignal"] = "multi-signal";
308
+ FieldType2["compoundField"] = "compound_field";
309
+ FieldType2["workitemRelatedSelect"] = "workitem_related_select";
310
+ FieldType2["workitemRelatedMultiSelect"] = "workitem_related_multi_select";
311
+ return FieldType2;
312
+ })(FieldType || {});
313
+ var FlowMode = /* @__PURE__ */ ((FlowMode2) => {
314
+ FlowMode2["workFlow"] = "workflow";
315
+ FlowMode2["stateFlow"] = "stateflow";
316
+ return FlowMode2;
317
+ })(FlowMode || {});
318
+
319
+ // src/types/features.ts
320
+ var ButtonScene = /* @__PURE__ */ ((ButtonScene2) => {
321
+ ButtonScene2[ButtonScene2["workItem"] = 3] = "workItem";
322
+ ButtonScene2[ButtonScene2["workItemNode"] = 4] = "workItemNode";
323
+ return ButtonScene2;
324
+ })(ButtonScene || {});
325
+ var InterceptionEvent = /* @__PURE__ */ ((InterceptionEvent2) => {
326
+ InterceptionEvent2[InterceptionEvent2["CreateWorkItem"] = 1001] = "CreateWorkItem";
327
+ InterceptionEvent2[InterceptionEvent2["DeleteWorkItem"] = 1002] = "DeleteWorkItem";
328
+ InterceptionEvent2[InterceptionEvent2["BatchDeleteWorkItem"] = 1003] = "BatchDeleteWorkItem";
329
+ InterceptionEvent2[InterceptionEvent2["RecoveryWorkItem"] = 1004] = "RecoveryWorkItem";
330
+ InterceptionEvent2[InterceptionEvent2["AbortWorkItem"] = 1005] = "AbortWorkItem";
331
+ InterceptionEvent2[InterceptionEvent2["UpgradeTemplate"] = 1006] = "UpgradeTemplate";
332
+ InterceptionEvent2[InterceptionEvent2["BatchUpgradeTemplate"] = 1007] = "BatchUpgradeTemplate";
333
+ InterceptionEvent2[InterceptionEvent2["ExportWorkItem"] = 1008] = "ExportWorkItem";
334
+ InterceptionEvent2[InterceptionEvent2["FinishNode"] = 2001] = "FinishNode";
335
+ InterceptionEvent2[InterceptionEvent2["DeleteNode"] = 2002] = "DeleteNode";
336
+ InterceptionEvent2[InterceptionEvent2["RecoveryNode"] = 2003] = "RecoveryNode";
337
+ InterceptionEvent2[InterceptionEvent2["RollBackNode"] = 2004] = "RollBackNode";
338
+ InterceptionEvent2[InterceptionEvent2["EditSchedule"] = 2005] = "EditSchedule";
339
+ InterceptionEvent2[InterceptionEvent2["UpdateState"] = 3001] = "UpdateState";
340
+ return InterceptionEvent2;
341
+ })(InterceptionEvent || {});
342
+
343
+ // src/index.ts
344
+ var src_default = SDKClient;
345
+ // Annotate the CommonJS export names for ESM import in node:
346
+ 0 && (module.exports = {
347
+ ButtonScene,
348
+ Cursor,
349
+ Field,
350
+ FieldType,
351
+ FlowMode,
352
+ HostEnv,
353
+ IMPL_KEY,
354
+ InterceptionEvent,
355
+ MEEGO_BIZ_HUB,
356
+ SDKClient,
357
+ Session,
358
+ Space,
359
+ WorkItem,
360
+ WorkObject
361
+ });