gs-x-parser 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/type.d.ts ADDED
@@ -0,0 +1,1780 @@
1
+ import { IUserBase as IUserBase$1, IUser as IUser$1, IMediaEntity as IMediaEntity$1, ITweetBase as ITweetBase$1, IUrlEntity as IUrlEntity$1, ITweet as ITweet$1, IOriginalInfo as IOriginalInfo$1, IMediaSizes as IMediaSizes$1, IExtMediaColor as IExtMediaColor$1, IColorPalette as IColorPalette$1, IMediaStats as IMediaStats$1, IBindingValue as IBindingValue$1, ICardPlatform as ICardPlatform$1, IOk as IOk$1, IExtendedEntities as IExtendedEntities$1 } from './index.d.ts';
2
+
3
+ /**
4
+ * 类型常量和联合类型定义
5
+ */
6
+ /**
7
+ * 用户类型名称常量
8
+ */
9
+ declare const USER_TYPENAMES: readonly ["User", "UserUnavailable"];
10
+ /**
11
+ * 用户类型名称联合类型
12
+ */
13
+ type UserTypename = typeof USER_TYPENAMES[number];
14
+ /**
15
+ * 推文类型名称常量
16
+ */
17
+ declare const TWEET_TYPENAMES: readonly ["Tweet", "TextTombstone", "TweetTombstone", "TweetWithVisibilityResults", "ContextualTweetInterstitial"];
18
+ /**
19
+ * 推文类型名称联合类型
20
+ */
21
+ type TweetTypename = typeof TWEET_TYPENAMES[number];
22
+ /**
23
+ * 社区类型名称常量
24
+ */
25
+ declare const COMMUNITY_TYPENAMES: readonly ["Community", "CommunityDeleteActionUnavailable", "CommunityUserDefaultModerationState", "CommunityJoinRequestsUnavailable"];
26
+ /**
27
+ * 社区类型名称联合类型
28
+ */
29
+ type CommunityTypename = typeof COMMUNITY_TYPENAMES[number];
30
+ /**
31
+ * 时间线类型名称常量
32
+ */
33
+ declare const TIMELINE_TYPENAMES: readonly ["TimelineTimelineItem", "TimelineMessagePrompt"];
34
+ /**
35
+ * 时间线类型名称联合类型
36
+ */
37
+ type TimelineTypename = typeof TIMELINE_TYPENAMES[number];
38
+ /**
39
+ * 时间线项目类型名称常量
40
+ */
41
+ declare const TIMELINE_ITEM_TYPENAMES: readonly ["TimelineTweet", "TimelineMessagePrompt"];
42
+ /**
43
+ * 时间线项目类型名称联合类型
44
+ */
45
+ type TimelineItemTypename = typeof TIMELINE_ITEM_TYPENAMES[number];
46
+ /**
47
+ * 时间线指令类型常量
48
+ */
49
+ declare const TIMELINE_INSTRUCTION_TYPES: readonly ["TimelineAddEntries"];
50
+ /**
51
+ * 时间线指令类型联合类型
52
+ */
53
+ type TimelineInstructionType = typeof TIMELINE_INSTRUCTION_TYPES[number];
54
+ /**
55
+ * 时间线条目类型常量
56
+ */
57
+ declare const TIMELINE_ENTRY_TYPES: readonly ["TimelineTimelineItem", "TimelineTimelineModule", "TimelineTimelineCursor"];
58
+ /**
59
+ * 时间线条目类型联合类型
60
+ */
61
+ type TimelineEntryType = typeof TIMELINE_ENTRY_TYPES[number];
62
+ /**
63
+ * 时间线项目类型常量
64
+ */
65
+ declare const TIMELINE_ITEM_TYPES: readonly ["TimelineTweet", "TimelineMessagePrompt"];
66
+ /**
67
+ * 时间线项目类型联合类型
68
+ */
69
+ type TimelineItemType = typeof TIMELINE_ITEM_TYPES[number];
70
+ /**
71
+ * 媒体类型常量
72
+ */
73
+ declare const MEDIA_TYPES: readonly ["photo", "video", "animated_gif"];
74
+ /**
75
+ * 媒体类型联合类型
76
+ */
77
+ type MediaType = typeof MEDIA_TYPES[number];
78
+ /**
79
+ * 资格类型常量
80
+ */
81
+ declare const ELIGIBILITY_TYPES: readonly ["Eligible", "IneligibleUserUnauthorized"];
82
+ /**
83
+ * 资格类型联合类型
84
+ */
85
+ type EligibilityType = typeof ELIGIBILITY_TYPES[number];
86
+ /**
87
+ * 显示类型常量
88
+ */
89
+ declare const DISPLAY_TYPES: readonly ["Carousel", "Vertical", "VerticalConversation", "Classic", "EntireTweet"];
90
+ /**
91
+ * 显示类型联合类型
92
+ */
93
+ type DisplayType = typeof DISPLAY_TYPES[number];
94
+ /**
95
+ * 推文显示类型常量
96
+ */
97
+ declare const TWEET_DISPLAY_TYPES: readonly ["CondensedTweet", "Tweet", "SelfThread"];
98
+ /**
99
+ * 推文显示类型联合类型
100
+ */
101
+ type TweetDisplayType = typeof TWEET_DISPLAY_TYPES[number];
102
+ /**
103
+ * 用户显示类型常量
104
+ */
105
+ declare const USER_DISPLAY_TYPES: readonly ["SubscribableUser", "User"];
106
+ /**
107
+ * 用户显示类型联合类型
108
+ */
109
+ type UserDisplayType = typeof USER_DISPLAY_TYPES[number];
110
+ /**
111
+ * 注入类型常量
112
+ */
113
+ declare const INJECTION_TYPES: readonly ["ForYouInNetwork", "ForYouPromoted", "WhoToFollow", "creators-only-connect-tab", "CommunityToJoin"];
114
+ /**
115
+ * 注入类型联合类型
116
+ */
117
+ type InjectionType = typeof INJECTION_TYPES[number];
118
+ /**
119
+ * 透明指南详情类型常量
120
+ */
121
+ declare const TRANSPARENT_GUIDE_DETAIL_TYPES: readonly ["TimelineEventUrtMetadata"];
122
+ /**
123
+ * 透明指南详情类型联合类型
124
+ */
125
+ type TransparentGuideDetailType = typeof TRANSPARENT_GUIDE_DETAIL_TYPES[number];
126
+ /**
127
+ * 元素类型常量
128
+ */
129
+ declare const ELEMENT_TYPES: readonly ["tweet", "user", "event", "feedback", "trend", "users_followed_you", "generic_report_received", "users_liked_your_tweet", "user_quoted_your_tweet", "user_replied_to_your_tweet", "users_retweeted_your_tweet", "user_mentioned_you"];
130
+ /**
131
+ * 元素类型联合类型
132
+ */
133
+ type ElementType = typeof ELEMENT_TYPES[number];
134
+ /**
135
+ * 推文质量类型常量
136
+ */
137
+ declare const TWEET_QUALITIES: readonly ["HighQuality", "LowQuality", "AbusiveQuality", "RelatedTweet"];
138
+ /**
139
+ * 推文质量类型联合类型
140
+ */
141
+ type TweetQuality = typeof TWEET_QUALITIES[number];
142
+ /**
143
+ * 组件值常量
144
+ */
145
+ declare const COMPONENT_VALUES: readonly ["url", "tweet", "trends", "unified_events", "related_tweet", "suggest_who_to_follow", "for_you_in_network", "for-you-promoted", "alt-text-prompt-injection", "ads-sharing-x-premium-upsell-candidate"];
146
+ /**
147
+ * 组件值联合类型
148
+ */
149
+ type ComponentValue = typeof COMPONENT_VALUES[number];
150
+ /**
151
+ * 项目类型常量
152
+ */
153
+ declare const ITEM_TYPES: readonly ["TimelineTweet", "TimelineUser", "TimelineEventSummary", "TimelineMessagePrompt", "TimelineCommunity", "CommunityPinnedTimeline"];
154
+ /**
155
+ * 项目类型联合类型
156
+ */
157
+ type ItemType = typeof ITEM_TYPES[number];
158
+ /**
159
+ * 游标类型常量
160
+ */
161
+ declare const CURSOR_TYPES: readonly ["Top", "Bottom", "ShowMore", "ShowMoreThreads"];
162
+ /**
163
+ * 游标类型联合类型
164
+ */
165
+ type CursorType = typeof CURSOR_TYPES[number];
166
+ /**
167
+ * 指令类型常量
168
+ */
169
+ declare const INSTRUCTION_TYPES: readonly ["TimelineClearCache", "TimelineAddEntries", "TimelineTerminateTimeline", "TimelineShowAlert", "TimelineShowCover"];
170
+ /**
171
+ * 指令类型联合类型
172
+ */
173
+ type InstructionType = typeof INSTRUCTION_TYPES[number];
174
+ /**
175
+ * 内容类型常量
176
+ */
177
+ declare const CONTENT_TYPES: readonly ["TimelineTweetMedia", "TimelineUrl"];
178
+ /**
179
+ * 内容类型联合类型
180
+ */
181
+ type ContentType = typeof CONTENT_TYPES[number];
182
+ /**
183
+ * 视频内容类型常量
184
+ */
185
+ declare const VIDEO_CONTENT_TYPES: readonly ["application/x-mpegURL", "video/mp4"];
186
+ /**
187
+ * 视频内容类型联合类型
188
+ */
189
+ type VideoContentType = typeof VIDEO_CONTENT_TYPES[number];
190
+ /**
191
+ * 消息收件箱时间线索引常量
192
+ */
193
+ declare const MESSAGE_INBOX_TIMELINE_INDEXES: readonly ["trusted", "untrusted", "untrusted_low_quality"];
194
+ /**
195
+ * 消息收件箱时间线索引联合类型
196
+ */
197
+ type MessageInboxTimelineIndex = typeof MESSAGE_INBOX_TIMELINE_INDEXES[number];
198
+ /**
199
+ * 通知键常量
200
+ */
201
+ declare const NOTIFICATION_KEYS: readonly ["clearCache", "addEntries", "clearEntriesUnreadState", "markEntriesUnreadGreaterThanSortIndex"];
202
+ /**
203
+ * 通知键联合类型
204
+ */
205
+ type NotificationKey = typeof NOTIFICATION_KEYS[number];
206
+ /**
207
+ * 验证类型常量
208
+ */
209
+ declare const VERIFIED_TYPES: readonly ["Business", "Government", "Blue", "None"];
210
+ /**
211
+ * 验证类型联合类型
212
+ */
213
+ type VerifiedType = typeof VERIFIED_TYPES[number];
214
+ /**
215
+ * 用户标签类型常量
216
+ */
217
+ declare const USER_LABEL_TYPES: readonly ["BusinessLabel", "AutomatedLabel"];
218
+ /**
219
+ * 用户标签类型联合类型
220
+ */
221
+ type UserLabelType = typeof USER_LABEL_TYPES[number];
222
+ /**
223
+ * URL类型常量
224
+ */
225
+ declare const URL_TYPES: readonly ["ExternalUrl", "DeepLink", "UrtEndpoint"];
226
+ /**
227
+ * URL类型联合类型
228
+ */
229
+ type UrlType = typeof URL_TYPES[number];
230
+ /**
231
+ * 视图状态常量
232
+ */
233
+ declare const VIEW_STATES: readonly ["EnabledWithCount", "Enabled"];
234
+ /**
235
+ * 视图状态联合类型
236
+ */
237
+ type ViewState = typeof VIEW_STATES[number];
238
+ /**
239
+ * 遗留卡片绑定键类型常量
240
+ */
241
+ declare const LEGACY_CARD_BINDING_KEY_TYPES: readonly ["thumbnail_image", "description", "domain", "thumbnail_image_large", "thumbnail_image_original", "thumbnail_image_small", "thumbnail_image_x_large", "thumbnail_image_color", "summary_photo_image", "summary_photo_image_small", "summary_photo_image_large", "summary_photo_image_x_large", "summary_photo_image_original", "summary_photo_image_color", "photo_image_full_size_color", "vanity_url", "title", "card_url", "creator", "site", "player_image", "player_image_small", "player_image_large", "player_image_x_large", "player_image_original", "player_image_color", "player_url", "player_width", "player_height", "app_name", "app_is_free", "app_star_rating", "app_num_ratings", "app_price_currency", "unified_card", "app_price_amount"];
242
+ /**
243
+ * 遗留卡片绑定键类型联合类型
244
+ */
245
+ type LegacyCardBindingKeyType = typeof LEGACY_CARD_BINDING_KEY_TYPES[number];
246
+ /**
247
+ * 遗留卡片绑定值类型常量
248
+ */
249
+ declare const LEGACY_CARD_BINDING_VALUE_TYPES: readonly ["STRING", "IMAGE_COLOR", "IMAGE", "USER"];
250
+ /**
251
+ * 遗留卡片绑定值类型联合类型
252
+ */
253
+ type LegacyCardBindingValueType = typeof LEGACY_CARD_BINDING_VALUE_TYPES[number];
254
+ /**
255
+ * ID前缀枚举
256
+ * 用于标识不同类型的条目ID前缀
257
+ */
258
+ declare enum IdPrefixes {
259
+ /**
260
+ * 弹出广告
261
+ */
262
+ MessagePrompt = "messageprompt-",
263
+ /**
264
+ * 正常推文
265
+ */
266
+ NormalTweet = "tweet-",
267
+ /**
268
+ * 推广推文
269
+ */
270
+ PromotedTweet = "promoted-tweet-",
271
+ /**
272
+ * 用户
273
+ */
274
+ User = "user-",
275
+ /**
276
+ * 社区推荐
277
+ */
278
+ CommunityToJoin = "community-to-join-",
279
+ /**
280
+ * 首页会话
281
+ */
282
+ HomeConversation = "home-conversation-",
283
+ /**
284
+ * 具体会话
285
+ */
286
+ Conversationthread = "conversationthread-",
287
+ /**
288
+ * 社区会话
289
+ */
290
+ CommunityConversation = "community-conversation-",
291
+ /**
292
+ * 社区分组
293
+ */
294
+ CommunityGrid = "communities-grid-",
295
+ /**
296
+ * 关注置顶推荐
297
+ */
298
+ PinnedTweets = "pinned-tweets-",
299
+ /**
300
+ * 关注推荐
301
+ */
302
+ WhoToFollow = "who-to-follow-",
303
+ /**
304
+ * 创伤者推荐
305
+ */
306
+ CreatorsOnlyConnectTab = "creators-only-connect-tab-",
307
+ /**
308
+ * 更多
309
+ */
310
+ Label = "label-",
311
+ /**
312
+ * 更多
313
+ */
314
+ Guide = "Guide-",
315
+ /**
316
+ * 个人信息分组
317
+ */
318
+ ProfileGrid = "profile-grid-",
319
+ /**
320
+ * 通知
321
+ */
322
+ Notification = "notification-",
323
+ /**
324
+ * 游标
325
+ */
326
+ Cursor = "cursor-",
327
+ /**
328
+ * 顶部游标
329
+ */
330
+ CursorTop = "cursor-top-",
331
+ /**
332
+ * 底部游标
333
+ */
334
+ CursorBottom = "cursor-bottom-",
335
+ /**
336
+ * 探索更多
337
+ */
338
+ TweetDetailRelatedTweets = "tweetdetailrelatedtweets-",
339
+ /**
340
+ * 流行趋势
341
+ */
342
+ Trends = "trends-"
343
+ }
344
+
345
+ /**
346
+ * 用户类型定义
347
+ */
348
+
349
+ /**
350
+ * 用户接口
351
+ */
352
+ interface IUser {
353
+ /** 类型名称 */
354
+ __typename: string;
355
+ /** 用户ID */
356
+ id: string;
357
+ /** 用户REST ID */
358
+ rest_id: string;
359
+ /** 附属高亮标签 */
360
+ affiliates_highlighted_label?: IAffiliatesHighlightedLabel;
361
+ /** 是否有毕业访问权限 */
362
+ has_graduated_access?: boolean;
363
+ /** 是否蓝V验证 */
364
+ is_blue_verified?: boolean;
365
+ /** 头像形状 */
366
+ profile_image_shape?: string;
367
+ /** 遗留用户数据 */
368
+ legacy?: IUserLegacy;
369
+ /** 专业信息 */
370
+ professional?: IUserProfessional;
371
+ /** 是否有超级关注资格 */
372
+ super_follow_eligible?: boolean;
373
+ /** 小费设置 */
374
+ tipjar_settings?: ITipjarSettings;
375
+ }
376
+ interface ITipjarSettings {
377
+ /** 是否启用 */
378
+ is_enabled?: boolean;
379
+ }
380
+ /**
381
+ * 遗留用户数据接口
382
+ */
383
+ interface IUserLegacy extends IUserBase$1 {
384
+ /** 快速粉丝数 */
385
+ fast_followers_count?: number;
386
+ /** 是否有自定义时间线 */
387
+ has_custom_timelines?: boolean;
388
+ /** 位置 */
389
+ location?: string;
390
+ /** 媒体数 */
391
+ media_count?: number;
392
+ /** 正常粉丝数 */
393
+ normal_followers_count?: number;
394
+ /** 固定推文ID数组 */
395
+ pinned_tweet_ids_str?: string[];
396
+ /** 是否敏感内容 */
397
+ possibly_sensitive?: boolean;
398
+ /** 个人资料横幅URL */
399
+ profile_banner_url?: string;
400
+ /** 个人资料间隙类型 */
401
+ profile_interstitial_type?: string;
402
+ /** 个人网站 */
403
+ url?: string;
404
+ /** 验证类型 */
405
+ verified_type?: VerifiedType;
406
+ }
407
+ /**
408
+ * 用户专业信息接口
409
+ */
410
+ interface IUserProfessional {
411
+ /** REST ID */
412
+ rest_id?: string;
413
+ /** 专业类型 */
414
+ professional_type?: string;
415
+ /** 分类 */
416
+ category?: IUserCategory[];
417
+ }
418
+ /**
419
+ * 用户分类接口
420
+ */
421
+ interface IUserCategory {
422
+ /** ID */
423
+ id?: number;
424
+ /** 名称 */
425
+ name?: string;
426
+ /** 是否显示 */
427
+ display?: boolean;
428
+ /** 图标名称 */
429
+ icon_name?: string;
430
+ }
431
+ /**
432
+ * 附属高亮标签接口
433
+ */
434
+ interface IAffiliatesHighlightedLabel {
435
+ /** 标签 */
436
+ label?: ILabel;
437
+ }
438
+ /**
439
+ * 标签接口
440
+ */
441
+ interface ILabel {
442
+ /** URL */
443
+ url?: IUrl;
444
+ /** 徽章 */
445
+ badge?: IBadge;
446
+ /** 描述 */
447
+ description?: string;
448
+ /** 用户标签类型 */
449
+ userLabelType?: UserLabelType;
450
+ /** 用户标签显示类型 */
451
+ userLabelDisplayType?: UserDisplayType;
452
+ }
453
+ /**
454
+ * URL接口
455
+ */
456
+ interface IUrl {
457
+ /** URL */
458
+ url?: string;
459
+ /** URL类型 */
460
+ urlType?: UrlType;
461
+ }
462
+ /**
463
+ * 徽章接口
464
+ */
465
+ interface IBadge {
466
+ /** URL */
467
+ url?: string;
468
+ }
469
+
470
+ /**
471
+ * 用户基础类型,包含所有用户相关类型共有的字段
472
+ */
473
+ interface IUserBase {
474
+ /** 用户名 */
475
+ name?: string;
476
+ /** 用户屏幕名称 */
477
+ screen_name?: string;
478
+ /** 位置 */
479
+ location?: string | null;
480
+ /** 个人简介 */
481
+ description?: string | null;
482
+ /** 个人网站 */
483
+ url?: string | null;
484
+ /** 实体 */
485
+ entities?: IUserEntities;
486
+ /** 粉丝数 */
487
+ followers_count?: number;
488
+ /** 关注数 */
489
+ friends_count?: number;
490
+ /** 列表数 */
491
+ listed_count?: number;
492
+ /** 创建时间 */
493
+ created_at?: string;
494
+ /** 收藏数 */
495
+ favourites_count?: number;
496
+ /** 推文数 */
497
+ statuses_count?: number;
498
+ /** 是否为翻译者 */
499
+ is_translator?: boolean;
500
+ /** 翻译者类型 */
501
+ translator_type?: string;
502
+ /** 头像URL */
503
+ profile_image_url_https?: string;
504
+ /** 是否默认个人资料 */
505
+ default_profile?: boolean;
506
+ /** 是否默认头像 */
507
+ default_profile_image?: boolean;
508
+ /** 是否可以直接消息 */
509
+ can_dm?: boolean | null;
510
+ /** 是否可以媒体标签 */
511
+ can_media_tag?: boolean;
512
+ /** 是否关注 */
513
+ following?: boolean | null;
514
+ /** 是否想要转发 */
515
+ want_retweets?: boolean;
516
+ /** 被限制的国家 */
517
+ withheld_in_countries?: string[];
518
+ /** 是否验证 */
519
+ verified?: boolean;
520
+ }
521
+ /**
522
+ * 用户实体接口
523
+ */
524
+ interface IUserEntities {
525
+ /** 描述实体 */
526
+ description?: IUserEntityUrls;
527
+ /** URL实体 */
528
+ url?: IUserEntityUrls;
529
+ }
530
+ /**
531
+ * 用户实体URL接口
532
+ */
533
+ interface IUserEntityUrls {
534
+ /** URL实体数组 */
535
+ urls?: IUrlEntity[];
536
+ }
537
+ /**
538
+ * URL实体接口
539
+ */
540
+ interface IUrlEntity {
541
+ /** 显示URL */
542
+ display_url?: string;
543
+ /** 展开URL */
544
+ expanded_url?: string;
545
+ /** URL */
546
+ url?: string;
547
+ /** 索引 */
548
+ indices?: number[];
549
+ }
550
+
551
+ /**
552
+ * 推文类型定义
553
+ */
554
+
555
+ /**
556
+ * 推文接口
557
+ */
558
+ interface ITweet {
559
+ /** 类型名称 */
560
+ __typename: string;
561
+ /** 推文REST ID */
562
+ rest_id: string;
563
+ /** 是否有birdwatch注释 */
564
+ has_birdwatch_notes?: boolean;
565
+ /** 核心数据 */
566
+ core?: ITweetCore;
567
+ /** 取消提及数据 */
568
+ unmention_data?: Record<string, unknown>;
569
+ /** 编辑控制 */
570
+ edit_control?: IEditControl;
571
+ /** 之前的计数 */
572
+ previous_counts?: IPreviousCounts;
573
+ /** 是否可翻译 */
574
+ is_translatable?: boolean;
575
+ /** 视图 */
576
+ views?: ITweetViews;
577
+ /** 来源 */
578
+ source?: string;
579
+ /** 卡片 */
580
+ card?: ICard;
581
+ /** 遗留推文数据 */
582
+ legacy?: ITweetLegacy;
583
+ /** 快速推广资格 */
584
+ quick_promote_eligibility?: IQuickPromoteEligibility;
585
+ /** 引用状态结果 */
586
+ quoted_status_result?: IQuotedStatusResult;
587
+ /** 转发状态结果 */
588
+ retweeted_status_result?: IRetweetedStatusResult;
589
+ /** 超级关注回复用户结果 */
590
+ superFollowsReplyUserResult?: ISuperFollowsReplyUserResult;
591
+ }
592
+ /**
593
+ * 推文核心数据接口
594
+ */
595
+ interface ITweetCore {
596
+ /** 用户结果 */
597
+ user_results?: IUserResults;
598
+ }
599
+ /**
600
+ * 用户结果接口
601
+ */
602
+ interface IUserResults {
603
+ /** 结果 */
604
+ result?: IUser$1;
605
+ }
606
+ /**
607
+ * 编辑控制接口
608
+ */
609
+ interface IEditControl {
610
+ /** 初始推文ID */
611
+ initial_tweet_id?: string;
612
+ /** 初始编辑控制 */
613
+ edit_control_initial?: IEditControlInitial;
614
+ /** 编辑推文ID数组 */
615
+ edit_tweet_ids?: string[];
616
+ /** 可编辑直到毫秒 */
617
+ editable_until_msecs?: string;
618
+ /** 是否可编辑 */
619
+ is_edit_eligible?: boolean;
620
+ /** 剩余编辑次数 */
621
+ edits_remaining?: string;
622
+ }
623
+ /**
624
+ * 初始编辑控制接口
625
+ */
626
+ interface IEditControlInitial {
627
+ /** 编辑推文ID数组 */
628
+ edit_tweet_ids?: string[];
629
+ /** 可编辑直到毫秒 */
630
+ editable_until_msecs?: string;
631
+ /** 是否可编辑 */
632
+ is_edit_eligible?: boolean;
633
+ /** 剩余编辑次数 */
634
+ edits_remaining?: string;
635
+ }
636
+ /**
637
+ * 之前的计数接口
638
+ */
639
+ interface IPreviousCounts {
640
+ /** 书签数 */
641
+ bookmark_count?: number;
642
+ /** 点赞数 */
643
+ favorite_count?: number;
644
+ /** 引用数 */
645
+ quote_count?: number;
646
+ /** 回复数 */
647
+ reply_count?: number;
648
+ /** 转发数 */
649
+ retweet_count?: number;
650
+ }
651
+ /**
652
+ * 推文视图接口
653
+ */
654
+ interface ITweetViews {
655
+ /** 计数 */
656
+ count?: string;
657
+ /** 状态 */
658
+ state?: ViewState;
659
+ }
660
+ /**
661
+ * 遗留推文数据接口
662
+ */
663
+ interface ITweetLegacy extends ITweetBase$1 {
664
+ /** 书签数 */
665
+ bookmark_count?: number;
666
+ /** 是否已书签 */
667
+ bookmarked?: boolean;
668
+ /** 扩展实体 */
669
+ extended_entities?: IExtendedEntities;
670
+ /** 是否可编辑敏感内容 */
671
+ possibly_sensitive_editable?: boolean;
672
+ /** 用户ID字符串 */
673
+ user_id_str?: string;
674
+ /** 引用状态永久链接 */
675
+ quoted_status_permalink?: IQuotedStatusPermalink;
676
+ }
677
+ /**
678
+ * 扩展实体接口
679
+ */
680
+ interface IExtendedEntities {
681
+ /** 媒体实体数组 */
682
+ media?: IMediaEntity$1[];
683
+ }
684
+ /**
685
+ * 快速推广资格接口
686
+ */
687
+ interface IQuickPromoteEligibility {
688
+ /** 资格 */
689
+ eligibility?: EligibilityType;
690
+ }
691
+ /**
692
+ * 引用状态结果接口
693
+ */
694
+ interface IQuotedStatusResult {
695
+ /** 结果 */
696
+ result?: ITweet;
697
+ }
698
+ /**
699
+ * 超级关注回复用户结果接口
700
+ */
701
+ interface ISuperFollowsReplyUserResult {
702
+ /** 结果 */
703
+ result?: IUser$1;
704
+ }
705
+ /**
706
+ * 转发状态结果接口
707
+ */
708
+ interface IRetweetedStatusResult {
709
+ /** 结果 */
710
+ result?: ITweet;
711
+ }
712
+ /**
713
+ * 引用状态永久链接接口
714
+ */
715
+ interface IQuotedStatusPermalink {
716
+ /** URL */
717
+ url?: string;
718
+ /** 展开URL */
719
+ expanded?: string;
720
+ /** 显示URL */
721
+ display?: string;
722
+ }
723
+ /**
724
+ * 卡片接口
725
+ */
726
+ interface ICard {
727
+ /** REST ID */
728
+ rest_id?: string;
729
+ /** 遗留卡片数据 */
730
+ legacy?: ICardLegacy;
731
+ }
732
+ /**
733
+ * 遗留卡片数据接口
734
+ */
735
+ interface ICardLegacy {
736
+ /** 绑定值数组 */
737
+ binding_values?: IBindingValue[];
738
+ /** 卡片平台 */
739
+ card_platform?: ICardPlatform;
740
+ /** 名称 */
741
+ name?: string;
742
+ /** URL */
743
+ url?: string;
744
+ /** 用户引用结果数组 */
745
+ user_refs_results?: IUserRefResult[];
746
+ }
747
+ /**
748
+ * 绑定值接口
749
+ */
750
+ interface IBindingValue {
751
+ /** 键 */
752
+ key?: LegacyCardBindingKeyType;
753
+ /** 值 */
754
+ value?: IBindingValueContent;
755
+ }
756
+ /**
757
+ * 绑定值内容接口
758
+ */
759
+ interface IBindingValueContent {
760
+ /** 图像值 */
761
+ image_value?: IImageValue;
762
+ /** 字符串值 */
763
+ string_value?: string;
764
+ /** 类型 */
765
+ type?: LegacyCardBindingValueType;
766
+ /** 图像颜色值 */
767
+ image_color_value?: IImageColorValue;
768
+ /** 记录键 */
769
+ scribe_key?: string;
770
+ /** 用户值 */
771
+ user_value?: IUserValue;
772
+ /** 应用价格金额 */
773
+ app_price_amount?: string;
774
+ }
775
+ /**
776
+ * 图像值接口
777
+ */
778
+ interface IImageValue {
779
+ /** 高度 */
780
+ height?: number;
781
+ /** 宽度 */
782
+ width?: number;
783
+ /** URL */
784
+ url?: string;
785
+ }
786
+ /**
787
+ * 图像颜色值接口
788
+ */
789
+ interface IImageColorValue {
790
+ /** 调色板 */
791
+ palette?: IColorPalette[];
792
+ }
793
+ /**
794
+ * 颜色调色板接口
795
+ */
796
+ interface IColorPalette {
797
+ /** RGB颜色 */
798
+ rgb?: IColorRGB;
799
+ /** 百分比 */
800
+ percentage?: number;
801
+ }
802
+ /**
803
+ * RGB颜色接口
804
+ */
805
+ interface IColorRGB {
806
+ /** 蓝色通道 */
807
+ blue?: number;
808
+ /** 绿色通道 */
809
+ green?: number;
810
+ /** 红色通道 */
811
+ red?: number;
812
+ }
813
+ /**
814
+ * 卡片平台接口
815
+ */
816
+ interface ICardPlatform {
817
+ /** 平台 */
818
+ platform?: IPlatform;
819
+ }
820
+ /**
821
+ * 平台接口
822
+ */
823
+ interface IPlatform {
824
+ /** 受众 */
825
+ audience?: IAudience;
826
+ /** 设备 */
827
+ device?: IDevice;
828
+ }
829
+ /**
830
+ * 受众接口
831
+ */
832
+ interface IAudience {
833
+ /** 名称 */
834
+ name?: string;
835
+ }
836
+ /**
837
+ * 设备接口
838
+ */
839
+ interface IDevice {
840
+ /** 名称 */
841
+ name?: string;
842
+ /** 版本 */
843
+ version?: string;
844
+ }
845
+ /**
846
+ * 用户引用结果接口
847
+ */
848
+ interface IUserRefResult {
849
+ /** 结果 */
850
+ result?: IUser$1;
851
+ }
852
+ /**
853
+ * 用户值接口
854
+ */
855
+ interface IUserValue {
856
+ /** ID字符串 */
857
+ id_str?: string;
858
+ /** 路径 */
859
+ path?: string[];
860
+ }
861
+
862
+ /**
863
+ * 推文基础类型,包含所有推文相关类型共有的字段
864
+ */
865
+
866
+ /**
867
+ * 推文基础接口
868
+ */
869
+ interface ITweetBase {
870
+ /** 创建时间 */
871
+ created_at?: string;
872
+ /** ID字符串 */
873
+ id_str?: string;
874
+ /** 完整文本 */
875
+ full_text?: string;
876
+ /** 是否截断 */
877
+ truncated?: boolean;
878
+ /** 显示文本范围 */
879
+ display_text_range?: number[];
880
+ /** 实体 */
881
+ entities?: ITweetEntities;
882
+ /** 来源 */
883
+ source?: string;
884
+ /** 回复的状态ID字符串 */
885
+ in_reply_to_status_id_str?: string | null;
886
+ /** 回复的用户ID字符串 */
887
+ in_reply_to_user_id_str?: string | null;
888
+ /** 回复的屏幕名称 */
889
+ in_reply_to_screen_name?: string | null;
890
+ /** 地理信息 */
891
+ geo?: any | null;
892
+ /** 坐标 */
893
+ coordinates?: any | null;
894
+ /** 地点 */
895
+ place?: any | null;
896
+ /** 贡献者 */
897
+ contributors?: any | null;
898
+ /** 是否为引用状态 */
899
+ is_quote_status?: boolean;
900
+ /** 引用状态ID字符串 */
901
+ quoted_status_id_str?: string | null;
902
+ /** 转发状态ID字符串 */
903
+ retweeted_status_id_str?: string | null;
904
+ /** 转发数 */
905
+ retweet_count?: number;
906
+ /** 点赞数 */
907
+ favorite_count?: number;
908
+ /** 回复数 */
909
+ reply_count?: number;
910
+ /** 引用数 */
911
+ quote_count?: number;
912
+ /** 对话ID字符串 */
913
+ conversation_id_str?: string;
914
+ /** 是否已收藏 */
915
+ favorited?: boolean;
916
+ /** 是否已转发 */
917
+ retweeted?: boolean;
918
+ /** 是否敏感内容 */
919
+ possibly_sensitive?: boolean;
920
+ /** 语言 */
921
+ lang?: string;
922
+ }
923
+ /**
924
+ * 推文实体接口
925
+ */
926
+ interface ITweetEntities {
927
+ /** 话题标签实体数组 */
928
+ hashtags?: IHashtagEntity[];
929
+ /** 媒体实体数组 */
930
+ media?: IMediaEntity$1[];
931
+ /** 符号实体数组 */
932
+ symbols?: any[];
933
+ /** 时间戳实体数组 */
934
+ timestamps?: any[];
935
+ /** URL实体数组 */
936
+ urls?: IUrlEntity$1[];
937
+ /** 用户提及实体数组 */
938
+ user_mentions?: IUserMentionEntity[];
939
+ }
940
+ /**
941
+ * 话题标签实体接口
942
+ */
943
+ interface IHashtagEntity {
944
+ /** 索引 */
945
+ indices?: number[];
946
+ /** 文本 */
947
+ text?: string;
948
+ }
949
+ /**
950
+ * 用户提及实体接口
951
+ */
952
+ interface IUserMentionEntity {
953
+ /** ID字符串 */
954
+ id_str?: string;
955
+ /** 名称 */
956
+ name?: string;
957
+ /** 屏幕名称 */
958
+ screen_name?: string;
959
+ /** 索引 */
960
+ indices?: number[];
961
+ }
962
+
963
+ interface ITimeline {
964
+ instructions?: ITimelineInstruction[];
965
+ }
966
+ interface ITimelineInstruction {
967
+ type?: string;
968
+ entries?: ITimelineEntry[];
969
+ }
970
+ interface ITimelineEntry {
971
+ entryId?: string;
972
+ sortIndex?: string;
973
+ content?: ITimelineContent;
974
+ }
975
+ interface ITimelineContent {
976
+ entryType?: TimelineEntryType;
977
+ __typename?: string;
978
+ itemContent?: ITimelineItemContent;
979
+ items?: ITimelineModuleItem[];
980
+ displayType?: DisplayType;
981
+ clientEventInfo?: IClientEventInfo;
982
+ feedbackInfo?: IFeedbackInfo;
983
+ metadata?: IMetadata;
984
+ }
985
+ interface IMetadata {
986
+ conversationMetadata?: IConversationMetadata;
987
+ }
988
+ interface IConversationMetadata {
989
+ allTweetIds?: string[];
990
+ enableDeduplication?: boolean;
991
+ }
992
+ interface ITimelineItemContent {
993
+ itemType?: string;
994
+ __typename?: string;
995
+ tweet_results?: ITweetResults;
996
+ tweetDisplayType?: TweetDisplayType;
997
+ hasModeratedReplies?: boolean;
998
+ clientEventInfo?: IClientEventInfo;
999
+ content?: ITimelineMessageContent;
1000
+ impressionCallbacks?: IEndpointCallback[];
1001
+ }
1002
+ interface ITimelineMessageContent {
1003
+ contentType?: string;
1004
+ headerText?: string;
1005
+ bodyText?: string;
1006
+ primaryButtonAction?: IButtonAction;
1007
+ headerRichText?: IRichText;
1008
+ bodyRichText?: IRichText;
1009
+ }
1010
+ interface IButtonAction {
1011
+ text?: string;
1012
+ action?: IAction;
1013
+ }
1014
+ interface IAction {
1015
+ url?: string;
1016
+ dismissOnClick?: boolean;
1017
+ onClickCallbacks?: IEndpointCallback[];
1018
+ clientEventInfo?: IClientEventInfo;
1019
+ }
1020
+ interface IEndpointCallback {
1021
+ endpoint?: string;
1022
+ }
1023
+ interface IRichText {
1024
+ text?: string;
1025
+ entities?: any[];
1026
+ }
1027
+ interface IFeedbackInfo {
1028
+ feedbackKeys?: string[];
1029
+ }
1030
+ interface ITweetResults {
1031
+ result?: ITweet$1;
1032
+ }
1033
+ interface ITimelineModuleItem {
1034
+ entryId?: string;
1035
+ item?: ITimelineModuleItemContent;
1036
+ }
1037
+ interface ITimelineModuleItemContent {
1038
+ itemContent?: ITimelineItemContent;
1039
+ clientEventInfo?: IClientEventInfo;
1040
+ }
1041
+ interface IClientEventInfo {
1042
+ details?: IClientEventDetails;
1043
+ }
1044
+ interface IClientEventDetails {
1045
+ conversationDetails?: IConversationDetails;
1046
+ timelinesDetails?: ITimelinesDetails;
1047
+ }
1048
+ interface IConversationDetails {
1049
+ conversationSection?: string;
1050
+ }
1051
+ interface ITimelinesDetails {
1052
+ controllerData?: string;
1053
+ injectionType?: InjectionType;
1054
+ }
1055
+
1056
+ interface IConversationTimeline {
1057
+ status?: string;
1058
+ min_entry_id?: string;
1059
+ max_entry_id?: string;
1060
+ entries?: IEntry[];
1061
+ users?: Record<string, IMessageUser>;
1062
+ conversations?: Record<string, IConversation>;
1063
+ }
1064
+ interface IEntry {
1065
+ message?: IMessage;
1066
+ }
1067
+ interface IMessage {
1068
+ id?: string;
1069
+ time?: string;
1070
+ request_id?: string;
1071
+ conversation_id?: string;
1072
+ message_data?: IMessageData;
1073
+ }
1074
+ interface IMessageData {
1075
+ id?: string;
1076
+ time?: string;
1077
+ recipient_id?: string;
1078
+ sender_id?: string;
1079
+ text?: string;
1080
+ entities?: IMessageEntities;
1081
+ attachment?: IAttachment;
1082
+ }
1083
+ interface IMessageEntities {
1084
+ hashtags?: any[];
1085
+ symbols?: any[];
1086
+ user_mentions?: any[];
1087
+ urls?: IUrlEntity$1[];
1088
+ }
1089
+ interface IAttachment {
1090
+ photo?: IPhoto;
1091
+ }
1092
+ interface IPhoto {
1093
+ id?: number;
1094
+ id_str?: string;
1095
+ indices?: number[];
1096
+ media_url?: string;
1097
+ media_url_https?: string;
1098
+ url?: string;
1099
+ display_url?: string;
1100
+ expanded_url?: string;
1101
+ type?: string;
1102
+ original_info?: IOriginalInfo$1;
1103
+ sizes?: IMediaSizes$1;
1104
+ features?: Record<string, unknown>;
1105
+ ext_media_color?: IExtMediaColor$1;
1106
+ ext_alt_text?: string | null;
1107
+ ext?: IExt;
1108
+ audio_only?: boolean;
1109
+ }
1110
+ interface IExt {
1111
+ mediaColor?: IMediaColor;
1112
+ mediaStats?: IMediaStats$1;
1113
+ altText?: IAltText;
1114
+ }
1115
+ interface IMediaColor {
1116
+ r?: IOk;
1117
+ ttl?: number;
1118
+ }
1119
+ interface IOk {
1120
+ palette?: IColorPalette$1[];
1121
+ }
1122
+ interface IAltText {
1123
+ r?: string;
1124
+ ttl?: number;
1125
+ }
1126
+ interface IMessageUser extends IUserBase$1 {
1127
+ id?: number;
1128
+ id_str?: string;
1129
+ protected?: boolean;
1130
+ utc_offset?: number | null;
1131
+ time_zone?: string | null;
1132
+ geo_enabled?: boolean;
1133
+ lang?: string | null;
1134
+ contributors_enabled?: boolean;
1135
+ is_translation_enabled?: boolean;
1136
+ profile_background_color?: string;
1137
+ profile_background_image_url?: string | null;
1138
+ profile_background_image_url_https?: string | null;
1139
+ profile_background_tile?: boolean;
1140
+ profile_image_url?: string;
1141
+ profile_link_color?: string;
1142
+ profile_sidebar_border_color?: string;
1143
+ profile_sidebar_fill_color?: string;
1144
+ profile_text_color?: string;
1145
+ profile_use_background_image?: boolean;
1146
+ can_secret_dm?: boolean | null;
1147
+ follow_request_sent?: boolean;
1148
+ notifications?: boolean;
1149
+ blocking?: boolean;
1150
+ subscribed_by?: boolean;
1151
+ blocked_by?: boolean;
1152
+ business_profile_state?: string;
1153
+ followed_by?: boolean;
1154
+ }
1155
+ interface IUrlEntities {
1156
+ urls?: IUrlEntity$1[];
1157
+ }
1158
+ interface IConversation {
1159
+ conversation_id?: string;
1160
+ type?: string;
1161
+ sort_event_id?: string;
1162
+ sort_timestamp?: string;
1163
+ participants?: IParticipant[];
1164
+ nsfw?: boolean;
1165
+ notifications_disabled?: boolean;
1166
+ mention_notifications_disabled?: boolean;
1167
+ last_read_event_id?: string;
1168
+ read_only?: boolean;
1169
+ trusted?: boolean;
1170
+ low_quality?: boolean;
1171
+ muted?: boolean;
1172
+ }
1173
+ interface IParticipant {
1174
+ user_id?: string;
1175
+ last_read_event_id?: string;
1176
+ }
1177
+
1178
+ interface ICommunityResult {
1179
+ result?: ICommunity;
1180
+ id?: string;
1181
+ }
1182
+ interface ICommunity {
1183
+ __typename?: string;
1184
+ id_str?: string;
1185
+ name?: string;
1186
+ description?: string;
1187
+ created_at?: number;
1188
+ search_tags?: string[];
1189
+ is_nsfw?: boolean;
1190
+ actions?: ICommunityActions;
1191
+ admin_results?: IUserResult;
1192
+ creator_results?: IUserResult;
1193
+ invites_result?: ICommunityInvitesResult;
1194
+ join_policy?: string;
1195
+ invites_policy?: string;
1196
+ is_pinned?: boolean;
1197
+ members_facepile_results?: IUserResult[];
1198
+ moderator_count?: number;
1199
+ member_count?: number;
1200
+ role?: string;
1201
+ rules?: ICommunityRule[];
1202
+ custom_banner_media?: ICommunityMedia;
1203
+ default_banner_media?: ICommunityMedia;
1204
+ viewer_relationship?: IViewerRelationship;
1205
+ join_requests_result?: ICommunityJoinRequestsResult;
1206
+ id?: string;
1207
+ }
1208
+ interface ICommunityActions {
1209
+ delete_action_result?: ICommunityDeleteActionResult;
1210
+ join_action_result?: ICommunityJoinActionResult;
1211
+ leave_action_result?: ICommunityLeaveActionResult;
1212
+ pin_action_result?: ICommunityTweetPinActionResult;
1213
+ id?: string;
1214
+ }
1215
+ interface ICommunityDeleteActionResult {
1216
+ __typename?: string;
1217
+ __isCommunityDeleteActionResult?: string;
1218
+ reason?: string;
1219
+ }
1220
+ interface ICommunityJoinActionResult {
1221
+ __typename?: string;
1222
+ __isCommunityJoinActionResult?: string;
1223
+ reason?: string;
1224
+ message?: string;
1225
+ }
1226
+ interface ICommunityLeaveActionResult {
1227
+ __typename?: string;
1228
+ __isCommunityLeaveActionResult?: string;
1229
+ reason?: string;
1230
+ message?: string;
1231
+ }
1232
+ interface ICommunityTweetPinActionResult {
1233
+ __typename?: string;
1234
+ __isCommunityTweetPinActionResult?: string;
1235
+ }
1236
+ interface IUserResult {
1237
+ result?: IUser$1;
1238
+ id?: string;
1239
+ }
1240
+ interface ICommunityInvitesResult {
1241
+ __typename?: string;
1242
+ __isCommunityInvitesResult?: string;
1243
+ reason?: string;
1244
+ message?: string;
1245
+ }
1246
+ interface ICommunityRule {
1247
+ rest_id?: string;
1248
+ name?: string;
1249
+ id?: string;
1250
+ }
1251
+ interface ICommunityMedia {
1252
+ media_info?: IApiImage;
1253
+ id?: string;
1254
+ }
1255
+ interface IApiImage {
1256
+ __typename?: string;
1257
+ color_info?: IColorInfo;
1258
+ original_img_url?: string;
1259
+ original_img_width?: number;
1260
+ original_img_height?: number;
1261
+ salient_rect?: ISalientRect;
1262
+ }
1263
+ interface IColorInfo {
1264
+ palette?: IColorPalette$1[];
1265
+ }
1266
+ interface ISalientRect {
1267
+ left?: number;
1268
+ top?: number;
1269
+ width?: number;
1270
+ height?: number;
1271
+ }
1272
+ interface IViewerRelationship {
1273
+ moderation_state?: ICommunityUserDefaultModerationState;
1274
+ id?: string;
1275
+ }
1276
+ interface ICommunityUserDefaultModerationState {
1277
+ __typename?: string;
1278
+ }
1279
+ interface ICommunityJoinRequestsResult {
1280
+ __typename?: string;
1281
+ }
1282
+
1283
+ interface INotificationResponse {
1284
+ globalObjects?: IGlobalObjects;
1285
+ }
1286
+ interface IGlobalObjects {
1287
+ users?: Record<string, IUserObject>;
1288
+ tweets?: Record<string, ITweetObject>;
1289
+ }
1290
+ interface IUserObject extends IUserBase$1 {
1291
+ id?: number;
1292
+ id_str?: string;
1293
+ protected?: boolean;
1294
+ utc_offset?: number | null;
1295
+ time_zone?: string | null;
1296
+ geo_enabled?: boolean;
1297
+ lang?: string | null;
1298
+ contributors_enabled?: boolean;
1299
+ is_translation_enabled?: boolean;
1300
+ profile_background_color?: string;
1301
+ profile_background_image_url?: string | null;
1302
+ profile_background_image_url_https?: string | null;
1303
+ profile_background_tile?: boolean;
1304
+ profile_image_url?: string;
1305
+ profile_banner_url?: string;
1306
+ profile_link_color?: string;
1307
+ profile_sidebar_border_color?: string;
1308
+ profile_sidebar_fill_color?: string;
1309
+ profile_text_color?: string;
1310
+ profile_use_background_image?: boolean;
1311
+ follow_request_sent?: boolean | null;
1312
+ notifications?: boolean | null;
1313
+ blocking?: boolean | null;
1314
+ blocked_by?: boolean | null;
1315
+ profile_interstitial_type?: string;
1316
+ followed_by?: boolean | null;
1317
+ ext_is_blue_verified?: boolean;
1318
+ ext_highlighted_label?: Record<string, unknown>;
1319
+ }
1320
+ interface ITweetObject extends ITweetBase$1 {
1321
+ id?: number;
1322
+ in_reply_to_status_id?: number | null;
1323
+ in_reply_to_user_id?: number | null;
1324
+ user_id?: number;
1325
+ user_id_str?: string;
1326
+ quoted_status_id?: number | null;
1327
+ conversation_id?: number;
1328
+ conversation_muted?: boolean;
1329
+ card?: ITweetCard;
1330
+ ext?: INotificationExt;
1331
+ extended_entities?: IExtendedEntities$1;
1332
+ }
1333
+ interface IHashtag {
1334
+ text?: string;
1335
+ indices?: number[];
1336
+ }
1337
+ interface IUserMention {
1338
+ screen_name?: string;
1339
+ name?: string;
1340
+ id?: number;
1341
+ id_str?: string;
1342
+ indices?: number[];
1343
+ }
1344
+ interface INotificationMediaStats {
1345
+ r?: IOk$1;
1346
+ ttl?: number;
1347
+ }
1348
+ interface IViewCount {
1349
+ viewCount?: string;
1350
+ }
1351
+ interface ITweetCard {
1352
+ name?: string;
1353
+ url?: string;
1354
+ card_type_url?: string;
1355
+ binding_values?: Record<string, IBindingValue$1>;
1356
+ card_platform?: ICardPlatform$1;
1357
+ }
1358
+ interface INotificationExt {
1359
+ superFollowMetadata?: ISuperFollowMetadata;
1360
+ }
1361
+ interface ISuperFollowMetadata {
1362
+ r?: IOk$1;
1363
+ ttl?: number;
1364
+ }
1365
+
1366
+ /**
1367
+ * 媒体相关类型定义
1368
+ */
1369
+
1370
+ /**
1371
+ * 媒体实体接口
1372
+ */
1373
+ interface IMediaEntity {
1374
+ /** 显示URL */
1375
+ display_url?: string;
1376
+ /** 展开URL */
1377
+ expanded_url?: string;
1378
+ /** ID字符串 */
1379
+ id_str?: string;
1380
+ /** 索引 */
1381
+ indices?: number[];
1382
+ /** 媒体键 */
1383
+ media_key?: string;
1384
+ /** 媒体URL */
1385
+ media_url_https?: string;
1386
+ /** 类型 */
1387
+ type?: string;
1388
+ /** URL */
1389
+ url?: string;
1390
+ /** 额外媒体信息 */
1391
+ additional_media_info?: IAdditionalMediaInfo;
1392
+ /** 扩展媒体可用性 */
1393
+ ext_media_availability?: IExtMediaAvailability;
1394
+ /** 尺寸 */
1395
+ sizes?: IMediaSizes;
1396
+ /** 原始信息 */
1397
+ original_info?: IOriginalInfo;
1398
+ /** 允许下载状态 */
1399
+ allow_download_status?: IAllowDownloadStatus;
1400
+ /** 视频信息 */
1401
+ video_info?: IVideoInfo;
1402
+ /** 媒体结果 */
1403
+ media_results?: IMediaResults;
1404
+ /** 特性 */
1405
+ features?: IMediaFeatures;
1406
+ /** 扩展媒体颜色 */
1407
+ ext_media_color?: IExtMediaColor;
1408
+ /** 扩展替代文本 */
1409
+ ext_alt_text?: string | null;
1410
+ /** 扩展 */
1411
+ ext?: IExtMedia;
1412
+ }
1413
+ /**
1414
+ * 额外媒体信息接口
1415
+ */
1416
+ interface IAdditionalMediaInfo {
1417
+ /** 是否可变现 */
1418
+ monetizable?: boolean;
1419
+ }
1420
+ /**
1421
+ * 扩展媒体可用性接口
1422
+ */
1423
+ interface IExtMediaAvailability {
1424
+ /** 状态 */
1425
+ status?: string;
1426
+ }
1427
+ /**
1428
+ * 媒体尺寸接口
1429
+ */
1430
+ interface IMediaSizes {
1431
+ /** 大尺寸 */
1432
+ large?: IMediaSize;
1433
+ /** 中等尺寸 */
1434
+ medium?: IMediaSize;
1435
+ /** 小尺寸 */
1436
+ small?: IMediaSize;
1437
+ /** 缩略图 */
1438
+ thumb?: IMediaSize;
1439
+ }
1440
+ /**
1441
+ * 媒体尺寸接口
1442
+ */
1443
+ interface IMediaSize {
1444
+ /** 高度 */
1445
+ h?: number;
1446
+ /** 宽度 */
1447
+ w?: number;
1448
+ /** 调整大小方式 */
1449
+ resize?: string;
1450
+ }
1451
+ /**
1452
+ * 原始信息接口
1453
+ */
1454
+ interface IOriginalInfo {
1455
+ /** 高度 */
1456
+ height?: number;
1457
+ /** 宽度 */
1458
+ width?: number;
1459
+ /** 焦点矩形 */
1460
+ focus_rects?: IFocusRect[];
1461
+ }
1462
+ /**
1463
+ * 焦点矩形接口
1464
+ */
1465
+ interface IFocusRect {
1466
+ /** X坐标 */
1467
+ x?: number;
1468
+ /** Y坐标 */
1469
+ y?: number;
1470
+ /** 宽度 */
1471
+ w?: number;
1472
+ /** 高度 */
1473
+ h?: number;
1474
+ }
1475
+ /**
1476
+ * 允许下载状态接口
1477
+ */
1478
+ interface IAllowDownloadStatus {
1479
+ /** 是否允许下载 */
1480
+ allow_download?: boolean;
1481
+ }
1482
+ /**
1483
+ * 视频信息接口
1484
+ */
1485
+ interface IVideoInfo {
1486
+ /** 宽高比 */
1487
+ aspect_ratio?: number[];
1488
+ /** 时长(毫秒) */
1489
+ duration_millis?: number;
1490
+ /** 视频变体 */
1491
+ variants?: IVideoVariant[];
1492
+ }
1493
+ /**
1494
+ * 视频变体接口
1495
+ */
1496
+ interface IVideoVariant {
1497
+ /** 比特率 */
1498
+ bitrate?: number;
1499
+ /** 内容类型 */
1500
+ content_type?: string;
1501
+ /** URL */
1502
+ url?: string;
1503
+ }
1504
+ /**
1505
+ * 媒体结果接口
1506
+ */
1507
+ interface IMediaResults {
1508
+ /** 结果 */
1509
+ result?: IMediaResult;
1510
+ }
1511
+ /**
1512
+ * 媒体结果接口
1513
+ */
1514
+ interface IMediaResult {
1515
+ /** 媒体键 */
1516
+ media_key?: string;
1517
+ }
1518
+ /**
1519
+ * 媒体特性接口
1520
+ */
1521
+ interface IMediaFeatures {
1522
+ /** 大尺寸 */
1523
+ large?: IMediaFeature;
1524
+ /** 中等尺寸 */
1525
+ medium?: IMediaFeature;
1526
+ /** 小尺寸 */
1527
+ small?: IMediaFeature;
1528
+ /** 原始尺寸 */
1529
+ orig?: IMediaFeature;
1530
+ }
1531
+ /**
1532
+ * 媒体特性接口
1533
+ */
1534
+ interface IMediaFeature {
1535
+ /** 面部 */
1536
+ faces?: any[];
1537
+ }
1538
+ /**
1539
+ * 扩展媒体颜色接口
1540
+ */
1541
+ interface IExtMediaColor {
1542
+ /** 调色板 */
1543
+ palette?: IColorPalette$1[];
1544
+ }
1545
+ /**
1546
+ * 扩展媒体接口
1547
+ */
1548
+ interface IExtMedia {
1549
+ /** 媒体统计 */
1550
+ mediaStats?: IMediaStats;
1551
+ }
1552
+ /**
1553
+ * 媒体统计接口
1554
+ */
1555
+ interface IMediaStats {
1556
+ /** 统计数据 */
1557
+ r?: any;
1558
+ /** 生存时间 */
1559
+ ttl?: number;
1560
+ }
1561
+
1562
+ /**
1563
+ * 简单用户类型,仅保留必须的标识字段、核心数据字段、用于显示的字段
1564
+ */
1565
+
1566
+ interface ISimpleUser {
1567
+ /** 用户REST ID */
1568
+ rest_id: string;
1569
+ /** 用户名 */
1570
+ name: string;
1571
+ /** 用户屏幕名称 */
1572
+ screen_name: string;
1573
+ /** 头像URL */
1574
+ profile_image_url_https: string;
1575
+ /** 是否验证 */
1576
+ verified?: boolean;
1577
+ /** 粉丝数 */
1578
+ followers_count?: number;
1579
+ /** 关注数 */
1580
+ friends_count?: number;
1581
+ /** 推文数 */
1582
+ statuses_count?: number;
1583
+ /** 个人简介 */
1584
+ description?: string | null;
1585
+ /** 位置 */
1586
+ location?: string | null;
1587
+ /** 个人网站 */
1588
+ url?: string | null;
1589
+ /** 用户标签类型 */
1590
+ userLabelType?: UserLabelType;
1591
+ /** 验证类型 */
1592
+ verified_type?: VerifiedType;
1593
+ }
1594
+
1595
+ /**
1596
+ * 简单媒体类型,仅保留各子类型、各品质的URL与尺寸、说明
1597
+ */
1598
+
1599
+ interface ISimpleMedia {
1600
+ /** 媒体键 */
1601
+ media_key?: string;
1602
+ /** 媒体类型 */
1603
+ type: MediaType;
1604
+ /** 媒体URL */
1605
+ media_url_https: string;
1606
+ /** 显示URL */
1607
+ display_url?: string;
1608
+ /** 展开URL */
1609
+ expanded_url?: string;
1610
+ }
1611
+ /**
1612
+ * 简单图片媒体类型
1613
+ */
1614
+ interface ISimplePhoto extends ISimpleMedia {
1615
+ /** 媒体类型 */
1616
+ type: 'photo';
1617
+ /** 图片尺寸 */
1618
+ sizes?: {
1619
+ /** 缩略图 */
1620
+ thumb?: ISimpleMediaSize;
1621
+ /** 小尺寸 */
1622
+ small?: ISimpleMediaSize;
1623
+ /** 中等尺寸 */
1624
+ medium?: ISimpleMediaSize;
1625
+ /** 大尺寸 */
1626
+ large?: ISimpleMediaSize;
1627
+ };
1628
+ /** 原始信息 */
1629
+ original_info?: {
1630
+ /** 宽度 */
1631
+ width: number;
1632
+ /** 高度 */
1633
+ height: number;
1634
+ };
1635
+ }
1636
+ /**
1637
+ * 简单视频媒体类型
1638
+ */
1639
+ interface ISimpleVideo extends ISimpleMedia {
1640
+ /** 媒体类型 */
1641
+ type: Exclude<MediaType, 'photo'>;
1642
+ /** 视频信息 */
1643
+ video_info?: {
1644
+ /** 宽高比 */
1645
+ aspect_ratio?: number[];
1646
+ /** 时长(毫秒) */
1647
+ duration_millis?: number;
1648
+ /** 视频变体 */
1649
+ variants?: ISimpleVideoVariant[];
1650
+ };
1651
+ }
1652
+ /**
1653
+ * 媒体尺寸
1654
+ */
1655
+ interface ISimpleMediaSize {
1656
+ /** 宽度 */
1657
+ w: number;
1658
+ /** 高度 */
1659
+ h: number;
1660
+ /** 调整大小方式 */
1661
+ resize: string;
1662
+ }
1663
+ /**
1664
+ * 视频变体
1665
+ */
1666
+ interface ISimpleVideoVariant {
1667
+ /** 比特率 */
1668
+ bitrate?: number;
1669
+ /** 内容类型 */
1670
+ content_type: string;
1671
+ /** 视频URL */
1672
+ url: string;
1673
+ }
1674
+ /**
1675
+ * 简单URL类型
1676
+ */
1677
+ interface ISimpleUrl {
1678
+ /** URL */
1679
+ url: string;
1680
+ /** 展开URL */
1681
+ expanded_url?: string;
1682
+ /** 显示URL */
1683
+ display_url?: string;
1684
+ }
1685
+
1686
+ /**
1687
+ * 简单推文类型,仅保留必须的标识字段、核心数据字段、用于显示的字段
1688
+ */
1689
+
1690
+ interface ISimpleTweet {
1691
+ /** 推文REST ID */
1692
+ rest_id: string;
1693
+ /** 推文完整文本 */
1694
+ full_text: string;
1695
+ /** 创建时间 */
1696
+ created_at: string;
1697
+ /** 用户ID */
1698
+ user_id: string;
1699
+ /** 用户屏幕名称 */
1700
+ user_screen_name: string;
1701
+ /** 转发数 */
1702
+ retweet_count?: number;
1703
+ /** 点赞数 */
1704
+ favorite_count?: number;
1705
+ /** 回复数 */
1706
+ reply_count?: number;
1707
+ /** 引用数 */
1708
+ quote_count?: number;
1709
+ /** 语言 */
1710
+ lang?: string;
1711
+ /** 会话ID */
1712
+ conversation_id?: string;
1713
+ /** 是否敏感内容 */
1714
+ possibly_sensitive?: boolean;
1715
+ /** 是否为转发 */
1716
+ is_retweet?: boolean;
1717
+ /** 被转发的推文ID */
1718
+ retweeted_status_id?: string | null;
1719
+ /** 被引用的推文ID */
1720
+ quoted_status_id?: string | null;
1721
+ /** 图片媒体数组 */
1722
+ photos?: ISimplePhoto[];
1723
+ /** 视频媒体数组 */
1724
+ videos?: ISimpleVideo[];
1725
+ /** URL数组 */
1726
+ urls?: ISimpleUrl[];
1727
+ }
1728
+
1729
+ /**
1730
+ * 简单Result类型,包含所有简单User、Tweet、各种媒体、游标标识等
1731
+ */
1732
+
1733
+ /**
1734
+ * Result的基类,支持泛型
1735
+ * @template UserType - 用户类型,必须是ISimpleUser或IUser
1736
+ * @template TweetType - 推文类型,必须是ISimpleTweet或ITweet
1737
+ */
1738
+ interface IResultBase<UserType extends ISimpleUser | IUser, TweetType extends ISimpleTweet | ITweet> {
1739
+ /** 用户数组 */
1740
+ users?: UserType[];
1741
+ /** 推文数组 */
1742
+ tweets?: TweetType[];
1743
+ /** 包含图片的推文数组 */
1744
+ photos?: TweetType[];
1745
+ /** 包含视频的推文数组 */
1746
+ videos?: TweetType[];
1747
+ /** 包含URL的推文数组 */
1748
+ urls?: TweetType[];
1749
+ /** 下一页游标 */
1750
+ next_cursor?: string;
1751
+ /** 下一页游标字符串 */
1752
+ next_cursor_str?: string;
1753
+ /** 上一页游标 */
1754
+ previous_cursor?: string;
1755
+ /** 上一页游标字符串 */
1756
+ previous_cursor_str?: string;
1757
+ /** 顶部游标 */
1758
+ cursor_top?: string;
1759
+ /** 底部游标 */
1760
+ cursor_bottom?: string;
1761
+ /** 总数 */
1762
+ total_count?: number;
1763
+ /** 是否有更多项目 */
1764
+ has_more_items?: boolean;
1765
+ /** 新的潜在计数 */
1766
+ new_latent_count?: number;
1767
+ }
1768
+ /**
1769
+ * 基于简单类型的Result
1770
+ */
1771
+ interface ISimpleResult extends IResultBase<ISimpleUser, ISimpleTweet> {
1772
+ }
1773
+ /**
1774
+ * 基于原始类型的Result
1775
+ */
1776
+ interface IOriginalResult extends IResultBase<IUser, ITweet> {
1777
+ }
1778
+
1779
+ export { COMMUNITY_TYPENAMES, COMPONENT_VALUES, CONTENT_TYPES, CURSOR_TYPES, DISPLAY_TYPES, ELEMENT_TYPES, ELIGIBILITY_TYPES, INJECTION_TYPES, INSTRUCTION_TYPES, ITEM_TYPES, IdPrefixes, LEGACY_CARD_BINDING_KEY_TYPES, LEGACY_CARD_BINDING_VALUE_TYPES, MEDIA_TYPES, MESSAGE_INBOX_TIMELINE_INDEXES, NOTIFICATION_KEYS, TIMELINE_ENTRY_TYPES, TIMELINE_INSTRUCTION_TYPES, TIMELINE_ITEM_TYPENAMES, TIMELINE_ITEM_TYPES, TIMELINE_TYPENAMES, TRANSPARENT_GUIDE_DETAIL_TYPES, TWEET_DISPLAY_TYPES, TWEET_QUALITIES, TWEET_TYPENAMES, URL_TYPES, USER_DISPLAY_TYPES, USER_LABEL_TYPES, USER_TYPENAMES, VERIFIED_TYPES, VIDEO_CONTENT_TYPES, VIEW_STATES };
1780
+ export type { CommunityTypename, ComponentValue, ContentType, CursorType, DisplayType, ElementType, EligibilityType, IAction, IAdditionalMediaInfo, IAffiliatesHighlightedLabel, IAllowDownloadStatus, IAltText, IApiImage, IAttachment, IAudience, IBadge, IBindingValue, IBindingValueContent, IButtonAction, ICard, ICardLegacy, ICardPlatform, IClientEventDetails, IClientEventInfo, IColorInfo, IColorPalette, IColorRGB, ICommunity, ICommunityActions, ICommunityDeleteActionResult, ICommunityInvitesResult, ICommunityJoinActionResult, ICommunityJoinRequestsResult, ICommunityLeaveActionResult, ICommunityMedia, ICommunityResult, ICommunityRule, ICommunityTweetPinActionResult, ICommunityUserDefaultModerationState, IConversation, IConversationDetails, IConversationMetadata, IConversationTimeline, IDevice, IEditControl, IEditControlInitial, IEndpointCallback, IEntry, IExt, IExtMedia, IExtMediaAvailability, IExtMediaColor, IExtendedEntities, IFeedbackInfo, IFocusRect, IGlobalObjects, IHashtag, IHashtagEntity, IImageColorValue, IImageValue, ILabel, IMediaColor, IMediaEntity, IMediaFeature, IMediaFeatures, IMediaResult, IMediaResults, IMediaSize, IMediaSizes, IMediaStats, IMessage, IMessageData, IMessageEntities, IMessageUser, IMetadata, INotificationExt, INotificationMediaStats, INotificationResponse, IOk, IOriginalInfo, IOriginalResult, IParticipant, IPhoto, IPlatform, IPreviousCounts, IQuickPromoteEligibility, IQuotedStatusPermalink, IQuotedStatusResult, IResultBase, IRetweetedStatusResult, IRichText, ISalientRect, ISimpleMedia, ISimpleMediaSize, ISimplePhoto, ISimpleResult, ISimpleTweet, ISimpleUrl, ISimpleUser, ISimpleVideo, ISimpleVideoVariant, ISuperFollowMetadata, ISuperFollowsReplyUserResult, ITimeline, ITimelineContent, ITimelineEntry, ITimelineInstruction, ITimelineItemContent, ITimelineMessageContent, ITimelineModuleItem, ITimelineModuleItemContent, ITimelinesDetails, ITipjarSettings, ITweet, ITweetBase, ITweetCard, ITweetCore, ITweetEntities, ITweetLegacy, ITweetObject, ITweetResults, ITweetViews, IUrl, IUrlEntities, IUrlEntity, IUser, IUserBase, IUserCategory, IUserEntities, IUserEntityUrls, IUserLegacy, IUserMention, IUserMentionEntity, IUserObject, IUserProfessional, IUserRefResult, IUserResult, IUserResults, IUserValue, IVideoInfo, IVideoVariant, IViewCount, IViewerRelationship, InjectionType, InstructionType, ItemType, LegacyCardBindingKeyType, LegacyCardBindingValueType, MediaType, MessageInboxTimelineIndex, NotificationKey, TimelineEntryType, TimelineInstructionType, TimelineItemType, TimelineItemTypename, TimelineTypename, TransparentGuideDetailType, TweetDisplayType, TweetQuality, TweetTypename, UrlType, UserDisplayType, UserLabelType, UserTypename, VerifiedType, VideoContentType, ViewState };