gs-x-parser 1.0.1 → 1.0.2

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 CHANGED
@@ -110,7 +110,7 @@ type UserDisplayType = typeof USER_DISPLAY_TYPES[number];
110
110
  /**
111
111
  * 注入类型常量
112
112
  */
113
- declare const INJECTION_TYPES: readonly ["ForYouInNetwork", "ForYouPromoted", "WhoToFollow", "creators-only-connect-tab", "CommunityToJoin"];
113
+ declare const INJECTION_TYPES: readonly ["ForYouInNetwork", "ForYouPromoted", "WhoToFollow", "creators-only-connect-tab", "CommunityToJoin", "FollowingInNetwork"];
114
114
  /**
115
115
  * 注入类型联合类型
116
116
  */
@@ -187,6 +187,14 @@ declare const VIDEO_CONTENT_TYPES: readonly ["application/x-mpegURL", "video/mp4
187
187
  * 视频内容类型联合类型
188
188
  */
189
189
  type VideoContentType = typeof VIDEO_CONTENT_TYPES[number];
190
+ /**
191
+ * 视频质量类型常量
192
+ */
193
+ declare const VIDEO_QUALITIES: readonly ["high", "medium", "low"];
194
+ /**
195
+ * 视频质量类型联合类型
196
+ */
197
+ type VideoQuality = typeof VIDEO_QUALITIES[number];
190
198
  /**
191
199
  * 消息收件箱时间线索引常量
192
200
  */
@@ -358,24 +366,98 @@ interface IUser {
358
366
  rest_id: string;
359
367
  /** 附属高亮标签 */
360
368
  affiliates_highlighted_label?: IAffiliatesHighlightedLabel;
369
+ /** 头像 */
370
+ avatar?: IAvatar;
371
+ /** 核心数据 */
372
+ core?: IUserCore;
373
+ /** 私信权限 */
374
+ dm_permissions?: IDmPermissions;
361
375
  /** 是否有毕业访问权限 */
362
376
  has_graduated_access?: boolean;
363
377
  /** 是否蓝V验证 */
364
378
  is_blue_verified?: boolean;
379
+ /** 位置 */
380
+ location?: ILocation | string;
381
+ /** 媒体权限 */
382
+ media_permissions?: IMediaPermissions;
383
+ /** 模仿评论粉丝标签 */
384
+ parody_commentary_fan_label?: string;
385
+ /** 隐私设置 */
386
+ privacy?: IPrivacy;
365
387
  /** 头像形状 */
366
388
  profile_image_shape?: string;
389
+ /** 个人简介 */
390
+ profile_bio?: IProfileBio;
391
+ /** 个人简介语言 */
392
+ profile_description_language?: string;
393
+ /** 关系视角 */
394
+ relationship_perspectives?: IRelationshipPerspectives;
367
395
  /** 遗留用户数据 */
368
396
  legacy?: IUserLegacy;
369
397
  /** 专业信息 */
370
398
  professional?: IUserProfessional;
371
399
  /** 是否有超级关注资格 */
372
400
  super_follow_eligible?: boolean;
401
+ /** 是否被超级关注 */
402
+ super_followed_by?: boolean;
403
+ /** 是否超级关注 */
404
+ super_following?: boolean;
373
405
  /** 小费设置 */
374
406
  tipjar_settings?: ITipjarSettings;
407
+ /** 验证信息 */
408
+ verification?: IVerification;
409
+ /** 直接在用户对象上的字段(用于通知数据) */
410
+ name?: string;
411
+ screen_name?: string;
412
+ profile_image_url_https?: string;
413
+ verified?: boolean;
414
+ followers_count?: number;
415
+ friends_count?: number;
416
+ statuses_count?: number;
417
+ description?: string;
418
+ url?: string;
419
+ verified_type?: VerifiedType;
420
+ created_at?: string;
421
+ profile_banner_url?: string;
422
+ protected?: boolean;
423
+ lang?: string;
424
+ contributors_enabled?: boolean;
425
+ is_translator?: boolean;
426
+ is_translation_enabled?: boolean;
427
+ profile_background_color?: string;
428
+ profile_background_image_url?: string;
429
+ profile_background_image_url_https?: string;
430
+ profile_background_tile?: boolean;
431
+ profile_link_color?: string;
432
+ profile_sidebar_border_color?: string;
433
+ profile_sidebar_fill_color?: string;
434
+ profile_text_color?: string;
435
+ profile_use_background_image?: boolean;
436
+ default_profile?: boolean;
437
+ default_profile_image?: boolean;
438
+ following?: boolean;
439
+ follow_request_sent?: boolean;
440
+ notifications?: boolean;
441
+ blocking?: boolean;
442
+ blocked_by?: boolean;
443
+ want_retweets?: boolean;
444
+ profile_interstitial_type?: string;
445
+ translator_type?: string;
446
+ withheld_in_countries?: string[];
447
+ followed_by?: boolean;
448
+ ext_is_blue_verified?: boolean;
449
+ ext_highlighted_label?: any;
450
+ entities?: any;
375
451
  }
376
452
  interface ITipjarSettings {
377
453
  /** 是否启用 */
378
454
  is_enabled?: boolean;
455
+ /** 比特币地址 */
456
+ bitcoin_handle?: string;
457
+ /** 以太坊地址 */
458
+ ethereum_handle?: string;
459
+ /** Patreon 句柄 */
460
+ patreon_handle?: string;
379
461
  }
380
462
  /**
381
463
  * 遗留用户数据接口
@@ -466,6 +548,81 @@ interface IBadge {
466
548
  /** URL */
467
549
  url?: string;
468
550
  }
551
+ /**
552
+ * 头像接口
553
+ */
554
+ interface IAvatar {
555
+ /** 图像URL */
556
+ image_url?: string;
557
+ }
558
+ /**
559
+ * 用户核心数据接口
560
+ */
561
+ interface IUserCore {
562
+ /** 创建时间 */
563
+ created_at?: string;
564
+ /** 名称 */
565
+ name?: string;
566
+ /** 屏幕名称 */
567
+ screen_name?: string;
568
+ }
569
+ /**
570
+ * 私信权限接口
571
+ */
572
+ interface IDmPermissions {
573
+ /** 是否可以发送私信 */
574
+ can_dm?: boolean;
575
+ }
576
+ /**
577
+ * 位置接口
578
+ */
579
+ interface ILocation {
580
+ /** 位置 */
581
+ location?: string;
582
+ }
583
+ /**
584
+ * 媒体权限接口
585
+ */
586
+ interface IMediaPermissions {
587
+ /** 是否可以媒体标签 */
588
+ can_media_tag?: boolean;
589
+ }
590
+ /**
591
+ * 隐私设置接口
592
+ */
593
+ interface IPrivacy {
594
+ /** 是否受保护 */
595
+ protected?: boolean;
596
+ }
597
+ /**
598
+ * 个人简介接口
599
+ */
600
+ interface IProfileBio {
601
+ /** 描述 */
602
+ description?: string;
603
+ }
604
+ /**
605
+ * 关系视角接口
606
+ */
607
+ interface IRelationshipPerspectives {
608
+ /** 是否被阻塞 */
609
+ blocked_by?: boolean;
610
+ /** 是否阻塞 */
611
+ blocking?: boolean;
612
+ /** 是否被关注 */
613
+ followed_by?: boolean;
614
+ /** 是否关注 */
615
+ following?: boolean;
616
+ /** 是否静音 */
617
+ muting?: boolean;
618
+ }
619
+ /**
620
+ * 验证信息接口
621
+ */
622
+ interface IVerification {
623
+ /** 是否验证 */
624
+ verified?: boolean;
625
+ }
469
626
 
470
627
  /**
471
628
  * 用户基础类型,包含所有用户相关类型共有的字段
@@ -568,6 +725,12 @@ interface ITweet {
568
725
  unmention_data?: Record<string, unknown>;
569
726
  /** 编辑控制 */
570
727
  edit_control?: IEditControl;
728
+ /** Grok分析按钮 */
729
+ grok_analysis_button?: boolean;
730
+ /** Grok注释 */
731
+ grok_annotations?: Record<string, unknown>;
732
+ /** Grok翻译帖子可用性 */
733
+ grok_translated_post_with_availability?: IGrokTranslatedPostWithAvailability;
571
734
  /** 之前的计数 */
572
735
  previous_counts?: IPreviousCounts;
573
736
  /** 是否可翻译 */
@@ -588,6 +751,81 @@ interface ITweet {
588
751
  retweeted_status_result?: IRetweetedStatusResult;
589
752
  /** 超级关注回复用户结果 */
590
753
  superFollowsReplyUserResult?: ISuperFollowsReplyUserResult;
754
+ /** 可见性结果 */
755
+ visibility_results?: IVisibilityResults;
756
+ /** 客户端事件信息 */
757
+ clientEventInfo?: IClientEventInfo;
758
+ /** 直接在推文对象上的字段(用于通知数据) */
759
+ full_text?: string;
760
+ created_at?: string;
761
+ user_id_str?: string;
762
+ retweet_count?: number;
763
+ favorite_count?: number;
764
+ reply_count?: number;
765
+ quote_count?: number;
766
+ lang?: string;
767
+ conversation_id_str?: string;
768
+ conversation_id?: string;
769
+ possibly_sensitive?: boolean;
770
+ retweeted_status_id_str?: string;
771
+ quoted_status_id_str?: string;
772
+ entities?: any;
773
+ extended_entities?: any;
774
+ entryId?: string;
775
+ }
776
+ /**
777
+ * 客户端事件信息接口
778
+ */
779
+ interface IClientEventInfo {
780
+ /** 组件 */
781
+ component?: string;
782
+ /** 详情 */
783
+ details?: IClientEventDetails;
784
+ /** 元素 */
785
+ element?: string;
786
+ }
787
+ /**
788
+ * 客户端事件详情接口
789
+ */
790
+ interface IClientEventDetails {
791
+ /** 会话详情 */
792
+ conversationDetails?: IConversationDetails;
793
+ /** 时间线详情 */
794
+ timelinesDetails?: ITimelinesDetails;
795
+ }
796
+ /**
797
+ * 会话详情接口
798
+ */
799
+ interface IConversationDetails {
800
+ /** 会话部分 */
801
+ conversationSection?: string;
802
+ }
803
+ /**
804
+ * 时间线详情接口
805
+ */
806
+ interface ITimelinesDetails {
807
+ /** 控制器数据 */
808
+ controllerData?: string;
809
+ /** 注入类型 */
810
+ injectionType?: string;
811
+ }
812
+ /**
813
+ * 可见性结果接口
814
+ */
815
+ interface IVisibilityResults {
816
+ /** 推文质量 */
817
+ tweet_visibility_annotations?: ITweetVisibilityAnnotation[];
818
+ }
819
+ /**
820
+ * 推文可见性注释接口
821
+ */
822
+ interface ITweetVisibilityAnnotation {
823
+ /** 类型 */
824
+ type?: string;
825
+ /** 理由 */
826
+ reason?: string;
827
+ /** 推文质量 */
828
+ tweet_quality?: string;
591
829
  }
592
830
  /**
593
831
  * 推文核心数据接口
@@ -782,6 +1020,8 @@ interface IImageValue {
782
1020
  width?: number;
783
1021
  /** URL */
784
1022
  url?: string;
1023
+ /** 替代文本 */
1024
+ alt?: string;
785
1025
  }
786
1026
  /**
787
1027
  * 图像颜色值接口
@@ -858,6 +1098,13 @@ interface IUserValue {
858
1098
  /** 路径 */
859
1099
  path?: string[];
860
1100
  }
1101
+ /**
1102
+ * Grok翻译帖子可用性接口
1103
+ */
1104
+ interface IGrokTranslatedPostWithAvailability {
1105
+ /** 是否可用 */
1106
+ is_available?: boolean;
1107
+ }
861
1108
 
862
1109
  /**
863
1110
  * 推文基础类型,包含所有推文相关类型共有的字段
@@ -966,6 +1213,7 @@ interface ITimeline {
966
1213
  interface ITimelineInstruction {
967
1214
  type?: string;
968
1215
  entries?: ITimelineEntry[];
1216
+ entry?: ITimelineEntry;
969
1217
  }
970
1218
  interface ITimelineEntry {
971
1219
  entryId?: string;
@@ -978,7 +1226,7 @@ interface ITimelineContent {
978
1226
  itemContent?: ITimelineItemContent;
979
1227
  items?: ITimelineModuleItem[];
980
1228
  displayType?: DisplayType;
981
- clientEventInfo?: IClientEventInfo;
1229
+ clientEventInfo?: ITimelineClientEventInfo;
982
1230
  feedbackInfo?: IFeedbackInfo;
983
1231
  metadata?: IMetadata;
984
1232
  }
@@ -995,9 +1243,17 @@ interface ITimelineItemContent {
995
1243
  tweet_results?: ITweetResults;
996
1244
  tweetDisplayType?: TweetDisplayType;
997
1245
  hasModeratedReplies?: boolean;
998
- clientEventInfo?: IClientEventInfo;
1246
+ clientEventInfo?: ITimelineClientEventInfo;
999
1247
  content?: ITimelineMessageContent;
1000
1248
  impressionCallbacks?: IEndpointCallback[];
1249
+ display_type?: string;
1250
+ text?: string;
1251
+ socialContext?: ISocialContext;
1252
+ }
1253
+ interface ISocialContext {
1254
+ contextType?: string;
1255
+ text?: string;
1256
+ type?: string;
1001
1257
  }
1002
1258
  interface ITimelineMessageContent {
1003
1259
  contentType?: string;
@@ -1015,7 +1271,7 @@ interface IAction {
1015
1271
  url?: string;
1016
1272
  dismissOnClick?: boolean;
1017
1273
  onClickCallbacks?: IEndpointCallback[];
1018
- clientEventInfo?: IClientEventInfo;
1274
+ clientEventInfo?: ITimelineClientEventInfo;
1019
1275
  }
1020
1276
  interface IEndpointCallback {
1021
1277
  endpoint?: string;
@@ -1033,22 +1289,25 @@ interface ITweetResults {
1033
1289
  interface ITimelineModuleItem {
1034
1290
  entryId?: string;
1035
1291
  item?: ITimelineModuleItemContent;
1292
+ dispensable?: boolean;
1036
1293
  }
1037
1294
  interface ITimelineModuleItemContent {
1038
1295
  itemContent?: ITimelineItemContent;
1039
- clientEventInfo?: IClientEventInfo;
1296
+ clientEventInfo?: ITimelineClientEventInfo;
1040
1297
  }
1041
- interface IClientEventInfo {
1042
- details?: IClientEventDetails;
1298
+ interface ITimelineClientEventInfo {
1299
+ component?: string;
1300
+ details?: ITimelineClientEventDetails;
1301
+ element?: string;
1043
1302
  }
1044
- interface IClientEventDetails {
1045
- conversationDetails?: IConversationDetails;
1046
- timelinesDetails?: ITimelinesDetails;
1303
+ interface ITimelineClientEventDetails {
1304
+ conversationDetails?: ITimelineConversationDetails;
1305
+ timelinesDetails?: ITimelineTimelinesDetails;
1047
1306
  }
1048
- interface IConversationDetails {
1307
+ interface ITimelineConversationDetails {
1049
1308
  conversationSection?: string;
1050
1309
  }
1051
- interface ITimelinesDetails {
1310
+ interface ITimelineTimelinesDetails {
1052
1311
  controllerData?: string;
1053
1312
  injectionType?: InjectionType;
1054
1313
  }
@@ -1528,12 +1787,25 @@ interface IMediaFeatures {
1528
1787
  /** 原始尺寸 */
1529
1788
  orig?: IMediaFeature;
1530
1789
  }
1790
+ /**
1791
+ * 面部接口
1792
+ */
1793
+ interface IFace {
1794
+ /** 高度 */
1795
+ h?: number;
1796
+ /** 宽度 */
1797
+ w?: number;
1798
+ /** X坐标 */
1799
+ x?: number;
1800
+ /** Y坐标 */
1801
+ y?: number;
1802
+ }
1531
1803
  /**
1532
1804
  * 媒体特性接口
1533
1805
  */
1534
1806
  interface IMediaFeature {
1535
1807
  /** 面部 */
1536
- faces?: any[];
1808
+ faces?: IFace[];
1537
1809
  }
1538
1810
  /**
1539
1811
  * 扩展媒体颜色接口
@@ -1574,6 +1846,8 @@ interface ISimpleUser {
1574
1846
  profile_image_url_https: string;
1575
1847
  /** 是否验证 */
1576
1848
  verified?: boolean;
1849
+ /** 是否蓝V验证 */
1850
+ blue_verified?: boolean;
1577
1851
  /** 粉丝数 */
1578
1852
  followers_count?: number;
1579
1853
  /** 关注数 */
@@ -1638,16 +1912,28 @@ interface ISimplePhoto extends ISimpleMedia {
1638
1912
  */
1639
1913
  interface ISimpleVideo extends ISimpleMedia {
1640
1914
  /** 媒体类型 */
1641
- type: Exclude<MediaType, 'photo'>;
1642
- /** 视频信息 */
1643
- video_info?: {
1644
- /** 宽高比 */
1645
- aspect_ratio?: number[];
1646
- /** 时长(毫秒) */
1647
- duration_millis?: number;
1648
- /** 视频变体 */
1649
- variants?: ISimpleVideoVariant[];
1650
- };
1915
+ type: 'video';
1916
+ /** 宽高比 */
1917
+ aspect_ratio?: number[];
1918
+ /** 时长(毫秒) */
1919
+ duration_millis?: number;
1920
+ /** MP4 视频数组 */
1921
+ mp4?: ISimpleMP4Video[];
1922
+ /** HLS 视频 URL */
1923
+ hls?: string;
1924
+ }
1925
+ /**
1926
+ * 简单动态图片媒体类型
1927
+ */
1928
+ interface ISimpleGif extends ISimpleMedia {
1929
+ /** 媒体类型 */
1930
+ type: 'animated_gif';
1931
+ /** 宽高比 */
1932
+ aspect_ratio?: number[];
1933
+ /** 时长(毫秒) */
1934
+ duration_millis?: number;
1935
+ /** MP4 视频 URL */
1936
+ mp4?: string;
1651
1937
  }
1652
1938
  /**
1653
1939
  * 媒体尺寸
@@ -1661,15 +1947,15 @@ interface ISimpleMediaSize {
1661
1947
  resize: string;
1662
1948
  }
1663
1949
  /**
1664
- * 视频变体
1950
+ * MP4 视频
1665
1951
  */
1666
- interface ISimpleVideoVariant {
1952
+ interface ISimpleMP4Video {
1667
1953
  /** 比特率 */
1668
1954
  bitrate?: number;
1669
- /** 内容类型 */
1670
- content_type: string;
1671
1955
  /** 视频URL */
1672
1956
  url: string;
1957
+ /** 质量 */
1958
+ quality?: VideoQuality;
1673
1959
  }
1674
1960
  /**
1675
1961
  * 简单URL类型
@@ -1694,10 +1980,8 @@ interface ISimpleTweet {
1694
1980
  full_text: string;
1695
1981
  /** 创建时间 */
1696
1982
  created_at: string;
1697
- /** 用户ID */
1698
- user_id: string;
1699
- /** 用户屏幕名称 */
1700
- user_screen_name: string;
1983
+ /** 用户信息 */
1984
+ user: ISimpleUser;
1701
1985
  /** 转发数 */
1702
1986
  retweet_count?: number;
1703
1987
  /** 点赞数 */
@@ -1722,8 +2006,12 @@ interface ISimpleTweet {
1722
2006
  photos?: ISimplePhoto[];
1723
2007
  /** 视频媒体数组 */
1724
2008
  videos?: ISimpleVideo[];
2009
+ /** 动态图片媒体数组 */
2010
+ gifs?: ISimpleGif[];
1725
2011
  /** URL数组 */
1726
2012
  urls?: ISimpleUrl[];
2013
+ /** 推文质量 */
2014
+ quality?: TweetQuality;
1727
2015
  }
1728
2016
 
1729
2017
  /**
@@ -1731,21 +2019,29 @@ interface ISimpleTweet {
1731
2019
  */
1732
2020
 
1733
2021
  /**
1734
- * Result的基类,支持泛型
1735
- * @template UserType - 用户类型,必须是ISimpleUser或IUser
2022
+ * Result的基类
1736
2023
  * @template TweetType - 推文类型,必须是ISimpleTweet或ITweet
2024
+ * @template UserType - 用户类型,必须是IUser或ISimpleUser
1737
2025
  */
1738
- interface IResultBase<UserType extends ISimpleUser | IUser, TweetType extends ISimpleTweet | ITweet> {
1739
- /** 用户数组 */
1740
- users?: UserType[];
2026
+ interface IResultBase<TweetType extends ISimpleTweet | ITweet, UserType extends IUser | ISimpleUser> {
1741
2027
  /** 推文数组 */
1742
2028
  tweets?: TweetType[];
1743
2029
  /** 包含图片的推文数组 */
1744
2030
  photos?: TweetType[];
1745
2031
  /** 包含视频的推文数组 */
1746
2032
  videos?: TweetType[];
2033
+ /** 包含动态图片的推文数组 */
2034
+ gifs?: TweetType[];
1747
2035
  /** 包含URL的推文数组 */
1748
2036
  urls?: TweetType[];
2037
+ /** 广告推文数组 */
2038
+ ads?: TweetType[];
2039
+ /** 探索更多内容数组 */
2040
+ exploreMore?: TweetType[];
2041
+ /** 推荐推文数组 */
2042
+ recommendations?: TweetType[];
2043
+ /** 用户数组 */
2044
+ users?: UserType[];
1749
2045
  /** 下一页游标 */
1750
2046
  next_cursor?: string;
1751
2047
  /** 下一页游标字符串 */
@@ -1768,13 +2064,13 @@ interface IResultBase<UserType extends ISimpleUser | IUser, TweetType extends IS
1768
2064
  /**
1769
2065
  * 基于简单类型的Result
1770
2066
  */
1771
- interface ISimpleResult extends IResultBase<ISimpleUser, ISimpleTweet> {
2067
+ interface ISimpleResult extends IResultBase<ISimpleTweet, ISimpleUser> {
1772
2068
  }
1773
2069
  /**
1774
2070
  * 基于原始类型的Result
1775
2071
  */
1776
- interface IOriginalResult extends IResultBase<IUser, ITweet> {
2072
+ interface IOriginalResult extends IResultBase<ITweet, IUser> {
1777
2073
  }
1778
2074
 
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 };
2075
+ 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, VIDEO_QUALITIES, VIEW_STATES };
2076
+ export type { CommunityTypename, ComponentValue, ContentType, CursorType, DisplayType, ElementType, EligibilityType, IAction, IAdditionalMediaInfo, IAffiliatesHighlightedLabel, IAllowDownloadStatus, IAltText, IApiImage, IAttachment, IAudience, IAvatar, 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, IDmPermissions, IEditControl, IEditControlInitial, IEndpointCallback, IEntry, IExt, IExtMedia, IExtMediaAvailability, IExtMediaColor, IExtendedEntities, IFace, IFeedbackInfo, IFocusRect, IGlobalObjects, IGrokTranslatedPostWithAvailability, IHashtag, IHashtagEntity, IImageColorValue, IImageValue, ILabel, ILocation, IMediaColor, IMediaEntity, IMediaFeature, IMediaFeatures, IMediaPermissions, IMediaResult, IMediaResults, IMediaSize, IMediaSizes, IMediaStats, IMessage, IMessageData, IMessageEntities, IMessageUser, IMetadata, INotificationExt, INotificationMediaStats, INotificationResponse, IOk, IOriginalInfo, IOriginalResult, IParticipant, IPhoto, IPlatform, IPreviousCounts, IPrivacy, IProfileBio, IQuickPromoteEligibility, IQuotedStatusPermalink, IQuotedStatusResult, IRelationshipPerspectives, IResultBase, IRetweetedStatusResult, IRichText, ISalientRect, ISimpleGif, ISimpleMP4Video, ISimpleMedia, ISimpleMediaSize, ISimplePhoto, ISimpleResult, ISimpleTweet, ISimpleUrl, ISimpleUser, ISimpleVideo, ISocialContext, ISuperFollowMetadata, ISuperFollowsReplyUserResult, ITimeline, ITimelineClientEventDetails, ITimelineClientEventInfo, ITimelineContent, ITimelineConversationDetails, ITimelineEntry, ITimelineInstruction, ITimelineItemContent, ITimelineMessageContent, ITimelineModuleItem, ITimelineModuleItemContent, ITimelineTimelinesDetails, ITimelinesDetails, ITipjarSettings, ITweet, ITweetBase, ITweetCard, ITweetCore, ITweetEntities, ITweetLegacy, ITweetObject, ITweetResults, ITweetViews, ITweetVisibilityAnnotation, IUrl, IUrlEntities, IUrlEntity, IUser, IUserBase, IUserCategory, IUserCore, IUserEntities, IUserEntityUrls, IUserLegacy, IUserMention, IUserMentionEntity, IUserObject, IUserProfessional, IUserRefResult, IUserResult, IUserResults, IUserValue, IVerification, IVideoInfo, IVideoVariant, IViewCount, IViewerRelationship, IVisibilityResults, InjectionType, InstructionType, ItemType, LegacyCardBindingKeyType, LegacyCardBindingValueType, MediaType, MessageInboxTimelineIndex, NotificationKey, TimelineEntryType, TimelineInstructionType, TimelineItemType, TimelineItemTypename, TimelineTypename, TransparentGuideDetailType, TweetDisplayType, TweetQuality, TweetTypename, UrlType, UserDisplayType, UserLabelType, UserTypename, VerifiedType, VideoContentType, VideoQuality, ViewState };
package/lib/type.mjs CHANGED
@@ -1,4 +1,4 @@
1
- const USER_TYPENAMES = ["User", "UserUnavailable"], TWEET_TYPENAMES = ["Tweet", "TextTombstone", "TweetTombstone", "TweetWithVisibilityResults", "ContextualTweetInterstitial"], COMMUNITY_TYPENAMES = ["Community", "CommunityDeleteActionUnavailable", "CommunityUserDefaultModerationState", "CommunityJoinRequestsUnavailable"], TIMELINE_TYPENAMES = ["TimelineTimelineItem", "TimelineMessagePrompt"], TIMELINE_ITEM_TYPENAMES = ["TimelineTweet", "TimelineMessagePrompt"], TIMELINE_INSTRUCTION_TYPES = ["TimelineAddEntries"], TIMELINE_ENTRY_TYPES = ["TimelineTimelineItem", "TimelineTimelineModule", "TimelineTimelineCursor"], TIMELINE_ITEM_TYPES = ["TimelineTweet", "TimelineMessagePrompt"], MEDIA_TYPES = ["photo", "video", "animated_gif"], ELIGIBILITY_TYPES = ["Eligible", "IneligibleUserUnauthorized"], DISPLAY_TYPES = ["Carousel", "Vertical", "VerticalConversation", "Classic", "EntireTweet"], TWEET_DISPLAY_TYPES = ["CondensedTweet", "Tweet", "SelfThread"], USER_DISPLAY_TYPES = ["SubscribableUser", "User"], INJECTION_TYPES = ["ForYouInNetwork", "ForYouPromoted", "WhoToFollow", "creators-only-connect-tab", "CommunityToJoin"], TRANSPARENT_GUIDE_DETAIL_TYPES = ["TimelineEventUrtMetadata"], ELEMENT_TYPES = ["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"], TWEET_QUALITIES = ["HighQuality", "LowQuality", "AbusiveQuality", "RelatedTweet"], COMPONENT_VALUES = ["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"], ITEM_TYPES = ["TimelineTweet", "TimelineUser", "TimelineEventSummary", "TimelineMessagePrompt", "TimelineCommunity", "CommunityPinnedTimeline"], CURSOR_TYPES = ["Top", "Bottom", "ShowMore", "ShowMoreThreads"], INSTRUCTION_TYPES = ["TimelineClearCache", "TimelineAddEntries", "TimelineTerminateTimeline", "TimelineShowAlert", "TimelineShowCover"], CONTENT_TYPES = ["TimelineTweetMedia", "TimelineUrl"], VIDEO_CONTENT_TYPES = ["application/x-mpegURL", "video/mp4"], MESSAGE_INBOX_TIMELINE_INDEXES = ["trusted", "untrusted", "untrusted_low_quality"], NOTIFICATION_KEYS = ["clearCache", "addEntries", "clearEntriesUnreadState", "markEntriesUnreadGreaterThanSortIndex"], VERIFIED_TYPES = ["Business", "Government", "Blue", "None"], USER_LABEL_TYPES = ["BusinessLabel", "AutomatedLabel"], URL_TYPES = ["ExternalUrl", "DeepLink", "UrtEndpoint"], VIEW_STATES = ["EnabledWithCount", "Enabled"], LEGACY_CARD_BINDING_KEY_TYPES = ["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"], LEGACY_CARD_BINDING_VALUE_TYPES = ["STRING", "IMAGE_COLOR", "IMAGE", "USER"];
1
+ const USER_TYPENAMES = ["User", "UserUnavailable"], TWEET_TYPENAMES = ["Tweet", "TextTombstone", "TweetTombstone", "TweetWithVisibilityResults", "ContextualTweetInterstitial"], COMMUNITY_TYPENAMES = ["Community", "CommunityDeleteActionUnavailable", "CommunityUserDefaultModerationState", "CommunityJoinRequestsUnavailable"], TIMELINE_TYPENAMES = ["TimelineTimelineItem", "TimelineMessagePrompt"], TIMELINE_ITEM_TYPENAMES = ["TimelineTweet", "TimelineMessagePrompt"], TIMELINE_INSTRUCTION_TYPES = ["TimelineAddEntries"], TIMELINE_ENTRY_TYPES = ["TimelineTimelineItem", "TimelineTimelineModule", "TimelineTimelineCursor"], TIMELINE_ITEM_TYPES = ["TimelineTweet", "TimelineMessagePrompt"], MEDIA_TYPES = ["photo", "video", "animated_gif"], ELIGIBILITY_TYPES = ["Eligible", "IneligibleUserUnauthorized"], DISPLAY_TYPES = ["Carousel", "Vertical", "VerticalConversation", "Classic", "EntireTweet"], TWEET_DISPLAY_TYPES = ["CondensedTweet", "Tweet", "SelfThread"], USER_DISPLAY_TYPES = ["SubscribableUser", "User"], INJECTION_TYPES = ["ForYouInNetwork", "ForYouPromoted", "WhoToFollow", "creators-only-connect-tab", "CommunityToJoin", "FollowingInNetwork"], TRANSPARENT_GUIDE_DETAIL_TYPES = ["TimelineEventUrtMetadata"], ELEMENT_TYPES = ["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"], TWEET_QUALITIES = ["HighQuality", "LowQuality", "AbusiveQuality", "RelatedTweet"], COMPONENT_VALUES = ["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"], ITEM_TYPES = ["TimelineTweet", "TimelineUser", "TimelineEventSummary", "TimelineMessagePrompt", "TimelineCommunity", "CommunityPinnedTimeline"], CURSOR_TYPES = ["Top", "Bottom", "ShowMore", "ShowMoreThreads"], INSTRUCTION_TYPES = ["TimelineClearCache", "TimelineAddEntries", "TimelineTerminateTimeline", "TimelineShowAlert", "TimelineShowCover"], CONTENT_TYPES = ["TimelineTweetMedia", "TimelineUrl"], VIDEO_CONTENT_TYPES = ["application/x-mpegURL", "video/mp4"], VIDEO_QUALITIES = ["high", "medium", "low"], MESSAGE_INBOX_TIMELINE_INDEXES = ["trusted", "untrusted", "untrusted_low_quality"], NOTIFICATION_KEYS = ["clearCache", "addEntries", "clearEntriesUnreadState", "markEntriesUnreadGreaterThanSortIndex"], VERIFIED_TYPES = ["Business", "Government", "Blue", "None"], USER_LABEL_TYPES = ["BusinessLabel", "AutomatedLabel"], URL_TYPES = ["ExternalUrl", "DeepLink", "UrtEndpoint"], VIEW_STATES = ["EnabledWithCount", "Enabled"], LEGACY_CARD_BINDING_KEY_TYPES = ["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"], LEGACY_CARD_BINDING_VALUE_TYPES = ["STRING", "IMAGE_COLOR", "IMAGE", "USER"];
2
2
  var IdPrefixes = /* @__PURE__ */ ((IdPrefixes2) => (IdPrefixes2.MessagePrompt = "messageprompt-", IdPrefixes2.NormalTweet = "tweet-", IdPrefixes2.PromotedTweet = "promoted-tweet-", IdPrefixes2.User = "user-", IdPrefixes2.CommunityToJoin = "community-to-join-", IdPrefixes2.HomeConversation = "home-conversation-", IdPrefixes2.Conversationthread = "conversationthread-", IdPrefixes2.CommunityConversation = "community-conversation-", IdPrefixes2.CommunityGrid = "communities-grid-", IdPrefixes2.PinnedTweets = "pinned-tweets-", IdPrefixes2.WhoToFollow = "who-to-follow-", IdPrefixes2.CreatorsOnlyConnectTab = "creators-only-connect-tab-", IdPrefixes2.Label = "label-", IdPrefixes2.Guide = "Guide-", IdPrefixes2.ProfileGrid = "profile-grid-", IdPrefixes2.Notification = "notification-", IdPrefixes2.Cursor = "cursor-", IdPrefixes2.CursorTop = "cursor-top-", IdPrefixes2.CursorBottom = "cursor-bottom-", IdPrefixes2.TweetDetailRelatedTweets = "tweetdetailrelatedtweets-", IdPrefixes2.Trends = "trends-", IdPrefixes2))(IdPrefixes || {});
3
3
  export {
4
4
  COMMUNITY_TYPENAMES,
@@ -32,5 +32,6 @@ export {
32
32
  USER_TYPENAMES,
33
33
  VERIFIED_TYPES,
34
34
  VIDEO_CONTENT_TYPES,
35
+ VIDEO_QUALITIES,
35
36
  VIEW_STATES
36
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gs-x-parser",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "grain-sand"