@docoi/mys-sdk 1.1.0 → 1.2.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/README.md CHANGED
@@ -86,6 +86,7 @@ try {
86
86
  | 1001 | `METHOD_NOT_FOUND` | App 没有这个方法 |
87
87
  | 1002 | `PARAMS_ERROR` | 参数校验失败,SDK 前置判定,不会发起调用 |
88
88
  | 2002 | `NOT_LOGGED_IN` | 未登录、Token 失效 |
89
+ | 3001 | `UNAUTHORIZED` | 未授权的调用,没有通过 App 的安全校验 |
89
90
  | 3002 | `PERMISSION_DENIED`| 权限被拒 |
90
91
  | 4002 | `NETWORK_ERROR` | 网络异常 |
91
92
  | 5001 | `BRIDGE_ERROR` | 通信链路不通:不在 App 内,或原生通道不存在 |
@@ -156,7 +157,7 @@ await mys.startRecordAudio({
156
157
  | 页面跳转 | `switchTab` `navigateTo` `openWebview` `openInExternalBrowser` `closeWebView` `openScheme` |
157
158
  | 账号与用户 | `login` `getToken` `getCurrentCircleInfo` |
158
159
  | 内容与分享 | `shareWebCard` `shareImage` `openAddCustomEmoji` `openCommentPanel` `showLongVipDesDialog` `voteAction` `openFriendsList` |
159
- | 业务场景 | `toBindGameRole` `bindGameRoleSuccess` `showAd` `onAdFinished` / `offAdFinished` `updateData` `openGiftBag` `onMemberActivate` / `offMemberActivate` |
160
+ | 业务场景 | `toBindGameRole` `bindGameRoleSuccess` `showAd` `updateData` `openGiftBag` `onMemberActivate` / `offMemberActivate` |
160
161
  | 工具 | `setDebug` `registerNativeHandler` |
161
162
 
162
163
  `getAppBaseInfo` / `isInApp` / `compareVersions` 用来读 App 环境信息,`ToastDuration` / `ShareType` 是枚举值。`onRoute` / `invokeDebug` 仅供仓库内的 Demo 调试,不承诺兼容,业务侧不要依赖。
@@ -1,4 +1,4 @@
1
- import { OpenAppParams, ShowPageNameParams, SwipeBackParams, SetBeforeInfoParams, OpenAppResult, BeforeInfoResult, PageEventCallback, ShowToastParams, PlayMediaParams, ChooseMediaParams, ChooseMediaResult, UploadFilesParams, UploadFilesResult, SaveImageToPhotosAlbumParams, StartRecordAudioParams, SetClipboardDataParams, GetClipboardDataResult, TriggerVibrateParams, Callbacks, NativeResponse, SystemInfoResult, OpenPhoneSettingParams, CheckPermissionParams, CheckPermissionResult, KeyboardHeightChangeCallback, CommentPanelChangeCallback, EventListenOptions } from '../types';
1
+ import { OpenAppParams, ShowPageNameParams, SwipeBackParams, SetBeforeInfoParams, OpenAppResult, BeforeInfoResult, PageEventCallback, ShowToastParams, PlayMediaParams, ChooseMediaParams, ChooseMediaResult, UploadFilesParams, UploadFilesResult, SaveImageToPhotosAlbumParams, StartRecordAudioParams, SetClipboardDataParams, GetClipboardDataResult, ScanCodeParams, ScanCodeResult, SetPullDownRefreshParams, PullDownRefreshCallback, SetNavigationBarTitleParams, SetNavigationBarColorParams, SetStatusBarStyleParams, SetStorageParams, GetStorageParams, GetStorageResult, RemoveStorageParams, TriggerVibrateParams, Callbacks, NativeResponse, SystemInfoResult, OpenPhoneSettingParams, CheckPermissionParams, CheckPermissionResult, KeyboardHeightChangeCallback, CommentPanelChangeCallback, EventListenOptions } from '../types';
2
2
  /**
3
3
  * 显示消息提示框。
4
4
  *
@@ -168,6 +168,21 @@ export declare function uploadFiles(params: UploadFilesParams): Promise<NativeRe
168
168
  * await mys.saveImageToPhotosAlbum({ filePath: canvas.toDataURL('image/png') })
169
169
  */
170
170
  export declare function saveImageToPhotosAlbum(params: SaveImageToPhotosAlbumParams): Promise<NativeResponse<void>>;
171
+ /**
172
+ * 调起相机扫描二维码或条形码,返回识别出的内容。
173
+ *
174
+ * @note 需要相机权限,未授权时返回 3002,可先用 checkPermission 检查,再用 openPhoneSetting 引导用户开启。
175
+ * @note 用户取消扫码不算失败,成功返回且 cancelled 为 true,此时 result 为空字符串。
176
+ * @note 有画面但识别不出内容时 reject,errMsg 带原因。
177
+ *
178
+ * @app 待定
179
+ * @example
180
+ * const res = await mys.scanCode({ scanType: ['qrCode'] })
181
+ * if (!res.result.cancelled) {
182
+ * console.log(res.result.result)
183
+ * }
184
+ */
185
+ export declare function scanCode(params?: ScanCodeParams): Promise<NativeResponse<ScanCodeResult>>;
171
186
  /**
172
187
  * 开始录音,录音结果通过 onEnd 回调返回。
173
188
  *
@@ -270,6 +285,52 @@ export declare function checkPermission(params: CheckPermissionParams): Promise<
270
285
  * }
271
286
  */
272
287
  export declare function openPhoneSetting(params: OpenPhoneSettingParams): Promise<NativeResponse<void>>;
288
+ /**
289
+ * 在 Native 存储里保存一个值,跨页面、跨 WebView 可读,App 卸载才清除。
290
+ *
291
+ * @note value 会序列化成 JSON 字符串后交给 Native,取回时还原成存入时的类型。
292
+ * @note undefined、函数、symbol 以及对象里的这些字段无法序列化,会被丢弃;顶层就是这些值时返回 1002。
293
+ * @note 每次读写都是一次 Native 往返,只适合存开关、上次选择这类少量状态,列表缓存等大块数据用 localStorage。
294
+ * @note 与 localStorage 互不相通:localStorage 随 WebView 回收丢失,且页面之间不共享。
295
+ *
296
+ * @app 待定
297
+ * @example
298
+ * await mys.setStorage({ key: 'bgm_enabled', value: true })
299
+ * await mys.setStorage({ key: 'last_choice', value: { id: 1, tags: ['a', 'b'] } })
300
+ */
301
+ export declare function setStorage(params: SetStorageParams): Promise<NativeResponse<void>>;
302
+ /**
303
+ * 读取 setStorage 保存的值。
304
+ *
305
+ * @note 键不存在时成功返回,data 为 null。
306
+ * @note 取回的文本不是合法 JSON(不是通过 setStorage 写入)时 reject。
307
+ *
308
+ * @app 待定
309
+ * @example
310
+ * const res = await mys.getStorage({ key: 'last_choice' })
311
+ * console.log(res.result.data)
312
+ */
313
+ export declare function getStorage(params: GetStorageParams): Promise<NativeResponse<GetStorageResult>>;
314
+ /**
315
+ * 删除 setStorage 保存的值。
316
+ *
317
+ * @note 键不存在时同样成功返回。
318
+ *
319
+ * @app 待定
320
+ * @example
321
+ * await mys.removeStorage({ key: 'last_choice' })
322
+ */
323
+ export declare function removeStorage(params: RemoveStorageParams): Promise<NativeResponse<void>>;
324
+ /**
325
+ * 清空 setStorage 保存的全部值。
326
+ *
327
+ * @note 只清除 SDK 写入的数据,不影响 App 自己的存储。
328
+ *
329
+ * @app 待定
330
+ * @example
331
+ * await mys.clearStorage()
332
+ */
333
+ export declare function clearStorage(params?: Callbacks): Promise<NativeResponse<void>>;
273
334
  /**
274
335
  * 打开指定包名的其他 App(如游戏),未安装时触发下载。
275
336
  *
@@ -300,6 +361,108 @@ export declare function openApp(params?: OpenAppParams): Promise<NativeResponse<
300
361
  * await mys.swipeBack({ enable: false })
301
362
  */
302
363
  export declare function swipeBack(params: SwipeBackParams): Promise<NativeResponse<void>>;
364
+ /**
365
+ * 设置当前页面是否允许原生下拉刷新。
366
+ *
367
+ * @note 只控制手势是否可用,不会立即触发刷新;触发刷新用 startPullDownRefresh,刷新由 onPullDownRefresh 通知。
368
+ * @note 只作用于当前页面,页面关闭后失效。
369
+ *
370
+ * @app 待定
371
+ * @example
372
+ * await mys.setPullDownRefresh({ enabled: true })
373
+ */
374
+ export declare function setPullDownRefresh(params?: SetPullDownRefreshParams): Promise<NativeResponse<void>>;
375
+ /**
376
+ * 主动触发一次下拉刷新,展示刷新动画并触发 onPullDownRefresh 的回调。
377
+ *
378
+ * @note 刷新完成后必须调用 stopPullDownRefresh,否则刷新动画不会收起。
379
+ *
380
+ * @app 待定
381
+ * @example
382
+ * await mys.startPullDownRefresh()
383
+ */
384
+ export declare function startPullDownRefresh(params?: Callbacks): Promise<NativeResponse<void>>;
385
+ /**
386
+ * 停止下拉刷新,收起刷新动画。
387
+ *
388
+ * @note 没有进行中的刷新时同样成功返回。
389
+ *
390
+ * @app 待定
391
+ * @example
392
+ * await mys.stopPullDownRefresh()
393
+ */
394
+ export declare function stopPullDownRefresh(params?: Callbacks): Promise<NativeResponse<void>>;
395
+ /**
396
+ * 监听下拉刷新,用户下拉或调用 startPullDownRefresh 时触发。
397
+ *
398
+ * @note 在回调里重新加载数据,完成后调用 stopPullDownRefresh 收起刷新动画。
399
+ *
400
+ * @app 待定
401
+ * @example
402
+ * mys.onPullDownRefresh(async () => {
403
+ * await reload()
404
+ * await mys.stopPullDownRefresh()
405
+ * })
406
+ */
407
+ export declare function onPullDownRefresh(callback: PullDownRefreshCallback, options?: EventListenOptions): void;
408
+ /**
409
+ * 取消监听下拉刷新。
410
+ *
411
+ * @param callback 要取消的监听函数,不传则取消全部下拉刷新监听
412
+ * @app 待定
413
+ * @example
414
+ * mys.offPullDownRefresh()
415
+ */
416
+ export declare function offPullDownRefresh(callback?: PullDownRefreshCallback): void;
417
+ /**
418
+ * 设置当前页面原生导航栏的标题。
419
+ *
420
+ * @note 只作用于当前页面,页面关闭后失效。
421
+ *
422
+ * @app 待定
423
+ * @example
424
+ * await mys.setNavigationBarTitle({ title: '活动详情' })
425
+ */
426
+ export declare function setNavigationBarTitle(params: SetNavigationBarTitleParams): Promise<NativeResponse<void>>;
427
+ /**
428
+ * 设置当前页面原生导航栏的背景色,以及标题和按钮的颜色。
429
+ *
430
+ * @note 只作用于当前页面,页面关闭后失效。
431
+ *
432
+ * @app 待定
433
+ * @example
434
+ * await mys.setNavigationBarColor({ backgroundColor: '#1a1a2e', frontColor: 'white' })
435
+ */
436
+ export declare function setNavigationBarColor(params: SetNavigationBarColorParams): Promise<NativeResponse<void>>;
437
+ /**
438
+ * 显示当前页面的原生导航栏。
439
+ *
440
+ * @app 待定
441
+ * @example
442
+ * await mys.showNavigationBar()
443
+ */
444
+ export declare function showNavigationBar(params?: Callbacks): Promise<NativeResponse<void>>;
445
+ /**
446
+ * 隐藏当前页面的原生导航栏。
447
+ *
448
+ * @note 隐藏后不会自动恢复,需要时调用 showNavigationBar。
449
+ *
450
+ * @app 待定
451
+ * @example
452
+ * await mys.hideNavigationBar()
453
+ */
454
+ export declare function hideNavigationBar(params?: Callbacks): Promise<NativeResponse<void>>;
455
+ /**
456
+ * 设置状态栏的文字颜色。
457
+ *
458
+ * @note 只改文字颜色,不改状态栏背景。
459
+ * @note 只作用于当前页面,页面关闭后失效。
460
+ *
461
+ * @app 待定
462
+ * @example
463
+ * await mys.setStatusBarStyle({ style: 'light' })
464
+ */
465
+ export declare function setStatusBarStyle(params: SetStatusBarStyleParams): Promise<NativeResponse<void>>;
303
466
  /**
304
467
  * 告知 Native 当前 H5 页面的类型,用于 Native 侧的页面识别和埋点。
305
468
  *
package/dist/api/biz.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Callbacks, NativeResponse, EventListenOptions, ShareWebCardParams, ShareImageParams, ShareImageResult, ShowAdParams, BindGameRoleParams, OpenCommentPanelParams, VoteActionParams, OpenGiftBagParams, OpenFriendsListParams, OpenFriendsListResult, UpdateDataParams, LoginResult, GetTokenResult, GetCircleInfoResult, VoteData, AdFinishedCallback, MemberActivateHandler } from '../types';
1
+ import { Callbacks, NativeResponse, ShareWebCardParams, ShareImageParams, ShareImageResult, ShowAdParams, BindGameRoleParams, OpenCommentPanelParams, VoteActionParams, OpenGiftBagParams, OpenFriendsListParams, OpenFriendsListResult, UpdateDataParams, LoginResult, GetTokenResult, GetCircleInfoResult, VoteData, MemberActivateHandler } from '../types';
2
2
  /**
3
3
  * 登录授权。
4
4
  *
@@ -147,32 +147,20 @@ export declare function bindGameRoleSuccess(params?: Callbacks): Promise<NativeR
147
147
  /**
148
148
  * 展示原生广告视频。
149
149
  *
150
- * @note 广告播放完成后 Native 通过 onAdFinished 事件通知。
150
+ * @note 广告播放完成后通过 onFinished 回调通知,不需要单独监听事件;只有 Native 回传的 module 与 params.module 一致时才触发。
151
+ * @note onFinished 不需要手动取消,触发一次后自动取消;同一个 module 只保留最近一次调用的 onFinished,不同 module 互不影响,调用失败也不会取消。
151
152
  *
152
153
  * @app 3.9.0
153
154
  * @example
154
- * await mys.showAd({ type: 1, params: { circle_id: '123', module: 1 } })
155
- */
156
- export declare function showAd(params: ShowAdParams): Promise<NativeResponse<void>>;
157
- /**
158
- * 监听广告播放完成。
159
- *
160
- * @app 3.7.0
161
- * @example
162
- * mys.onAdFinished((res) => {
163
- * console.log(res.module)
155
+ * await mys.showAd({
156
+ * type: 1,
157
+ * params: { circle_id: '123', module: 1 },
158
+ * onFinished: (res) => {
159
+ * console.log('广告播放完成', res.module)
160
+ * },
164
161
  * })
165
162
  */
166
- export declare function onAdFinished(callback: AdFinishedCallback, options?: EventListenOptions): void;
167
- /**
168
- * 取消监听广告播放完成。
169
- *
170
- * @param callback 要取消的监听函数,不传则取消全部广告播放完成监听
171
- * @app 3.7.0
172
- * @example
173
- * mys.offAdFinished()
174
- */
175
- export declare function offAdFinished(callback?: AdFinishedCallback): void;
163
+ export declare function showAd(params: ShowAdParams): Promise<NativeResponse<void>>;
176
164
  /**
177
165
  * 通知 Native 更新数据。
178
166
  *
@@ -185,9 +173,19 @@ export declare function updateData(params: UpdateDataParams): Promise<NativeResp
185
173
  /**
186
174
  * 打开客户端背包。
187
175
  *
176
+ * @note 送礼成功后通过 onSent 回调通知,不需要单独监听事件。
177
+ * @note onSent 不需要手动取消,调用失败或下一次调用 openGiftBag 时自动取消;每次送礼成功都会触发。
178
+ *
188
179
  * @app 3.2.0
189
180
  * @example
190
- * await mys.openGiftBag({ user_id: 'u1', server_id: 's123', openBag: true })
181
+ * await mys.openGiftBag({
182
+ * user_id: 'u1',
183
+ * server_id: 's123',
184
+ * openBag: true,
185
+ * onSent: (res) => {
186
+ * console.log('送礼成功', res.gift_id, res.gift_name)
187
+ * },
188
+ * })
191
189
  */
192
190
  export declare function openGiftBag(params: OpenGiftBagParams): Promise<NativeResponse<void>>;
193
191
  /**
@@ -9,6 +9,12 @@ import { Callbacks, NativeResponse, NavigateToParams, OpenInExternalBrowserParam
9
9
  * @app 4.4.0
10
10
  * @example
11
11
  * await mys.switchTab({ tab: 'discover', params: { subTab: 'square' } })
12
+ *
13
+ * // 各 tab
14
+ * mys.switchTab({ tab: 'home' }) // 首页
15
+ * mys.switchTab({ tab: 'discover' }) // 发现,可用 params.subTab 指定二级 tab:friends 好友圈、square 广场、comic 漫剧
16
+ * mys.switchTab({ tab: 'message' }) // 消息
17
+ * mys.switchTab({ tab: 'mine' }) // 我的
12
18
  */
13
19
  export declare function switchTab(params: SwitchTabParams): Promise<NativeResponse<void>>;
14
20
  /**
@@ -16,13 +22,42 @@ export declare function switchTab(params: SwitchTabParams): Promise<NativeRespon
16
22
  *
17
23
  * @note 不在 App 内时唤起 App,唤起失败(超时仍停留在当前页)时触发 onLaunchFail,由业务侧引导下载。
18
24
  * @note 唤起 App 和 App 4.4.0 以下的跳转都是发出即成功,不代表页面已打开。
19
- * @note App 4.4.0 以下能否跳转取决于目标页面自己的起始版本,不支持的返回 ENV_UNSUPPORTED(5002);绑定游戏角色、添加自定义表情页面在低版本仍可用。
25
+ * @note App 4.4.0 以下能否跳转取决于目标页面自己的起始版本,不支持的返回 ENV_UNSUPPORTED(5002);动态发布、资料编辑、点赞列表、广告页、绑定游戏角色、添加自定义表情页面在低版本仍可用。
20
26
  *
21
27
  * @app 4.4.0
22
28
  * @paramsMap NavigatePageParamsMap
23
29
  * @example
24
30
  * await mys.navigateTo({ type: 'userHomePage', params: { userId: '123' } })
25
31
  * await mys.navigateTo({ url: 'daoke://page?type=11&user_id=123' })
32
+ *
33
+ * // 各页面及必填参数;行尾标了版本的页面,App 低于该版本返回 5002
34
+ * mys.navigateTo({ type: 'dynamicDetailPage', params: { dynamicId } }) // 动态详情
35
+ * mys.navigateTo({ type: 'dynamicPublishPage', params: { serverId } }) // 动态发布
36
+ * mys.navigateTo({ type: 'topicPage', params: { topicId } }) // 动态话题
37
+ * mys.navigateTo({ type: 'likeListPage', params: { dynamicId, publishType } }) // 点赞列表
38
+ * mys.navigateTo({ type: 'circleHomePage', params: { serverId } }) // 圈子主页
39
+ * mys.navigateTo({ type: 'joinCirclePage', params: { serverId, inviteCode } }) // 查询圈子并加入
40
+ * mys.navigateTo({ type: 'homePage' }) // 新版首页
41
+ * mys.navigateTo({ type: 'guideCatalogPage', params: { serverId, channelId, catalogId } }) // 攻略一级分类
42
+ * mys.navigateTo({ type: 'gamePushSettingPage', params: { serverId } }) // 游戏离线推送开关
43
+ * mys.navigateTo({ type: 'userHomePage', params: { userId } }) // 用户主页
44
+ * mys.navigateTo({ type: 'groupChatPage', params: { serverId, groupId } }) // 群聊
45
+ * mys.navigateTo({ type: 'joinGroupPage', params: { inviteCode } }) // 查询小群并加入
46
+ * mys.navigateTo({ type: 'privateChatPage', params: { userId, nickName } }) // 私聊(4.1.0 起)
47
+ * mys.navigateTo({ type: 'myPublishPage' }) // 我的-发布
48
+ * mys.navigateTo({ type: 'myFavoritePage' }) // 我的-收藏(3.8.0 起)
49
+ * mys.navigateTo({ type: 'browseHistoryPage' }) // 浏览记录(4.4.0 起)
50
+ * mys.navigateTo({ type: 'profileEditPage' }) // 资料编辑
51
+ * mys.navigateTo({ type: 'coinRechargePage' }) // 金币充值
52
+ * mys.navigateTo({ type: 'gameSubscribePage' }) // 游戏消息订阅(3.8.0 起)
53
+ * mys.navigateTo({ type: 'douyinMallPage' }) // 抖音商城
54
+ * mys.navigateTo({ type: 'activityCenterPage' }) // 活动中心(3.9.0 起)
55
+ * mys.navigateTo({ type: 'adPage', params: { url } }) // 广告 SDK 页面
56
+ * mys.navigateTo({ type: 'coinDetailPage' }) // 金币明细
57
+ * mys.navigateTo({ type: 'miniGamesPage' }) // 小游戏集合(一起玩)
58
+ * mys.navigateTo({ type: 'bindGamePage', params: { serverId, gameName } }) // 绑定游戏角色
59
+ * mys.navigateTo({ type: 'playerReportPage', params: { objectId, objectType } }) // 玩家举报(4.4.0 起)
60
+ * mys.navigateTo({ type: 'addCustomEmojiPage' }) // 添加自定义表情
26
61
  */
27
62
  export declare function navigateTo(params: NavigateToParams): Promise<NativeResponse<void>>;
28
63
  /**
@@ -35,6 +70,13 @@ export declare function navigateTo(params: NavigateToParams): Promise<NativeResp
35
70
  * @app 4.4.0
36
71
  * @example
37
72
  * await mys.openWebview({ url: 'https://example.com', type: 'immersive' })
73
+ *
74
+ * // 各容器类型
75
+ * mys.openWebview({ url, type: 'normal' }) // 普通 H5,带原生导航栏
76
+ * mys.openWebview({ url, type: 'mini' }) // 小程序样式
77
+ * mys.openWebview({ url, type: 'immersive' }) // 沉浸式,没有原生导航栏
78
+ * mys.openWebview({ url, type: 'dynamic' }) // 动态链接
79
+ * mys.openWebview({ url, type: 'transparent' }) // 纯透明 H5,url 需为 https,不支持 params(3.8.0 起)
38
80
  */
39
81
  export declare function openWebview(params: OpenWebviewParams): Promise<NativeResponse<void>>;
40
82
  /**
@@ -68,6 +68,9 @@ export declare const PAGE_ROUTES: {
68
68
  publish: string;
69
69
  };
70
70
  };
71
+ publishType: {
72
+ key: string;
73
+ };
71
74
  relationType: {
72
75
  key: string;
73
76
  enum: {
@@ -333,6 +336,23 @@ export declare const PAGE_ROUTES: {
333
336
  since: string;
334
337
  fields: {};
335
338
  };
339
+ dynamicPublishPage: {
340
+ type: number;
341
+ name: string;
342
+ since: string;
343
+ fields: {
344
+ serverId: {
345
+ key: string;
346
+ required: true;
347
+ };
348
+ channelId: {
349
+ key: string;
350
+ };
351
+ publishType: {
352
+ key: string;
353
+ };
354
+ };
355
+ };
336
356
  };
337
357
  /** navigateTo 页面 + switchTab / openWebview 的路由,key 为语义名 */
338
358
  export declare const ROUTES: {
@@ -442,6 +462,9 @@ export declare const ROUTES: {
442
462
  publish: string;
443
463
  };
444
464
  };
465
+ publishType: {
466
+ key: string;
467
+ };
445
468
  relationType: {
446
469
  key: string;
447
470
  enum: {
@@ -707,6 +730,23 @@ export declare const ROUTES: {
707
730
  since: string;
708
731
  fields: {};
709
732
  };
733
+ dynamicPublishPage: {
734
+ type: number;
735
+ name: string;
736
+ since: string;
737
+ fields: {
738
+ serverId: {
739
+ key: string;
740
+ required: true;
741
+ };
742
+ channelId: {
743
+ key: string;
744
+ };
745
+ publishType: {
746
+ key: string;
747
+ };
748
+ };
749
+ };
710
750
  };
711
751
  export type RouteKey = keyof typeof ROUTES;
712
752
  /** daoke type → 路由,未登记的 type 返回 undefined */
@@ -13,6 +13,8 @@ export declare const METHOD_NOT_FOUND = 1001;
13
13
  export declare const PARAMS_ERROR = 1002;
14
14
  /** 未登录段起点:未登录、Token 失效、Token 过期等。 */
15
15
  export declare const NOT_LOGGED_IN = 2002;
16
+ /** 未授权的调用:调用方没有通过 App 的安全校验,App 拒绝执行。与 PERMISSION_DENIED 不同,不是系统权限或用户授权的问题。 */
17
+ export declare const UNAUTHORIZED = 3001;
16
18
  /** 权限拒绝段起点:权限被拒、权限未开通、用户拒绝授权等。 */
17
19
  export declare const PERMISSION_DENIED = 3002;
18
20
  /** 网络错误段起点:网络异常、服务端 5xx、超时等。 */