rettiwt-api 5.0.1 → 6.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.
Files changed (150) hide show
  1. package/.eslintrc.js +13 -8
  2. package/README.md +8 -1
  3. package/dist/cli.js +17 -14
  4. package/dist/cli.js.map +1 -1
  5. package/dist/collections/Extractors.d.ts +1 -1
  6. package/dist/collections/Extractors.js +21 -21
  7. package/dist/collections/Extractors.js.map +1 -1
  8. package/dist/collections/Groups.d.ts +4 -4
  9. package/dist/collections/Groups.js +45 -45
  10. package/dist/collections/Groups.js.map +1 -1
  11. package/dist/collections/Requests.d.ts +3 -3
  12. package/dist/collections/Requests.js +3 -3
  13. package/dist/collections/Requests.js.map +1 -1
  14. package/dist/collections/Tweet.d.ts +4 -4
  15. package/dist/collections/Tweet.js +5 -5
  16. package/dist/collections/Tweet.js.map +1 -1
  17. package/dist/commands/Tweet.js +48 -12
  18. package/dist/commands/Tweet.js.map +1 -1
  19. package/dist/enums/Api.d.ts +1 -1
  20. package/dist/enums/Api.js +7 -7
  21. package/dist/enums/Api.js.map +1 -1
  22. package/dist/enums/Authentication.d.ts +1 -1
  23. package/dist/enums/Authentication.js +7 -7
  24. package/dist/enums/Authentication.js.map +1 -1
  25. package/dist/enums/Data.d.ts +1 -1
  26. package/dist/enums/Data.js +7 -7
  27. package/dist/enums/Data.js.map +1 -1
  28. package/dist/enums/Logging.d.ts +1 -1
  29. package/dist/enums/Logging.js +11 -11
  30. package/dist/enums/Logging.js.map +1 -1
  31. package/dist/enums/Media.d.ts +1 -1
  32. package/dist/enums/Media.js +7 -7
  33. package/dist/enums/Media.js.map +1 -1
  34. package/dist/enums/Notification.d.ts +1 -1
  35. package/dist/enums/Notification.js +9 -9
  36. package/dist/enums/Notification.js.map +1 -1
  37. package/dist/enums/Resource.d.ts +1 -1
  38. package/dist/enums/Resource.js +42 -42
  39. package/dist/enums/Resource.js.map +1 -1
  40. package/dist/enums/Tweet.d.ts +1 -1
  41. package/dist/enums/Tweet.js +7 -7
  42. package/dist/enums/Tweet.js.map +1 -1
  43. package/dist/enums/raw/Analytics.d.ts +2 -2
  44. package/dist/enums/raw/Analytics.js +21 -21
  45. package/dist/enums/raw/Analytics.js.map +1 -1
  46. package/dist/enums/raw/Media.d.ts +1 -1
  47. package/dist/enums/raw/Media.js +7 -7
  48. package/dist/enums/raw/Media.js.map +1 -1
  49. package/dist/enums/raw/Notification.d.ts +1 -1
  50. package/dist/enums/raw/Notification.js +8 -8
  51. package/dist/enums/raw/Notification.js.map +1 -1
  52. package/dist/enums/raw/Tweet.d.ts +2 -2
  53. package/dist/enums/raw/Tweet.js +12 -12
  54. package/dist/enums/raw/Tweet.js.map +1 -1
  55. package/dist/models/RettiwtConfig.d.ts +3 -2
  56. package/dist/models/RettiwtConfig.js +7 -5
  57. package/dist/models/RettiwtConfig.js.map +1 -1
  58. package/dist/models/args/FetchArgs.d.ts +7 -5
  59. package/dist/models/args/FetchArgs.js +15 -9
  60. package/dist/models/args/FetchArgs.js.map +1 -1
  61. package/dist/models/auth/AuthCredential.d.ts +2 -2
  62. package/dist/models/auth/AuthCredential.js +3 -3
  63. package/dist/models/auth/AuthCredential.js.map +1 -1
  64. package/dist/models/data/CursoredData.d.ts +2 -2
  65. package/dist/models/data/CursoredData.js +3 -3
  66. package/dist/models/data/CursoredData.js.map +1 -1
  67. package/dist/models/data/Notification.d.ts +2 -2
  68. package/dist/models/data/Notification.js +3 -3
  69. package/dist/models/data/Notification.js.map +1 -1
  70. package/dist/models/data/Tweet.d.ts +4 -4
  71. package/dist/models/data/Tweet.js +18 -18
  72. package/dist/models/data/Tweet.js.map +1 -1
  73. package/dist/models/data/User.js +9 -9
  74. package/dist/models/data/User.js.map +1 -1
  75. package/dist/requests/Tweet.d.ts +2 -2
  76. package/dist/requests/Tweet.js +2 -2
  77. package/dist/requests/Tweet.js.map +1 -1
  78. package/dist/requests/User.d.ts +2 -2
  79. package/dist/requests/User.js.map +1 -1
  80. package/dist/services/internal/AuthService.js +1 -1
  81. package/dist/services/internal/AuthService.js.map +1 -1
  82. package/dist/services/internal/ErrorService.d.ts +2 -2
  83. package/dist/services/internal/ErrorService.js +4 -4
  84. package/dist/services/internal/ErrorService.js.map +1 -1
  85. package/dist/services/internal/LogService.d.ts +2 -2
  86. package/dist/services/internal/LogService.js.map +1 -1
  87. package/dist/services/internal/TidService.d.ts +4 -4
  88. package/dist/services/internal/TidService.js +10 -10
  89. package/dist/services/internal/TidService.js.map +1 -1
  90. package/dist/services/public/FetcherService.d.ts +7 -7
  91. package/dist/services/public/FetcherService.js +79 -35
  92. package/dist/services/public/FetcherService.js.map +1 -1
  93. package/dist/services/public/ListService.js +4 -4
  94. package/dist/services/public/ListService.js.map +1 -1
  95. package/dist/services/public/TweetService.d.ts +3 -3
  96. package/dist/services/public/TweetService.js +35 -35
  97. package/dist/services/public/TweetService.js.map +1 -1
  98. package/dist/services/public/UserService.js +37 -37
  99. package/dist/services/public/UserService.js.map +1 -1
  100. package/dist/types/RettiwtConfig.d.ts +6 -0
  101. package/dist/types/args/FetchArgs.d.ts +14 -6
  102. package/dist/types/auth/AuthCredential.d.ts +2 -2
  103. package/dist/types/data/Notification.d.ts +2 -2
  104. package/dist/types/data/Tweet.d.ts +2 -2
  105. package/dist/types/raw/base/Media.d.ts +2 -2
  106. package/dist/types/raw/base/Notification.d.ts +2 -2
  107. package/package.json +18 -18
  108. package/src/cli.ts +20 -14
  109. package/src/collections/Extractors.ts +21 -21
  110. package/src/collections/Groups.ts +45 -45
  111. package/src/collections/Requests.ts +4 -4
  112. package/src/collections/Tweet.ts +6 -6
  113. package/src/commands/Tweet.ts +49 -12
  114. package/src/enums/Api.ts +1 -1
  115. package/src/enums/Authentication.ts +1 -1
  116. package/src/enums/Data.ts +1 -1
  117. package/src/enums/Logging.ts +1 -1
  118. package/src/enums/Media.ts +1 -1
  119. package/src/enums/Notification.ts +1 -1
  120. package/src/enums/Resource.ts +1 -1
  121. package/src/enums/Tweet.ts +1 -1
  122. package/src/enums/raw/Analytics.ts +2 -2
  123. package/src/enums/raw/Media.ts +1 -1
  124. package/src/enums/raw/Notification.ts +1 -1
  125. package/src/enums/raw/Tweet.ts +2 -2
  126. package/src/models/RettiwtConfig.ts +7 -5
  127. package/src/models/args/FetchArgs.ts +17 -11
  128. package/src/models/auth/AuthCredential.ts +5 -5
  129. package/src/models/data/CursoredData.ts +5 -5
  130. package/src/models/data/Notification.ts +6 -6
  131. package/src/models/data/Tweet.ts +22 -22
  132. package/src/models/data/User.ts +10 -10
  133. package/src/requests/Tweet.ts +4 -4
  134. package/src/requests/User.ts +3 -3
  135. package/src/services/internal/AuthService.ts +2 -2
  136. package/src/services/internal/ErrorService.ts +4 -4
  137. package/src/services/internal/LogService.ts +2 -2
  138. package/src/services/internal/TidService.ts +11 -11
  139. package/src/services/public/FetcherService.ts +54 -38
  140. package/src/services/public/ListService.ts +6 -6
  141. package/src/services/public/TweetService.ts +39 -39
  142. package/src/services/public/UserService.ts +40 -40
  143. package/src/types/RettiwtConfig.ts +7 -0
  144. package/src/types/args/FetchArgs.ts +18 -8
  145. package/src/types/auth/AuthCredential.ts +2 -2
  146. package/src/types/data/Notification.ts +2 -2
  147. package/src/types/data/Tweet.ts +2 -2
  148. package/src/types/raw/base/Media.ts +2 -2
  149. package/src/types/raw/base/Notification.ts +2 -2
  150. package/.tool-versions +0 -1
@@ -1,4 +1,4 @@
1
- import { ETweetRepliesSortType } from '../../enums/Tweet';
1
+ import { TweetRepliesSortType } from '../../enums/Tweet';
2
2
 
3
3
  /**
4
4
  * Options specifying the data that is to be fetched.
@@ -64,7 +64,7 @@ export interface IFetchArgs {
64
64
  * @remarks
65
65
  * - Only works for {@link EResourceType.TWEET_REPLIES}.
66
66
  */
67
- sortBy?: ETweetRepliesSortType;
67
+ sortBy?: TweetRepliesSortType;
68
68
  }
69
69
 
70
70
  /**
@@ -104,9 +104,6 @@ export interface ITweetFilter {
104
104
  /** The language of the tweets to search. */
105
105
  language?: string;
106
106
 
107
- /** Whether to fetch tweets that are links or not. */
108
- links?: boolean;
109
-
110
107
  /** The list from which tweets are to be searched. */
111
108
  list?: string;
112
109
 
@@ -130,15 +127,28 @@ export interface ITweetFilter {
130
127
  /** The minimum number of retweets to search by. */
131
128
  minRetweets?: number;
132
129
 
130
+ /**
131
+ * Whether to search only posts that contain links.
132
+ *
133
+ * @remarks 'links' includes things like media, quotes, retweets, etc.
134
+ */
135
+ onlyLinks?: boolean;
136
+
137
+ /** Whether to search only original posts. */
138
+ onlyOriginal?: boolean;
139
+
140
+ /** Whether to search only replies */
141
+ onlyReplies?: boolean;
142
+
143
+ /** Whether to search posts that only contain text. */
144
+ onlyText?: boolean;
145
+
133
146
  /** The optional words to search. */
134
147
  optionalWords?: string[];
135
148
 
136
149
  /** The id of the tweet which is quoted in the tweets to search. */
137
150
  quoted?: string;
138
151
 
139
- /** Whether to fetch tweets that are replies or not. */
140
- replies?: boolean;
141
-
142
152
  /** The id of the tweet, after which the tweets are to be searched. */
143
153
  sinceId?: string;
144
154
 
@@ -1,4 +1,4 @@
1
- import { EAuthenticationType } from '../../enums/Authentication';
1
+ import { AuthenticationType } from '../../enums/Authentication';
2
2
 
3
3
  /**
4
4
  * The credentials for authenticating against Twitter.
@@ -15,7 +15,7 @@ export interface IAuthCredential {
15
15
  authToken?: string;
16
16
 
17
17
  /** The type of authentication. */
18
- authenticationType?: EAuthenticationType;
18
+ authenticationType?: AuthenticationType;
19
19
 
20
20
  /** The cookie of the twitter account, which is used to authenticate against twitter. */
21
21
  cookies?: string;
@@ -1,4 +1,4 @@
1
- import { ENotificationType } from '../../enums/Notification';
1
+ import { NotificationType } from '../../enums/Notification';
2
2
 
3
3
  /**
4
4
  * The details of a single notification.
@@ -22,5 +22,5 @@ export interface INotification {
22
22
  target: string[];
23
23
 
24
24
  /** The type of notification. */
25
- type?: ENotificationType;
25
+ type?: NotificationType;
26
26
  }
@@ -1,4 +1,4 @@
1
- import { EMediaType } from '../../enums/Media';
1
+ import { MediaType } from '../../enums/Media';
2
2
 
3
3
  import { IUser } from './User';
4
4
 
@@ -89,7 +89,7 @@ export interface ITweetMedia {
89
89
  thumbnailUrl?: string;
90
90
 
91
91
  /** The type of media. */
92
- type: EMediaType;
92
+ type: MediaType;
93
93
 
94
94
  /** The direct URL to the media. */
95
95
  url: string;
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
 
3
- import { ERawMediaType } from '../../../enums/raw/Media';
3
+ import { RawMediaType } from '../../../enums/raw/Media';
4
4
 
5
5
  /**
6
6
  * Represents the raw data of a single Media.
@@ -12,7 +12,7 @@ export interface IMedia {
12
12
  expanded_url: string;
13
13
  id_str: string;
14
14
  media_url_https: string;
15
- type: ERawMediaType;
15
+ type: RawMediaType;
16
16
  url: string;
17
17
  }
18
18
 
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable */
2
2
 
3
- import { ERawNotificationType } from '../../../enums/raw/Notification';
3
+ import { RawNotificationType } from '../../../enums/raw/Notification';
4
4
 
5
5
  /**
6
6
  * Represents the raw data of a single Notification.
@@ -16,7 +16,7 @@ export interface INotification {
16
16
  }
17
17
 
18
18
  export interface INotificationIcon {
19
- id: ERawNotificationType;
19
+ id: RawNotificationType;
20
20
  }
21
21
 
22
22
  export interface INotificationMessage {
package/.tool-versions DELETED
@@ -1 +0,0 @@
1
- nodejs 22.13.1