@ikenxuan/amagi 5.4.2 → 5.5.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.
@@ -4,6 +4,647 @@ import * as express from 'express';
4
4
  import express__default, { Router, RequestHandler } from 'express';
5
5
  import { ChalkInstance } from 'chalk';
6
6
 
7
+ type XiaohongshuEmojiList = {
8
+ code: number;
9
+ data: DataData$h;
10
+ msg: string;
11
+ success: boolean;
12
+ [property: string]: any;
13
+ };
14
+ type DataData$h = {
15
+ emoji: DataEmoji;
16
+ result: Result$4;
17
+ version: number;
18
+ [property: string]: any;
19
+ };
20
+ type DataEmoji = {
21
+ tabs: Tab[];
22
+ [property: string]: any;
23
+ };
24
+ type Tab = {
25
+ collection?: Collection[];
26
+ [property: string]: any;
27
+ };
28
+ type Collection = {
29
+ emoji: EmojiElement[];
30
+ name: string;
31
+ [property: string]: any;
32
+ };
33
+ type EmojiElement = {
34
+ image: string;
35
+ image_name: string;
36
+ [property: string]: any;
37
+ };
38
+ type Result$4 = {
39
+ code: number;
40
+ message: string;
41
+ success: boolean;
42
+ [property: string]: any;
43
+ };
44
+
45
+ type SearchNotes = {
46
+ code: number;
47
+ data: DataData$g;
48
+ msg: string;
49
+ success: boolean;
50
+ [property: string]: any;
51
+ };
52
+ type DataData$g = {
53
+ has_more: boolean;
54
+ items: Item$a[];
55
+ [property: string]: any;
56
+ };
57
+ type Item$a = {
58
+ id: string;
59
+ model_type: string;
60
+ note_card: NoteCard$2;
61
+ rec_query: RecQuery;
62
+ xsec_token: string;
63
+ [property: string]: any;
64
+ };
65
+ type NoteCard$2 = {
66
+ corner_tag_info: CornerTagInfo[];
67
+ cover: Cover$6;
68
+ display_title: string;
69
+ image_list: ImageList$2[];
70
+ interact_info: InteractInfo$2;
71
+ type: string;
72
+ user: User$4;
73
+ [property: string]: any;
74
+ };
75
+ type CornerTagInfo = {
76
+ text: string;
77
+ type: string;
78
+ [property: string]: any;
79
+ };
80
+ type Cover$6 = {
81
+ height: number;
82
+ url_default: string;
83
+ url_pre: string;
84
+ width: number;
85
+ [property: string]: any;
86
+ };
87
+ type ImageList$2 = {
88
+ height: number;
89
+ info_list: InfoList$3[];
90
+ width: number;
91
+ [property: string]: any;
92
+ };
93
+ type InfoList$3 = {
94
+ image_scene: string;
95
+ url: string;
96
+ [property: string]: any;
97
+ };
98
+ type InteractInfo$2 = {
99
+ collected: boolean;
100
+ collected_count: string;
101
+ comment_count: string;
102
+ liked: boolean;
103
+ liked_count: string;
104
+ shared_count: string;
105
+ [property: string]: any;
106
+ };
107
+ type User$4 = {
108
+ avatar: string;
109
+ nick_name: string;
110
+ nickname: string;
111
+ user_id: string;
112
+ xsec_token: string;
113
+ [property: string]: any;
114
+ };
115
+ type RecQuery = {
116
+ queries: Query[];
117
+ source: number;
118
+ title: string;
119
+ word_request_id: string;
120
+ [property: string]: any;
121
+ };
122
+ type Query = {
123
+ id: string;
124
+ name: string;
125
+ search_word: string;
126
+ [property: string]: any;
127
+ };
128
+
129
+ interface XiaohongshuMethodOptionsMap {
130
+ HomeFeedParams: {
131
+ methodType: '首页推荐数据';
132
+ /** 游标分数,用于分页 */
133
+ cursor_score?: string;
134
+ /** 每次请求的数量 */
135
+ num?: number;
136
+ /** 刷新类型 */
137
+ refresh_type?: number;
138
+ /** 笔记索引 */
139
+ note_index?: number;
140
+ /** 分类 */
141
+ category?: string;
142
+ /** 搜索关键词 */
143
+ search_key?: string;
144
+ };
145
+ NoteParams: {
146
+ methodType: '单个笔记数据';
147
+ /** 笔记ID */
148
+ note_id: string;
149
+ /** 反爬的 X-Sec-Token 可从web地址中获取 */
150
+ xsec_token: string;
151
+ };
152
+ CommentParams: {
153
+ methodType: '评论数据';
154
+ /** 笔记ID */
155
+ note_id: string;
156
+ /** 游标 */
157
+ cursor?: string;
158
+ /** 反爬的 X-Sec-Token 可从web地址中获取 */
159
+ xsec_token: string;
160
+ };
161
+ UserParams: {
162
+ methodType: '用户数据';
163
+ /** 用户ID */
164
+ user_id: string;
165
+ };
166
+ UserNoteParams: {
167
+ methodType: '用户笔记数据';
168
+ /** 用户ID */
169
+ user_id: string;
170
+ /** 上一页最后一条笔记的ID */
171
+ cursor?: string;
172
+ /**
173
+ * 每次请求的数量
174
+ * @default 30
175
+ */
176
+ num?: number;
177
+ };
178
+ EmojiListParams: {
179
+ methodType: '表情列表';
180
+ };
181
+ SearchNoteParams: {
182
+ methodType: '搜索笔记';
183
+ /** 搜索关键词 */
184
+ keyword: string;
185
+ /** 页码 */
186
+ page?: number;
187
+ /** 每页数量 */
188
+ page_size?: number;
189
+ /** 排序类型 */
190
+ sort?: SearchSortType;
191
+ /** 笔记类型 */
192
+ note_type?: SearchNoteType;
193
+ };
194
+ }
195
+ type XiaohongshuMethodOptionsWithoutMethodType = {
196
+ [K in keyof XiaohongshuMethodOptionsMap]: Omit<XiaohongshuMethodOptionsMap[K], 'methodType'>;
197
+ };
198
+
199
+ /**
200
+ * 搜索排序类型枚举
201
+ */
202
+ declare enum SearchSortType {
203
+ /**
204
+ * 默认排序
205
+ */
206
+ GENERAL = "general",
207
+ /**
208
+ * 最受欢迎(按热度降序)
209
+ */
210
+ MOST_POPULAR = "popularity_descending",
211
+ /**
212
+ * 最新发布(按时间降序)
213
+ */
214
+ LATEST = "time_descending"
215
+ }
216
+ /**
217
+ * 搜索笔记类型枚举
218
+ */
219
+ declare enum SearchNoteType {
220
+ /**
221
+ * 默认(全部类型)
222
+ */
223
+ ALL = 0,
224
+ /**
225
+ * 仅视频
226
+ */
227
+ VIDEO = 1,
228
+ /**
229
+ * 仅图片
230
+ */
231
+ IMAGE = 2
232
+ }
233
+ /**
234
+ * 小红书API地址配置
235
+ */
236
+ declare const xiaohongshuApiUrls: {
237
+ /**
238
+ * 获取首页推荐数据的接口地址
239
+ * @param data - 请求参数
240
+ * @returns 完整的接口URL
241
+ */
242
+ 首页推荐数据(data?: XiaohongshuMethodOptionsWithoutMethodType["HomeFeedParams"]): {
243
+ apiPath: string;
244
+ Url: string;
245
+ Body: {
246
+ cursor_score: string;
247
+ num: number;
248
+ refresh_type: number;
249
+ note_index: number;
250
+ category: string;
251
+ search_key: string;
252
+ image_formats: string[];
253
+ };
254
+ };
255
+ /**
256
+ * 获取单个笔记数据的接口地址
257
+ * @param data - 请求参数
258
+ * @returns 完整的接口URL
259
+ */
260
+ 单个笔记数据(data: XiaohongshuMethodOptionsWithoutMethodType["NoteParams"]): {
261
+ apiPath: string;
262
+ Url: string;
263
+ Body: {
264
+ source_note_id: string;
265
+ image_formats: string[];
266
+ extra: {
267
+ need_body_topic: string;
268
+ };
269
+ xsec_source: string;
270
+ xsec_token: string;
271
+ };
272
+ };
273
+ /**
274
+ * 获取评论数据的接口地址
275
+ * @param data - 请求参数
276
+ * @returns 完整的接口URL
277
+ */
278
+ 评论数据(data: XiaohongshuMethodOptionsWithoutMethodType["CommentParams"]): {
279
+ apiPath: string;
280
+ Url: string;
281
+ };
282
+ /**
283
+ * 获取用户数据的接口地址
284
+ * @param data - 请求参数
285
+ * @returns 完整的接口URL
286
+ */
287
+ 用户数据(data: XiaohongshuMethodOptionsWithoutMethodType["UserParams"]): {
288
+ apiPath: string;
289
+ Url: string;
290
+ };
291
+ /**
292
+ * 获取用户笔记数据的接口地址
293
+ * @param data - 请求参数
294
+ * @returns 完整的接口URL
295
+ */
296
+ 用户笔记数据(data: XiaohongshuMethodOptionsWithoutMethodType["UserNoteParams"]): {
297
+ apiPath: string;
298
+ Url: string;
299
+ };
300
+ /**
301
+ * 获取笔记表情列表的接口地址
302
+ * @param data - 请求参数
303
+ * @returns 完整的接口URL
304
+ */
305
+ 表情列表(data: XiaohongshuMethodOptionsWithoutMethodType["EmojiListParams"]): {
306
+ apiPath: string;
307
+ Url: string;
308
+ };
309
+ /**
310
+ * 搜索笔记的接口地址
311
+ * @param data - 请求参数
312
+ * @returns 完整的接口URL
313
+ */
314
+ 搜索笔记(data: XiaohongshuMethodOptionsWithoutMethodType["SearchNoteParams"]): {
315
+ apiPath: string;
316
+ Body: {
317
+ keyword: string;
318
+ page: number;
319
+ page_size: number;
320
+ sort: SearchSortType;
321
+ note_type: SearchNoteType;
322
+ search_id: string;
323
+ image_formats: string[];
324
+ };
325
+ Url: string;
326
+ };
327
+ };
328
+
329
+ type XiaohongshuUserProfile = {
330
+ code: number;
331
+ data: DataData$f;
332
+ msg: string;
333
+ [property: string]: any;
334
+ };
335
+ type DataData$f = {
336
+ basicInfo: BasicInfo;
337
+ extraInfo: ExtraInfo$1;
338
+ interactions: Interaction[];
339
+ result: Result$3;
340
+ tabPublic: TabPublic;
341
+ tags: Tag$1[];
342
+ verifyInfo: VerifyInfo;
343
+ [property: string]: any;
344
+ };
345
+ type BasicInfo = {
346
+ desc: string;
347
+ gender: number;
348
+ imageb: string;
349
+ images: string;
350
+ ipLocation: string;
351
+ nickname: string;
352
+ redId: string;
353
+ [property: string]: any;
354
+ };
355
+ type ExtraInfo$1 = {
356
+ blockType: string;
357
+ fstatus: string;
358
+ [property: string]: any;
359
+ };
360
+ type Interaction = {
361
+ count: string;
362
+ name: string;
363
+ type: string;
364
+ [property: string]: any;
365
+ };
366
+ type Result$3 = {
367
+ code: number;
368
+ message: string;
369
+ success: boolean;
370
+ [property: string]: any;
371
+ };
372
+ type TabPublic = {
373
+ collection: boolean;
374
+ collectionBoard: CollectionBoard;
375
+ collectionNote: CollectionNote;
376
+ [property: string]: any;
377
+ };
378
+ type CollectionBoard = {
379
+ count: number;
380
+ display: boolean;
381
+ lock: boolean;
382
+ [property: string]: any;
383
+ };
384
+ type CollectionNote = {
385
+ count: number;
386
+ display: boolean;
387
+ lock: boolean;
388
+ [property: string]: any;
389
+ };
390
+ type Tag$1 = {
391
+ icon?: string;
392
+ tagType?: string;
393
+ [property: string]: any;
394
+ };
395
+ type VerifyInfo = {
396
+ redOfficialVerifyType: number;
397
+ [property: string]: any;
398
+ };
399
+
400
+ type NoteComments = {
401
+ code: number;
402
+ data: DataData$e;
403
+ msg: string;
404
+ success: boolean;
405
+ [property: string]: any;
406
+ };
407
+ type DataData$e = {
408
+ comments: Comment$9[];
409
+ cursor: string;
410
+ has_more: boolean;
411
+ time: number;
412
+ user_id: string;
413
+ xsec_token: string;
414
+ [property: string]: any;
415
+ };
416
+ type Comment$9 = {
417
+ at_users: string[];
418
+ content: string;
419
+ create_time: number;
420
+ id: string;
421
+ ip_location: string;
422
+ like_count: string;
423
+ liked: boolean;
424
+ note_id: string;
425
+ pictures: Picture[];
426
+ show_tags: string[];
427
+ status: number;
428
+ sub_comment_count: string;
429
+ sub_comment_cursor: string;
430
+ sub_comment_has_more: boolean;
431
+ sub_comments: SubComment$1[];
432
+ user_info: CommentUserInfo;
433
+ [property: string]: any;
434
+ };
435
+ type Picture = {
436
+ height: number;
437
+ info_list: InfoList$2[];
438
+ url_default: string;
439
+ url_pre: string;
440
+ width: number;
441
+ [property: string]: any;
442
+ };
443
+ type InfoList$2 = {
444
+ image_scene: string;
445
+ url: string;
446
+ [property: string]: any;
447
+ };
448
+ type SubComment$1 = {
449
+ at_users: string[];
450
+ content: string;
451
+ create_time: number;
452
+ id: string;
453
+ ip_location: string;
454
+ like_count: string;
455
+ liked: boolean;
456
+ note_id: string;
457
+ pictures: string[];
458
+ show_tags: string[];
459
+ status: number;
460
+ target_comment: TargetComment;
461
+ user_info: SubCommentUserInfo;
462
+ [property: string]: any;
463
+ };
464
+ type TargetComment = {
465
+ id: string;
466
+ user_info: TargetCommentUserInfo;
467
+ [property: string]: any;
468
+ };
469
+ type TargetCommentUserInfo = {
470
+ image: string;
471
+ nickname: string;
472
+ user_id: string;
473
+ xsec_token: string;
474
+ [property: string]: any;
475
+ };
476
+ type SubCommentUserInfo = {
477
+ image: string;
478
+ nickname: string;
479
+ user_id: string;
480
+ xsec_token: string;
481
+ [property: string]: any;
482
+ };
483
+ type CommentUserInfo = {
484
+ image: string;
485
+ nickname: string;
486
+ user_id: string;
487
+ xsec_token: string;
488
+ [property: string]: any;
489
+ };
490
+
491
+ type OneNote = {
492
+ code: number;
493
+ data: DataData$d;
494
+ msg: string;
495
+ success: boolean;
496
+ [property: string]: any;
497
+ };
498
+ type DataData$d = {
499
+ current_time: number;
500
+ cursor_score: string;
501
+ items: Item$9[];
502
+ [property: string]: any;
503
+ };
504
+ type Item$9 = {
505
+ id?: string;
506
+ model_type?: string;
507
+ note_card?: NoteCard$1;
508
+ [property: string]: any;
509
+ };
510
+ type NoteCard$1 = {
511
+ at_user_list: AtUserList[];
512
+ desc: string;
513
+ image_list: ImageList$1[];
514
+ interact_info: InteractInfo$1;
515
+ ip_location: string;
516
+ last_update_time: number;
517
+ note_id: string;
518
+ share_info: ShareInfo$3;
519
+ tag_list: TagList[];
520
+ time: number;
521
+ title: string;
522
+ type: string;
523
+ user: User$3;
524
+ [property: string]: any;
525
+ };
526
+ type AtUserList = {
527
+ nickname: string;
528
+ user_id: string;
529
+ xsec_token: string;
530
+ [property: string]: any;
531
+ };
532
+ type ImageList$1 = {
533
+ file_id: string;
534
+ height: number;
535
+ info_list: InfoList$1[];
536
+ live_photo: boolean;
537
+ stream: {
538
+ [key: string]: any;
539
+ };
540
+ trace_id: string;
541
+ url: string;
542
+ url_default: string;
543
+ url_pre: string;
544
+ width: number;
545
+ [property: string]: any;
546
+ };
547
+ type InfoList$1 = {
548
+ image_scene: string;
549
+ url: string;
550
+ [property: string]: any;
551
+ };
552
+ type InteractInfo$1 = {
553
+ collected: boolean;
554
+ collected_count: string;
555
+ comment_count: string;
556
+ followed: boolean;
557
+ liked: boolean;
558
+ liked_count: string;
559
+ relation: string;
560
+ share_count: string;
561
+ [property: string]: any;
562
+ };
563
+ type ShareInfo$3 = {
564
+ un_share: boolean;
565
+ [property: string]: any;
566
+ };
567
+ type TagList = {
568
+ id: string;
569
+ name: string;
570
+ type: string;
571
+ [property: string]: any;
572
+ };
573
+ type User$3 = {
574
+ avatar: string;
575
+ nickname: string;
576
+ user_id: string;
577
+ xsec_token: string;
578
+ [property: string]: any;
579
+ };
580
+
581
+ type HomeFeed = {
582
+ code: number;
583
+ data: DataData$c;
584
+ msg: string;
585
+ success: boolean;
586
+ [property: string]: any;
587
+ };
588
+ type DataData$c = {
589
+ cursor_score: string;
590
+ items: Item$8[];
591
+ [property: string]: any;
592
+ };
593
+ type Item$8 = {
594
+ id: string;
595
+ ignore: boolean;
596
+ model_type: string;
597
+ note_card: NoteCard;
598
+ track_id: string;
599
+ xsec_token: string;
600
+ [property: string]: any;
601
+ };
602
+ type NoteCard = {
603
+ cover: Cover$5;
604
+ display_title: string;
605
+ interact_info: InteractInfo;
606
+ type: string;
607
+ user: User$2;
608
+ video?: Video$7;
609
+ [property: string]: any;
610
+ };
611
+ type Cover$5 = {
612
+ file_id: string;
613
+ height: number;
614
+ info_list: InfoList[];
615
+ url: string;
616
+ url_default: string;
617
+ url_pre: string;
618
+ width: number;
619
+ [property: string]: any;
620
+ };
621
+ type InfoList = {
622
+ image_scene: string;
623
+ url: string;
624
+ [property: string]: any;
625
+ };
626
+ type InteractInfo = {
627
+ liked: boolean;
628
+ liked_count: string;
629
+ [property: string]: any;
630
+ };
631
+ type User$2 = {
632
+ avatar: string;
633
+ nick_name: string;
634
+ nickname: string;
635
+ user_id: string;
636
+ xsec_token: string;
637
+ [property: string]: any;
638
+ };
639
+ type Video$7 = {
640
+ capa: Capa;
641
+ [property: string]: any;
642
+ };
643
+ type Capa = {
644
+ duration: number;
645
+ [property: string]: any;
646
+ };
647
+
7
648
  /**
8
649
  * 视频信息参数类型
9
650
  */
@@ -78,19 +719,19 @@ declare const BilibiliValidationSchemas: {
78
719
  readonly 单个视频作品数据: z.ZodType<{
79
720
  methodType: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E";
80
721
  bvid: string;
81
- }, z.ZodTypeDef, {
722
+ }, unknown, z.core.$ZodTypeInternals<{
82
723
  methodType: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E";
83
724
  bvid: string;
84
- }>;
725
+ }, unknown>>;
85
726
  readonly 单个视频下载信息数据: z.ZodType<{
86
727
  methodType: "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E";
87
728
  avid: number;
88
729
  cid: number;
89
- }, z.ZodTypeDef, {
730
+ }, unknown, z.core.$ZodTypeInternals<{
90
731
  methodType: "\u5355\u4E2A\u89C6\u9891\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E";
91
732
  avid: number;
92
733
  cid: number;
93
- }>;
734
+ }, unknown>>;
94
735
  readonly 评论数据: z.ZodType<{
95
736
  methodType: "\u8BC4\u8BBA\u6570\u636E";
96
737
  type: number;
@@ -101,7 +742,7 @@ declare const BilibiliValidationSchemas: {
101
742
  plat?: number;
102
743
  seek_rpid?: string;
103
744
  web_location?: string;
104
- }, z.ZodTypeDef, {
745
+ }, unknown, z.core.$ZodTypeInternals<{
105
746
  methodType: "\u8BC4\u8BBA\u6570\u636E";
106
747
  type: number;
107
748
  oid: string;
@@ -111,110 +752,110 @@ declare const BilibiliValidationSchemas: {
111
752
  plat?: number;
112
753
  seek_rpid?: string;
113
754
  web_location?: string;
114
- }>;
755
+ }, unknown>>;
115
756
  readonly 用户主页数据: z.ZodType<{
116
757
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
117
758
  host_mid: number;
118
- }, z.ZodTypeDef, {
759
+ }, unknown, z.core.$ZodTypeInternals<{
119
760
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
120
761
  host_mid: number;
121
- }>;
762
+ }, unknown>>;
122
763
  readonly 用户主页动态列表数据: z.ZodType<{
123
764
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
124
765
  host_mid: number;
125
- }, z.ZodTypeDef, {
766
+ }, unknown, z.core.$ZodTypeInternals<{
126
767
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
127
768
  host_mid: number;
128
- }>;
769
+ }, unknown>>;
129
770
  readonly Emoji数据: z.ZodType<{
130
771
  methodType: "Emoji\u6570\u636E";
131
- }, z.ZodTypeDef, {
772
+ }, unknown, z.core.$ZodTypeInternals<{
132
773
  methodType: "Emoji\u6570\u636E";
133
- }>;
774
+ }, unknown>>;
134
775
  readonly 番剧基本信息数据: z.ZodType<{
135
776
  methodType: "\u756A\u5267\u57FA\u672C\u4FE1\u606F\u6570\u636E";
136
777
  season_id?: string;
137
778
  ep_id?: string;
138
- }, z.ZodTypeDef, {
779
+ }, unknown, z.core.$ZodTypeInternals<{
139
780
  methodType: "\u756A\u5267\u57FA\u672C\u4FE1\u606F\u6570\u636E";
140
781
  season_id?: string;
141
782
  ep_id?: string;
142
- }>;
783
+ }, unknown>>;
143
784
  readonly 番剧下载信息数据: z.ZodType<{
144
785
  methodType: "\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E";
145
786
  cid: number;
146
787
  ep_id: string;
147
- }, z.ZodTypeDef, {
788
+ }, unknown, z.core.$ZodTypeInternals<{
148
789
  methodType: "\u756A\u5267\u4E0B\u8F7D\u4FE1\u606F\u6570\u636E";
149
790
  cid: number;
150
791
  ep_id: string;
151
- }>;
792
+ }, unknown>>;
152
793
  readonly 动态详情数据: z.ZodType<{
153
794
  methodType: "\u52A8\u6001\u8BE6\u60C5\u6570\u636E" | "\u52A8\u6001\u5361\u7247\u6570\u636E";
154
795
  dynamic_id: string;
155
- }, z.ZodTypeDef, {
796
+ }, unknown, z.core.$ZodTypeInternals<{
156
797
  methodType: "\u52A8\u6001\u8BE6\u60C5\u6570\u636E" | "\u52A8\u6001\u5361\u7247\u6570\u636E";
157
798
  dynamic_id: string;
158
- }>;
799
+ }, unknown>>;
159
800
  readonly 动态卡片数据: z.ZodType<{
160
801
  methodType: "\u52A8\u6001\u8BE6\u60C5\u6570\u636E" | "\u52A8\u6001\u5361\u7247\u6570\u636E";
161
802
  dynamic_id: string;
162
- }, z.ZodTypeDef, {
803
+ }, unknown, z.core.$ZodTypeInternals<{
163
804
  methodType: "\u52A8\u6001\u8BE6\u60C5\u6570\u636E" | "\u52A8\u6001\u5361\u7247\u6570\u636E";
164
805
  dynamic_id: string;
165
- }>;
806
+ }, unknown>>;
166
807
  readonly 直播间信息: z.ZodType<{
167
808
  methodType: "\u76F4\u64AD\u95F4\u4FE1\u606F" | "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F";
168
809
  room_id: string;
169
- }, z.ZodTypeDef, {
810
+ }, unknown, z.core.$ZodTypeInternals<{
170
811
  methodType: "\u76F4\u64AD\u95F4\u4FE1\u606F" | "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F";
171
812
  room_id: string;
172
- }>;
813
+ }, unknown>>;
173
814
  readonly 直播间初始化信息: z.ZodType<{
174
815
  methodType: "\u76F4\u64AD\u95F4\u4FE1\u606F" | "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F";
175
816
  room_id: string;
176
- }, z.ZodTypeDef, {
817
+ }, unknown, z.core.$ZodTypeInternals<{
177
818
  methodType: "\u76F4\u64AD\u95F4\u4FE1\u606F" | "\u76F4\u64AD\u95F4\u521D\u59CB\u5316\u4FE1\u606F";
178
819
  room_id: string;
179
- }>;
820
+ }, unknown>>;
180
821
  readonly 登录基本信息: z.ZodType<{
181
822
  methodType: "\u767B\u5F55\u57FA\u672C\u4FE1\u606F";
182
- }, z.ZodTypeDef, {
823
+ }, unknown, z.core.$ZodTypeInternals<{
183
824
  methodType: "\u767B\u5F55\u57FA\u672C\u4FE1\u606F";
184
- }>;
825
+ }, unknown>>;
185
826
  readonly 申请二维码: z.ZodType<{
186
827
  methodType: "\u7533\u8BF7\u4E8C\u7EF4\u7801";
187
- }, z.ZodTypeDef, {
828
+ }, unknown, z.core.$ZodTypeInternals<{
188
829
  methodType: "\u7533\u8BF7\u4E8C\u7EF4\u7801";
189
- }>;
830
+ }, unknown>>;
190
831
  readonly 二维码状态: z.ZodType<{
191
832
  methodType: "\u4E8C\u7EF4\u7801\u72B6\u6001";
192
833
  qrcode_key: string;
193
- }, z.ZodTypeDef, {
834
+ }, unknown, z.core.$ZodTypeInternals<{
194
835
  methodType: "\u4E8C\u7EF4\u7801\u72B6\u6001";
195
836
  qrcode_key: string;
196
- }>;
837
+ }, unknown>>;
197
838
  readonly 获取UP主总播放量: z.ZodType<{
198
839
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
199
840
  host_mid: number;
200
- }, z.ZodTypeDef, {
841
+ }, unknown, z.core.$ZodTypeInternals<{
201
842
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u52A8\u6001\u5217\u8868\u6570\u636E" | "\u83B7\u53D6UP\u4E3B\u603B\u64AD\u653E\u91CF";
202
843
  host_mid: number;
203
- }>;
844
+ }, unknown>>;
204
845
  readonly AV转BV: z.ZodType<{
205
846
  methodType: "AV\u8F6CBV";
206
847
  avid: number;
207
- }, z.ZodTypeDef, {
848
+ }, unknown, z.core.$ZodTypeInternals<{
208
849
  methodType: "AV\u8F6CBV";
209
850
  avid: number;
210
- }>;
851
+ }, unknown>>;
211
852
  readonly BV转AV: z.ZodType<{
212
853
  methodType: "BV\u8F6CAV";
213
854
  bvid: string;
214
- }, z.ZodTypeDef, {
855
+ }, unknown, z.core.$ZodTypeInternals<{
215
856
  methodType: "BV\u8F6CAV";
216
857
  bvid: string;
217
- }>;
858
+ }, unknown>>;
218
859
  };
219
860
 
220
861
  type BilibiliMethodType = keyof typeof BilibiliValidationSchemas;
@@ -394,142 +1035,142 @@ declare const DouyinValidationSchemas: {
394
1035
  readonly 文字作品数据: z.ZodType<{
395
1036
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
396
1037
  aweme_id: string;
397
- }, z.ZodTypeDef, {
1038
+ }, unknown, z.core.$ZodTypeInternals<{
398
1039
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
399
1040
  aweme_id: string;
400
- }>;
1041
+ }, unknown>>;
401
1042
  readonly 聚合解析: z.ZodType<{
402
1043
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
403
1044
  aweme_id: string;
404
- }, z.ZodTypeDef, {
1045
+ }, unknown, z.core.$ZodTypeInternals<{
405
1046
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
406
1047
  aweme_id: string;
407
- }>;
1048
+ }, unknown>>;
408
1049
  readonly 视频作品数据: z.ZodType<{
409
1050
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
410
1051
  aweme_id: string;
411
- }, z.ZodTypeDef, {
1052
+ }, unknown, z.core.$ZodTypeInternals<{
412
1053
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
413
1054
  aweme_id: string;
414
- }>;
1055
+ }, unknown>>;
415
1056
  readonly 图集作品数据: z.ZodType<{
416
1057
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
417
1058
  aweme_id: string;
418
- }, z.ZodTypeDef, {
1059
+ }, unknown, z.core.$ZodTypeInternals<{
419
1060
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
420
1061
  aweme_id: string;
421
- }>;
1062
+ }, unknown>>;
422
1063
  readonly 合辑作品数据: z.ZodType<{
423
1064
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
424
1065
  aweme_id: string;
425
- }, z.ZodTypeDef, {
1066
+ }, unknown, z.core.$ZodTypeInternals<{
426
1067
  methodType: "\u89C6\u9891\u4F5C\u54C1\u6570\u636E" | "\u56FE\u96C6\u4F5C\u54C1\u6570\u636E" | "\u5408\u8F91\u4F5C\u54C1\u6570\u636E" | "\u805A\u5408\u89E3\u6790" | "\u6587\u5B57\u4F5C\u54C1\u6570\u636E";
427
1068
  aweme_id: string;
428
- }>;
1069
+ }, unknown>>;
429
1070
  readonly 评论数据: z.ZodType<{
430
1071
  methodType: "\u8BC4\u8BBA\u6570\u636E";
431
1072
  aweme_id: string;
432
1073
  number?: number;
433
1074
  cursor?: number;
434
- }, z.ZodTypeDef, {
1075
+ }, unknown, z.core.$ZodTypeInternals<{
435
1076
  methodType: "\u8BC4\u8BBA\u6570\u636E";
436
1077
  aweme_id: string;
437
1078
  number?: number;
438
1079
  cursor?: number;
439
- }>;
1080
+ }, unknown>>;
440
1081
  readonly 用户主页数据: z.ZodType<{
441
1082
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
442
1083
  sec_uid: string;
443
- }, z.ZodTypeDef, {
1084
+ }, unknown, z.core.$ZodTypeInternals<{
444
1085
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
445
1086
  sec_uid: string;
446
- }>;
1087
+ }, unknown>>;
447
1088
  readonly 用户主页视频列表数据: z.ZodType<{
448
1089
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
449
1090
  sec_uid: string;
450
- }, z.ZodTypeDef, {
1091
+ }, unknown, z.core.$ZodTypeInternals<{
451
1092
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
452
1093
  sec_uid: string;
453
- }>;
1094
+ }, unknown>>;
454
1095
  readonly 热点词数据: z.ZodType<{
455
1096
  methodType: "\u70ED\u70B9\u8BCD\u6570\u636E" | "\u641C\u7D22\u6570\u636E";
456
1097
  query: string;
457
1098
  number?: number;
458
1099
  search_id?: string;
459
- }, z.ZodTypeDef, {
1100
+ }, unknown, z.core.$ZodTypeInternals<{
460
1101
  methodType: "\u70ED\u70B9\u8BCD\u6570\u636E" | "\u641C\u7D22\u6570\u636E";
461
1102
  query: string;
462
1103
  number?: number;
463
1104
  search_id?: string;
464
- }>;
1105
+ }, unknown>>;
465
1106
  readonly 搜索数据: z.ZodType<{
466
1107
  methodType: "\u70ED\u70B9\u8BCD\u6570\u636E" | "\u641C\u7D22\u6570\u636E";
467
1108
  query: string;
468
1109
  number?: number;
469
1110
  search_id?: string;
470
- }, z.ZodTypeDef, {
1111
+ }, unknown, z.core.$ZodTypeInternals<{
471
1112
  methodType: "\u70ED\u70B9\u8BCD\u6570\u636E" | "\u641C\u7D22\u6570\u636E";
472
1113
  query: string;
473
1114
  number?: number;
474
1115
  search_id?: string;
475
- }>;
1116
+ }, unknown>>;
476
1117
  readonly 音乐数据: z.ZodType<{
477
1118
  methodType: "\u97F3\u4E50\u6570\u636E";
478
1119
  music_id: string;
479
- }, z.ZodTypeDef, {
1120
+ }, unknown, z.core.$ZodTypeInternals<{
480
1121
  methodType: "\u97F3\u4E50\u6570\u636E";
481
1122
  music_id: string;
482
- }>;
1123
+ }, unknown>>;
483
1124
  readonly 直播间信息数据: z.ZodType<{
484
1125
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
485
1126
  sec_uid: string;
486
- }, z.ZodTypeDef, {
1127
+ }, unknown, z.core.$ZodTypeInternals<{
487
1128
  methodType: "\u7528\u6237\u4E3B\u9875\u6570\u636E" | "\u7528\u6237\u4E3B\u9875\u89C6\u9891\u5217\u8868\u6570\u636E" | "\u76F4\u64AD\u95F4\u4FE1\u606F\u6570\u636E";
488
1129
  sec_uid: string;
489
- }>;
1130
+ }, unknown>>;
490
1131
  readonly 申请二维码数据: z.ZodType<{
491
1132
  methodType: "\u7533\u8BF7\u4E8C\u7EF4\u7801\u6570\u636E";
492
1133
  verify_fp: string;
493
- }, z.ZodTypeDef, {
1134
+ }, unknown, z.core.$ZodTypeInternals<{
494
1135
  methodType: "\u7533\u8BF7\u4E8C\u7EF4\u7801\u6570\u636E";
495
1136
  verify_fp: string;
496
- }>;
1137
+ }, unknown>>;
497
1138
  readonly Emoji数据: z.ZodType<{
498
1139
  methodType: "Emoji\u6570\u636E";
499
- }, z.ZodTypeDef, {
1140
+ }, unknown, z.core.$ZodTypeInternals<{
500
1141
  methodType: "Emoji\u6570\u636E";
501
- }>;
1142
+ }, unknown>>;
502
1143
  readonly 动态表情数据: z.ZodType<{
503
1144
  methodType: "\u52A8\u6001\u8868\u60C5\u6570\u636E";
504
- }, z.ZodTypeDef, {
1145
+ }, unknown, z.core.$ZodTypeInternals<{
505
1146
  methodType: "\u52A8\u6001\u8868\u60C5\u6570\u636E";
506
- }>;
1147
+ }, unknown>>;
507
1148
  readonly 指定评论回复数据: z.ZodType<{
508
1149
  methodType: "\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E";
509
1150
  aweme_id: string;
510
1151
  comment_id: string;
511
1152
  number?: number;
512
1153
  cursor?: number;
513
- }, z.ZodTypeDef, {
1154
+ }, unknown, z.core.$ZodTypeInternals<{
514
1155
  methodType: "\u6307\u5B9A\u8BC4\u8BBA\u56DE\u590D\u6570\u636E";
515
1156
  aweme_id: string;
516
1157
  comment_id: string;
517
1158
  number?: number;
518
1159
  cursor?: number;
519
- }>;
1160
+ }, unknown>>;
520
1161
  readonly 弹幕数据: z.ZodType<{
521
1162
  methodType: "\u5F39\u5E55\u6570\u636E";
522
1163
  aweme_id: string;
523
1164
  start_time?: number;
524
1165
  end_time?: number;
525
1166
  duration: number;
526
- }, z.ZodTypeDef, {
1167
+ }, unknown, z.core.$ZodTypeInternals<{
527
1168
  methodType: "\u5F39\u5E55\u6570\u636E";
528
1169
  aweme_id: string;
529
1170
  start_time?: number;
530
1171
  end_time?: number;
531
1172
  duration: number;
532
- }>;
1173
+ }, unknown>>;
533
1174
  };
534
1175
  type DouyinMethodType = keyof typeof DouyinValidationSchemas;
535
1176
 
@@ -568,22 +1209,22 @@ declare const KuaishouValidationSchemas: {
568
1209
  readonly 单个视频作品数据: z.ZodType<{
569
1210
  methodType: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E";
570
1211
  photoId: string;
571
- }, z.ZodTypeDef, {
1212
+ }, unknown, z.core.$ZodTypeInternals<{
572
1213
  methodType: "\u5355\u4E2A\u89C6\u9891\u4F5C\u54C1\u6570\u636E";
573
1214
  photoId: string;
574
- }>;
1215
+ }, unknown>>;
575
1216
  readonly 评论数据: z.ZodType<{
576
1217
  methodType: "\u8BC4\u8BBA\u6570\u636E";
577
1218
  photoId: string;
578
- }, z.ZodTypeDef, {
1219
+ }, unknown, z.core.$ZodTypeInternals<{
579
1220
  methodType: "\u8BC4\u8BBA\u6570\u636E";
580
1221
  photoId: string;
581
- }>;
1222
+ }, unknown>>;
582
1223
  readonly Emoji数据: z.ZodType<{
583
1224
  methodType: "Emoji\u6570\u636E";
584
- }, z.ZodTypeDef, {
1225
+ }, unknown, z.core.$ZodTypeInternals<{
585
1226
  methodType: "Emoji\u6570\u636E";
586
- }>;
1227
+ }, unknown>>;
587
1228
  };
588
1229
  type KuaishouMethodType = keyof typeof KuaishouValidationSchemas;
589
1230
 
@@ -762,6 +1403,23 @@ declare enum kuaishouAPIErrorCode {
762
1403
  /** 未知错误 */
763
1404
  UNKNOWN = "UNKNOWN_ERROR"
764
1405
  }
1406
+ /** 小红书平台API错误码 */
1407
+ declare enum xiaohongshuAPIErrorCode {
1408
+ /** Cookie无效或已过期 */
1409
+ COOKIE = "INVALID_COOKIE",
1410
+ /** 未知错误 */
1411
+ UNKNOWN = "UNKNOWN_ERROR",
1412
+ /** 非法请求 */
1413
+ ILLEGAL_REQUEST = 500,
1414
+ /** 检测到帐号异常,请稍后重试 */
1415
+ ACCOUNT_ABNORMAL = 300011,
1416
+ /** 网络连接异常,请检查网络设置后重试 */
1417
+ NETWORK_ERROR = 300012,
1418
+ /** 访问频次异常,请勿频繁操作 */
1419
+ FREQUENCY_ERROR = 300013,
1420
+ /** 浏览器异常,请尝试更换浏览器后重试 */
1421
+ BROWSER_ERROR = 300015
1422
+ }
765
1423
 
766
1424
  interface BilibiliMethodOptionsMap {
767
1425
  VideoInfoParams: {
@@ -790,7 +1448,7 @@ interface BilibiliMethodOptionsMap {
790
1448
  /**
791
1449
  * 排序方式
792
1450
  * 默认为3
793
- * 0: 仅热度
1451
+ * 0和3: 仅热度
794
1452
  * 1: 按热度+按时间
795
1453
  * 2: 仅时间
796
1454
  * @defaultValue 3
@@ -16819,6 +17477,102 @@ type LogPb = {
16819
17477
  [property: string]: any;
16820
17478
  };
16821
17479
 
17480
+ /**
17481
+ * 小红书验证模式映射
17482
+ */
17483
+ declare const XiaohongshuValidationSchemas: {
17484
+ readonly 首页推荐数据: z.ZodObject<{
17485
+ methodType: z.ZodLiteral<"首页推荐数据">;
17486
+ cursor_score: z.ZodOptional<z.ZodString>;
17487
+ num: z.ZodOptional<z.ZodNumber>;
17488
+ refresh_type: z.ZodOptional<z.ZodNumber>;
17489
+ note_index: z.ZodOptional<z.ZodNumber>;
17490
+ category: z.ZodOptional<z.ZodString>;
17491
+ search_key: z.ZodOptional<z.ZodString>;
17492
+ }, z.core.$strip>;
17493
+ readonly 单个笔记数据: z.ZodObject<{
17494
+ methodType: z.ZodLiteral<"单个笔记数据">;
17495
+ note_id: z.ZodString;
17496
+ xsec_token: z.ZodString;
17497
+ }, z.core.$strip>;
17498
+ readonly 评论数据: z.ZodObject<{
17499
+ methodType: z.ZodLiteral<"评论数据">;
17500
+ note_id: z.ZodString;
17501
+ cursor: z.ZodOptional<z.ZodString>;
17502
+ xsec_token: z.ZodString;
17503
+ }, z.core.$strip>;
17504
+ readonly 用户数据: z.ZodObject<{
17505
+ methodType: z.ZodLiteral<"用户数据">;
17506
+ user_id: z.ZodString;
17507
+ }, z.core.$strip>;
17508
+ readonly 用户笔记数据: z.ZodObject<{
17509
+ methodType: z.ZodLiteral<"用户笔记数据">;
17510
+ user_id: z.ZodString;
17511
+ cursor: z.ZodOptional<z.ZodString>;
17512
+ num: z.ZodOptional<z.ZodNumber>;
17513
+ }, z.core.$strip>;
17514
+ readonly 表情列表: z.ZodObject<{
17515
+ methodType: z.ZodLiteral<"表情列表">;
17516
+ }, z.core.$strip>;
17517
+ readonly 搜索笔记: z.ZodObject<{
17518
+ methodType: z.ZodLiteral<"搜索笔记">;
17519
+ keyword: z.ZodString;
17520
+ page: z.ZodOptional<z.ZodNumber>;
17521
+ page_size: z.ZodOptional<z.ZodNumber>;
17522
+ sort: z.ZodOptional<z.ZodEnum<{
17523
+ [x: string]: string;
17524
+ }>>;
17525
+ note_type: z.ZodOptional<z.ZodEnum<{
17526
+ [x: string]: string;
17527
+ }>>;
17528
+ }, z.core.$strip>;
17529
+ };
17530
+ /**
17531
+ * 小红书方法类型
17532
+ */
17533
+ type XiaohongshuMethodType = keyof typeof XiaohongshuValidationSchemas;
17534
+ /**
17535
+ * 验证小红书参数
17536
+ * @param methodType - 小红书方法类型
17537
+ * @param params - 待验证的参数
17538
+ * @returns 验证后的参数
17539
+ */
17540
+ declare const validateXiaohongshuParams: <T extends XiaohongshuMethodType>(methodType: T, params: unknown) => {
17541
+ methodType: "首页推荐数据";
17542
+ cursor_score?: string | undefined;
17543
+ num?: number | undefined;
17544
+ refresh_type?: number | undefined;
17545
+ note_index?: number | undefined;
17546
+ category?: string | undefined;
17547
+ search_key?: string | undefined;
17548
+ } | {
17549
+ methodType: "单个笔记数据";
17550
+ note_id: string;
17551
+ xsec_token: string;
17552
+ } | {
17553
+ methodType: "评论数据";
17554
+ note_id: string;
17555
+ xsec_token: string;
17556
+ cursor?: string | undefined;
17557
+ } | {
17558
+ methodType: "用户数据";
17559
+ user_id: string;
17560
+ } | {
17561
+ methodType: "用户笔记数据";
17562
+ user_id: string;
17563
+ cursor?: string | undefined;
17564
+ num?: number | undefined;
17565
+ } | {
17566
+ methodType: "表情列表";
17567
+ } | {
17568
+ methodType: "搜索笔记";
17569
+ keyword: string;
17570
+ page?: number | undefined;
17571
+ page_size?: number | undefined;
17572
+ sort?: string | undefined;
17573
+ note_type?: string | undefined;
17574
+ };
17575
+
16822
17576
  /**
16823
17577
  * 移除methodType字段的工具类型
16824
17578
  */
@@ -16997,7 +17751,38 @@ interface KuaishouDataOptionsMap {
16997
17751
  data: KsEmojiList;
16998
17752
  };
16999
17753
  }
17754
+ interface XiaohongshuDataOptionsMap {
17755
+ 首页推荐数据: {
17756
+ opt: XiaohongshuMethodOptionsMap['HomeFeedParams'];
17757
+ data: HomeFeed;
17758
+ };
17759
+ 单个笔记数据: {
17760
+ opt: XiaohongshuMethodOptionsMap['NoteParams'];
17761
+ data: OneNote;
17762
+ };
17763
+ 评论数据: {
17764
+ opt: XiaohongshuMethodOptionsMap['CommentParams'];
17765
+ data: NoteComments;
17766
+ };
17767
+ 用户数据: {
17768
+ opt: XiaohongshuMethodOptionsMap['UserParams'];
17769
+ data: XiaohongshuUserProfile;
17770
+ };
17771
+ 用户笔记数据: {
17772
+ opt: XiaohongshuMethodOptionsMap['UserNoteParams'];
17773
+ data: any;
17774
+ };
17775
+ 表情列表: {
17776
+ opt: XiaohongshuMethodOptionsMap['EmojiListParams'];
17777
+ data: XiaohongshuEmojiList;
17778
+ };
17779
+ 搜索笔记: {
17780
+ opt: XiaohongshuMethodOptionsMap['SearchNoteParams'];
17781
+ data: SearchNotes;
17782
+ };
17783
+ }
17000
17784
 
17785
+ type XiaohongshuDataOptions<T extends keyof XiaohongshuDataOptionsMap> = OmitMethodType<XiaohongshuDataOptionsMap[T]['opt'] & TypeControl>;
17001
17786
  type DouyinDataOptions<T extends keyof DouyinDataOptionsMap> = OmitMethodType<DouyinDataOptionsMap[T]['opt'] & TypeControl>;
17002
17787
  type BilibiliDataOptions<T extends keyof BilibiliDataOptionsMap> = OmitMethodType<BilibiliDataOptionsMap[T]['opt'] & TypeControl>;
17003
17788
  type KuaishouDataOptions<T extends keyof KuaishouDataOptionsMap> = OmitMethodType<KuaishouDataOptionsMap[T]['opt'] & TypeControl>;
@@ -17005,9 +17790,9 @@ type KuaishouDataOptions<T extends keyof KuaishouDataOptionsMap> = OmitMethodTyp
17005
17790
  * API请求错误类型
17006
17791
  * 该类型是方法 `getXXXData` 封装后请求遇到错误时的返回类型
17007
17792
  */
17008
- type APIErrorType<T extends 'douyin' | 'bilibili' | 'kuaishou' | 'default' = 'default'> = {
17793
+ type APIErrorType<T extends 'douyin' | 'bilibili' | 'kuaishou' | 'xiaohongshu' | 'default' = 'default'> = {
17009
17794
  /** 错误码 */
17010
- code: T extends 'douyin' ? douoyinAPIErrorCode : T extends 'bilibili' ? bilibiliAPIErrorCode : T extends 'kuaishou' ? kuaishouAPIErrorCode : amagiAPIErrorCode;
17795
+ code: T extends 'douyin' ? douoyinAPIErrorCode : T extends 'bilibili' ? bilibiliAPIErrorCode : T extends 'kuaishou' ? kuaishouAPIErrorCode : T extends 'xiaohongshu' ? xiaohongshuAPIErrorCode : amagiAPIErrorCode;
17011
17796
  /** 错误时的响应数据 */
17012
17797
  data: any;
17013
17798
  /** amagi 错误详情 */
@@ -17200,6 +17985,8 @@ type CookieConfig = {
17200
17985
  bilibili?: string;
17201
17986
  /** 快手Cookie */
17202
17987
  kuaishou?: string;
17988
+ /** 小红书Cookie */
17989
+ xiaohongshu?: string;
17203
17990
  };
17204
17991
  /**
17205
17992
  * 客户端配置选项接口
@@ -17227,6 +18014,9 @@ declare const createAmagiClient: (options?: Options) => {
17227
18014
  getKuaishouData: <T extends KuaishouMethodType, M extends TypeMode>(methodType: T, options?: ExtendedKuaishouOptions<T> & {
17228
18015
  typeMode?: M;
17229
18016
  }) => Promise<ApiResponse<ConditionalReturnType<KuaishouDataOptionsMap[T]["data"], M>>>;
18017
+ getXiaohongshuData: <T extends XiaohongshuMethodType, M extends TypeMode>(methodType: T, options?: ExtendedXiaohongshuOptions<T> & {
18018
+ typeMode?: M;
18019
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuDataOptionsMap[T]["data"], M>>>;
17230
18020
  douyin: {
17231
18021
  /** 绑定了cookie和请求配置的抖音API对象,调用时不需要传递cookie */
17232
18022
  api: {
@@ -17563,6 +18353,82 @@ declare const createAmagiClient: (options?: Options) => {
17563
18353
  };
17564
18354
  kuaishouApiUrls: typeof kuaishouApiUrls;
17565
18355
  };
18356
+ xiaohongshu: {
18357
+ /** 绑定了cookie和请求配置的小红书API对象,调用时不需要传递cookie */
18358
+ api: {
18359
+ getHomeFeed: <M extends TypeMode>(options: Omit<{
18360
+ methodType: "\u9996\u9875\u63A8\u8350\u6570\u636E";
18361
+ cursor_score?: string;
18362
+ num?: number;
18363
+ refresh_type?: number;
18364
+ note_index?: number;
18365
+ category?: string;
18366
+ search_key?: string;
18367
+ }, "methodType"> & {
18368
+ typeMode?: TypeMode;
18369
+ } & {
18370
+ typeMode?: M | undefined;
18371
+ }) => Promise<ApiResponse<ConditionalReturnType<HomeFeed, M>>>;
18372
+ getNote: <M extends TypeMode>(options: Omit<{
18373
+ methodType: "\u5355\u4E2A\u7B14\u8BB0\u6570\u636E";
18374
+ note_id: string;
18375
+ xsec_token: string;
18376
+ }, "methodType"> & {
18377
+ typeMode?: TypeMode;
18378
+ } & {
18379
+ typeMode?: M | undefined;
18380
+ }) => Promise<ApiResponse<ConditionalReturnType<OneNote, M>>>;
18381
+ getComments: <M extends TypeMode>(options: Omit<{
18382
+ methodType: "\u8BC4\u8BBA\u6570\u636E";
18383
+ note_id: string;
18384
+ cursor?: string;
18385
+ xsec_token: string;
18386
+ }, "methodType"> & {
18387
+ typeMode?: TypeMode;
18388
+ } & {
18389
+ typeMode?: M | undefined;
18390
+ }) => Promise<ApiResponse<ConditionalReturnType<NoteComments, M>>>;
18391
+ getUser: <M extends TypeMode>(options: Omit<{
18392
+ methodType: "\u7528\u6237\u6570\u636E";
18393
+ user_id: string;
18394
+ }, "methodType"> & {
18395
+ typeMode?: TypeMode;
18396
+ } & {
18397
+ typeMode?: M | undefined;
18398
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuUserProfile, M>>>;
18399
+ getUserNotes: <M extends TypeMode>(options: Omit<{
18400
+ methodType: "\u7528\u6237\u7B14\u8BB0\u6570\u636E";
18401
+ user_id: string;
18402
+ cursor?: string;
18403
+ num?: number;
18404
+ }, "methodType"> & {
18405
+ typeMode?: TypeMode;
18406
+ } & {
18407
+ typeMode?: M | undefined;
18408
+ }) => Promise<ApiResponse<ConditionalReturnType<any, M>>>;
18409
+ getSearchNotes: <M extends TypeMode>(options: Omit<{
18410
+ methodType: "\u641C\u7D22\u7B14\u8BB0";
18411
+ keyword: string;
18412
+ page?: number;
18413
+ page_size?: number;
18414
+ sort?: SearchSortType;
18415
+ note_type?: SearchNoteType;
18416
+ }, "methodType"> & {
18417
+ typeMode?: TypeMode;
18418
+ } & {
18419
+ typeMode?: M | undefined;
18420
+ }) => Promise<ApiResponse<ConditionalReturnType<SearchNotes, M>>>;
18421
+ getEmojiList: <M extends TypeMode>(options: Omit<{
18422
+ methodType: "\u8868\u60C5\u5217\u8868";
18423
+ }, "methodType"> & {
18424
+ typeMode?: TypeMode;
18425
+ } & {
18426
+ typeMode?: M | undefined;
18427
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuEmojiList, M>>>;
18428
+ };
18429
+ sign: typeof xiaohongshuSign;
18430
+ xiaohongshuApiUrls: typeof xiaohongshuApiUrls;
18431
+ };
17566
18432
  };
17567
18433
 
17568
18434
  /**
@@ -17617,6 +18483,19 @@ type ExtendedKuaishouOptions<T extends KuaishouMethodType> = Omit<KuaishouDataOp
17617
18483
  */
17618
18484
  typeMode?: TypeMode;
17619
18485
  };
18486
+ type ExtendedXiaohongshuOptions<T extends XiaohongshuMethodType> = Omit<XiaohongshuDataOptionsMap[T]['opt'], 'methodType'> & {
18487
+ /**
18488
+ * 获取返回类型
18489
+ * 类型定义时间:2025-02-02
18490
+ *
18491
+ * 类型解析模式:
18492
+ * - `strict`: 返回严格类型(基于接口响应定义,随时间推移可能缺少未声明的字段)
18493
+ * - `loose` 或 `未指定`: 返回宽松的 any 类型(默认)
18494
+ *
18495
+ * @default 'loose'
18496
+ */
18497
+ typeMode?: TypeMode;
18498
+ };
17620
18499
  /**
17621
18500
  * 获取抖音数据的核心方法(推荐用法:第三个参数为cookie)
17622
18501
  * @param methodType - 请求数据类型
@@ -17679,6 +18558,26 @@ declare function getKuaishouData<T extends KuaishouMethodType, M extends TypeMod
17679
18558
  declare function getKuaishouData<T extends KuaishouMethodType, M extends TypeMode>(methodType: T, cookie: string, options?: ExtendedKuaishouOptions<T> & {
17680
18559
  typeMode?: M;
17681
18560
  }, requestConfig?: RequestConfig): Promise<ApiResponse<ConditionalReturnType<KuaishouDataOptionsMap[T]['data'], M>>>;
18561
+ /**
18562
+ * 获取小红书数据的核心方法(推荐用法:第三个参数为cookie)
18563
+ * @param methodType - 请求数据类型
18564
+ * @param options - 请求参数对象,包含typeMode属性控制返回类型
18565
+ * @param cookie - 可选的用户Cookie
18566
+ * @returns 根据typeMode返回对应类型的数据
18567
+ */
18568
+ declare function getXiaohongshuData<T extends XiaohongshuMethodType, M extends TypeMode>(methodType: T, options?: ExtendedXiaohongshuOptions<T> & {
18569
+ typeMode?: M;
18570
+ }, cookie?: string, requestConfig?: RequestConfig): Promise<ApiResponse<ConditionalReturnType<XiaohongshuDataOptionsMap[T]['data'], M>>>;
18571
+ /**
18572
+ * 获取小红书数据的核心方法(重载:第二个参数为cookie)
18573
+ * @param methodType - 请求数据类型
18574
+ * @param cookie - 用户Cookie
18575
+ * @param options - 请求参数对象,包含typeMode属性控制返回类型
18576
+ * @returns 根据typeMode返回对应类型的数据
18577
+ */
18578
+ declare function getXiaohongshuData<T extends XiaohongshuMethodType, M extends TypeMode>(methodType: T, cookie: string, options?: ExtendedXiaohongshuOptions<T> & {
18579
+ typeMode?: M;
18580
+ }, requestConfig?: RequestConfig): Promise<ApiResponse<ConditionalReturnType<XiaohongshuDataOptionsMap[T]['data'], M>>>;
17682
18581
 
17683
18582
  /**
17684
18583
  * B站相关 API 的命名空间。
@@ -19149,6 +20048,331 @@ type kuaishouUtilsModel = {
19149
20048
  /** 快手相关功能模块 (工具集) */
19150
20049
  declare const kuaishouUtils: kuaishouUtilsModel;
19151
20050
 
20051
+ /**
20052
+ * 封装了所有小红书相关的API请求,采用对象化的方式组织。
20053
+ *
20054
+ * 提供了一系列方法,用于与小红书相关的 API 进行交互。
20055
+ *
20056
+ * 每个方法都接受参数和 Cookie,返回 Promise,解析为统一格式的API响应。
20057
+ */
20058
+ declare const xiaohongshu: {
20059
+ /**
20060
+ * 获取首页推荐数据
20061
+ * @param options 请求参数,包含分页和过滤选项
20062
+ * @param cookie 有效的用户 Cookie
20063
+ * @returns 统一格式的API响应,包含首页推荐笔记列表
20064
+ */
20065
+ getHomeFeed: <M extends TypeMode>(options: Omit<{
20066
+ methodType: "\u9996\u9875\u63A8\u8350\u6570\u636E";
20067
+ cursor_score?: string;
20068
+ num?: number;
20069
+ refresh_type?: number;
20070
+ note_index?: number;
20071
+ category?: string;
20072
+ search_key?: string;
20073
+ }, "methodType"> & {
20074
+ typeMode?: TypeMode;
20075
+ } & {
20076
+ typeMode?: M | undefined;
20077
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<HomeFeed, M>>>;
20078
+ /**
20079
+ * 获取单个笔记数据
20080
+ * @param options 请求参数,包含笔记ID
20081
+ * @param cookie 有效的用户 Cookie
20082
+ * @returns 统一格式的API响应,包含指定笔记的详细信息
20083
+ */
20084
+ getNote: <M extends TypeMode>(options: Omit<{
20085
+ methodType: "\u5355\u4E2A\u7B14\u8BB0\u6570\u636E";
20086
+ note_id: string;
20087
+ xsec_token: string;
20088
+ }, "methodType"> & {
20089
+ typeMode?: TypeMode;
20090
+ } & {
20091
+ typeMode?: M | undefined;
20092
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<OneNote, M>>>;
20093
+ /**
20094
+ * 获取评论数据
20095
+ * @param options 请求参数,包含笔记ID和分页选项
20096
+ * @param cookie 有效的用户 Cookie
20097
+ * @returns 统一格式的API响应,包含指定笔记的评论列表
20098
+ */
20099
+ getComments: <M extends TypeMode>(options: Omit<{
20100
+ methodType: "\u8BC4\u8BBA\u6570\u636E";
20101
+ note_id: string;
20102
+ cursor?: string;
20103
+ xsec_token: string;
20104
+ }, "methodType"> & {
20105
+ typeMode?: TypeMode;
20106
+ } & {
20107
+ typeMode?: M | undefined;
20108
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<NoteComments, M>>>;
20109
+ /**
20110
+ * 获取用户数据
20111
+ * @param options 请求参数,包含用户ID
20112
+ * @param cookie 有效的用户 Cookie
20113
+ * @returns 统一格式的API响应,包含指定用户的详细信息
20114
+ */
20115
+ getUser: <M extends TypeMode>(options: Omit<{
20116
+ methodType: "\u7528\u6237\u6570\u636E";
20117
+ user_id: string;
20118
+ }, "methodType"> & {
20119
+ typeMode?: TypeMode;
20120
+ } & {
20121
+ typeMode?: M | undefined;
20122
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuUserProfile, M>>>;
20123
+ /**
20124
+ * 获取用户笔记数据
20125
+ * @param options 请求参数,包含用户ID和分页选项
20126
+ * @param cookie 有效的用户 Cookie
20127
+ * @returns 统一格式的API响应,包含指定用户的笔记列表
20128
+ */
20129
+ getUserNotes: <M extends TypeMode>(options: Omit<{
20130
+ methodType: "\u7528\u6237\u7B14\u8BB0\u6570\u636E";
20131
+ user_id: string;
20132
+ cursor?: string;
20133
+ num?: number;
20134
+ }, "methodType"> & {
20135
+ typeMode?: TypeMode;
20136
+ } & {
20137
+ typeMode?: M | undefined;
20138
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<any, M>>>;
20139
+ /**
20140
+ * 获取搜索笔记数据
20141
+ * @param options 请求参数,包含搜索关键词和分页选项
20142
+ * @param cookie 有效的用户 Cookie
20143
+ * @returns 统一格式的API响应,包含搜索到的笔记列表
20144
+ */
20145
+ getSearchNotes: <M extends TypeMode>(options: Omit<{
20146
+ methodType: "\u641C\u7D22\u7B14\u8BB0";
20147
+ keyword: string;
20148
+ page?: number;
20149
+ page_size?: number;
20150
+ sort?: SearchSortType;
20151
+ note_type?: SearchNoteType;
20152
+ }, "methodType"> & {
20153
+ typeMode?: TypeMode;
20154
+ } & {
20155
+ typeMode?: M | undefined;
20156
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<SearchNotes, M>>>;
20157
+ /**
20158
+ * 获取表情列表数据
20159
+ * @param options 请求参数,包含分页和过滤选项
20160
+ * @param cookie 有效的用户 Cookie
20161
+ * @returns 统一格式的API响应,包含表情列表
20162
+ */
20163
+ getEmojiList: <M extends TypeMode>(options: Omit<{
20164
+ methodType: "\u8868\u60C5\u5217\u8868";
20165
+ }, "methodType"> & {
20166
+ typeMode?: TypeMode;
20167
+ } & {
20168
+ typeMode?: M | undefined;
20169
+ }, cookie: string, requestConfig?: RequestConfig) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuEmojiList, M>>>;
20170
+ };
20171
+ /**
20172
+ * 创建绑定了cookie的小红书API对象
20173
+ * @param cookie - 要绑定的cookie
20174
+ * @returns 绑定了cookie的小红书API对象,调用时不需要再传递cookie
20175
+ */
20176
+ declare const createBoundXiaohongshuApi: (cookie: string, requestConfig: RequestConfig) => {
20177
+ /**
20178
+ * 获取首页推荐数据
20179
+ * @param options 请求参数,包含分页和过滤选项
20180
+ * @returns 统一格式的API响应,包含首页推荐笔记列表
20181
+ */
20182
+ getHomeFeed: <M extends TypeMode>(options: Omit<{
20183
+ methodType: "\u9996\u9875\u63A8\u8350\u6570\u636E";
20184
+ cursor_score?: string;
20185
+ num?: number;
20186
+ refresh_type?: number;
20187
+ note_index?: number;
20188
+ category?: string;
20189
+ search_key?: string;
20190
+ }, "methodType"> & {
20191
+ typeMode?: TypeMode;
20192
+ } & {
20193
+ typeMode?: M | undefined;
20194
+ }) => Promise<ApiResponse<ConditionalReturnType<HomeFeed, M>>>;
20195
+ /**
20196
+ * 获取单个笔记数据
20197
+ * @param options 请求参数,包含笔记ID
20198
+ * @returns 统一格式的API响应,包含指定笔记的详细信息
20199
+ */
20200
+ getNote: <M extends TypeMode>(options: Omit<{
20201
+ methodType: "\u5355\u4E2A\u7B14\u8BB0\u6570\u636E";
20202
+ note_id: string;
20203
+ xsec_token: string;
20204
+ }, "methodType"> & {
20205
+ typeMode?: TypeMode;
20206
+ } & {
20207
+ typeMode?: M | undefined;
20208
+ }) => Promise<ApiResponse<ConditionalReturnType<OneNote, M>>>;
20209
+ /**
20210
+ * 获取评论数据
20211
+ * @param options 请求参数,包含笔记ID和分页选项
20212
+ * @returns 统一格式的API响应,包含指定笔记的评论列表
20213
+ */
20214
+ getComments: <M extends TypeMode>(options: Omit<{
20215
+ methodType: "\u8BC4\u8BBA\u6570\u636E";
20216
+ note_id: string;
20217
+ cursor?: string;
20218
+ xsec_token: string;
20219
+ }, "methodType"> & {
20220
+ typeMode?: TypeMode;
20221
+ } & {
20222
+ typeMode?: M | undefined;
20223
+ }) => Promise<ApiResponse<ConditionalReturnType<NoteComments, M>>>;
20224
+ /**
20225
+ * 获取用户数据
20226
+ * @param options 请求参数,包含用户ID
20227
+ * @returns 统一格式的API响应,包含指定用户的详细信息
20228
+ */
20229
+ getUser: <M extends TypeMode>(options: Omit<{
20230
+ methodType: "\u7528\u6237\u6570\u636E";
20231
+ user_id: string;
20232
+ }, "methodType"> & {
20233
+ typeMode?: TypeMode;
20234
+ } & {
20235
+ typeMode?: M | undefined;
20236
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuUserProfile, M>>>;
20237
+ /**
20238
+ * 获取用户笔记数据
20239
+ * @param options 请求参数,包含用户ID和分页选项
20240
+ * @returns 统一格式的API响应,包含指定用户的笔记列表
20241
+ */
20242
+ getUserNotes: <M extends TypeMode>(options: Omit<{
20243
+ methodType: "\u7528\u6237\u7B14\u8BB0\u6570\u636E";
20244
+ user_id: string;
20245
+ cursor?: string;
20246
+ num?: number;
20247
+ }, "methodType"> & {
20248
+ typeMode?: TypeMode;
20249
+ } & {
20250
+ typeMode?: M | undefined;
20251
+ }) => Promise<ApiResponse<ConditionalReturnType<any, M>>>;
20252
+ /**
20253
+ * 获取搜索笔记数据
20254
+ * @param options 请求参数,包含搜索关键词和分页选项
20255
+ * @returns 统一格式的API响应,包含搜索到的笔记列表
20256
+ */
20257
+ getSearchNotes: <M extends TypeMode>(options: Omit<{
20258
+ methodType: "\u641C\u7D22\u7B14\u8BB0";
20259
+ keyword: string;
20260
+ page?: number;
20261
+ page_size?: number;
20262
+ sort?: SearchSortType;
20263
+ note_type?: SearchNoteType;
20264
+ }, "methodType"> & {
20265
+ typeMode?: TypeMode;
20266
+ } & {
20267
+ typeMode?: M | undefined;
20268
+ }) => Promise<ApiResponse<ConditionalReturnType<SearchNotes, M>>>;
20269
+ /**
20270
+ * 获取表情列表数据
20271
+ * @param options 请求参数,包含分页和过滤选项
20272
+ * @returns 统一格式的API响应,包含表情列表
20273
+ */
20274
+ getEmojiList: <M extends TypeMode>(options: Omit<{
20275
+ methodType: "\u8868\u60C5\u5217\u8868";
20276
+ }, "methodType"> & {
20277
+ typeMode?: TypeMode;
20278
+ } & {
20279
+ typeMode?: M | undefined;
20280
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuEmojiList, M>>>;
20281
+ };
20282
+ /**
20283
+ * 绑定cookie的小红书API对象类型
20284
+ */
20285
+ type BoundXiaohongshuApi = ReturnType<typeof createBoundXiaohongshuApi>;
20286
+
20287
+ /**
20288
+ * 小红书签名算法类
20289
+ */
20290
+ declare class xiaohongshuSign {
20291
+ private static client;
20292
+ /**
20293
+ * 生成GET请求的X-S签名
20294
+ * @param path - API路径
20295
+ * @param a1Cookie - a1 cookie值
20296
+ * @param clientType - 客户端类型,默认为 'xhs-pc-web'
20297
+ * @param params - 查询参数对象
20298
+ * @returns X-S签名
20299
+ */
20300
+ static generateXSGet(path: string, a1Cookie: string, clientType?: string, params?: Record<string, any>): string;
20301
+ /**
20302
+ * 生成POST请求的X-S签名
20303
+ * @param path - API路径
20304
+ * @param a1Cookie - a1 cookie值
20305
+ * @param clientType - 客户端类型,默认为 'xhs-pc-web'
20306
+ * @param body - 请求体对象
20307
+ * @returns X-S签名
20308
+ */
20309
+ static generateXSPost(path: string, a1Cookie: string, clientType?: string, body?: Record<string, any>): string;
20310
+ /**
20311
+ * 生成X-S签名(兼容旧接口)
20312
+ * @param url - 请求URL
20313
+ * @param body - 请求体
20314
+ * @param userAgent - User-Agent(暂未使用)
20315
+ * @param method - 请求方法,默认为 'POST'
20316
+ * @param a1Cookie - a1 cookie值
20317
+ * @returns X-S签名
20318
+ */
20319
+ static generateXS(url: string, body: any, userAgent: string, method?: string, a1Cookie?: string): string;
20320
+ /**
20321
+ * 生成X-S-Common参数
20322
+ * @param length - 长度
20323
+ * @returns Base64编码的随机字符串
20324
+ */
20325
+ static generateXSCommon(length?: number): string;
20326
+ /**
20327
+ * 生成X-T时间戳
20328
+ * @returns 当前时间戳字符串
20329
+ */
20330
+ static generateXT(): string;
20331
+ /**
20332
+ * 生成X-B3-Traceid
20333
+ * @returns 16位随机字符串
20334
+ */
20335
+ static generateXB3Traceid(): string;
20336
+ /**
20337
+ * 从cookie字符串中提取a1值
20338
+ * @param cookieString - 完整的cookie字符串
20339
+ * @returns a1 cookie值
20340
+ */
20341
+ static extractA1FromCookie(cookieString: string): string;
20342
+ /**
20343
+ * 生成搜索ID
20344
+ * @returns 搜索ID字符串
20345
+ */
20346
+ static getSearchId: () => string;
20347
+ }
20348
+
20349
+ /**
20350
+ * 创建小红书路由
20351
+ * @param cookie - 小红书Cookie
20352
+ * @param requestConfig - 可选的请求配置
20353
+ * @returns Express路由器
20354
+ */
20355
+ declare const createXiaohongshuRoutes: (cookie: string, requestConfig?: RequestConfig) => Router;
20356
+
20357
+ type xiaohongshuUtilsModel = {
20358
+ /** 签名算法相关 */
20359
+ sign: typeof xiaohongshuSign;
20360
+ /**
20361
+ * 该类下的所有方法只会返回拼接好参数后的 Url 地址,需要手动请求该地址以获取数据
20362
+ */
20363
+ xiaohongshuApiUrls: typeof xiaohongshuApiUrls;
20364
+ /**
20365
+ * 封装了所有小红书相关的API请求,采用对象化的方式组织。
20366
+ *
20367
+ * 提供了一系列方法,用于与小红书相关的 API 进行交互。
20368
+ *
20369
+ * 每个方法都接受参数和 Cookie,返回 Promise,解析为接口返回的原始数据。
20370
+ */
20371
+ api: typeof xiaohongshu;
20372
+ };
20373
+ /** 小红书相关功能模块 (工具集) */
20374
+ declare const xiaohongshuUtils: xiaohongshuUtilsModel;
20375
+
19152
20376
  declare class CustomLogger {
19153
20377
  private logger;
19154
20378
  chalk: ChalkInstance;
@@ -19238,7 +20462,7 @@ declare class ValidationError extends Error {
19238
20462
  * @param requestPath - HTTP请求路径
19239
20463
  * @returns 验证错误实例
19240
20464
  */
19241
- static fromZodError(zodError: z.ZodError, requestPath?: string): ValidationError;
20465
+ static fromZodError(zodError: z.ZodError<any>, requestPath?: string): ValidationError;
19242
20466
  }
19243
20467
  /**
19244
20468
  * 处理错误并返回统一格式
@@ -19272,6 +20496,9 @@ declare const amagiClient: (options?: Options) => {
19272
20496
  getKuaishouData: <T extends KuaishouMethodType, M extends TypeMode>(methodType: T, options?: ExtendedKuaishouOptions<T> & {
19273
20497
  typeMode?: M;
19274
20498
  }) => Promise<ApiResponse<ConditionalReturnType<KuaishouDataOptionsMap[T]["data"], M>>>;
20499
+ getXiaohongshuData: <T extends XiaohongshuMethodType, M extends TypeMode>(methodType: T, options?: ExtendedXiaohongshuOptions<T> & {
20500
+ typeMode?: M;
20501
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuDataOptionsMap[T]["data"], M>>>;
19275
20502
  douyin: {
19276
20503
  api: {
19277
20504
  getTextWorkInfo: <M extends TypeMode>(options: Omit<{
@@ -19605,6 +20832,81 @@ declare const amagiClient: (options?: Options) => {
19605
20832
  };
19606
20833
  kuaishouApiUrls: typeof kuaishouApiUrls;
19607
20834
  };
20835
+ xiaohongshu: {
20836
+ api: {
20837
+ getHomeFeed: <M extends TypeMode>(options: Omit<{
20838
+ methodType: "\u9996\u9875\u63A8\u8350\u6570\u636E";
20839
+ cursor_score?: string;
20840
+ num?: number;
20841
+ refresh_type?: number;
20842
+ note_index?: number;
20843
+ category?: string;
20844
+ search_key?: string;
20845
+ }, "methodType"> & {
20846
+ typeMode?: TypeMode;
20847
+ } & {
20848
+ typeMode?: M | undefined;
20849
+ }) => Promise<ApiResponse<ConditionalReturnType<HomeFeed, M>>>;
20850
+ getNote: <M extends TypeMode>(options: Omit<{
20851
+ methodType: "\u5355\u4E2A\u7B14\u8BB0\u6570\u636E";
20852
+ note_id: string;
20853
+ xsec_token: string;
20854
+ }, "methodType"> & {
20855
+ typeMode?: TypeMode;
20856
+ } & {
20857
+ typeMode?: M | undefined;
20858
+ }) => Promise<ApiResponse<ConditionalReturnType<OneNote, M>>>;
20859
+ getComments: <M extends TypeMode>(options: Omit<{
20860
+ methodType: "\u8BC4\u8BBA\u6570\u636E";
20861
+ note_id: string;
20862
+ cursor?: string;
20863
+ xsec_token: string;
20864
+ }, "methodType"> & {
20865
+ typeMode?: TypeMode;
20866
+ } & {
20867
+ typeMode?: M | undefined;
20868
+ }) => Promise<ApiResponse<ConditionalReturnType<NoteComments, M>>>;
20869
+ getUser: <M extends TypeMode>(options: Omit<{
20870
+ methodType: "\u7528\u6237\u6570\u636E";
20871
+ user_id: string;
20872
+ }, "methodType"> & {
20873
+ typeMode?: TypeMode;
20874
+ } & {
20875
+ typeMode?: M | undefined;
20876
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuUserProfile, M>>>;
20877
+ getUserNotes: <M extends TypeMode>(options: Omit<{
20878
+ methodType: "\u7528\u6237\u7B14\u8BB0\u6570\u636E";
20879
+ user_id: string;
20880
+ cursor?: string;
20881
+ num?: number;
20882
+ }, "methodType"> & {
20883
+ typeMode?: TypeMode;
20884
+ } & {
20885
+ typeMode?: M | undefined;
20886
+ }) => Promise<ApiResponse<ConditionalReturnType<any, M>>>;
20887
+ getSearchNotes: <M extends TypeMode>(options: Omit<{
20888
+ methodType: "\u641C\u7D22\u7B14\u8BB0";
20889
+ keyword: string;
20890
+ page?: number;
20891
+ page_size?: number;
20892
+ sort?: SearchSortType;
20893
+ note_type?: SearchNoteType;
20894
+ }, "methodType"> & {
20895
+ typeMode?: TypeMode;
20896
+ } & {
20897
+ typeMode?: M | undefined;
20898
+ }) => Promise<ApiResponse<ConditionalReturnType<SearchNotes, M>>>;
20899
+ getEmojiList: <M extends TypeMode>(options: Omit<{
20900
+ methodType: "\u8868\u60C5\u5217\u8868";
20901
+ }, "methodType"> & {
20902
+ typeMode?: TypeMode;
20903
+ } & {
20904
+ typeMode?: M | undefined;
20905
+ }) => Promise<ApiResponse<ConditionalReturnType<XiaohongshuEmojiList, M>>>;
20906
+ };
20907
+ sign: typeof xiaohongshuSign;
20908
+ xiaohongshuApiUrls: typeof xiaohongshuApiUrls;
20909
+ };
19608
20910
  };
19609
20911
  /** amagi 的构造函数类型 */
19610
20912
  type AmagiConstructor = {
@@ -19616,6 +20918,8 @@ type AmagiConstructor = {
19616
20918
  bilibili: typeof bilibiliUtils;
19617
20919
  /** 快手相关功能模块 (工具集) */
19618
20920
  kuaishou: typeof kuaishouUtils;
20921
+ /** 小红书相关功能模块 (工具集) */
20922
+ xiaohongshu: typeof xiaohongshuUtils;
19619
20923
  /**
19620
20924
  * 快捷获取抖音数据
19621
20925
  * @param type - 请求数据类型
@@ -19640,6 +20944,14 @@ type AmagiConstructor = {
19640
20944
  * @returns 返回接口的原始数据
19641
20945
  */
19642
20946
  getKuaishouData: typeof getKuaishouData;
20947
+ /**
20948
+ * 快捷获取小红书数据
20949
+ * @param type - 请求数据类型
20950
+ * @param options - 请求参数,是一个对象
20951
+ * @param cookie - 有效的用户Cookie
20952
+ * @returns 返回接口的原始数据
20953
+ */
20954
+ getXiaohongshuData: typeof getXiaohongshuData;
19643
20955
  };
19644
20956
  /** After instantiation, it can interact with the specified platform API to quickly obtain data. */
19645
20957
  declare const CreateApp: AmagiConstructor;
@@ -19647,4 +20959,4 @@ declare const CreateApp: AmagiConstructor;
19647
20959
  declare const Client: AmagiConstructor;
19648
20960
  declare const amagi: AmagiConstructor;
19649
20961
 
19650
- export { type APIErrorType, AdditionalType, ApiError, type ApiResponse, type BaseResponse, type BiliAv2Bv, type BiliBangumiVideoInfo, type BiliBangumiVideoPlayurlIsLogin, type BiliBangumiVideoPlayurlNoLogin, type BiliBiliVideoPlayurlNoLogin, type BiliBv2AV, type BiliCheckQrcode, type BiliDynamicCard, type BiliDynamicInfo, type BiliDynamicInfoUnion, type BiliEmojiList, type BiliLiveRoomDef, type BiliLiveRoomDetail, type BiliNewLoginQrcode, type BiliOneWork, type BiliUserDynamic, type BiliUserFullView, type BiliUserProfile, type BiliVideoPlayurlIsLogin, type BiliWorkComments, type BilibiliAv2BvParams, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoParams, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamParams, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvParams, BilibiliBv2AvParamsSchema, type BilibiliCommentParams, BilibiliCommentParamsSchema, type BilibiliDataOptions, type BilibiliDataOptionsMap, type BilibiliDynamicParams, BilibiliDynamicParamsSchema, type BilibiliEmojiParams, BilibiliEmojiParamsSchema, type BilibiliLiveParams, BilibiliLiveParamsSchema, type BilibiliLoginParams, BilibiliLoginParamsSchema, type BilibiliMethodOptionsMap, type BilibiliMethodType, type BilibiliQrcodeParams, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusParams, BilibiliQrcodeStatusParamsSchema, type BilibiliUserParams, BilibiliUserParamsSchema, BilibiliValidationSchemas, type BilibiliVideoDownloadParams, BilibiliVideoDownloadParamsSchema, type BilibiliVideoParams, BilibiliVideoParamsSchema, type BoundBilibiliApi, type BoundDouyinApi, type BoundKuaishouApi, type CookieConfig, CreateApp, type DouyinCommentParams, DouyinCommentParamsSchema, type DouyinCommentReplyParams, DouyinCommentReplyParamsSchema, type DouyinDanmakuParams, DouyinDanmakuParamsSchema, type DouyinDataOptions, type DouyinDataOptionsMap, type DouyinEmojiListParams, DouyinEmojiListParamsSchema, type DouyinEmojiProParams, DouyinEmojiProParamsSchema, type DouyinLiveRoomParams, type DouyinMethodOptionsMap, type DouyinMethodType, type DouyinMusicParams, DouyinMusicParamsSchema, type DouyinQrcodeParams, DouyinQrcodeParamsSchema, type DouyinSearchParams, DouyinSearchParamsSchema, type DouyinUserParams, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkParams, DouyinWorkParamsSchema, type DyDanmakuList, type DyEmojiList, type DyEmojiProList, type DyImageAlbumWork, type DyMusicWork, type DySearchInfo, type DySlidesWork, type DySuggestWords, type DyUserInfo, type DyUserLiveVideos, type DyUserPostVideos, type DyVideoWork, type DyWorkComments, DynamicType, type DynamicTypeAV$1 as DynamicTypeAV, type DynamicTypeDraw$1 as DynamicTypeDraw, type DynamicTypeForward, type DynamicTypeForwardUnion, type DynamicTypeLiveRcmd, type DynamicTypeWord, type ErrorResponse, type KsEmojiList, type KsOneWork, type KsWorkComments, type KuaishouCommentParams, KuaishouCommentParamsSchema, type KuaishouDataOptions, type KuaishouDataOptionsMap, type KuaishouEmojiParams, KuaishouEmojiParamsSchema, type KuaishouMethodOptionsMap, type KuaishouMethodType, KuaishouValidationSchemas, type KuaishouVideoParams, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, type OmitMethodType, type Options, type RequestConfig, type SuccessResponse, type TypeControl, ValidationError, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, wbi_sign };
20962
+ export { type APIErrorType, AdditionalType, ApiError, type ApiResponse, type BaseResponse, type BiliAv2Bv, type BiliBangumiVideoInfo, type BiliBangumiVideoPlayurlIsLogin, type BiliBangumiVideoPlayurlNoLogin, type BiliBiliVideoPlayurlNoLogin, type BiliBv2AV, type BiliCheckQrcode, type BiliDynamicCard, type BiliDynamicInfo, type BiliDynamicInfoUnion, type BiliEmojiList, type BiliLiveRoomDef, type BiliLiveRoomDetail, type BiliNewLoginQrcode, type BiliOneWork, type BiliUserDynamic, type BiliUserFullView, type BiliUserProfile, type BiliVideoPlayurlIsLogin, type BiliWorkComments, type BilibiliAv2BvParams, BilibiliAv2BvParamsSchema, type BilibiliBangumiInfoParams, BilibiliBangumiInfoParamsSchema, type BilibiliBangumiStreamParams, BilibiliBangumiStreamParamsSchema, type BilibiliBv2AvParams, BilibiliBv2AvParamsSchema, type BilibiliCommentParams, BilibiliCommentParamsSchema, type BilibiliDataOptions, type BilibiliDataOptionsMap, type BilibiliDynamicParams, BilibiliDynamicParamsSchema, type BilibiliEmojiParams, BilibiliEmojiParamsSchema, type BilibiliLiveParams, BilibiliLiveParamsSchema, type BilibiliLoginParams, BilibiliLoginParamsSchema, type BilibiliMethodOptionsMap, type BilibiliMethodType, type BilibiliQrcodeParams, BilibiliQrcodeParamsSchema, type BilibiliQrcodeStatusParams, BilibiliQrcodeStatusParamsSchema, type BilibiliUserParams, BilibiliUserParamsSchema, BilibiliValidationSchemas, type BilibiliVideoDownloadParams, BilibiliVideoDownloadParamsSchema, type BilibiliVideoParams, BilibiliVideoParamsSchema, type BoundBilibiliApi, type BoundDouyinApi, type BoundKuaishouApi, type BoundXiaohongshuApi, type CookieConfig, CreateApp, type DouyinCommentParams, DouyinCommentParamsSchema, type DouyinCommentReplyParams, DouyinCommentReplyParamsSchema, type DouyinDanmakuParams, DouyinDanmakuParamsSchema, type DouyinDataOptions, type DouyinDataOptionsMap, type DouyinEmojiListParams, DouyinEmojiListParamsSchema, type DouyinEmojiProParams, DouyinEmojiProParamsSchema, type DouyinLiveRoomParams, type DouyinMethodOptionsMap, type DouyinMethodType, type DouyinMusicParams, DouyinMusicParamsSchema, type DouyinQrcodeParams, DouyinQrcodeParamsSchema, type DouyinSearchParams, DouyinSearchParamsSchema, type DouyinUserParams, DouyinUserParamsSchema, DouyinValidationSchemas, type DouyinWorkParams, DouyinWorkParamsSchema, type DyDanmakuList, type DyEmojiList, type DyEmojiProList, type DyImageAlbumWork, type DyMusicWork, type DySearchInfo, type DySlidesWork, type DySuggestWords, type DyUserInfo, type DyUserLiveVideos, type DyUserPostVideos, type DyVideoWork, type DyWorkComments, DynamicType, type DynamicTypeAV$1 as DynamicTypeAV, type DynamicTypeDraw$1 as DynamicTypeDraw, type DynamicTypeForward, type DynamicTypeForwardUnion, type DynamicTypeLiveRcmd, type DynamicTypeWord, type ErrorResponse, type KsEmojiList, type KsOneWork, type KsWorkComments, type KuaishouCommentParams, KuaishouCommentParamsSchema, type KuaishouDataOptions, type KuaishouDataOptionsMap, type KuaishouEmojiParams, KuaishouEmojiParamsSchema, type KuaishouMethodOptionsMap, type KuaishouMethodType, KuaishouValidationSchemas, type KuaishouVideoParams, KuaishouVideoParamsSchema, MajorType, type NetworksConfigType, type OmitMethodType, type Options, type RequestConfig, type SuccessResponse, type TypeControl, ValidationError, type XiaohongshuDataOptions, type XiaohongshuDataOptionsMap, type XiaohongshuMethodType, XiaohongshuValidationSchemas, amagi, amagiClient, av2bv, bilibili, bilibiliApiUrls, bilibiliErrorCodeMap, bilibiliUtils, bv2av, createAmagiClient, createBilibiliRoutes, createBoundBilibiliApi, createBoundDouyinApi, createBoundKuaishouApi, createBoundXiaohongshuApi, createDouyinRoutes, createErrorResponse, createKuaishouRoutes, createSuccessResponse, createXiaohongshuRoutes, Client as default, douyin, douyinApiUrls, douyinSign, douyinUtils, fetchData, fetchResponse, getBilibiliData, getDouyinData, getHeadersAndData, getKuaishouData, handleError, httpLogger, kuaishou, kuaishouApiUrls, kuaishouUtils, logMiddleware, logger, qtparam, createBilibiliRoutes as registerBilibiliRoutes, createDouyinRoutes as registerDouyinRoutes, createKuaishouRoutes as registerKuaishouRoutes, createXiaohongshuRoutes as registerXiaohongshuRoutes, validateBilibiliParams, validateDouyinParams, validateKuaishouParams, validateXiaohongshuParams, wbi_sign, xiaohongshu, xiaohongshuApiUrls, xiaohongshuSign, xiaohongshuUtils };