fishpi 0.1.26 → 0.1.28

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/lib/index.d.mts CHANGED
@@ -49,7 +49,16 @@ declare class ArticlePost implements IArticlePost {
49
49
  * 提问悬赏积分
50
50
  */
51
51
  offerPoint?: number;
52
+ /**
53
+ * 从接口数据转换为 ArticlePost 实例
54
+ * @param article 帖子数据
55
+ * @returns ArticlePost 实例
56
+ */
52
57
  static from(article: IArticlePost): ArticlePost & IArticlePost;
58
+ /**
59
+ * 转换为接口请求数据
60
+ * @returns 接口请求数据
61
+ */
53
62
  toJson(): {
54
63
  articleTitle: string;
55
64
  articleContent: string;
@@ -64,6 +73,9 @@ declare class ArticlePost implements IArticlePost {
64
73
  articleQnAOfferPoint: number | undefined;
65
74
  };
66
75
  }
76
+ /**
77
+ * 评论提交信息
78
+ */
67
79
  declare class CommentPost implements ICommentPost {
68
80
  /**
69
81
  * 文章 Id
@@ -85,7 +97,16 @@ declare class CommentPost implements ICommentPost {
85
97
  * 回复评论 Id
86
98
  */
87
99
  originalId?: string;
100
+ /**
101
+ * 从接口数据转换为 CommentPost 实例
102
+ * @param comment 评论数据
103
+ * @returns CommentPost 实例
104
+ */
88
105
  static from(comment: ICommentPost): CommentPost & ICommentPost;
106
+ /**
107
+ * 转换为接口请求数据
108
+ * @returns 接口请求数据
109
+ */
89
110
  toJson(): {
90
111
  articleId: string;
91
112
  commentAnonymous: number;
@@ -877,8 +898,16 @@ declare class BreezemoonContent {
877
898
  * 发布城市(可能为空,请注意做判断)
878
899
  */
879
900
  city: string;
901
+ /**
902
+ * 从接口数据转换为 BreezemoonContent 实例
903
+ * @param src 接口数据
904
+ * @returns BreezemoonContent 实例
905
+ */
880
906
  static from(src: Record<string, any>): BreezemoonContent;
881
907
  }
908
+ /**
909
+ * 清风明月列表
910
+ */
882
911
  declare class BreezemoonList {
883
912
  /**
884
913
  * 分页信息
@@ -888,6 +917,11 @@ declare class BreezemoonList {
888
917
  * 清风明月列表
889
918
  */
890
919
  breezemoons: BreezemoonContent[];
920
+ /**
921
+ * 从接口数据转换为 BreezemoonList 实例
922
+ * @param src 接口数据
923
+ * @returns BreezemoonList 实例
924
+ */
891
925
  static from(src: Record<string, any>): BreezemoonList;
892
926
  }
893
927
  //#endregion
@@ -953,8 +987,14 @@ interface IChatRevoke {
953
987
  * 消息 Id
954
988
  */
955
989
  data: string;
990
+ /**
991
+ * 消息类型
992
+ */
956
993
  type: 'revoke';
957
994
  }
995
+ /**
996
+ * 私聊查询参数
997
+ */
958
998
  interface IChatQuery {
959
999
  /**
960
1000
  * 页码
@@ -969,6 +1009,9 @@ interface IChatQuery {
969
1009
  */
970
1010
  autoRead?: boolean;
971
1011
  }
1012
+ /**
1013
+ * 私聊通知信息
1014
+ */
972
1015
  interface IChatNotice {
973
1016
  /**
974
1017
  * 命令
@@ -1665,10 +1708,25 @@ interface IRedPacketStatusMsg {
1665
1708
  }
1666
1709
  //#endregion
1667
1710
  //#region src/types/user.d.ts
1711
+ /**
1712
+ * 基础用户信息
1713
+ */
1668
1714
  interface IUserLite {
1715
+ /**
1716
+ * 用户 ID
1717
+ */
1669
1718
  oId: string;
1719
+ /**
1720
+ * 用户头像 URL
1721
+ */
1670
1722
  userAvatarURL: string;
1723
+ /**
1724
+ * 用户昵称
1725
+ */
1671
1726
  userNickname: string;
1727
+ /**
1728
+ * 用户名
1729
+ */
1672
1730
  userName: string;
1673
1731
  }
1674
1732
  /**
@@ -1755,7 +1813,15 @@ declare class UserInfo {
1755
1813
  * MBTI 性格类型
1756
1814
  */
1757
1815
  mbti: string;
1816
+ /**
1817
+ * 获取用户显示名称
1818
+ */
1758
1819
  get name(): string;
1820
+ /**
1821
+ * 从接口数据转换为 UserInfo 实例
1822
+ * @param user 接口数据
1823
+ * @returns UserInfo 实例
1824
+ */
1759
1825
  static from(user: Record<string, any>): UserInfo;
1760
1826
  }
1761
1827
  /**
@@ -1938,8 +2004,17 @@ interface UserUpdateParams {
1938
2004
  * 摸鱼大闯关信息
1939
2005
  */
1940
2006
  declare class MoFishGame implements IMoFishGame {
2007
+ /**
2008
+ * 用户名
2009
+ */
1941
2010
  userName: string;
2011
+ /**
2012
+ * 关卡
2013
+ */
1942
2014
  stage: string;
2015
+ /**
2016
+ * 时间
2017
+ */
1943
2018
  time: number;
1944
2019
  }
1945
2020
  /**
@@ -1963,7 +2038,13 @@ interface IMoFishGame {
1963
2038
  * 用户 IP 信息
1964
2039
  */
1965
2040
  interface IUserIP {
2041
+ /**
2042
+ * 最近登录 IP
2043
+ */
1966
2044
  latestLoginIP: string;
2045
+ /**
2046
+ * 用户 ID
2047
+ */
1967
2048
  userId: string;
1968
2049
  }
1969
2050
  /**
@@ -2952,6 +3033,9 @@ declare class Pagination {
2952
3033
  }
2953
3034
  //#endregion
2954
3035
  //#region src/ws.d.ts
3036
+ /**
3037
+ * 通用 WebSocket 事件
3038
+ */
2955
3039
  interface IWebSocketEvent {
2956
3040
  /**
2957
3041
  * Websocket 打开
@@ -2966,7 +3050,13 @@ interface IWebSocketEvent {
2966
3050
  */
2967
3051
  error: (error: ErrorEvent) => void;
2968
3052
  }
3053
+ /**
3054
+ * WebSocket 事件基础类
3055
+ */
2969
3056
  declare class WsEventBase<T> {
3057
+ /**
3058
+ * 事件触发器
3059
+ */
2970
3060
  emitter: {
2971
3061
  listeners: Map<string, Function[]>;
2972
3062
  on(event: string, listener: Function): /*elided*/any;
@@ -2975,7 +3065,13 @@ declare class WsEventBase<T> {
2975
3065
  emit(event: string, ...args: any[]): /*elided*/any;
2976
3066
  removeAllListeners(event?: string): /*elided*/any;
2977
3067
  };
3068
+ /**
3069
+ * WebSocket 连接对象
3070
+ */
2978
3071
  ws: ReconnectingWebSocket | null;
3072
+ /**
3073
+ * WebSocket 配置
3074
+ */
2979
3075
  rwsOptions: Options;
2980
3076
  constructor();
2981
3077
  /**
@@ -2992,6 +3088,7 @@ declare class WsEventBase<T> {
2992
3088
  * WebSocket 监听
2993
3089
  * @param event WebSocket 事件
2994
3090
  * @param listener 监听器
3091
+ * @returns EventEmitter
2995
3092
  */
2996
3093
  on<K extends keyof T>(event: K, listener: T[K]): {
2997
3094
  listeners: Map<string, Function[]>;
@@ -3005,6 +3102,7 @@ declare class WsEventBase<T> {
3005
3102
  * 移除 WebSocket 监听
3006
3103
  * @param event WebSocket 事件
3007
3104
  * @param listener 监听器
3105
+ * @returns EventEmitter
3008
3106
  */
3009
3107
  off<K extends keyof T>(event?: K, listener?: T[K]): {
3010
3108
  listeners: Map<string, Function[]>;
@@ -3018,6 +3116,7 @@ declare class WsEventBase<T> {
3018
3116
  * WebSocket 单次监听
3019
3117
  * @param event WebSocket 事件
3020
3118
  * @param listener 监听器
3119
+ * @returns EventEmitter
3021
3120
  */
3022
3121
  once<K extends keyof T>(event: K, listener: T[K]): {
3023
3122
  listeners: Map<string, Function[]>;
@@ -3118,13 +3217,38 @@ interface IChatRoomEvents extends IWebSocketEvent {
3118
3217
  */
3119
3218
  all: (type: string, data: any) => void;
3120
3219
  }
3220
+ /**
3221
+ * 摸鱼派聊天室接口
3222
+ */
3121
3223
  declare class ChatRoom extends WsEventBase<IChatRoomEvents> {
3224
+ /**
3225
+ * 接口 API Key
3226
+ */
3122
3227
  private apiKey;
3228
+ /**
3229
+ * 讨论话题
3230
+ */
3123
3231
  private _discusse;
3232
+ /**
3233
+ * 在线用户列表
3234
+ */
3124
3235
  private _onlines;
3236
+ /**
3237
+ * WebSocket 心跳定时器
3238
+ */
3125
3239
  private wsTimer;
3240
+ /**
3241
+ * 客户端类型
3242
+ */
3126
3243
  private client;
3244
+ /**
3245
+ * 客户端版本
3246
+ */
3127
3247
  private version;
3248
+ /**
3249
+ * 实例化聊天室
3250
+ * @param token 认证 Token
3251
+ */
3128
3252
  constructor(token?: string);
3129
3253
  /**
3130
3254
  * 当前在线人数列表,需要先调用 addListener 添加聊天室消息监听
@@ -3136,6 +3260,7 @@ declare class ChatRoom extends WsEventBase<IChatRoomEvents> {
3136
3260
  get discusse(): string;
3137
3261
  /**
3138
3262
  * 設置当前聊天室话题
3263
+ * @param val 话题内容
3139
3264
  */
3140
3265
  set discusse(val: string);
3141
3266
  /**
@@ -3157,10 +3282,12 @@ declare class ChatRoom extends WsEventBase<IChatRoomEvents> {
3157
3282
  history(page?: number, type?: ChatContentType): Promise<IChatRoomMessage[]>;
3158
3283
  /**
3159
3284
  * 获取指定消息附近的聊天室消息
3160
- * @param oId 消息 Id
3161
- * @param mode 获取模式,context 上下文模式,after 之后模式
3162
- * @param size 获取消息数量,默认 25,最大 100
3163
- * @param type 获取消息类型,默认 HTML
3285
+ * @param params 获取参数
3286
+ * @param params.oId 消息 Id
3287
+ * @param params.mode 获取模式,context 上下文模式,after 之后模式
3288
+ * @param params.size 获取消息数量,默认 25,最大 100
3289
+ * @param params.type 获取消息类型,默认 HTML
3290
+ * @returns 聊天室消息列表
3164
3291
  */
3165
3292
  get({
3166
3293
  oId,
@@ -3243,6 +3370,9 @@ declare class RedPacket {
3243
3370
  }
3244
3371
  //#endregion
3245
3372
  //#region src/notice.d.ts
3373
+ /**
3374
+ * 通知事件监听器
3375
+ */
3246
3376
  interface INoticeEvents extends IWebSocketEvent {
3247
3377
  /**
3248
3378
  * 清风明月更新
@@ -3270,21 +3400,33 @@ interface INoticeEvents extends IWebSocketEvent {
3270
3400
  */
3271
3401
  warnBroadcast: (data: INoticeWarnBroadcast) => void;
3272
3402
  }
3403
+ /**
3404
+ * 摸鱼派通知接口
3405
+ */
3273
3406
  declare class Notice extends WsEventBase<INoticeEvents> {
3407
+ /**
3408
+ * 接口 API Key
3409
+ */
3274
3410
  private apiKey;
3411
+ /**
3412
+ * 实例化通知
3413
+ * @param token 认证 Token
3414
+ */
3275
3415
  constructor(token?: string);
3276
3416
  /**
3277
3417
  * 重新设置请求 Token
3278
- * @param apiKey 接口 API Key
3418
+ * @param token 接口 API Key
3279
3419
  */
3280
3420
  setToken(token: string): void;
3281
3421
  /**
3282
3422
  * 获取未读消息数
3423
+ * @returns 未读消息数信息
3283
3424
  */
3284
3425
  count(): Promise<INoticeCount>;
3285
3426
  /**
3286
3427
  * 获取消息列表
3287
3428
  * @param type 消息类型
3429
+ * @returns 消息列表
3288
3430
  */
3289
3431
  list(type: NoticeType): Promise<NoticeList>;
3290
3432
  /**
@@ -3302,22 +3444,39 @@ declare class Notice extends WsEventBase<INoticeEvents> {
3302
3444
  */
3303
3445
  reconnect(): Promise<unknown>;
3304
3446
  /**
3305
- * 连接用户私聊频道
3447
+ * 连接通知频道
3448
+ * @param reload 是否重新连接
3306
3449
  * @returns Websocket 连接对象
3307
3450
  */
3308
3451
  connect(reload?: boolean): Promise<ReconnectingWebSocket>;
3309
3452
  }
3310
3453
  //#endregion
3311
3454
  //#region src/emoji.d.ts
3455
+ /**
3456
+ * 摸鱼派表情接口
3457
+ */
3312
3458
  declare class Emoji {
3459
+ /**
3460
+ * 接口 API Key
3461
+ */
3313
3462
  private apiKey;
3463
+ /**
3464
+ * 自定义表情列表
3465
+ */
3314
3466
  private emojis;
3467
+ /**
3468
+ * 各个模块的实例化
3469
+ * @param token 认证 Token
3470
+ */
3315
3471
  constructor(token?: string);
3316
3472
  /**
3317
3473
  * 重新设置请求 Token
3318
- * @param apiKey 接口 API Key
3474
+ * @param token 接口 API Key
3319
3475
  */
3320
3476
  setToken(token: string): void;
3477
+ /**
3478
+ * 默认表情列表
3479
+ */
3321
3480
  get default(): {
3322
3481
  doge: string;
3323
3482
  trollface: string;
@@ -3511,12 +3670,22 @@ declare class Emoji {
3511
3670
  }
3512
3671
  //#endregion
3513
3672
  //#region src/user.d.ts
3673
+ /**
3674
+ * 摸鱼派用户接口
3675
+ */
3514
3676
  declare class User {
3677
+ /**
3678
+ * 接口 API Key
3679
+ */
3515
3680
  private apiKey;
3681
+ /**
3682
+ * 实例化用户
3683
+ * @param token 认证 Token
3684
+ */
3516
3685
  constructor(token?: string);
3517
3686
  /**
3518
3687
  * 重新设置请求 Token
3519
- * @param apiKey 接口 API Key
3688
+ * @param token 接口 API Key
3520
3689
  */
3521
3690
  setToken(token: string): void;
3522
3691
  /**
@@ -3570,27 +3739,53 @@ declare class User {
3570
3739
  /**
3571
3740
  * 修改用户头像
3572
3741
  * @param userAvatarURL 用户头像地址
3742
+ * @returns void
3573
3743
  */
3574
3744
  updateUserAvatar(userAvatarURL: string): Promise<void>;
3575
3745
  /**
3576
3746
  * 修改用户信息
3577
3747
  * @param data 用户信息参数
3748
+ * @returns void
3578
3749
  */
3579
3750
  updateUserInfo(data: UserUpdateParams): Promise<void>;
3580
3751
  }
3581
3752
  //#endregion
3582
3753
  //#region src/article.d.ts
3754
+ /**
3755
+ * 文章事件监听器
3756
+ */
3583
3757
  interface IArticleEvents extends IWebSocketEvent {
3758
+ /**
3759
+ * 热度更新
3760
+ * @param msg 文章热度信息
3761
+ */
3584
3762
  heat: (msg: IArticleHeat) => void;
3763
+ /**
3764
+ * 评论通知
3765
+ * @param msg 文章评论信息
3766
+ */
3585
3767
  comment: (msg: ArticleComment) => void;
3586
3768
  }
3769
+ /**
3770
+ * 摸鱼派文章接口
3771
+ */
3587
3772
  declare class Article {
3773
+ /**
3774
+ * 接口 API Key
3775
+ */
3588
3776
  private apiKey;
3777
+ /**
3778
+ * 文章频道
3779
+ */
3589
3780
  private channels;
3781
+ /**
3782
+ * 各个模块的实例化
3783
+ * @param token 认证 Token
3784
+ */
3590
3785
  constructor(token?: string);
3591
3786
  /**
3592
3787
  * 重新设置请求 Token
3593
- * @param apiKey 接口 API Key
3788
+ * @param token 接口 API Key
3594
3789
  */
3595
3790
  setToken(token: string): void;
3596
3791
  /**
@@ -3608,8 +3803,11 @@ declare class Article {
3608
3803
  update(id: string, data: IArticlePost): Promise<string>;
3609
3804
  /**
3610
3805
  * 查询文章列表
3611
- * @param type 查询类型
3612
- * @param tag 指定查询标签,可选
3806
+ * @param params 查询参数
3807
+ * @param params.type 查询类型
3808
+ * @param params.page 页码,默认 1
3809
+ * @param params.size 每页数量,默认 20
3810
+ * @param params.tag 指定查询标签,可选
3613
3811
  * @returns 文章列表
3614
3812
  */
3615
3813
  list({
@@ -3654,6 +3852,7 @@ declare class Article {
3654
3852
  /**
3655
3853
  * 感谢文章
3656
3854
  * @param id 文章id
3855
+ * @returns void
3657
3856
  */
3658
3857
  thank(id: string): Promise<void>;
3659
3858
  /**
@@ -3664,16 +3863,19 @@ declare class Article {
3664
3863
  /**
3665
3864
  * 取消收藏文章
3666
3865
  * @param followingId 文章id
3866
+ * @returns void
3667
3867
  */
3668
3868
  unfollow(followingId: string): Promise<void>;
3669
3869
  /**
3670
3870
  * 关注文章
3671
3871
  * @param followingId 文章id
3872
+ * @returns void
3672
3873
  */
3673
3874
  watch(followingId: string): Promise<void>;
3674
3875
  /**
3675
3876
  * 取消关注文章
3676
3877
  * @param followingId 文章id
3878
+ * @returns void
3677
3879
  */
3678
3880
  unwatch(followingId: string): Promise<void>;
3679
3881
  /**
@@ -3684,53 +3886,91 @@ declare class Article {
3684
3886
  /**
3685
3887
  * 获取文章在线人数
3686
3888
  * @param id 文章id
3889
+ * @returns 文章热度值
3687
3890
  */
3688
3891
  heat(id: string): Promise<number>;
3689
3892
  /**
3690
3893
  * 获取帖子的Markdown原文
3691
3894
  * @param articleId 文章Id
3895
+ * @returns 文章 Markdown 内容
3692
3896
  */
3693
3897
  md(articleId: string): Promise<string>;
3898
+ /**
3899
+ * 获取文章频道
3900
+ * @param id 文章 Id
3901
+ * @param type 文章类型
3902
+ * @returns 文章频道实例
3903
+ */
3694
3904
  channel(id: string, type: ArticleType): ArticleChannel;
3695
3905
  }
3906
+ /**
3907
+ * 文章实时频道
3908
+ */
3696
3909
  declare class ArticleChannel extends WsEventBase<IArticleEvents> {
3910
+ /**
3911
+ * 接口 API Key
3912
+ */
3697
3913
  private apiKey;
3914
+ /**
3915
+ * 文章 Id
3916
+ */
3698
3917
  private id;
3918
+ /**
3919
+ * 文章类型
3920
+ */
3699
3921
  private type;
3700
- constructor(token: string, id: string, type: ArticleType);
3701
3922
  /**
3702
- * 添加文章监听器
3703
- * @param id 文章id
3923
+ * 实例化文章频道
3924
+ * @param token 认证 Token
3925
+ * @param id 文章 Id
3704
3926
  * @param type 文章类型
3705
- * @param callback 监听回调
3927
+ */
3928
+ constructor(token: string, id: string, type: ArticleType);
3929
+ /**
3930
+ * 连接实时频道
3931
+ * @param reload 是否强制重连
3932
+ * @returns WebSocket 实例
3706
3933
  */
3707
3934
  connect(reload?: boolean): Promise<ReconnectingWebSocket>;
3708
3935
  }
3709
3936
  //#endregion
3710
3937
  //#region src/comment.d.ts
3938
+ /**
3939
+ * 摸鱼派评论接口
3940
+ */
3711
3941
  declare class Comment {
3942
+ /**
3943
+ * 接口 API Key
3944
+ */
3712
3945
  private apiKey;
3946
+ /**
3947
+ * 各个模块的实例化
3948
+ * @param token 认证 Token
3949
+ */
3713
3950
  constructor(token?: string);
3714
3951
  /**
3715
3952
  * 重新设置请求 Token
3716
- * @param apiKey 接口 API Key
3953
+ * @param token 接口 API Key
3717
3954
  */
3718
3955
  setToken(token: string): void;
3719
3956
  /**
3720
3957
  * 发布评论
3721
3958
  * @param data 评论信息
3959
+ * @returns void
3722
3960
  */
3723
3961
  send(data: ICommentPost): Promise<void>;
3724
3962
  /**
3725
3963
  * 更新评论
3726
3964
  * @param id 评论 Id
3727
3965
  * @param data 评论信息
3966
+ * @returns 评论内容
3728
3967
  */
3729
3968
  update(id: string, data: ICommentPost): Promise<string>;
3730
3969
  /**
3731
3970
  * 评论点赞
3732
3971
  * @param id 评论 Id
3733
3972
  * @param type 点赞类型
3973
+ * @returns 投票状态
3734
3974
  */
3735
3975
  vote(id: string, type: 'up' | 'down'): Promise<VoteType>;
3736
3976
  /**
@@ -3746,6 +3986,9 @@ declare class Comment {
3746
3986
  }
3747
3987
  //#endregion
3748
3988
  //#region src/chat.d.ts
3989
+ /**
3990
+ * 私聊事件监听器
3991
+ */
3749
3992
  interface IChatEvents extends IWebSocketEvent {
3750
3993
  /**
3751
3994
  * 私聊消息
@@ -3758,9 +4001,23 @@ interface IChatEvents extends IWebSocketEvent {
3758
4001
  */
3759
4002
  revoke: (oId: string) => void;
3760
4003
  }
4004
+ /**
4005
+ * 私聊频道
4006
+ */
3761
4007
  declare class ChatChannel extends WsEventBase<IChatEvents> {
4008
+ /**
4009
+ * 接口 API Key
4010
+ */
3762
4011
  private apiKey;
4012
+ /**
4013
+ * 目标用户名
4014
+ */
3763
4015
  private user;
4016
+ /**
4017
+ * 实例化私聊频道
4018
+ * @param user 目标用户名
4019
+ * @param apiKey 接口 API Key
4020
+ */
3764
4021
  constructor(user: string, apiKey: string);
3765
4022
  /**
3766
4023
  * 重新设置请求 Token
@@ -3772,7 +4029,15 @@ declare class ChatChannel extends WsEventBase<IChatEvents> {
3772
4029
  * @returns Websocket 连接对象
3773
4030
  */
3774
4031
  connect(reload?: boolean): Promise<ReconnectingWebSocket>;
4032
+ /**
4033
+ * 发送私聊消息
4034
+ * @param msg 消息内容
4035
+ * @returns void
4036
+ */
3775
4037
  send(msg: string): Promise<void>;
4038
+ /**
4039
+ * 关闭私聊频道
4040
+ */
3776
4041
  close(): void;
3777
4042
  /**
3778
4043
  * 获取用户私聊历史消息
@@ -3829,18 +4094,29 @@ declare class Chat {
3829
4094
  }
3830
4095
  //#endregion
3831
4096
  //#region src/breezemoon.d.ts
4097
+ /**
4098
+ * 摸鱼派清风明月接口
4099
+ */
3832
4100
  declare class Breezemoon {
4101
+ /**
4102
+ * 接口 API Key
4103
+ */
3833
4104
  private apiKey;
4105
+ /**
4106
+ * 各个模块的实例化
4107
+ * @param token 认证 Token
4108
+ */
3834
4109
  constructor(token?: string);
3835
4110
  /**
3836
4111
  * 重新设置请求 Token
3837
- * @param apiKey 接口 API Key
4112
+ * @param token 接口 API Key
3838
4113
  */
3839
4114
  setToken(token: string): void;
3840
4115
  /**
3841
4116
  * 获取清风明月列表
3842
4117
  * @param page 消息页码
3843
4118
  * @param size 每页个数
4119
+ * @returns 清风明月列表
3844
4120
  */
3845
4121
  list(page?: number, size?: number): Promise<BreezemoonContent[]>;
3846
4122
  /**
@@ -3848,29 +4124,44 @@ declare class Breezemoon {
3848
4124
  * @param user 用户名
3849
4125
  * @param page 消息页码
3850
4126
  * @param size 每页个数
4127
+ * @returns 清风明月列表
3851
4128
  */
3852
4129
  listByUser(user: string, page?: number, size?: number): Promise<BreezemoonList>;
3853
4130
  /**
3854
4131
  * 发送清风明月
3855
4132
  * @param content 内容
4133
+ * @returns void
3856
4134
  */
3857
4135
  send(content: string): Promise<void>;
3858
4136
  }
3859
4137
  //#endregion
3860
4138
  //#region src/finger.d.ts
4139
+ /**
4140
+ * 摸鱼派金手指接口
4141
+ */
3861
4142
  declare class Finger {
4143
+ /**
4144
+ * 金手指密钥
4145
+ */
3862
4146
  private goldFingerKey;
4147
+ /**
4148
+ * 实例化金手指
4149
+ * @param key 金手指密钥
4150
+ */
3863
4151
  constructor(key: string);
3864
4152
  /**
3865
4153
  * 设置金手指
3866
4154
  * @param key 金手指密钥
4155
+ * @returns void
3867
4156
  */
3868
4157
  setFinger(key: string): void;
3869
4158
  /**
3870
4159
  * 上传摸鱼大闯关关卡数据
3871
- * @param userName: 用户在摸鱼派的用户名
3872
- * @param stage: 关卡数
3873
- * @param time: 通过此关时间(毫秒级时间戳)
4160
+ * @param params 关卡数据
4161
+ * @param params.userName 用户在摸鱼派的用户名
4162
+ * @param params.stage 关卡数
4163
+ * @param params.time 通过此关时间(毫秒级时间戳)
4164
+ * @returns void
3874
4165
  */
3875
4166
  addMofishScore({
3876
4167
  userName,
@@ -3883,13 +4174,15 @@ declare class Finger {
3883
4174
  }): Promise<void>;
3884
4175
  /**
3885
4176
  * 查询用户最近登录的IP地址
3886
- * @param userName: 用户在摸鱼派的用户名
4177
+ * @param userName 用户在摸鱼派的用户名
4178
+ * @returns 用户 IP 信息
3887
4179
  */
3888
4180
  queryLatestLoginIP(userName: string): Promise<IUserIP>;
3889
4181
  /**
3890
4182
  * 添加勋章
3891
- * @param userName: 用户在摸鱼派的用户名
3892
- * @param metal: 勋章信息
4183
+ * @param userName 用户在摸鱼派的用户名
4184
+ * @param metal 勋章信息
4185
+ * @returns void
3893
4186
  */
3894
4187
  addMetal(userName: string, metal: MetalBase): Promise<void>;
3895
4188
  /**
@@ -3933,9 +4226,19 @@ declare class Finger {
3933
4226
  * @param userName: 用户在摸鱼派的用户名
3934
4227
  */
3935
4228
  getYesterDayLivenessReward(userName: string): Promise<number>;
4229
+ /**
4230
+ * 给指定用户发送通知
4231
+ * @param userName: 用户在摸鱼派的用户名
4232
+ * @param notification: 通知内容
4233
+ * @returns void
4234
+ */
4235
+ sendNotice(userName: string, notification: string): Promise<void>;
3936
4236
  }
3937
4237
  //#endregion
3938
4238
  //#region src/index.d.ts
4239
+ /**
4240
+ * 摸鱼派 SDK 主入口
4241
+ */
3939
4242
  declare class FishPi {
3940
4243
  /**
3941
4244
  * 请求 API 的 API Key
@@ -3978,7 +4281,17 @@ declare class FishPi {
3978
4281
  * @param token 接口 API Key,没有可以传空
3979
4282
  */
3980
4283
  constructor(token?: string);
4284
+ /**
4285
+ * 设置请求 Token
4286
+ * @param apiKey 接口 API Key
4287
+ * @returns void
4288
+ */
3981
4289
  setToken(apiKey: string): Promise<void>;
4290
+ /**
4291
+ * 设置 API 域名
4292
+ * @param domain API 域名
4293
+ * @returns void
4294
+ */
3982
4295
  setDomain(domain: string): Promise<void>;
3983
4296
  /**
3984
4297
  * 登录账号返回 API Key
@@ -3988,17 +4301,19 @@ declare class FishPi {
3988
4301
  /**
3989
4302
  * 预注册账号
3990
4303
  * @param data 用户信息
3991
- * @returns
4304
+ * @returns void
3992
4305
  */
3993
4306
  preRegister(data: PreRegisterInfo): Promise<void>;
3994
4307
  /**
3995
4308
  * 验证手机验证码
3996
4309
  * @param code 验证码
3997
- * @returns
4310
+ * @returns 验证状态
3998
4311
  */
3999
4312
  verify(code: string): Promise<number>;
4000
4313
  /**
4001
4314
  * 注册账号
4315
+ * @param data 注册信息
4316
+ * @returns void
4002
4317
  */
4003
4318
  register(data: RegisterInfo): Promise<void>;
4004
4319
  /**