@lark-project/js-sdk 0.1.7 → 2.0.0-alpha.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.
- package/CHANGELOG.md +3 -0
- package/dist/es/index.js +70 -1
- package/dist/lib/index.js +73 -1
- package/dist/types/index.d.ts +137 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/es/index.js
CHANGED
|
@@ -212,6 +212,54 @@ _a9 = IMPL_KEY;
|
|
|
212
212
|
*/
|
|
213
213
|
Toast[_a9] = "toast";
|
|
214
214
|
|
|
215
|
+
// src/biz/ActionSheet.ts
|
|
216
|
+
var _a10;
|
|
217
|
+
var ActionSheet = class extends BaseModel {
|
|
218
|
+
/**
|
|
219
|
+
* @internal
|
|
220
|
+
*/
|
|
221
|
+
static load() {
|
|
222
|
+
throw new Error("not implemented");
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
_a10 = IMPL_KEY;
|
|
226
|
+
/**
|
|
227
|
+
* @internal
|
|
228
|
+
*/
|
|
229
|
+
ActionSheet[_a10] = "actionSheet";
|
|
230
|
+
|
|
231
|
+
// src/biz/Modal.ts
|
|
232
|
+
var _a11;
|
|
233
|
+
var Modal = class extends BaseModel {
|
|
234
|
+
/**
|
|
235
|
+
* @internal
|
|
236
|
+
*/
|
|
237
|
+
static load() {
|
|
238
|
+
throw new Error("not implemented");
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
_a11 = IMPL_KEY;
|
|
242
|
+
/**
|
|
243
|
+
* @internal
|
|
244
|
+
*/
|
|
245
|
+
Modal[_a11] = "modal";
|
|
246
|
+
|
|
247
|
+
// src/biz/Utils.ts
|
|
248
|
+
var _a12;
|
|
249
|
+
var Utils = class extends BaseModel {
|
|
250
|
+
/**
|
|
251
|
+
* @internal
|
|
252
|
+
*/
|
|
253
|
+
static load() {
|
|
254
|
+
throw new Error("not implemented");
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
_a12 = IMPL_KEY;
|
|
258
|
+
/**
|
|
259
|
+
* @internal
|
|
260
|
+
*/
|
|
261
|
+
Utils[_a12] = "utils";
|
|
262
|
+
|
|
215
263
|
// src/client.ts
|
|
216
264
|
function getImplClass(decl, impls) {
|
|
217
265
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -244,6 +292,24 @@ var _SDKClient = class {
|
|
|
244
292
|
get toast() {
|
|
245
293
|
return getImplValue(Toast, this._meegoBizHub);
|
|
246
294
|
}
|
|
295
|
+
/**
|
|
296
|
+
* 模态框
|
|
297
|
+
*/
|
|
298
|
+
get modal() {
|
|
299
|
+
return getImplValue(Modal, this._meegoBizHub);
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* 操作菜单
|
|
303
|
+
*/
|
|
304
|
+
get actionSheet() {
|
|
305
|
+
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
306
|
+
}
|
|
307
|
+
/**
|
|
308
|
+
* 工具方法
|
|
309
|
+
*/
|
|
310
|
+
get utils() {
|
|
311
|
+
return getImplValue(Utils, this._meegoBizHub);
|
|
312
|
+
}
|
|
247
313
|
/**
|
|
248
314
|
* 应用上下文
|
|
249
315
|
*/
|
|
@@ -300,7 +366,7 @@ var SDKClient = _SDKClient;
|
|
|
300
366
|
/**
|
|
301
367
|
* SDK 版本号
|
|
302
368
|
*/
|
|
303
|
-
SDKClient.version = "0.
|
|
369
|
+
SDKClient.version = "2.0.0-alpha.0";
|
|
304
370
|
|
|
305
371
|
// src/types/biz.ts
|
|
306
372
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -426,6 +492,7 @@ var OutOfLimitError = class extends CustomError {
|
|
|
426
492
|
// src/index.ts
|
|
427
493
|
var src_default = SDKClient;
|
|
428
494
|
export {
|
|
495
|
+
ActionSheet,
|
|
429
496
|
AttributeType,
|
|
430
497
|
ButtonScene,
|
|
431
498
|
Clipboard,
|
|
@@ -437,6 +504,7 @@ export {
|
|
|
437
504
|
InterceptionEvent,
|
|
438
505
|
InternalError,
|
|
439
506
|
MEEGO_BIZ_HUB,
|
|
507
|
+
Modal,
|
|
440
508
|
Navigation,
|
|
441
509
|
NoAuthError,
|
|
442
510
|
NodeStatus,
|
|
@@ -446,6 +514,7 @@ export {
|
|
|
446
514
|
Space,
|
|
447
515
|
Storage,
|
|
448
516
|
Toast,
|
|
517
|
+
Utils,
|
|
449
518
|
WorkItem,
|
|
450
519
|
WorkObject,
|
|
451
520
|
src_default as default
|
package/dist/lib/index.js
CHANGED
|
@@ -48,6 +48,7 @@ var __async = (__this, __arguments, generator) => {
|
|
|
48
48
|
// src/index.ts
|
|
49
49
|
var src_exports = {};
|
|
50
50
|
__export(src_exports, {
|
|
51
|
+
ActionSheet: () => ActionSheet,
|
|
51
52
|
AttributeType: () => AttributeType,
|
|
52
53
|
ButtonScene: () => ButtonScene,
|
|
53
54
|
Clipboard: () => Clipboard,
|
|
@@ -59,6 +60,7 @@ __export(src_exports, {
|
|
|
59
60
|
InterceptionEvent: () => InterceptionEvent,
|
|
60
61
|
InternalError: () => InternalError,
|
|
61
62
|
MEEGO_BIZ_HUB: () => MEEGO_BIZ_HUB,
|
|
63
|
+
Modal: () => Modal,
|
|
62
64
|
Navigation: () => Navigation,
|
|
63
65
|
NoAuthError: () => NoAuthError,
|
|
64
66
|
NodeStatus: () => NodeStatus,
|
|
@@ -68,6 +70,7 @@ __export(src_exports, {
|
|
|
68
70
|
Space: () => Space,
|
|
69
71
|
Storage: () => Storage,
|
|
70
72
|
Toast: () => Toast,
|
|
73
|
+
Utils: () => Utils,
|
|
71
74
|
WorkItem: () => WorkItem,
|
|
72
75
|
WorkObject: () => WorkObject,
|
|
73
76
|
default: () => src_default
|
|
@@ -258,6 +261,54 @@ _a9 = IMPL_KEY;
|
|
|
258
261
|
*/
|
|
259
262
|
Toast[_a9] = "toast";
|
|
260
263
|
|
|
264
|
+
// src/biz/ActionSheet.ts
|
|
265
|
+
var _a10;
|
|
266
|
+
var ActionSheet = class extends BaseModel {
|
|
267
|
+
/**
|
|
268
|
+
* @internal
|
|
269
|
+
*/
|
|
270
|
+
static load() {
|
|
271
|
+
throw new Error("not implemented");
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
_a10 = IMPL_KEY;
|
|
275
|
+
/**
|
|
276
|
+
* @internal
|
|
277
|
+
*/
|
|
278
|
+
ActionSheet[_a10] = "actionSheet";
|
|
279
|
+
|
|
280
|
+
// src/biz/Modal.ts
|
|
281
|
+
var _a11;
|
|
282
|
+
var Modal = class extends BaseModel {
|
|
283
|
+
/**
|
|
284
|
+
* @internal
|
|
285
|
+
*/
|
|
286
|
+
static load() {
|
|
287
|
+
throw new Error("not implemented");
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
_a11 = IMPL_KEY;
|
|
291
|
+
/**
|
|
292
|
+
* @internal
|
|
293
|
+
*/
|
|
294
|
+
Modal[_a11] = "modal";
|
|
295
|
+
|
|
296
|
+
// src/biz/Utils.ts
|
|
297
|
+
var _a12;
|
|
298
|
+
var Utils = class extends BaseModel {
|
|
299
|
+
/**
|
|
300
|
+
* @internal
|
|
301
|
+
*/
|
|
302
|
+
static load() {
|
|
303
|
+
throw new Error("not implemented");
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
_a12 = IMPL_KEY;
|
|
307
|
+
/**
|
|
308
|
+
* @internal
|
|
309
|
+
*/
|
|
310
|
+
Utils[_a12] = "utils";
|
|
311
|
+
|
|
261
312
|
// src/client.ts
|
|
262
313
|
function getImplClass(decl, impls) {
|
|
263
314
|
return impls == null ? void 0 : impls[decl[IMPL_KEY]];
|
|
@@ -290,6 +341,24 @@ var _SDKClient = class {
|
|
|
290
341
|
get toast() {
|
|
291
342
|
return getImplValue(Toast, this._meegoBizHub);
|
|
292
343
|
}
|
|
344
|
+
/**
|
|
345
|
+
* 模态框
|
|
346
|
+
*/
|
|
347
|
+
get modal() {
|
|
348
|
+
return getImplValue(Modal, this._meegoBizHub);
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* 操作菜单
|
|
352
|
+
*/
|
|
353
|
+
get actionSheet() {
|
|
354
|
+
return getImplValue(ActionSheet, this._meegoBizHub);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* 工具方法
|
|
358
|
+
*/
|
|
359
|
+
get utils() {
|
|
360
|
+
return getImplValue(Utils, this._meegoBizHub);
|
|
361
|
+
}
|
|
293
362
|
/**
|
|
294
363
|
* 应用上下文
|
|
295
364
|
*/
|
|
@@ -346,7 +415,7 @@ var SDKClient = _SDKClient;
|
|
|
346
415
|
/**
|
|
347
416
|
* SDK 版本号
|
|
348
417
|
*/
|
|
349
|
-
SDKClient.version = "0.
|
|
418
|
+
SDKClient.version = "2.0.0-alpha.0";
|
|
350
419
|
|
|
351
420
|
// src/types/biz.ts
|
|
352
421
|
var AttributeType = /* @__PURE__ */ ((AttributeType2) => {
|
|
@@ -473,6 +542,7 @@ var OutOfLimitError = class extends CustomError {
|
|
|
473
542
|
var src_default = SDKClient;
|
|
474
543
|
// Annotate the CommonJS export names for ESM import in node:
|
|
475
544
|
0 && (module.exports = {
|
|
545
|
+
ActionSheet,
|
|
476
546
|
AttributeType,
|
|
477
547
|
ButtonScene,
|
|
478
548
|
Clipboard,
|
|
@@ -484,6 +554,7 @@ var src_default = SDKClient;
|
|
|
484
554
|
InterceptionEvent,
|
|
485
555
|
InternalError,
|
|
486
556
|
MEEGO_BIZ_HUB,
|
|
557
|
+
Modal,
|
|
487
558
|
Navigation,
|
|
488
559
|
NoAuthError,
|
|
489
560
|
NodeStatus,
|
|
@@ -493,6 +564,7 @@ var src_default = SDKClient;
|
|
|
493
564
|
Space,
|
|
494
565
|
Storage,
|
|
495
566
|
Toast,
|
|
567
|
+
Utils,
|
|
496
568
|
WorkItem,
|
|
497
569
|
WorkObject
|
|
498
570
|
});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -921,6 +921,130 @@ declare abstract class Toast extends BaseModel {
|
|
|
921
921
|
abstract close(id: string): void;
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
+
/**
|
|
925
|
+
* ActionSheet 配置选项
|
|
926
|
+
*/
|
|
927
|
+
interface ActionSheetOptions {
|
|
928
|
+
/**
|
|
929
|
+
* 菜单列表
|
|
930
|
+
* 数量限制 1 至 6 个
|
|
931
|
+
*/
|
|
932
|
+
itemList: string[];
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* @mobile
|
|
936
|
+
* @public
|
|
937
|
+
* ActionSheet 动作菜单用于让用户选择操作
|
|
938
|
+
*/
|
|
939
|
+
declare abstract class ActionSheet extends BaseModel {
|
|
940
|
+
/**
|
|
941
|
+
* @internal
|
|
942
|
+
*/
|
|
943
|
+
protected static [IMPL_KEY]: string;
|
|
944
|
+
/**
|
|
945
|
+
* @internal
|
|
946
|
+
*/
|
|
947
|
+
private static load;
|
|
948
|
+
/**
|
|
949
|
+
* 打开操作菜单
|
|
950
|
+
* @param options
|
|
951
|
+
* @return
|
|
952
|
+
* tapIndex 用户点击的菜单位置
|
|
953
|
+
*/
|
|
954
|
+
abstract show(options: ActionSheetOptions): Promise<{
|
|
955
|
+
tapIndex: number;
|
|
956
|
+
}>;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Modal 展示配置
|
|
961
|
+
*/
|
|
962
|
+
interface ModalOptions {
|
|
963
|
+
/**
|
|
964
|
+
* 标题
|
|
965
|
+
* title 和 content 不可同时为空
|
|
966
|
+
*/
|
|
967
|
+
title?: string;
|
|
968
|
+
/**
|
|
969
|
+
* 内容
|
|
970
|
+
* title 和 content 不可同时为空
|
|
971
|
+
*/
|
|
972
|
+
content?: string;
|
|
973
|
+
/**
|
|
974
|
+
* 确认按钮文字
|
|
975
|
+
* 默认 ok
|
|
976
|
+
*/
|
|
977
|
+
confirmText?: string;
|
|
978
|
+
/**
|
|
979
|
+
* 是否展示取消按钮
|
|
980
|
+
* 默认 true
|
|
981
|
+
*/
|
|
982
|
+
showCancel?: boolean;
|
|
983
|
+
/**
|
|
984
|
+
* 取消按钮文字
|
|
985
|
+
* 默认 cancel
|
|
986
|
+
*/
|
|
987
|
+
cancelText?: string;
|
|
988
|
+
}
|
|
989
|
+
/**
|
|
990
|
+
* @public
|
|
991
|
+
* Modal 用于等待用户响应、告知用户重要信息或在不丢失上下文的情况下展示更多信息
|
|
992
|
+
*/
|
|
993
|
+
declare abstract class Modal extends BaseModel {
|
|
994
|
+
/**
|
|
995
|
+
* @internal
|
|
996
|
+
*/
|
|
997
|
+
protected static [IMPL_KEY]: string;
|
|
998
|
+
/**
|
|
999
|
+
* @internal
|
|
1000
|
+
*/
|
|
1001
|
+
private static load;
|
|
1002
|
+
/**
|
|
1003
|
+
* 打开模态框
|
|
1004
|
+
* @param options
|
|
1005
|
+
* @return
|
|
1006
|
+
* confirmed 点击了确认
|
|
1007
|
+
* conceled 点击了取消
|
|
1008
|
+
*/
|
|
1009
|
+
abstract show(options: string | ModalOptions): Promise<{
|
|
1010
|
+
confirmed: boolean;
|
|
1011
|
+
canceled: boolean;
|
|
1012
|
+
}>;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
/**
|
|
1016
|
+
* @mobile
|
|
1017
|
+
* @public
|
|
1018
|
+
* Utils
|
|
1019
|
+
*/
|
|
1020
|
+
declare abstract class Utils extends BaseModel {
|
|
1021
|
+
/**
|
|
1022
|
+
* @internal
|
|
1023
|
+
*/
|
|
1024
|
+
protected static [IMPL_KEY]: string;
|
|
1025
|
+
/**
|
|
1026
|
+
* @internal
|
|
1027
|
+
*/
|
|
1028
|
+
private static load;
|
|
1029
|
+
/**
|
|
1030
|
+
* 信息类型提示
|
|
1031
|
+
* @param apiList string[] 方法名列表
|
|
1032
|
+
* @returns
|
|
1033
|
+
* availableList string[] 可用方法名列表
|
|
1034
|
+
*/
|
|
1035
|
+
abstract canIUse(apiList: string[]): Promise<{
|
|
1036
|
+
availableList: string[];
|
|
1037
|
+
}>;
|
|
1038
|
+
/**
|
|
1039
|
+
* 获取用户身份授权码,用于 OpenAPI 换取 user_access_token
|
|
1040
|
+
* @returns
|
|
1041
|
+
* code 授权码
|
|
1042
|
+
*/
|
|
1043
|
+
abstract getAuthCode(): Promise<{
|
|
1044
|
+
code: string;
|
|
1045
|
+
}>;
|
|
1046
|
+
}
|
|
1047
|
+
|
|
924
1048
|
/**
|
|
925
1049
|
* @public
|
|
926
1050
|
* SDKClient 的配置项
|
|
@@ -954,6 +1078,18 @@ declare class SDKClient {
|
|
|
954
1078
|
* 提示
|
|
955
1079
|
*/
|
|
956
1080
|
get toast(): Toast;
|
|
1081
|
+
/**
|
|
1082
|
+
* 模态框
|
|
1083
|
+
*/
|
|
1084
|
+
get modal(): Modal;
|
|
1085
|
+
/**
|
|
1086
|
+
* 操作菜单
|
|
1087
|
+
*/
|
|
1088
|
+
get actionSheet(): ActionSheet;
|
|
1089
|
+
/**
|
|
1090
|
+
* 工具方法
|
|
1091
|
+
*/
|
|
1092
|
+
get utils(): Utils;
|
|
957
1093
|
/**
|
|
958
1094
|
* 应用上下文
|
|
959
1095
|
*/
|
|
@@ -1046,4 +1182,4 @@ declare class OutOfLimitError extends CustomError {
|
|
|
1046
1182
|
* @packageDocumentation
|
|
1047
1183
|
*/
|
|
1048
1184
|
|
|
1049
|
-
export { AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Context, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, InternalError, Language, MEEGO_BIZ_HUB, Navigation, NoAuthError, NodeStatus, NotFoundError, OutOfLimitError, PageFeatureContext, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, ViewFeatureContext, WorkItem, WorkItemCreateFormPreset, WorkObject, SDKClient as default, unwatch };
|
|
1185
|
+
export { ActionSheet, ActionSheetOptions, AttributeType, BizLine, BriefField, BriefNode, BriefSpace, BriefTemplate, BriefView, BriefWorkItem, BriefWorkObject, ButtonFeatureContext, ButtonScene, Clipboard, ColorScheme, Context, ControlFeatureContext, Field, FieldType, FlowMode, IMPL_KEY, IPluginCustomBuildConfig, IntegrationFeatureContext, InterceptionEvent, InterceptionFeatureContext, InternalError, Language, MEEGO_BIZ_HUB, Modal, ModalOptions, Navigation, NoAuthError, NodeStatus, NotFoundError, OutOfLimitError, PageFeatureContext, Role, RoleOwners, SDKClient, SDKClientOptions, Space, Storage, TabFeatureContext, Toast, ToastOptions, User, Utils, ViewFeatureContext, WorkItem, WorkItemCreateFormPreset, WorkObject, SDKClient as default, unwatch };
|