@docoi/mys-sdk 1.0.0-beta.0 → 1.0.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/dist/index.mjs CHANGED
@@ -1,51 +1,391 @@
1
- import { a } from "./basic-C58euoyc.js";
2
- import { c as n, b as h, g as f, d as l, e as w, h as c, f as v, n as u, o as C, i as T, j as x, k as y, p as S, l as k, s as A, m as I, q as B, r as D, t as K, u as R, v as V, w as W, x as j } from "./basic-C58euoyc.js";
3
- import { a as e } from "./biz-BbTdssY5.js";
4
- import { g as H, b as J, l as P, o as q, s as G, c as L, t as M } from "./biz-BbTdssY5.js";
5
- import { b as s, s as o } from "./bridge-BsyNF-2c.js";
6
- import r from "@docoi/jsbridge-sdk";
7
- import { default as $ } from "@docoi/jsbridge-sdk";
8
- const g = {
9
- ...a,
10
- ...e,
11
- setDebug: o,
12
- bridge: s,
13
- JSBridgeSdk: r
1
+ import A from "@docoi/jsbridge-sdk";
2
+ import { default as Ee } from "@docoi/jsbridge-sdk";
3
+ const S = 0, v = -1, ae = 1001, I = 1002, Ce = 2002, Pe = 3002, be = 4002, qe = 9002;
4
+ function N(e) {
5
+ return {
6
+ code: S,
7
+ msg: "ok",
8
+ result: e
9
+ };
10
+ }
11
+ function w(e) {
12
+ if (typeof e == "string") return e;
13
+ if (e instanceof Error) return e.message || "system error";
14
+ if (h(e)) {
15
+ if (typeof e.errMsg == "string") return e.errMsg;
16
+ if (typeof e.msg == "string") return e.msg;
17
+ if (typeof e.message == "string") return e.message;
18
+ }
19
+ return "system error";
20
+ }
21
+ function O(e, t) {
22
+ return {
23
+ code: v,
24
+ msg: `${e}:fail ${w(t)}`,
25
+ result: h(t) && "result" in t ? t.result : t
26
+ };
27
+ }
28
+ const u = A.init({
29
+ debug: !1,
30
+ timeout: 9e4
31
+ }), Se = (e) => u.setDebug(e);
32
+ function H(e, t) {
33
+ return u.register(e, async (r) => {
34
+ try {
35
+ const o = await t(r);
36
+ return N(o);
37
+ } catch (o) {
38
+ return O(e, o);
39
+ }
40
+ });
41
+ }
42
+ function i(e, t, r) {
43
+ var f, s;
44
+ const o = {
45
+ errMsg: `${e}:fail parameter error: ${t}`,
46
+ errCode: I
47
+ };
48
+ return (f = r == null ? void 0 : r.fail) == null || f.call(r, o), (s = r == null ? void 0 : r.complete) == null || s.call(r, o), Promise.reject(o);
49
+ }
50
+ function _(e) {
51
+ return Object.fromEntries(
52
+ Object.entries(e).filter(([, r]) => typeof r != "function")
53
+ );
54
+ }
55
+ function h(e) {
56
+ return typeof e == "object" && e !== null && !Array.isArray(e);
57
+ }
58
+ function M(e) {
59
+ return h(e) && typeof e.code == "number";
60
+ }
61
+ function D(e) {
62
+ if (typeof e != "string") return e;
63
+ try {
64
+ return JSON.parse(e);
65
+ } catch {
66
+ return e;
67
+ }
68
+ }
69
+ function q(e, t) {
70
+ return h(t) && typeof t.errMsg == "string" && typeof t.errCode == "number" ? t : M(t) ? {
71
+ errMsg: `${e}:fail ${t.msg || "fail"}`,
72
+ errCode: t.code,
73
+ raw: t
74
+ } : {
75
+ errMsg: `${e}:fail ${w(t)}`,
76
+ errCode: v
77
+ };
78
+ }
79
+ function n(e, t = {}, r, o) {
80
+ const f = String(e), { success: s, fail: y, complete: l } = r || {}, R = (a) => {
81
+ const d = D(a);
82
+ if (M(d) && d.code === S) {
83
+ const C = d;
84
+ return s == null || s(C), l == null || l(C), C;
85
+ }
86
+ throw q(f, d);
87
+ }, T = (a) => {
88
+ const d = q(f, a);
89
+ throw y == null || y(d), l == null || l(d), d;
90
+ };
91
+ return u.callAsync(f, _(t), o).then(R).catch(T);
92
+ }
93
+ var E = /* @__PURE__ */ ((e) => (e[e.Short = 0] = "Short", e[e.Long = 1] = "Long", e))(E || {});
94
+ function m(e) {
95
+ return e.text ? n(
96
+ "showToast",
97
+ {
98
+ text: e.text,
99
+ duration: e.duration ?? E.Short
100
+ },
101
+ e
102
+ ) : i("showToast", "text is required", e);
103
+ }
104
+ function x(e = {}) {
105
+ return n("triggerVibrate", {
106
+ duration: e.duration,
107
+ intensity: e.intensity ?? 1,
108
+ steps: e.steps,
109
+ repeat: e.repeat ?? !1
110
+ }, e, { queue: "serial" });
111
+ }
112
+ function V(e) {
113
+ return n("stopVibrate", {}, e, { queue: "serial" });
114
+ }
115
+ function j(e) {
116
+ return n("hideKeyboard", {}, e);
117
+ }
118
+ function F() {
119
+ return typeof window > "u" ? 1 : window.devicePixelRatio || 1;
120
+ }
121
+ const c = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Map();
122
+ function B(e, t) {
123
+ const r = c.get(e);
124
+ r && u.off("keyboardHeightChange", r);
125
+ const o = (f) => {
126
+ const s = f ? f / F() : 0;
127
+ e(s), t != null && t.once && c.delete(e);
128
+ };
129
+ if (c.set(e, o), t != null && t.once) {
130
+ u.once("keyboardHeightChange", o);
131
+ return;
132
+ }
133
+ u.on("keyboardHeightChange", o);
134
+ }
135
+ function $(e) {
136
+ if (!e) {
137
+ c.clear(), u.off("keyboardHeightChange");
138
+ return;
139
+ }
140
+ const t = c.get(e);
141
+ c.delete(e), u.off("keyboardHeightChange", t || e);
142
+ }
143
+ function k(e, t) {
144
+ const r = g.get(e);
145
+ r && u.off("onCommentPanelChange", r);
146
+ const o = (f) => {
147
+ e(f), t != null && t.once && g.delete(e);
148
+ };
149
+ if (g.set(e, o), t != null && t.once) {
150
+ u.once("onCommentPanelChange", o);
151
+ return;
152
+ }
153
+ u.on("onCommentPanelChange", o);
154
+ }
155
+ function G(e) {
156
+ if (!e) {
157
+ g.clear(), u.off("onCommentPanelChange");
158
+ return;
159
+ }
160
+ const t = g.get(e);
161
+ g.delete(e), u.off("onCommentPanelChange", t || e);
162
+ }
163
+ function W(e) {
164
+ var r;
165
+ if (!((r = e.urls) != null && r.length))
166
+ return i("playMedia", "urls is required", e);
167
+ const t = e.current ?? 0;
168
+ return !Number.isInteger(t) || t < 0 || t >= e.urls.length ? i("playMedia", "current is out of range", e) : n(
169
+ "playMedia",
170
+ {
171
+ type: "image",
172
+ urls: e.urls,
173
+ current: t
174
+ },
175
+ e
176
+ );
177
+ }
178
+ function K(e) {
179
+ var r;
180
+ if (!((r = e.urls) != null && r.length))
181
+ return i("previewVideo", "urls is required", e);
182
+ const t = e.current ?? 0;
183
+ return !Number.isInteger(t) || t < 0 || t >= e.urls.length ? i("previewVideo", "current is out of range", e) : n(
184
+ "playMedia",
185
+ {
186
+ type: "video",
187
+ urls: e.urls,
188
+ current: t
189
+ },
190
+ e
191
+ );
192
+ }
193
+ function z(e = {}) {
194
+ return e.count !== void 0 && (!Number.isInteger(e.count) || e.count <= 0) ? i("chooseMedia", "可选择照片数量范围为1-9张", e) : n(
195
+ "chooseMedia",
196
+ {
197
+ count: e.count ?? 9,
198
+ mediaType: e.mediaType ?? "image",
199
+ compressed: e.compressed ?? !0,
200
+ maxDuration: e.maxDuration ?? 60,
201
+ camera: e.camera ?? "back"
202
+ },
203
+ e,
204
+ { queue: "serial", timeout: 6e4 }
205
+ );
206
+ }
207
+ const b = /* @__PURE__ */ new Set();
208
+ let P = !1;
209
+ u.on("uploadFilesProgress", (e) => {
210
+ for (const t of b)
211
+ t(e);
212
+ });
213
+ function J(e) {
214
+ return !Array.isArray(e.files) || e.files.length === 0 ? i("uploadFiles", "files is required", e) : e.files.some((t) => !t) ? i("uploadFiles", "files[] is required", e) : P ? i("uploadFiles", "another uploadFiles request is in progress", e) : (P = !0, e.onProgress && b.add(e.onProgress), n(
215
+ "uploadFiles",
216
+ {
217
+ files: e.files,
218
+ cosDirPath: e.cosDirPath ?? "multipleSource/common/"
219
+ },
220
+ e,
221
+ { queue: "serial", timeout: 12e4 }
222
+ ).finally(() => {
223
+ P = !1, e.onProgress && b.delete(e.onProgress);
224
+ }));
225
+ }
226
+ function L(e) {
227
+ return e.filePath ? n("saveMediaToPhotosAlbum", { type: "image", file: e.filePath }, e, { queue: "serial" }) : i("saveImageToPhotosAlbum", "filePath is required", e);
228
+ }
229
+ function U(e) {
230
+ return e.filePath ? n("saveMediaToPhotosAlbum", { type: "video", file: e.filePath }, e, { queue: "serial" }) : i("saveVideoToPhotosAlbum", "filePath is required", e);
231
+ }
232
+ function X(e) {
233
+ return n("startRecord", e || {}, e, { queue: "serial" });
234
+ }
235
+ function Y(e) {
236
+ return n("stopRecord", {}, e, { queue: "serial" });
237
+ }
238
+ function Q(e) {
239
+ return n("getSystemInfo", {}, e);
240
+ }
241
+ function Z(e) {
242
+ return n("getNetworkType", {}, e);
243
+ }
244
+ function p(e) {
245
+ return e.data === void 0 ? i("setClipboardData", "data is required", e) : n("setClipboardData", { data: e.data }, e);
246
+ }
247
+ function ee(e) {
248
+ return n("getClipboardData", {}, e);
249
+ }
250
+ function te(e) {
251
+ return e.permission ? n(
252
+ "checkPermission",
253
+ {
254
+ permission: e.permission
255
+ },
256
+ e
257
+ ) : i("checkPermission", "permission is required", e);
258
+ }
259
+ function re(e) {
260
+ return e.type ? n(
261
+ "openPhoneSetting",
262
+ {
263
+ type: e.type
264
+ },
265
+ e,
266
+ { queue: "serial" }
267
+ ) : i("openPhoneSetting", "type is required", e);
268
+ }
269
+ function ne(e) {
270
+ return n("closeWebView", {}, e, { queue: "serial" });
271
+ }
272
+ function ie(e) {
273
+ return e.url ? n("openInExternalBrowser", { url: e.url }, e, { queue: "serial" }) : i("openInExternalBrowser", "url is required", e);
274
+ }
275
+ const oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
276
+ __proto__: null,
277
+ checkPermission: te,
278
+ chooseMedia: z,
279
+ closeWebView: ne,
280
+ getClipboardData: ee,
281
+ getNetworkType: Z,
282
+ getSystemInfo: Q,
283
+ hideKeyboard: j,
284
+ offCommentPanelChange: G,
285
+ offKeyboardHeightChange: $,
286
+ onCommentPanelChange: k,
287
+ onKeyboardHeightChange: B,
288
+ openInExternalBrowser: ie,
289
+ openPhoneSetting: re,
290
+ previewImage: W,
291
+ previewVideo: K,
292
+ saveImageToPhotosAlbum: L,
293
+ saveVideoToPhotosAlbum: U,
294
+ setClipboardData: p,
295
+ showToast: m,
296
+ startRecord: X,
297
+ stopRecord: Y,
298
+ stopVibrate: V,
299
+ triggerVibrate: x,
300
+ uploadFiles: J
301
+ }, Symbol.toStringTag, { value: "Module" }));
302
+ function ue(e) {
303
+ return n("login", {}, e, { queue: "serial" });
304
+ }
305
+ function fe(e) {
306
+ return n("getToken", {}, e);
307
+ }
308
+ function se(e) {
309
+ return n("getCurrentCircleInfo", {}, e);
310
+ }
311
+ function de(e) {
312
+ return e.title ? n(
313
+ "shareWebCard",
314
+ {
315
+ ...e,
316
+ shareTypes: e.shareTypes ?? [1, 2, 3]
317
+ },
318
+ e,
319
+ { queue: "serial" }
320
+ ) : i("shareWebCard", "title is required", e);
321
+ }
322
+ function le(e) {
323
+ return n("openAddCustomEmoji", {}, e, { queue: "serial" });
324
+ }
325
+ function ce(e) {
326
+ return e.gameName ? e.serverId ? n("pointsMallBindGame", e, e, { queue: "serial" }) : i("toBindGameRole", "serverId is required", e) : i("toBindGameRole", "gameName is required", e);
327
+ }
328
+ function ge(e) {
329
+ return e.type === void 0 ? i("showAd", "type is required", e) : n("showAdVideo", e, e, { queue: "serial" });
330
+ }
331
+ const he = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
332
+ __proto__: null,
333
+ getCurrentCircleInfo: se,
334
+ getToken: fe,
335
+ login: ue,
336
+ openAddCustomEmoji: le,
337
+ shareWebCard: de,
338
+ showAd: ge,
339
+ toBindGameRole: ce
340
+ }, Symbol.toStringTag, { value: "Module" })), ve = {
341
+ ...oe,
342
+ ...he,
343
+ registerNativeHandler: H
14
344
  };
15
345
  export {
16
- $ as JSBridgeSdk,
17
- s as bridge,
18
- n as chooseMedia,
19
- h as closeWebView,
20
- g as default,
21
- f as getClipboardData,
22
- H as getCurrentCircleInfo,
23
- l as getNetworkType,
24
- w as getSystemInfo,
25
- J as getToken,
26
- c as hideKeyboard,
27
- v as hideToast,
28
- P as login,
29
- u as navigateToApp,
30
- C as offKeyboardHeightChange,
31
- T as onKeyboardHeightChange,
32
- q as openAddCustomEmoji,
33
- x as openInExternalBrowser,
34
- y as openWebview,
35
- S as previewImage,
36
- k as previewVideo,
37
- A as saveImageToPhotosAlbum,
38
- I as saveVideoToPhotosAlbum,
39
- B as setClipboardData,
40
- o as setDebug,
41
- G as shareWebCard,
42
- L as showAd,
43
- D as showToast,
44
- K as startRecord,
45
- R as stopRecord,
46
- V as switchTab,
47
- M as toBindGameRole,
48
- W as vibrateLong,
49
- j as vibrateShort
346
+ qe as CUSTOM,
347
+ Ee as JSBridgeSdk,
348
+ ae as METHOD_NOT_FOUND,
349
+ be as NETWORK_ERROR,
350
+ Ce as NOT_LOGGED_IN,
351
+ I as PARAMS_ERROR,
352
+ Pe as PERMISSION_DENIED,
353
+ S as SUCCESS,
354
+ v as SYSTEM_EXCEPTION,
355
+ E as ToastDuration,
356
+ u as bridge,
357
+ te as checkPermission,
358
+ z as chooseMedia,
359
+ ne as closeWebView,
360
+ ve as default,
361
+ ee as getClipboardData,
362
+ se as getCurrentCircleInfo,
363
+ Z as getNetworkType,
364
+ Q as getSystemInfo,
365
+ fe as getToken,
366
+ j as hideKeyboard,
367
+ ue as login,
368
+ G as offCommentPanelChange,
369
+ $ as offKeyboardHeightChange,
370
+ k as onCommentPanelChange,
371
+ B as onKeyboardHeightChange,
372
+ le as openAddCustomEmoji,
373
+ ie as openInExternalBrowser,
374
+ re as openPhoneSetting,
375
+ W as previewImage,
376
+ K as previewVideo,
377
+ H as registerNativeHandler,
378
+ L as saveImageToPhotosAlbum,
379
+ U as saveVideoToPhotosAlbum,
380
+ p as setClipboardData,
381
+ Se as setDebug,
382
+ de as shareWebCard,
383
+ ge as showAd,
384
+ m as showToast,
385
+ X as startRecord,
386
+ Y as stopRecord,
387
+ V as stopVibrate,
388
+ ce as toBindGameRole,
389
+ x as triggerVibrate,
390
+ J as uploadFiles
50
391
  };
51
- //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,54 @@
1
+ /**
2
+ * mys-sdk 基础协议类型
3
+ *
4
+ * 定义 Native 与 SDK 对外暴露的统一数据格式。
5
+ *
6
+ * @module types/base
7
+ */
8
+ /**
9
+ * Native 返回的统一响应格式。
10
+ *
11
+ * SDK 成功时 Promise resolve、success 回调、complete 回调均返回该完整结构,
12
+ * 不拆包返回 result。
13
+ *
14
+ * @typeParam TResult - result 字段的业务数据类型
15
+ */
16
+ export interface NativeResponse<TResult = void> {
17
+ /** 状态码,0 表示成功 */
18
+ readonly code: number;
19
+ /** 业务数据 */
20
+ readonly result: TResult;
21
+ /** 提示信息 */
22
+ readonly msg: string;
23
+ }
24
+ /**
25
+ * API 调用错误对象。
26
+ *
27
+ * SDK 失败时 Promise reject、fail 回调、complete 回调均返回该结构。
28
+ */
29
+ export interface ApiError {
30
+ /** 错误描述,格式:`fnName:fail ...` */
31
+ readonly errMsg: string;
32
+ /** 错误码,-1 表示参数校验失败或未知错误 */
33
+ readonly errCode: number;
34
+ /** Native result 或额外错误详情 */
35
+ readonly errDetail?: unknown;
36
+ /** Native 原始响应,便于排查联调问题 */
37
+ readonly raw?: NativeResponse<unknown>;
38
+ }
39
+ /**
40
+ * API 回调接口。
41
+ *
42
+ * 所有 API 参数类型都 extends 此接口,以兼容 success/fail/complete 回调风格。
43
+ * 泛型表示 NativeResponse.result 的业务数据类型,而不是 success 的完整参数类型。
44
+ *
45
+ * @typeParam TResult - NativeResponse.result 字段的业务数据类型
46
+ */
47
+ export interface Callbacks<TResult = void> {
48
+ /** 成功回调,返回完整 NativeResponse */
49
+ success?: (res: NativeResponse<TResult>) => void;
50
+ /** 失败回调,返回标准 ApiError */
51
+ fail?: (err: ApiError) => void;
52
+ /** 完成回调,成功时返回 NativeResponse,失败时返回 ApiError */
53
+ complete?: (res?: NativeResponse<TResult> | ApiError) => void;
54
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * mys-sdk 枚举类型别名
3
+ *
4
+ * 为 API 参数提供精确的字符串/数字字面量联合类型,
5
+ * 替代传统的 TypeScript enum,实现更好的 IDE 自动补全和文档站精确解析
6
+ *
7
+ * @module types/enums
8
+ */
9
+ /** Toast 显示时长 */
10
+ export declare enum ToastDuration {
11
+ /** 短时显示 */
12
+ Short = 0,
13
+ /** 长时显示 */
14
+ Long = 1
15
+ }
16
+ /** 媒体预览类型 */
17
+ export type PreviewMediaType = "image" | "video";
18
+ /** 媒体文件类型 */
19
+ export type MediaFileType = "image" | "video";
20
+ /** 系统设置页类型。当前仅支持通知设置页 */
21
+ export type SettingType = "notice";
22
+ /** 权限类型 */
23
+ export type PermissionType = "camera" | "microphone" | "location" | "storage" | "notification";
24
+ /** 权限状态 */
25
+ export type PermissionStatus = "granted" | "denied" | "permanentlyDenied";
26
+ /** 摄像头方向 */
27
+ export type CameraDirection = "back" | "front";
28
+ /** Webview 容器类型 */
29
+ export type WebviewType = "immersive" | "normal" | "mini";
30
+ /** 平台 */
31
+ export type Platform = "android" | "ios";
32
+ /** 网络类型 */
33
+ export type NetworkTypeStr = "wifi" | "2g" | "3g" | "4g" | "5g" | "unknown" | "none";
34
+ /**
35
+ * 分享渠道
36
+ * - 1: 微信好友
37
+ * - 2: 朋友圈
38
+ * - 3: QQ
39
+ */
40
+ export type ShareChannelType = 1 | 2 | 3;
41
+ /** 文件类型标签 */
42
+ export type FileTypeTag = "image" | "video";
@@ -1,141 +1,11 @@
1
1
  /**
2
- * mysJs-sdk v2.0.0 类型定义
2
+ * mys-sdk 类型定义
3
3
  *
4
- * 统一模块导出:基础协议类型 + 各 API 参数/返回值类型
4
+ * barrel re-export,按需从拆分后的子模块导出
5
+ *
6
+ * @module types
5
7
  */
6
- /** Native 返回的统一格式 */
7
- export interface NativeResponse<T = any> {
8
- code: number;
9
- msg: string;
10
- result: T;
11
- }
12
- /** API 错误 */
13
- export interface ApiError {
14
- errMsg: string;
15
- errCode: number;
16
- [key: string]: any;
17
- }
18
- /** 通用回调接口 */
19
- export interface Callbacks<T = any> {
20
- success?: (res: T) => void;
21
- fail?: (err: ApiError) => void;
22
- complete?: (res?: T | ApiError) => void;
23
- }
24
- export interface ShowToastParams extends Callbacks<void> {
25
- title: string;
26
- icon?: 'success' | 'error' | 'loading' | 'none';
27
- duration?: number;
28
- mask?: boolean;
29
- }
30
- export interface HideToastParams extends Callbacks<void> {
31
- }
32
- export interface PlayMediaParams extends Callbacks<void> {
33
- urls: string[];
34
- url: string;
35
- }
36
- export interface ChooseMediaParams extends Callbacks<ChooseMediaResult> {
37
- count?: number;
38
- mediaType?: ('image' | 'video' | 'mix')[];
39
- sourceType?: ('album' | 'camera')[];
40
- maxDuration?: number;
41
- sizeType?: ('original' | 'compressed')[];
42
- camera?: 'back' | 'front';
43
- }
44
- export interface ChooseMediaResult {
45
- tempFiles: Array<{
46
- tempFilePath: string;
47
- size: number;
48
- duration?: number;
49
- height?: number;
50
- width?: number;
51
- thumbTempFilePath?: string;
52
- fileType: 'image' | 'video';
53
- }>;
54
- type: 'image' | 'video' | 'mix';
55
- }
56
- export interface SaveImageToPhotosAlbumParams extends Callbacks<void> {
57
- filePath: string;
58
- }
59
- export interface SaveVideoToPhotosAlbumParams extends Callbacks<void> {
60
- filePath: string;
61
- }
62
- export interface StartRecordParams extends Callbacks<void> {
63
- maxDuration?: number;
64
- }
65
- export interface SetClipboardDataParams extends Callbacks<void> {
66
- data: string;
67
- }
68
- export interface GetClipboardDataResult {
69
- data: string;
70
- }
71
- export interface OpenInExternalBrowserParams extends Callbacks<void> {
72
- url: string;
73
- }
74
- export interface NavigateToAppParams extends Callbacks<void> {
75
- url: string;
76
- }
77
- export interface SwitchTabParams extends Callbacks<void> {
78
- url: string;
79
- }
80
- export interface OpenWebviewParams extends Callbacks<void> {
81
- url: string;
82
- type?: 'immersive' | 'normal' | 'mini';
83
- replace?: boolean;
84
- }
85
- export interface VibrateShortParams extends Callbacks<void> {
86
- type: 'heavy' | 'medium' | 'light';
87
- }
88
- export interface SystemInfoResult {
89
- brand: string;
90
- model: string;
91
- pixelRatio: number;
92
- screenWidth: number;
93
- screenHeight: number;
94
- windowWidth: number;
95
- windowHeight: number;
96
- statusBarHeight: number;
97
- version: string;
98
- system: string;
99
- platform: 'android' | 'ios';
100
- }
101
- export interface NetworkTypeResult {
102
- networkType: 'wifi' | '2g' | '3g' | '4g' | '5g' | 'unknown' | 'none';
103
- }
104
- export interface ShareWebCardParams extends Callbacks<void> {
105
- title: string;
106
- content?: string;
107
- icon?: string;
108
- shareUrl?: string;
109
- externalContent?: string;
110
- shareTypes?: (1 | 2 | 3)[];
111
- isSharePic?: boolean;
112
- serverId?: string;
113
- trackData?: string;
114
- daokeUrl?: string;
115
- channelIds?: string;
116
- contentType?: string;
117
- }
118
- export interface ShowAdParams extends Callbacks<void> {
119
- type: number;
120
- circle_id?: string;
121
- cycle_day?: string | number;
122
- module?: string | number;
123
- cycle_id?: string;
124
- wheel_lottery_id?: string | number;
125
- }
126
- export interface BindGameRoleParams extends Callbacks<void> {
127
- gameName: string;
128
- serverId: string;
129
- }
130
- export interface LoginResult {
131
- code: string;
132
- userInfo?: any;
133
- }
134
- export interface GetTokenResult {
135
- token: string;
136
- }
137
- export interface GetCircleInfoResult {
138
- serverId: string;
139
- name: string;
140
- icon: string;
141
- }
8
+ export * from './base';
9
+ export * from './enums';
10
+ export * from './params';
11
+ export * from './results';