rettiwt-api 6.0.8 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/bug-report.yml +57 -0
- package/.github/ISSUE_TEMPLATE/feature-request.yml +20 -0
- package/.github/ISSUE_TEMPLATE/question.yml +15 -0
- package/.github/PULL_REQUEST_TEMPLATE.md +32 -0
- package/.github/workflows/ci.yml +33 -0
- package/.nvmrc +1 -0
- package/README.md +30 -6
- package/dist/Rettiwt.d.ts +3 -0
- package/dist/Rettiwt.js +4 -0
- package/dist/Rettiwt.js.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/collections/Extractors.d.ts +24 -0
- package/dist/collections/Extractors.js +14 -0
- package/dist/collections/Extractors.js.map +1 -1
- package/dist/collections/Groups.js +11 -0
- package/dist/collections/Groups.js.map +1 -1
- package/dist/collections/Requests.js +12 -0
- package/dist/collections/Requests.js.map +1 -1
- package/dist/commands/DirectMessage.d.ts +10 -0
- package/dist/commands/DirectMessage.js +57 -0
- package/dist/commands/DirectMessage.js.map +1 -0
- package/dist/commands/List.js +44 -3
- package/dist/commands/List.js.map +1 -1
- package/dist/commands/Tweet.js +29 -1
- package/dist/commands/Tweet.js.map +1 -1
- package/dist/commands/User.js +39 -1
- package/dist/commands/User.js.map +1 -1
- package/dist/enums/Data.d.ts +3 -1
- package/dist/enums/Data.js +2 -0
- package/dist/enums/Data.js.map +1 -1
- package/dist/enums/Resource.d.ts +11 -0
- package/dist/enums/Resource.js +12 -0
- package/dist/enums/Resource.js.map +1 -1
- package/dist/enums/raw/Analytics.d.ts +6 -3
- package/dist/enums/raw/Analytics.js +5 -2
- package/dist/enums/raw/Analytics.js.map +1 -1
- package/dist/index.d.ts +15 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/models/args/FetchArgs.d.ts +9 -0
- package/dist/models/args/FetchArgs.js +16 -0
- package/dist/models/args/FetchArgs.js.map +1 -1
- package/dist/models/args/PostArgs.d.ts +1 -0
- package/dist/models/args/PostArgs.js +2 -0
- package/dist/models/args/PostArgs.js.map +1 -1
- package/dist/models/data/Analytics.d.ts +43 -0
- package/dist/models/data/Analytics.js +92 -0
- package/dist/models/data/Analytics.js.map +1 -0
- package/dist/models/data/Conversation.d.ts +93 -0
- package/dist/models/data/Conversation.js +293 -0
- package/dist/models/data/Conversation.js.map +1 -0
- package/dist/models/data/CursoredData.d.ts +2 -1
- package/dist/models/data/CursoredData.js +6 -1
- package/dist/models/data/CursoredData.js.map +1 -1
- package/dist/models/data/DirectMessage.d.ts +105 -0
- package/dist/models/data/DirectMessage.js +284 -0
- package/dist/models/data/DirectMessage.js.map +1 -0
- package/dist/models/data/Inbox.d.ts +44 -0
- package/dist/models/data/Inbox.js +106 -0
- package/dist/models/data/Inbox.js.map +1 -0
- package/dist/models/data/List.d.ts +20 -0
- package/dist/models/data/List.js +50 -1
- package/dist/models/data/List.js.map +1 -1
- package/dist/models/data/Tweet.d.ts +6 -6
- package/dist/models/data/Tweet.js +4 -2
- package/dist/models/data/Tweet.js.map +1 -1
- package/dist/models/data/User.d.ts +2 -0
- package/dist/models/data/User.js +6 -0
- package/dist/models/data/User.js.map +1 -1
- package/dist/requests/DirectMessage.d.ts +28 -0
- package/dist/requests/DirectMessage.js +149 -0
- package/dist/requests/DirectMessage.js.map +1 -0
- package/dist/requests/List.d.ts +10 -0
- package/dist/requests/List.js +52 -0
- package/dist/requests/List.js.map +1 -1
- package/dist/requests/Tweet.d.ts +8 -0
- package/dist/requests/Tweet.js +30 -0
- package/dist/requests/Tweet.js.map +1 -1
- package/dist/requests/User.d.ts +8 -1
- package/dist/requests/User.js +67 -8
- package/dist/requests/User.js.map +1 -1
- package/dist/services/public/DirectMessageService.d.ts +100 -0
- package/dist/services/public/DirectMessageService.js +143 -0
- package/dist/services/public/DirectMessageService.js.map +1 -0
- package/dist/services/public/FetcherService.d.ts +2 -2
- package/dist/services/public/FetcherService.js +4 -4
- package/dist/services/public/FetcherService.js.map +1 -1
- package/dist/services/public/ListService.d.ts +85 -0
- package/dist/services/public/ListService.js +111 -0
- package/dist/services/public/ListService.js.map +1 -1
- package/dist/services/public/TweetService.d.ts +56 -0
- package/dist/services/public/TweetService.js +72 -0
- package/dist/services/public/TweetService.js.map +1 -1
- package/dist/services/public/UserService.d.ts +61 -2
- package/dist/services/public/UserService.js +89 -0
- package/dist/services/public/UserService.js.map +1 -1
- package/dist/types/args/FetchArgs.d.ts +69 -12
- package/dist/types/args/PostArgs.d.ts +29 -11
- package/dist/types/data/Analytics.d.ts +42 -0
- package/dist/types/data/Analytics.js +3 -0
- package/dist/types/data/Analytics.js.map +1 -0
- package/dist/types/data/Conversation.d.ts +32 -0
- package/dist/types/data/Conversation.js +3 -0
- package/dist/types/data/Conversation.js.map +1 -0
- package/dist/types/data/CursoredData.d.ts +4 -1
- package/dist/types/data/DirectMessage.d.ts +25 -0
- package/dist/types/data/DirectMessage.js +3 -0
- package/dist/types/data/DirectMessage.js.map +1 -0
- package/dist/types/data/Inbox.d.ts +18 -0
- package/dist/types/data/Inbox.js +3 -0
- package/dist/types/data/Inbox.js.map +1 -0
- package/dist/types/data/List.d.ts +5 -1
- package/dist/types/data/Tweet.d.ts +6 -6
- package/dist/types/data/User.d.ts +4 -0
- package/dist/types/raw/base/Analytic.d.ts +6 -1
- package/dist/types/raw/base/Message.d.ts +16 -0
- package/dist/types/raw/base/Message.js +4 -0
- package/dist/types/raw/base/Message.js.map +1 -0
- package/dist/types/raw/base/Tweet.d.ts +6 -6
- package/dist/types/raw/base/User.d.ts +2 -1
- package/dist/types/raw/composite/TimelineList.d.ts +9 -0
- package/dist/types/raw/composite/TimelineList.js +3 -0
- package/dist/types/raw/composite/TimelineList.js.map +1 -0
- package/dist/types/raw/dm/Conversation.d.ts +55 -0
- package/dist/types/raw/dm/Conversation.js +4 -0
- package/dist/types/raw/dm/Conversation.js.map +1 -0
- package/dist/types/raw/dm/InboxInitial.d.ts +137 -0
- package/dist/types/raw/dm/InboxInitial.js +4 -0
- package/dist/types/raw/dm/InboxInitial.js.map +1 -0
- package/dist/types/raw/dm/InboxTimeline.d.ts +287 -0
- package/dist/types/raw/dm/InboxTimeline.js +4 -0
- package/dist/types/raw/dm/InboxTimeline.js.map +1 -0
- package/dist/types/raw/dm/UserUpdates.d.ts +41 -0
- package/dist/types/raw/dm/UserUpdates.js +4 -0
- package/dist/types/raw/dm/UserUpdates.js.map +1 -0
- package/dist/types/raw/list/AddMember.d.ts +151 -0
- package/dist/types/raw/list/AddMember.js +4 -0
- package/dist/types/raw/list/AddMember.js.map +1 -0
- package/dist/types/raw/list/Details.d.ts +44 -13
- package/dist/types/raw/list/RemoveMember.d.ts +150 -0
- package/dist/types/raw/list/RemoveMember.js +4 -0
- package/dist/types/raw/list/RemoveMember.js.map +1 -0
- package/dist/types/raw/tweet/Bookmark.d.ts +12 -0
- package/dist/types/raw/tweet/Bookmark.js +4 -0
- package/dist/types/raw/tweet/Bookmark.js.map +1 -0
- package/dist/types/raw/tweet/Unbookmark.d.ts +11 -0
- package/dist/types/raw/tweet/Unbookmark.js +4 -0
- package/dist/types/raw/tweet/Unbookmark.js.map +1 -0
- package/dist/types/raw/user/Analytics.d.ts +6 -18
- package/dist/types/raw/user/Analytics.js +0 -1
- package/dist/types/raw/user/Analytics.js.map +1 -1
- package/dist/types/raw/user/Lists.d.ts +319 -0
- package/dist/types/raw/user/Lists.js +4 -0
- package/dist/types/raw/user/Lists.js.map +1 -0
- package/eslint.config.mjs +1 -1
- package/package.json +11 -6
- package/playground/.env.example +1 -0
- package/playground/README.md +53 -0
- package/playground/index.js +15 -0
- package/playground/package.json +15 -0
- package/src/Rettiwt.ts +5 -0
- package/src/cli.ts +2 -0
- package/src/collections/Extractors.ts +29 -0
- package/src/collections/Groups.ts +11 -0
- package/src/collections/Requests.ts +20 -0
- package/src/commands/DirectMessage.ts +62 -0
- package/src/commands/List.ts +44 -3
- package/src/commands/Tweet.ts +29 -1
- package/src/commands/User.ts +65 -1
- package/src/enums/Data.ts +2 -0
- package/src/enums/Resource.ts +13 -0
- package/src/enums/raw/Analytics.ts +5 -2
- package/src/index.ts +15 -0
- package/src/models/args/FetchArgs.ts +17 -0
- package/src/models/args/PostArgs.ts +2 -0
- package/src/models/data/Analytics.ts +97 -0
- package/src/models/data/Conversation.ts +344 -0
- package/src/models/data/CursoredData.ts +7 -2
- package/src/models/data/DirectMessage.ts +335 -0
- package/src/models/data/Inbox.ts +124 -0
- package/src/models/data/List.ts +60 -1
- package/src/models/data/Tweet.ts +10 -8
- package/src/models/data/User.ts +6 -0
- package/src/requests/DirectMessage.ts +233 -0
- package/src/requests/List.ts +58 -0
- package/src/requests/Tweet.ts +32 -0
- package/src/requests/User.ts +70 -7
- package/src/services/public/DirectMessageService.ts +159 -0
- package/src/services/public/FetcherService.ts +3 -3
- package/src/services/public/ListService.ts +127 -0
- package/src/services/public/TweetService.ts +82 -0
- package/src/services/public/UserService.ts +110 -2
- package/src/types/args/FetchArgs.ts +77 -12
- package/src/types/args/PostArgs.ts +31 -11
- package/src/types/data/Analytics.ts +58 -0
- package/src/types/data/Conversation.ts +44 -0
- package/src/types/data/CursoredData.ts +4 -1
- package/src/types/data/DirectMessage.ts +33 -0
- package/src/types/data/Inbox.ts +23 -0
- package/src/types/data/List.ts +7 -1
- package/src/types/data/Tweet.ts +6 -6
- package/src/types/data/User.ts +6 -0
- package/src/types/raw/base/Analytic.ts +7 -1
- package/src/types/raw/base/Message.ts +22 -0
- package/src/types/raw/base/Tweet.ts +6 -6
- package/src/types/raw/base/User.ts +2 -1
- package/src/types/raw/composite/TimelineList.ts +10 -0
- package/src/types/raw/dm/Conversation.ts +59 -0
- package/src/types/raw/dm/InboxInitial.ts +155 -0
- package/src/types/raw/dm/InboxTimeline.ts +301 -0
- package/src/types/raw/dm/UserUpdates.ts +46 -0
- package/src/types/raw/list/AddMember.ts +175 -0
- package/src/types/raw/list/Details.ts +52 -13
- package/src/types/raw/list/RemoveMember.ts +174 -0
- package/src/types/raw/tweet/Bookmark.ts +14 -0
- package/src/types/raw/tweet/Unbookmark.ts +14 -0
- package/src/types/raw/user/Analytics.ts +6 -22
- package/src/types/raw/user/Lists.ts +378 -0
- package/tsconfig.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IAnalyticsMetric } from '../../types/raw/base/Analytic';
|
|
2
|
+
/**
|
|
3
|
+
* The details of the analytic result of the connected User.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IAnalytics {
|
|
8
|
+
/** The creation date of user's account. */
|
|
9
|
+
createdAt: string;
|
|
10
|
+
/** Total followers number */
|
|
11
|
+
followers: number;
|
|
12
|
+
/** Total verified followers */
|
|
13
|
+
verifiedFollowers: number;
|
|
14
|
+
/** Total impressions on the given period */
|
|
15
|
+
impressions: number;
|
|
16
|
+
/** Total profile visits on the given period */
|
|
17
|
+
profileVisits: number;
|
|
18
|
+
/** Total Engagements on the given period */
|
|
19
|
+
engagements: number;
|
|
20
|
+
/** Total Follows on the given period */
|
|
21
|
+
follows: number;
|
|
22
|
+
/** Total Replies on the given period */
|
|
23
|
+
replies: number;
|
|
24
|
+
/** Total Likes on the given period */
|
|
25
|
+
likes: number;
|
|
26
|
+
/** Total Retweets on the given period */
|
|
27
|
+
retweets: number;
|
|
28
|
+
/** Total Bookmark on the given period */
|
|
29
|
+
bookmarks: number;
|
|
30
|
+
/** Total Shares on the given period */
|
|
31
|
+
shares: number;
|
|
32
|
+
/** Total CreateTweets on the given period */
|
|
33
|
+
createTweets: number;
|
|
34
|
+
/** Total CreateQuote on the given period */
|
|
35
|
+
createQuote: number;
|
|
36
|
+
/** Total Unfollows on the given period */
|
|
37
|
+
unfollows: number;
|
|
38
|
+
/** Total CreateReply on the given period */
|
|
39
|
+
createReply: number;
|
|
40
|
+
/** Organic metrics times series */
|
|
41
|
+
organicMetricsTimeSeries: IAnalyticsMetric[];
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Analytics.js","sourceRoot":"","sources":["../../../src/types/data/Analytics.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { IDirectMessage } from './DirectMessage';
|
|
2
|
+
/**
|
|
3
|
+
* The details of a single conversation.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IConversation {
|
|
8
|
+
/** The unique identifier of the conversation. */
|
|
9
|
+
id: string;
|
|
10
|
+
/** The type of conversation (ONE_TO_ONE or GROUP_DM). */
|
|
11
|
+
type: 'ONE_TO_ONE' | 'GROUP_DM';
|
|
12
|
+
/** Array of participant user IDs. */
|
|
13
|
+
participants: string[];
|
|
14
|
+
/** The name of the conversation (for group DMs). */
|
|
15
|
+
name?: string;
|
|
16
|
+
/** URL to the conversation avatar (for group DMs). */
|
|
17
|
+
avatarUrl?: string;
|
|
18
|
+
/** Whether the conversation is trusted. */
|
|
19
|
+
trusted: boolean;
|
|
20
|
+
/** Whether the conversation is muted. */
|
|
21
|
+
muted: boolean;
|
|
22
|
+
/** Whether notifications are disabled. */
|
|
23
|
+
notificationsDisabled: boolean;
|
|
24
|
+
/** The timestamp of the last activity (ISO 8601 format). */
|
|
25
|
+
lastActivityAt: string;
|
|
26
|
+
/** The ID of the last message. */
|
|
27
|
+
lastMessageId?: string;
|
|
28
|
+
/** Whether there are more messages to load. */
|
|
29
|
+
hasMore: boolean;
|
|
30
|
+
/** Array of messages in this conversation. */
|
|
31
|
+
messages: IDirectMessage[];
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Conversation.js","sourceRoot":"","sources":["../../../src/types/data/Conversation.ts"],"names":[],"mappings":""}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { IConversation } from './Conversation';
|
|
2
|
+
import { IDirectMessage } from './DirectMessage';
|
|
3
|
+
import { IList } from './List';
|
|
1
4
|
import { INotification } from './Notification';
|
|
2
5
|
import { ITweet } from './Tweet';
|
|
3
6
|
import { IUser } from './User';
|
|
@@ -8,7 +11,7 @@ import { IUser } from './User';
|
|
|
8
11
|
*
|
|
9
12
|
* @public
|
|
10
13
|
*/
|
|
11
|
-
export interface ICursoredData<T extends INotification | ITweet | IUser> {
|
|
14
|
+
export interface ICursoredData<T extends IDirectMessage | IConversation | INotification | ITweet | IUser | IList> {
|
|
12
15
|
/** The batch of data of the given type. */
|
|
13
16
|
list: T[];
|
|
14
17
|
/** The cursor to the next batch of data. */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The details of a single direct message.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IDirectMessage {
|
|
7
|
+
/** The unique identifier of the message. */
|
|
8
|
+
id: string;
|
|
9
|
+
/** The ID of the conversation this message belongs to. */
|
|
10
|
+
conversationId: string;
|
|
11
|
+
/** The ID of the user who sent the message. */
|
|
12
|
+
senderId: string;
|
|
13
|
+
/** The ID of the user who received the message (for one-to-one conversations). */
|
|
14
|
+
recipientId?: string;
|
|
15
|
+
/** The text content of the message. */
|
|
16
|
+
text: string;
|
|
17
|
+
/** The timestamp when the message was sent (ISO 8601 format). */
|
|
18
|
+
createdAt: string;
|
|
19
|
+
/** Array of media URLs attached to the message. */
|
|
20
|
+
mediaUrls?: string[];
|
|
21
|
+
/** Number of times the message has been edited. */
|
|
22
|
+
editCount?: number;
|
|
23
|
+
/** Whether the message has been read. */
|
|
24
|
+
read?: boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DirectMessage.js","sourceRoot":"","sources":["../../../src/types/data/DirectMessage.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IConversation } from './Conversation';
|
|
2
|
+
/**
|
|
3
|
+
* The details of a DM inbox containing conversations and metadata.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IInbox {
|
|
8
|
+
/** List of conversations in the inbox. */
|
|
9
|
+
conversations: IConversation[];
|
|
10
|
+
/** The cursor for pagination of conversations. */
|
|
11
|
+
cursor: string;
|
|
12
|
+
/** The ID of the last seen event. */
|
|
13
|
+
lastSeenEventId: string;
|
|
14
|
+
/** The ID of the last seen trusted event. */
|
|
15
|
+
trustedLastSeenEventId: string;
|
|
16
|
+
/** The ID of the last seen untrusted event. */
|
|
17
|
+
untrustedLastSeenEventId: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Inbox.js","sourceRoot":"","sources":["../../../src/types/data/Inbox.ts"],"names":[],"mappings":""}
|
|
@@ -6,12 +6,16 @@
|
|
|
6
6
|
export interface IList {
|
|
7
7
|
/** The date and time of creation of the list, int UTC string format. */
|
|
8
8
|
createdAt: string;
|
|
9
|
-
/** The
|
|
9
|
+
/** The ID of the user who created the list. */
|
|
10
10
|
createdBy: string;
|
|
11
11
|
/** The list description. */
|
|
12
12
|
description?: string;
|
|
13
|
+
/** Whether the user is following the list or not. */
|
|
14
|
+
isFollowing: boolean;
|
|
13
15
|
/** The rest id of the list. */
|
|
14
16
|
id: string;
|
|
17
|
+
/** Whether the user is a member of the list or not. */
|
|
18
|
+
isMember: boolean;
|
|
15
19
|
/** The number of memeber of the list. */
|
|
16
20
|
memberCount: number;
|
|
17
21
|
/** The name of the list. */
|
|
@@ -7,7 +7,7 @@ import { IUser } from './User';
|
|
|
7
7
|
*/
|
|
8
8
|
export interface ITweet {
|
|
9
9
|
/** The number of bookmarks of a tweet. */
|
|
10
|
-
bookmarkCount
|
|
10
|
+
bookmarkCount?: number;
|
|
11
11
|
/** The ID of tweet which started the current conversation. */
|
|
12
12
|
conversationId: string;
|
|
13
13
|
/** The creation date of the tweet. */
|
|
@@ -21,19 +21,19 @@ export interface ITweet {
|
|
|
21
21
|
/** The language in which the tweet is written. */
|
|
22
22
|
lang: string;
|
|
23
23
|
/** The number of likes of the tweet. */
|
|
24
|
-
likeCount
|
|
24
|
+
likeCount?: number;
|
|
25
25
|
/** The urls of the media contents of the tweet (if any). */
|
|
26
26
|
media?: ITweetMedia[];
|
|
27
27
|
/** The number of quotes of the tweet. */
|
|
28
|
-
quoteCount
|
|
28
|
+
quoteCount?: number;
|
|
29
29
|
/** The tweet which is quoted in the tweet. */
|
|
30
30
|
quoted?: ITweet;
|
|
31
31
|
/** The number of replies to the tweet. */
|
|
32
|
-
replyCount
|
|
32
|
+
replyCount?: number;
|
|
33
33
|
/** The rest id of the tweet to which the tweet is a reply. */
|
|
34
34
|
replyTo?: string;
|
|
35
35
|
/** The number of retweets of the tweet. */
|
|
36
|
-
retweetCount
|
|
36
|
+
retweetCount?: number;
|
|
37
37
|
/** The tweet which is retweeted in this tweet (if any). */
|
|
38
38
|
retweetedTweet?: ITweet;
|
|
39
39
|
/** The details of the user who made the tweet. */
|
|
@@ -41,7 +41,7 @@ export interface ITweet {
|
|
|
41
41
|
/** The URL to the tweet. */
|
|
42
42
|
url: string;
|
|
43
43
|
/** The number of views of a tweet. */
|
|
44
|
-
viewCount
|
|
44
|
+
viewCount?: number;
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
47
47
|
* The different types parsed entities like urls, media, mentions, hashtags, etc.
|
|
@@ -16,6 +16,10 @@ export interface IUser {
|
|
|
16
16
|
fullName: string;
|
|
17
17
|
/** The rest id of the user. */
|
|
18
18
|
id: string;
|
|
19
|
+
/** Whether the user is being followed by the logged-in user. Available only when logged in. */
|
|
20
|
+
isFollowed?: boolean;
|
|
21
|
+
/** Whether the user is following the logged-in user. Available only when logged in. */
|
|
22
|
+
isFollowing?: boolean;
|
|
19
23
|
/** Whether the account is verified or not. */
|
|
20
24
|
isVerified: boolean;
|
|
21
25
|
/** The number of tweets liked by the user. */
|
|
@@ -6,10 +6,15 @@
|
|
|
6
6
|
export interface IAnalytics {
|
|
7
7
|
__typename: string;
|
|
8
8
|
organic_metrics_time_series: IAnalyticsMetric[];
|
|
9
|
+
verified_follower_count: string;
|
|
10
|
+
relationship_counts: IAnalyticsRelationships;
|
|
9
11
|
id: string;
|
|
10
12
|
}
|
|
13
|
+
export interface IAnalyticsRelationships {
|
|
14
|
+
followers: number;
|
|
15
|
+
}
|
|
11
16
|
export interface IAnalyticsMetric {
|
|
12
|
-
|
|
17
|
+
metric_values: IAnalyticsMetricValue[];
|
|
13
18
|
timestamp: IAnalyticsTimeStamp;
|
|
14
19
|
}
|
|
15
20
|
export interface IAnalyticsMetricValue {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConversationMessage } from '../dm/Conversation';
|
|
2
|
+
import { Message } from '../dm/InboxInitial';
|
|
3
|
+
import { TimelineMessage } from '../dm/InboxTimeline';
|
|
4
|
+
type ConversationMessageData = ConversationMessage['message_data'];
|
|
5
|
+
type InboxMessageData = Message['message_data'];
|
|
6
|
+
type TimelineMessageData = TimelineMessage['message_data'];
|
|
7
|
+
type UnifiedMessageData = InboxMessageData & Partial<ConversationMessageData> & Partial<TimelineMessageData>;
|
|
8
|
+
export interface IMessage {
|
|
9
|
+
id: string;
|
|
10
|
+
time: string;
|
|
11
|
+
affects_sort?: boolean;
|
|
12
|
+
request_id: string;
|
|
13
|
+
conversation_id: string;
|
|
14
|
+
message_data: UnifiedMessageData;
|
|
15
|
+
}
|
|
16
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.js","sourceRoot":"","sources":["../../../../src/types/raw/base/Message.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|
|
@@ -14,7 +14,7 @@ export interface ITweet {
|
|
|
14
14
|
edit_control: ITweetEditControl;
|
|
15
15
|
edit_perspective: ITweetEditPerspective;
|
|
16
16
|
is_translatable: boolean;
|
|
17
|
-
views
|
|
17
|
+
views?: ITweetViews;
|
|
18
18
|
source: string;
|
|
19
19
|
quoted_status_result: IDataResult<ITweet | ILimitedVisibilityTweet>;
|
|
20
20
|
note_tweet: ITweetNote;
|
|
@@ -64,14 +64,14 @@ export interface ITweetNoteMedia {
|
|
|
64
64
|
inline_media: any[];
|
|
65
65
|
}
|
|
66
66
|
export interface ITweetLegacy {
|
|
67
|
-
bookmark_count
|
|
67
|
+
bookmark_count?: number;
|
|
68
68
|
bookmarked: boolean;
|
|
69
69
|
created_at: string;
|
|
70
70
|
conversation_id_str: string;
|
|
71
71
|
display_text_range: number[];
|
|
72
72
|
entities: IEntities;
|
|
73
73
|
extended_entities: IExtendedEntities;
|
|
74
|
-
favorite_count
|
|
74
|
+
favorite_count?: number;
|
|
75
75
|
favorited: boolean;
|
|
76
76
|
full_text: string;
|
|
77
77
|
in_reply_to_status_id_str: string;
|
|
@@ -79,10 +79,10 @@ export interface ITweetLegacy {
|
|
|
79
79
|
lang: string;
|
|
80
80
|
possibly_sensitive: boolean;
|
|
81
81
|
possibly_sensitive_editable: boolean;
|
|
82
|
-
quote_count
|
|
82
|
+
quote_count?: number;
|
|
83
83
|
quoted_status_id_str: string;
|
|
84
|
-
reply_count
|
|
85
|
-
retweet_count
|
|
84
|
+
reply_count?: number;
|
|
85
|
+
retweet_count?: number;
|
|
86
86
|
retweeted: boolean;
|
|
87
87
|
user_id_str: string;
|
|
88
88
|
id_str: string;
|
|
@@ -68,7 +68,8 @@ export interface IAffiliateHighlightedMentionResultLegacy {
|
|
|
68
68
|
screen_name: string;
|
|
69
69
|
}
|
|
70
70
|
export interface IUserLegacy {
|
|
71
|
-
|
|
71
|
+
followed_by?: boolean;
|
|
72
|
+
following?: boolean;
|
|
72
73
|
can_dm: boolean;
|
|
73
74
|
can_media_tag: boolean;
|
|
74
75
|
created_at: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimelineList.js","sourceRoot":"","sources":["../../../../src/types/raw/composite/TimelineList.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Users, Conversations } from './InboxInitial';
|
|
2
|
+
/**
|
|
3
|
+
* The raw data received when fetching a specific conversation timeline.
|
|
4
|
+
*
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface IConversationTimelineResponse {
|
|
8
|
+
conversation_timeline: ConversationTimeline;
|
|
9
|
+
}
|
|
10
|
+
interface ConversationTimeline {
|
|
11
|
+
status: 'HAS_MORE' | 'AT_END';
|
|
12
|
+
min_entry_id: string;
|
|
13
|
+
max_entry_id: string;
|
|
14
|
+
entries: ConversationEntry[];
|
|
15
|
+
users: Users;
|
|
16
|
+
conversations: Conversations;
|
|
17
|
+
}
|
|
18
|
+
type ConversationEntry = {
|
|
19
|
+
message: ConversationMessage;
|
|
20
|
+
} | {
|
|
21
|
+
trust_conversation: TrustConversation;
|
|
22
|
+
};
|
|
23
|
+
export interface ConversationMessage {
|
|
24
|
+
id: string;
|
|
25
|
+
time: string;
|
|
26
|
+
request_id: string;
|
|
27
|
+
conversation_id: string;
|
|
28
|
+
message_data: ConversationMessageData;
|
|
29
|
+
}
|
|
30
|
+
interface ConversationMessageData {
|
|
31
|
+
id: string;
|
|
32
|
+
time: string;
|
|
33
|
+
recipient_id: string;
|
|
34
|
+
sender_id: string;
|
|
35
|
+
text: string;
|
|
36
|
+
edit_count?: number;
|
|
37
|
+
message_reactions?: MessageReaction[];
|
|
38
|
+
}
|
|
39
|
+
interface MessageReaction {
|
|
40
|
+
id: string;
|
|
41
|
+
time: string;
|
|
42
|
+
conversation_id: string;
|
|
43
|
+
message_id: string;
|
|
44
|
+
reaction_key: string;
|
|
45
|
+
emoji_reaction: string;
|
|
46
|
+
sender_id: string;
|
|
47
|
+
}
|
|
48
|
+
interface TrustConversation {
|
|
49
|
+
id: string;
|
|
50
|
+
time: string;
|
|
51
|
+
request_id: string;
|
|
52
|
+
conversation_id: string;
|
|
53
|
+
reason: string;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Conversation.js","sourceRoot":"","sources":["../../../../src/types/raw/dm/Conversation.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The raw data received when fetching the initial state of the DM inbox.
|
|
3
|
+
*
|
|
4
|
+
* @public
|
|
5
|
+
*/
|
|
6
|
+
export interface IInboxInitialResponse {
|
|
7
|
+
inbox_initial_state: InboxInitialState;
|
|
8
|
+
}
|
|
9
|
+
export interface InboxInitialState {
|
|
10
|
+
last_seen_event_id: string;
|
|
11
|
+
trusted_last_seen_event_id: string;
|
|
12
|
+
untrusted_last_seen_event_id: string;
|
|
13
|
+
cursor: string;
|
|
14
|
+
inbox_timelines: InboxTimelines;
|
|
15
|
+
entries: Entry[];
|
|
16
|
+
users: Users;
|
|
17
|
+
conversations: Conversations;
|
|
18
|
+
}
|
|
19
|
+
interface InboxTimelines {
|
|
20
|
+
trusted: TimelineStatus;
|
|
21
|
+
untrusted: TimelineStatus;
|
|
22
|
+
untrusted_low_quality: TimelineStatus;
|
|
23
|
+
}
|
|
24
|
+
interface TimelineStatus {
|
|
25
|
+
status: string;
|
|
26
|
+
min_entry_id: string;
|
|
27
|
+
}
|
|
28
|
+
interface Entry {
|
|
29
|
+
message: Message;
|
|
30
|
+
}
|
|
31
|
+
export interface Message {
|
|
32
|
+
id: string;
|
|
33
|
+
time: string;
|
|
34
|
+
affects_sort: boolean;
|
|
35
|
+
request_id: string;
|
|
36
|
+
conversation_id: string;
|
|
37
|
+
message_data: MessageData;
|
|
38
|
+
}
|
|
39
|
+
interface MessageData {
|
|
40
|
+
id: string;
|
|
41
|
+
time: string;
|
|
42
|
+
recipient_id: string;
|
|
43
|
+
sender_id: string;
|
|
44
|
+
text: string;
|
|
45
|
+
edit_count: number;
|
|
46
|
+
}
|
|
47
|
+
export interface Users {
|
|
48
|
+
[userId: string]: User;
|
|
49
|
+
}
|
|
50
|
+
interface User {
|
|
51
|
+
id: number;
|
|
52
|
+
id_str: string;
|
|
53
|
+
name: string;
|
|
54
|
+
screen_name: string;
|
|
55
|
+
profile_image_url: string;
|
|
56
|
+
profile_image_url_https: string;
|
|
57
|
+
following: boolean;
|
|
58
|
+
follow_request_sent: boolean;
|
|
59
|
+
description: string;
|
|
60
|
+
entities: UserEntities;
|
|
61
|
+
verified: boolean;
|
|
62
|
+
is_blue_verified: boolean;
|
|
63
|
+
protected: boolean;
|
|
64
|
+
blocking: boolean;
|
|
65
|
+
subscribed_by: boolean;
|
|
66
|
+
can_media_tag: boolean;
|
|
67
|
+
dm_blocked_by: boolean;
|
|
68
|
+
dm_blocking: boolean;
|
|
69
|
+
created_at: string;
|
|
70
|
+
friends_count: number;
|
|
71
|
+
followers_count: number;
|
|
72
|
+
}
|
|
73
|
+
interface UserEntities {
|
|
74
|
+
url: UrlEntity;
|
|
75
|
+
description: DescriptionEntity;
|
|
76
|
+
}
|
|
77
|
+
interface UrlEntity {
|
|
78
|
+
urls: UrlInfo[];
|
|
79
|
+
}
|
|
80
|
+
interface DescriptionEntity {
|
|
81
|
+
urls: UrlInfo[];
|
|
82
|
+
}
|
|
83
|
+
interface UrlInfo {
|
|
84
|
+
url: string;
|
|
85
|
+
expanded_url: string;
|
|
86
|
+
display_url: string;
|
|
87
|
+
indices: [number, number];
|
|
88
|
+
}
|
|
89
|
+
export interface Conversations {
|
|
90
|
+
[conversationId: string]: Conversation;
|
|
91
|
+
}
|
|
92
|
+
export interface Conversation {
|
|
93
|
+
conversation_id: string;
|
|
94
|
+
type: 'GROUP_DM' | 'ONE_TO_ONE';
|
|
95
|
+
sort_event_id: string;
|
|
96
|
+
sort_timestamp: string;
|
|
97
|
+
participants: Participant[];
|
|
98
|
+
nsfw: boolean;
|
|
99
|
+
notifications_disabled: boolean;
|
|
100
|
+
mention_notifications_disabled: boolean;
|
|
101
|
+
last_read_event_id: string;
|
|
102
|
+
trusted: boolean;
|
|
103
|
+
low_quality: boolean;
|
|
104
|
+
muted: boolean;
|
|
105
|
+
status: 'HAS_MORE' | 'AT_END';
|
|
106
|
+
min_entry_id: string;
|
|
107
|
+
max_entry_id: string;
|
|
108
|
+
create_time?: string;
|
|
109
|
+
created_by_user_id?: string;
|
|
110
|
+
name?: string;
|
|
111
|
+
avatar_image_https?: string;
|
|
112
|
+
avatar?: ConversationAvatar;
|
|
113
|
+
read_only?: boolean;
|
|
114
|
+
social_proof?: SocialProof[];
|
|
115
|
+
}
|
|
116
|
+
interface ConversationAvatar {
|
|
117
|
+
image: {
|
|
118
|
+
original_info: {
|
|
119
|
+
url: string;
|
|
120
|
+
width: number;
|
|
121
|
+
height: number;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
interface Participant {
|
|
126
|
+
user_id: string;
|
|
127
|
+
join_time?: string;
|
|
128
|
+
last_read_event_id?: string;
|
|
129
|
+
join_conversation_event_id?: string;
|
|
130
|
+
is_admin?: boolean;
|
|
131
|
+
}
|
|
132
|
+
export interface SocialProof {
|
|
133
|
+
proof_type: string;
|
|
134
|
+
users: any[];
|
|
135
|
+
total: number;
|
|
136
|
+
}
|
|
137
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InboxInitial.js","sourceRoot":"","sources":["../../../../src/types/raw/dm/InboxInitial.ts"],"names":[],"mappings":";AAAA,oBAAoB"}
|