rettiwt-api 1.3.1 → 2.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 (233) hide show
  1. package/.eslintignore +3 -0
  2. package/.eslintrc.js +54 -0
  3. package/.github/workflows/documentation.yml +47 -0
  4. package/.github/workflows/{publish-to-npm.yml → publish.yml} +8 -8
  5. package/.prettierignore +3 -0
  6. package/.prettierrc +13 -0
  7. package/README.md +59 -61
  8. package/dist/Rettiwt.d.ts +19 -0
  9. package/dist/Rettiwt.js +30 -0
  10. package/dist/Rettiwt.js.map +1 -0
  11. package/dist/enums/ApiErrors.d.ts +30 -0
  12. package/dist/enums/ApiErrors.js +35 -0
  13. package/dist/enums/ApiErrors.js.map +1 -0
  14. package/dist/enums/HTTP.d.ts +11 -11
  15. package/dist/enums/HTTP.js +15 -16
  16. package/dist/enums/HTTP.js.map +1 -1
  17. package/dist/helper/JsonUtils.d.ts +26 -0
  18. package/dist/helper/JsonUtils.js +88 -0
  19. package/dist/helper/JsonUtils.js.map +1 -0
  20. package/dist/index.d.ts +10 -43
  21. package/dist/index.js +16 -55
  22. package/dist/index.js.map +1 -1
  23. package/dist/models/CursoredData.d.ts +37 -0
  24. package/dist/models/CursoredData.js +59 -0
  25. package/dist/models/CursoredData.js.map +1 -0
  26. package/dist/models/{data/Tweet.d.ts → Tweet.d.ts} +4 -4
  27. package/dist/models/{data/Tweet.js → Tweet.js} +7 -32
  28. package/dist/models/Tweet.js.map +1 -0
  29. package/dist/models/{data/User.d.ts → User.d.ts} +3 -3
  30. package/dist/models/{data/User.js → User.js} +3 -3
  31. package/dist/models/User.js.map +1 -0
  32. package/dist/services/FetcherService.d.ts +66 -0
  33. package/dist/services/FetcherService.js +207 -0
  34. package/dist/services/FetcherService.js.map +1 -0
  35. package/dist/services/TweetService.d.ts +88 -0
  36. package/dist/services/TweetService.js +244 -0
  37. package/dist/services/TweetService.js.map +1 -0
  38. package/dist/services/UserService.d.ts +60 -0
  39. package/dist/services/UserService.js +188 -0
  40. package/dist/services/UserService.js.map +1 -0
  41. package/dist/types/{Service.d.ts → CursoredData.d.ts} +3 -3
  42. package/dist/types/CursoredData.js +3 -0
  43. package/dist/types/CursoredData.js.map +1 -0
  44. package/dist/types/Tweet.js +1 -1
  45. package/dist/types/User.js +1 -1
  46. package/package.json +15 -19
  47. package/src/Rettiwt.ts +33 -0
  48. package/src/enums/ApiErrors.ts +30 -0
  49. package/src/enums/HTTP.ts +12 -12
  50. package/src/helper/JsonUtils.ts +86 -0
  51. package/src/index.ts +14 -57
  52. package/src/models/CursoredData.ts +64 -0
  53. package/src/models/Tweet.ts +116 -0
  54. package/src/models/User.ts +72 -0
  55. package/src/services/FetcherService.ts +183 -0
  56. package/src/services/TweetService.ts +153 -0
  57. package/src/services/UserService.ts +117 -0
  58. package/src/types/CursoredData.ts +24 -0
  59. package/src/types/Tweet.ts +35 -35
  60. package/src/types/User.ts +30 -30
  61. package/tsconfig.json +9 -9
  62. package/.github/workflows/build-docs.yml +0 -28
  63. package/dist/config/env.d.ts +0 -5
  64. package/dist/config/env.js +0 -9
  65. package/dist/config/env.js.map +0 -1
  66. package/dist/enums/Errors.d.ts +0 -21
  67. package/dist/enums/Errors.js +0 -29
  68. package/dist/enums/Errors.js.map +0 -1
  69. package/dist/graphql/enums/Errors.d.ts +0 -21
  70. package/dist/graphql/enums/Errors.js +0 -29
  71. package/dist/graphql/enums/Errors.js.map +0 -1
  72. package/dist/graphql/queries/RootQuery.d.ts +0 -4
  73. package/dist/graphql/queries/RootQuery.js +0 -78
  74. package/dist/graphql/queries/RootQuery.js.map +0 -1
  75. package/dist/graphql/resolvers/AccountResolver.d.ts +0 -12
  76. package/dist/graphql/resolvers/AccountResolver.js +0 -84
  77. package/dist/graphql/resolvers/AccountResolver.js.map +0 -1
  78. package/dist/graphql/resolvers/ResolverBase.d.ts +0 -16
  79. package/dist/graphql/resolvers/ResolverBase.js +0 -23
  80. package/dist/graphql/resolvers/ResolverBase.js.map +0 -1
  81. package/dist/graphql/resolvers/TweetResolver.d.ts +0 -46
  82. package/dist/graphql/resolvers/TweetResolver.js +0 -312
  83. package/dist/graphql/resolvers/TweetResolver.js.map +0 -1
  84. package/dist/graphql/resolvers/UserResolver.d.ts +0 -48
  85. package/dist/graphql/resolvers/UserResolver.js +0 -334
  86. package/dist/graphql/resolvers/UserResolver.js.map +0 -1
  87. package/dist/graphql/types/Global.d.ts +0 -4
  88. package/dist/graphql/types/Global.js +0 -13
  89. package/dist/graphql/types/Global.js.map +0 -1
  90. package/dist/graphql/types/TweetTypes.d.ts +0 -4
  91. package/dist/graphql/types/TweetTypes.js +0 -160
  92. package/dist/graphql/types/TweetTypes.js.map +0 -1
  93. package/dist/graphql/types/UserTypes.d.ts +0 -3
  94. package/dist/graphql/types/UserTypes.js +0 -137
  95. package/dist/graphql/types/UserTypes.js.map +0 -1
  96. package/dist/models/args/TweetListArgs.d.ts +0 -21
  97. package/dist/models/args/TweetListArgs.js +0 -54
  98. package/dist/models/args/TweetListArgs.js.map +0 -1
  99. package/dist/models/args/UserListArgs.d.ts +0 -21
  100. package/dist/models/args/UserListArgs.js +0 -54
  101. package/dist/models/args/UserListArgs.js.map +0 -1
  102. package/dist/models/auth/AuthCookie.d.ts +0 -21
  103. package/dist/models/auth/AuthCookie.js +0 -33
  104. package/dist/models/auth/AuthCookie.js.map +0 -1
  105. package/dist/models/data/CursoredData.d.ts +0 -34
  106. package/dist/models/data/CursoredData.js +0 -42
  107. package/dist/models/data/CursoredData.js.map +0 -1
  108. package/dist/models/data/Tweet.js.map +0 -1
  109. package/dist/models/data/User.js.map +0 -1
  110. package/dist/server.d.ts +0 -1
  111. package/dist/server.js +0 -76
  112. package/dist/server.js.map +0 -1
  113. package/dist/services/auth/AccountService.d.ts +0 -83
  114. package/dist/services/auth/AccountService.js +0 -412
  115. package/dist/services/auth/AccountService.js.map +0 -1
  116. package/dist/services/auth/AuthService.d.ts +0 -31
  117. package/dist/services/auth/AuthService.js +0 -118
  118. package/dist/services/auth/AuthService.js.map +0 -1
  119. package/dist/services/data/TweetService.d.ts +0 -60
  120. package/dist/services/data/TweetService.js +0 -251
  121. package/dist/services/data/TweetService.js.map +0 -1
  122. package/dist/services/data/UserService.d.ts +0 -71
  123. package/dist/services/data/UserService.js +0 -278
  124. package/dist/services/data/UserService.js.map +0 -1
  125. package/dist/services/helper/Headers.d.ts +0 -19
  126. package/dist/services/helper/Headers.js +0 -62
  127. package/dist/services/helper/Headers.js.map +0 -1
  128. package/dist/services/helper/Parser.d.ts +0 -22
  129. package/dist/services/helper/Parser.js +0 -84
  130. package/dist/services/helper/Parser.js.map +0 -1
  131. package/dist/services/helper/extractors/Tweets.d.ts +0 -23
  132. package/dist/services/helper/extractors/Tweets.js +0 -200
  133. package/dist/services/helper/extractors/Tweets.js.map +0 -1
  134. package/dist/services/helper/extractors/Users.d.ts +0 -17
  135. package/dist/services/helper/extractors/Users.js +0 -151
  136. package/dist/services/helper/extractors/Users.js.map +0 -1
  137. package/dist/services/helper/payloads/LoginFlows.d.ts +0 -77
  138. package/dist/services/helper/payloads/LoginFlows.js +0 -92
  139. package/dist/services/helper/payloads/LoginFlows.js.map +0 -1
  140. package/dist/services/helper/urls/Authentication.d.ts +0 -4
  141. package/dist/services/helper/urls/Authentication.js +0 -11
  142. package/dist/services/helper/urls/Authentication.js.map +0 -1
  143. package/dist/services/util/CacheService.d.ts +0 -33
  144. package/dist/services/util/CacheService.js +0 -96
  145. package/dist/services/util/CacheService.js.map +0 -1
  146. package/dist/services/util/FetcherService.d.ts +0 -65
  147. package/dist/services/util/FetcherService.js +0 -202
  148. package/dist/services/util/FetcherService.js.map +0 -1
  149. package/dist/types/Args.d.ts +0 -11
  150. package/dist/types/Args.js +0 -4
  151. package/dist/types/Args.js.map +0 -1
  152. package/dist/types/Authentication.d.ts +0 -55
  153. package/dist/types/Authentication.js +0 -6
  154. package/dist/types/Authentication.js.map +0 -1
  155. package/dist/types/Resolvers.d.ts +0 -15
  156. package/dist/types/Resolvers.js +0 -3
  157. package/dist/types/Resolvers.js.map +0 -1
  158. package/dist/types/Rettiwt.d.ts +0 -16
  159. package/dist/types/Rettiwt.js +0 -3
  160. package/dist/types/Rettiwt.js.map +0 -1
  161. package/dist/types/Service.js +0 -5
  162. package/dist/types/Service.js.map +0 -1
  163. package/docs/.nojekyll +0 -1
  164. package/docs/assets/highlight.css +0 -64
  165. package/docs/assets/main.js +0 -58
  166. package/docs/assets/search.js +0 -1
  167. package/docs/assets/style.css +0 -1280
  168. package/docs/classes/AccountService.html +0 -286
  169. package/docs/classes/AuthCookie.html +0 -146
  170. package/docs/classes/AuthService.html +0 -147
  171. package/docs/classes/CacheService.html +0 -157
  172. package/docs/classes/Cursor.html +0 -102
  173. package/docs/classes/CursoredData.html +0 -126
  174. package/docs/classes/DataValidationError.html +0 -120
  175. package/docs/classes/FetcherService.html +0 -225
  176. package/docs/classes/Tweet.html +0 -210
  177. package/docs/classes/TweetEntities.html +0 -128
  178. package/docs/classes/TweetFilter.html +0 -223
  179. package/docs/classes/TweetListArgs.html +0 -118
  180. package/docs/classes/TweetService.html +0 -319
  181. package/docs/classes/User.html +0 -230
  182. package/docs/classes/UserListArgs.html +0 -118
  183. package/docs/classes/UserService.html +0 -355
  184. package/docs/enums/HttpMethods.html +0 -74
  185. package/docs/functions/Rettiwt.html +0 -100
  186. package/docs/index.html +0 -159
  187. package/docs/interfaces/IAuthCookie.html +0 -104
  188. package/docs/interfaces/ICursor.html +0 -77
  189. package/docs/interfaces/ICursoredData.html +0 -93
  190. package/docs/interfaces/IDataContext.html +0 -91
  191. package/docs/interfaces/IDataValidationError.html +0 -109
  192. package/docs/interfaces/IListArgs.html +0 -87
  193. package/docs/interfaces/ITweet.html +0 -176
  194. package/docs/interfaces/ITweetEntities.html +0 -104
  195. package/docs/interfaces/ITweetFilter.html +0 -158
  196. package/docs/interfaces/IUser.html +0 -194
  197. package/docs/modules.html +0 -111
  198. package/environment.d.ts +0 -11
  199. package/src/config/env.ts +0 -5
  200. package/src/enums/Errors.ts +0 -22
  201. package/src/graphql/enums/Errors.ts +0 -22
  202. package/src/graphql/queries/RootQuery.ts +0 -75
  203. package/src/graphql/resolvers/AccountResolver.ts +0 -22
  204. package/src/graphql/resolvers/ResolverBase.ts +0 -26
  205. package/src/graphql/resolvers/TweetResolver.ts +0 -237
  206. package/src/graphql/resolvers/UserResolver.ts +0 -257
  207. package/src/graphql/types/Global.ts +0 -10
  208. package/src/graphql/types/TweetTypes.ts +0 -158
  209. package/src/graphql/types/UserTypes.ts +0 -135
  210. package/src/models/args/TweetListArgs.ts +0 -47
  211. package/src/models/args/UserListArgs.ts +0 -47
  212. package/src/models/auth/AuthCookie.ts +0 -43
  213. package/src/models/data/CursoredData.ts +0 -45
  214. package/src/models/data/Tweet.ts +0 -118
  215. package/src/models/data/User.ts +0 -72
  216. package/src/server.ts +0 -37
  217. package/src/services/auth/AccountService.ts +0 -283
  218. package/src/services/auth/AuthService.ts +0 -81
  219. package/src/services/data/TweetService.ts +0 -198
  220. package/src/services/data/UserService.ts +0 -221
  221. package/src/services/helper/Headers.ts +0 -60
  222. package/src/services/helper/Parser.ts +0 -89
  223. package/src/services/helper/extractors/Tweets.ts +0 -190
  224. package/src/services/helper/extractors/Users.ts +0 -141
  225. package/src/services/helper/payloads/LoginFlows.ts +0 -90
  226. package/src/services/helper/urls/Authentication.ts +0 -6
  227. package/src/services/util/CacheService.ts +0 -76
  228. package/src/services/util/FetcherService.ts +0 -143
  229. package/src/types/Args.ts +0 -12
  230. package/src/types/Authentication.ts +0 -63
  231. package/src/types/Resolvers.ts +0 -18
  232. package/src/types/Rettiwt.ts +0 -20
  233. package/src/types/Service.ts +0 -24
@@ -1,61 +1,61 @@
1
1
  /**
2
2
  * The different types parsed entities like urls, media, mentions, hashtags, etc.
3
- *
3
+ *
4
4
  * @public
5
5
  */
6
6
  export interface ITweetEntities {
7
- /** The list of hashtags mentioned in the tweet. */
8
- hashtags: string[];
7
+ /** The list of hashtags mentioned in the tweet. */
8
+ hashtags: string[];
9
9
 
10
- /** The list of urls mentioned in the tweet. */
11
- urls: string[];
10
+ /** The list of urls mentioned in the tweet. */
11
+ urls: string[];
12
12
 
13
- /** The list of IDs of users mentioned in the tweet. */
14
- mentionedUsers: string[];
13
+ /** The list of IDs of users mentioned in the tweet. */
14
+ mentionedUsers: string[];
15
15
 
16
- /** The list of urls to various media mentioned in the tweet. */
17
- media: string[];
16
+ /** The list of urls to various media mentioned in the tweet. */
17
+ media: string[];
18
18
  }
19
19
 
20
20
  /**
21
21
  * The details of a single Tweet.
22
- *
22
+ *
23
23
  * @public
24
24
  */
25
25
  export interface ITweet {
26
- /** The rest id of the tweet. */
27
- id: string;
26
+ /** The rest id of the tweet. */
27
+ id: string;
28
28
 
29
- /** The rest id of the user who made the tweet. */
30
- tweetBy: string;
29
+ /** The rest id of the user who made the tweet. */
30
+ tweetBy: string;
31
31
 
32
- /** The date and time of creation of the tweet, in UTC string format. */
33
- createdAt: string;
32
+ /** The date and time of creation of the tweet, in UTC string format. */
33
+ createdAt: string;
34
34
 
35
- /** Additional tweet entities like urls, mentions, etc. */
36
- entities: ITweetEntities;
35
+ /** Additional tweet entities like urls, mentions, etc. */
36
+ entities: ITweetEntities;
37
37
 
38
- /** The rest id of the tweet which is quoted in the tweet. */
39
- quoted: string;
38
+ /** The rest id of the tweet which is quoted in the tweet. */
39
+ quoted: string;
40
40
 
41
- /** The full text content of the tweet. */
42
- fullText: string;
41
+ /** The full text content of the tweet. */
42
+ fullText: string;
43
43
 
44
- /** The rest id of the user to which the tweet is a reply. */
45
- replyTo: string;
44
+ /** The rest id of the user to which the tweet is a reply. */
45
+ replyTo: string;
46
46
 
47
- /** The language in which the tweet is written. */
48
- lang: string;
47
+ /** The language in which the tweet is written. */
48
+ lang: string;
49
49
 
50
- /** The number of quotes of the tweet. */
51
- quoteCount: number;
50
+ /** The number of quotes of the tweet. */
51
+ quoteCount: number;
52
52
 
53
- /** The number of replies to the tweet. */
54
- replyCount: number;
53
+ /** The number of replies to the tweet. */
54
+ replyCount: number;
55
55
 
56
- /** The number of retweets of the tweet. */
57
- retweetCount: number;
56
+ /** The number of retweets of the tweet. */
57
+ retweetCount: number;
58
58
 
59
- /** The number of likes of the tweet. */
60
- likeCount: number;
61
- }
59
+ /** The number of likes of the tweet. */
60
+ likeCount: number;
61
+ }
package/src/types/User.ts CHANGED
@@ -1,48 +1,48 @@
1
1
  /**
2
2
  * The details of a single user.
3
- *
3
+ *
4
4
  * @public
5
5
  */
6
6
  export interface IUser {
7
- /** The rest id of the user. */
8
- id: string;
7
+ /** The rest id of the user. */
8
+ id: string;
9
9
 
10
- /** The username/screenname of the user. */
11
- userName: string;
10
+ /** The username/screenname of the user. */
11
+ userName: string;
12
12
 
13
- /** The full name of the user. */
14
- fullName: string;
13
+ /** The full name of the user. */
14
+ fullName: string;
15
15
 
16
- /** The creation date of user's account. */
17
- createdAt: string;
16
+ /** The creation date of user's account. */
17
+ createdAt: string;
18
18
 
19
- /** The user's description. */
20
- description: string;
19
+ /** The user's description. */
20
+ description: string;
21
21
 
22
- /** Whether the account is verified or not. */
23
- isVerified: boolean;
22
+ /** Whether the account is verified or not. */
23
+ isVerified: boolean;
24
24
 
25
- /** The number of tweets liked by the user. */
26
- favouritesCount: number;
25
+ /** The number of tweets liked by the user. */
26
+ favouritesCount: number;
27
27
 
28
- /** The number of followers of the user. */
29
- followersCount: number;
28
+ /** The number of followers of the user. */
29
+ followersCount: number;
30
30
 
31
- /** The number of following of the user. */
32
- followingsCount: number;
31
+ /** The number of following of the user. */
32
+ followingsCount: number;
33
33
 
34
- /** The number of tweets made by the user. */
35
- statusesCount: number;
34
+ /** The number of tweets made by the user. */
35
+ statusesCount: number;
36
36
 
37
- /** The location of user as provided by user. */
38
- location: string;
37
+ /** The location of user as provided by user. */
38
+ location: string;
39
39
 
40
- /** The rest id of the tweet pinned in the user's profile. */
41
- pinnedTweet: string;
40
+ /** The rest id of the tweet pinned in the user's profile. */
41
+ pinnedTweet: string;
42
42
 
43
- /** The url of the profile banner image. */
44
- profileBanner: string;
43
+ /** The url of the profile banner image. */
44
+ profileBanner: string;
45
45
 
46
- /** The url of the profile image. */
47
- profileImage: string;
48
- }
46
+ /** The url of the profile image. */
47
+ profileImage: string;
48
+ }
package/tsconfig.json CHANGED
@@ -12,8 +12,8 @@
12
12
  // "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
13
  // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
14
14
  // "jsx": "preserve", /* Specify what JSX code is generated. */
15
- "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
16
- "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
15
+ "experimentalDecorators": true /* Enable experimental support for TC39 stage 2 draft decorators. */,
16
+ "emitDecoratorMetadata": true /* Emit design-type metadata for decorated declarations in source files. */,
17
17
  // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
18
18
  // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
19
19
  // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
@@ -23,7 +23,7 @@
23
23
  // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
24
24
  /* Modules */
25
25
  // "module": "commonjs", /* Specify what module code is generated. */
26
- "rootDir": "./src", /* Specify the root folder within your source files. */
26
+ "rootDir": "./src" /* Specify the root folder within your source files. */,
27
27
  // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
28
28
  // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29
29
  // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
@@ -39,12 +39,12 @@
39
39
  // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
40
40
  // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
41
41
  /* Emit */
42
- "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
42
+ "declaration": true /* Generate .d.ts files from TypeScript and JavaScript files in your project. */,
43
43
  // "declarationMap": true, /* Create sourcemaps for d.ts files. */
44
44
  // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
45
- "sourceMap": true, /* Create source map files for emitted JavaScript files. */
45
+ "sourceMap": true /* Create source map files for emitted JavaScript files. */,
46
46
  // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
47
- "outDir": "./dist", /* Specify an output folder for all emitted files. */
47
+ "outDir": "./dist" /* Specify an output folder for all emitted files. */,
48
48
  // "removeComments": true, /* Disable emitting comments. */
49
49
  // "noEmit": true, /* Disable emitting files from a compilation. */
50
50
  // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
@@ -65,11 +65,11 @@
65
65
  /* Interop Constraints */
66
66
  // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
67
67
  // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
68
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
68
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
69
69
  // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
70
70
  // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
71
71
  /* Type Checking */
72
- "strict": true, /* Enable all strict type-checking options. */
72
+ "strict": true /* Enable all strict type-checking options. */
73
73
  // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
74
74
  // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
75
75
  // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -92,4 +92,4 @@
92
92
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
93
93
  // "skipLibCheck": true /* Skip type checking all .d.ts files. */
94
94
  }
95
- }
95
+ }
@@ -1,28 +0,0 @@
1
- name: build-documentation
2
- run-name: Building the documentation for the release
3
- on:
4
- push:
5
- branches: release
6
-
7
- jobs:
8
- # Creating the documentation
9
- documentation:
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: write
13
- steps:
14
- - uses: actions/checkout@v3
15
- - uses: actions/setup-node@v3
16
- with:
17
- node-version: '18.x'
18
- # Installing dependencies
19
- - run: npm install
20
-
21
- # Generating documentations
22
- - run: npx typedoc src/index.ts
23
-
24
- # Commiting the documentations
25
- - uses: stefanzweifel/git-auto-commit-action@v4
26
- with:
27
- commit_message: Updated documentations
28
- branch: release
@@ -1,5 +0,0 @@
1
- export declare const config: {
2
- port: number;
3
- is_development: boolean;
4
- twitter_auth_token: string;
5
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.config = void 0;
4
- exports.config = {
5
- port: Number(process.env.APP_PORT),
6
- is_development: (process.env.DEVELOPMENT == 'true'),
7
- twitter_auth_token: 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'
8
- };
9
- //# sourceMappingURL=env.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/config/env.ts"],"names":[],"mappings":";;;AAAa,QAAA,MAAM,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClC,cAAc,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,MAAM,CAAC;IACnD,kBAAkB,EAAE,iHAAiH;CACxI,CAAA"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Different types of error messages related to authentication returned by services.
3
- *
4
- * @public
5
- */
6
- export declare enum AuthenticationErrors {
7
- NotAuthenticated = "Cannot fetch this data without authentication",
8
- InvalidEmail = "No Twitter account found for the given email address",
9
- InvalidUsername = "Incorrect username given for the given Twitter account",
10
- InvalidPassword = "Incorrect password given for the given Twitter account"
11
- }
12
- /**
13
- * Different type of error messages related to data that are returned by services.
14
- *
15
- * @public
16
- */
17
- export declare enum DataErrors {
18
- UserNotFound = "An account with given username/id was not found",
19
- TweetNotFound = "A tweet with the given id was not found",
20
- NoMatchingTweetsFound = "No tweets matching the given filter were found"
21
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.DataErrors = exports.AuthenticationErrors = void 0;
4
- /**
5
- * Different types of error messages related to authentication returned by services.
6
- *
7
- * @public
8
- */
9
- var AuthenticationErrors;
10
- (function (AuthenticationErrors) {
11
- AuthenticationErrors["NotAuthenticated"] = "Cannot fetch this data without authentication";
12
- AuthenticationErrors["InvalidEmail"] = "No Twitter account found for the given email address";
13
- AuthenticationErrors["InvalidUsername"] = "Incorrect username given for the given Twitter account";
14
- AuthenticationErrors["InvalidPassword"] = "Incorrect password given for the given Twitter account";
15
- })(AuthenticationErrors = exports.AuthenticationErrors || (exports.AuthenticationErrors = {}));
16
- ;
17
- /**
18
- * Different type of error messages related to data that are returned by services.
19
- *
20
- * @public
21
- */
22
- var DataErrors;
23
- (function (DataErrors) {
24
- DataErrors["UserNotFound"] = "An account with given username/id was not found";
25
- DataErrors["TweetNotFound"] = "A tweet with the given id was not found";
26
- DataErrors["NoMatchingTweetsFound"] = "No tweets matching the given filter were found";
27
- })(DataErrors = exports.DataErrors || (exports.DataErrors = {}));
28
- ;
29
- //# sourceMappingURL=Errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../src/enums/Errors.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC5B,0FAAkE,CAAA;IAClE,6FAAqE,CAAA;IACrE,kGAA0E,CAAA;IAC1E,kGAA0E,CAAA;AAC9E,CAAC,EALW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAK/B;AAAA,CAAC;AAEF;;;;GAIG;AACH,IAAY,UAIX;AAJD,WAAY,UAAU;IAClB,8EAAgE,CAAA;IAChE,uEAAyD,CAAA;IACzD,sFAAwE,CAAA;AAC5E,CAAC,EAJW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAIrB;AAAA,CAAC"}
@@ -1,21 +0,0 @@
1
- /**
2
- * Different types error messages for validation errors returned by GraphQL API.
3
- *
4
- * @public
5
- */
6
- export declare enum ValidationErrors {
7
- NoUserIdentification = "Either userName or id must be given"
8
- }
9
- /**
10
- * Different type of error messages related to data that are returned by GraphQL API.
11
- *
12
- * @public
13
- */
14
- export declare enum DataErrors {
15
- NoTweetsFound = "No tweets matching the given criteria found",
16
- NoLikersFound = "No likers found for the tweet with the given id",
17
- NoRetweetersFound = "No retweeters found for the tweet with the given id",
18
- NoUserTweetsFound = "No tweets were found for the user with the given id",
19
- NoFollowsFound = "No follow details were found for the user with the given id",
20
- NoLikedTweetsFound = "No liked tweets were found for the user with the given id"
21
- }
@@ -1,29 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- exports.DataErrors = exports.ValidationErrors = void 0;
4
- /**
5
- * Different types error messages for validation errors returned by GraphQL API.
6
- *
7
- * @public
8
- */
9
- var ValidationErrors;
10
- (function (ValidationErrors) {
11
- ValidationErrors["NoUserIdentification"] = "Either userName or id must be given";
12
- })(ValidationErrors = exports.ValidationErrors || (exports.ValidationErrors = {}));
13
- ;
14
- /**
15
- * Different type of error messages related to data that are returned by GraphQL API.
16
- *
17
- * @public
18
- */
19
- var DataErrors;
20
- (function (DataErrors) {
21
- DataErrors["NoTweetsFound"] = "No tweets matching the given criteria found";
22
- DataErrors["NoLikersFound"] = "No likers found for the tweet with the given id";
23
- DataErrors["NoRetweetersFound"] = "No retweeters found for the tweet with the given id";
24
- DataErrors["NoUserTweetsFound"] = "No tweets were found for the user with the given id";
25
- DataErrors["NoFollowsFound"] = "No follow details were found for the user with the given id";
26
- DataErrors["NoLikedTweetsFound"] = "No liked tweets were found for the user with the given id";
27
- })(DataErrors = exports.DataErrors || (exports.DataErrors = {}));
28
- ;
29
- //# sourceMappingURL=Errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Errors.js","sourceRoot":"","sources":["../../../src/graphql/enums/Errors.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,gBAEX;AAFD,WAAY,gBAAgB;IACxB,gFAA4D,CAAA;AAChE,CAAC,EAFW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAE3B;AAAA,CAAC;AAEF;;;;GAIG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IAClB,2EAA6D,CAAA;IAC7D,+EAAiE,CAAA;IACjE,uFAAyE,CAAA;IACzE,uFAAyE,CAAA;IACzE,4FAA8E,CAAA;IAC9E,8FAAgF,CAAA;AACpF,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AAAA,CAAC"}
@@ -1,4 +0,0 @@
1
- import { GraphQLObjectType } from 'graphql';
2
- export declare const rootQuery: GraphQLObjectType<any, any, {
3
- [key: string]: any;
4
- }>;
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- exports.__esModule = true;
6
- exports.rootQuery = void 0;
7
- // PACKAGE
8
- var graphql_1 = require("graphql");
9
- // TYPES
10
- var UserTypes_1 = require("../types/UserTypes");
11
- var TweetTypes_1 = require("../types/TweetTypes");
12
- // RESOLVERS
13
- var UserResolver_1 = __importDefault(require("../resolvers/UserResolver"));
14
- var TweetResolver_1 = __importDefault(require("../resolvers/TweetResolver"));
15
- var AccountResolver_1 = __importDefault(require("../resolvers/AccountResolver"));
16
- exports.rootQuery = new graphql_1.GraphQLObjectType({
17
- name: 'Root',
18
- fields: {
19
- test: {
20
- type: graphql_1.GraphQLString,
21
- resolve: function () { return "GraphQL Works!"; }
22
- },
23
- User: {
24
- type: UserTypes_1.User,
25
- description: "Returns the details of the twitter user with given user name",
26
- args: {
27
- id: { type: graphql_1.GraphQLString }
28
- },
29
- resolve: function (parent, args, context) { return new UserResolver_1["default"](context).resolveUserDetails(args.id); }
30
- },
31
- Tweet: {
32
- type: TweetTypes_1.Tweet,
33
- description: "Returns a single tweet given it's id",
34
- args: {
35
- id: { type: graphql_1.GraphQLString }
36
- },
37
- resolve: function (parent, args, context) { return new TweetResolver_1["default"](context).resolveTweet(args.id); }
38
- },
39
- Tweets: {
40
- type: TweetTypes_1.TweetList,
41
- description: "Returns the list of tweets matching the given criteria",
42
- args: {
43
- fromUsers: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) },
44
- toUsers: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) },
45
- mentions: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) },
46
- hashtags: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) },
47
- words: { type: new graphql_1.GraphQLList(graphql_1.GraphQLString) },
48
- startDate: { type: graphql_1.GraphQLString },
49
- endDate: { type: graphql_1.GraphQLString },
50
- sinceId: { type: graphql_1.GraphQLString },
51
- quoted: { type: graphql_1.GraphQLString },
52
- links: { type: graphql_1.GraphQLBoolean, defaultValue: false },
53
- count: { type: graphql_1.GraphQLInt, defaultValue: 10 },
54
- cursor: { type: graphql_1.GraphQLString, defaultValue: '' }
55
- },
56
- resolve: function (parent, args, context) { return new TweetResolver_1["default"](context).resolveTweets(args, args.count, args.cursor); }
57
- },
58
- Login: {
59
- type: new graphql_1.GraphQLObjectType({
60
- name: 'AuthCookie',
61
- fields: {
62
- auth_token: { type: graphql_1.GraphQLString },
63
- ct0: { type: graphql_1.GraphQLString },
64
- kdt: { type: graphql_1.GraphQLString },
65
- twid: { type: graphql_1.GraphQLString }
66
- }
67
- }),
68
- description: "Returns the cookies that can be used to fetch data from twitter",
69
- args: {
70
- email: { type: graphql_1.GraphQLString },
71
- userName: { type: graphql_1.GraphQLString },
72
- password: { type: graphql_1.GraphQLString }
73
- },
74
- resolve: function (parent, args, context) { return new AccountResolver_1["default"](context).resolveLogin(args.email, args.userName, args.password); }
75
- }
76
- }
77
- });
78
- //# sourceMappingURL=RootQuery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RootQuery.js","sourceRoot":"","sources":["../../../src/graphql/queries/RootQuery.ts"],"names":[],"mappings":";;;;;;AAAA,UAAU;AACV,mCAAmG;AAGnG,QAAQ;AACR,gDAA0C;AAC1C,kDAAuD;AAEvD,YAAY;AACZ,2EAAqD;AACrD,6EAAuD;AACvD,iFAA2D;AAE9C,QAAA,SAAS,GAAG,IAAI,2BAAiB,CAAC;IAC3C,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE;QACJ,IAAI,EAAE;YACF,IAAI,EAAE,uBAAa;YACnB,OAAO,EAAE,cAAM,OAAA,gBAAgB,EAAhB,CAAgB;SAClC;QACD,IAAI,EAAE;YACF,IAAI,EAAE,gBAAI;YACV,WAAW,EAAE,8DAA8D;YAC3E,IAAI,EAAE;gBACF,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;aAC9B;YACD,OAAO,EAAE,UAAC,MAAM,EAAE,IAAI,EAAE,OAAO,IAAK,OAAA,IAAI,yBAAY,CAAC,OAAO,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,CAAC,EAArD,CAAqD;SAC5F;QACD,KAAK,EAAE;YACH,IAAI,EAAE,kBAAK;YACX,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE;gBACF,EAAE,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;aAC9B;YACD,OAAO,EAAE,UAAC,MAAM,EAAE,IAAI,EAAE,OAAO,IAAK,OAAA,IAAI,0BAAa,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,EAAhD,CAAgD;SACvF;QACD,MAAM,EAAE;YACJ,IAAI,EAAE,sBAAS;YACf,WAAW,EAAE,wDAAwD;YACrE,IAAI,EAAE;gBACF,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,qBAAW,CAAC,uBAAa,CAAC,EAAE;gBACnD,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,qBAAW,CAAC,uBAAa,CAAC,EAAE;gBACjD,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,qBAAW,CAAC,uBAAa,CAAC,EAAE;gBAClD,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,qBAAW,CAAC,uBAAa,CAAC,EAAE;gBAClD,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,qBAAW,CAAC,uBAAa,CAAC,EAAE;gBAC/C,SAAS,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBAClC,OAAO,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBAChC,OAAO,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBAChC,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,wBAAc,EAAE,YAAY,EAAE,KAAK,EAAE;gBACpD,KAAK,EAAE,EAAE,IAAI,EAAE,oBAAU,EAAE,YAAY,EAAE,EAAE,EAAE;gBAC7C,MAAM,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE,YAAY,EAAE,EAAE,EAAE;aACpD;YACD,OAAO,EAAE,UAAC,MAAM,EAAE,IAAI,EAAE,OAAO,IAAK,OAAA,IAAI,0BAAa,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,IAAmB,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,EAAtF,CAAsF;SAC7H;QACD,KAAK,EAAE;YACH,IAAI,EAAE,IAAI,2BAAiB,CAAC;gBACxB,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE;oBACJ,UAAU,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;oBACnC,GAAG,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;oBAC5B,GAAG,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;oBAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;iBAChC;aACJ,CAAC;YACF,WAAW,EAAE,iEAAiE;YAC9E,IAAI,EAAE;gBACF,KAAK,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBAC9B,QAAQ,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;gBACjC,QAAQ,EAAE,EAAE,IAAI,EAAE,uBAAa,EAAE;aACpC;YACD,OAAO,EAAE,UAAC,MAAM,EAAE,IAAI,EAAE,OAAO,IAAK,OAAA,IAAI,4BAAe,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,EAAnF,CAAmF;SAC1H;KACJ;CACJ,CAAC,CAAA"}
@@ -1,12 +0,0 @@
1
- import ResolverBase from './ResolverBase';
2
- import { IDataContext } from '../../types/Rettiwt';
3
- export default class AccountResolver extends ResolverBase {
4
- constructor(context: IDataContext);
5
- /**
6
- * @param email The email of the account to be logged into
7
- * @param userName The username associated with the account
8
- * @param password The password to the account
9
- * @returns The cookie string that can be used to authenticate against twitter
10
- */
11
- resolveLogin(email: string, userName: string, password: string): Promise<any>;
12
- }
@@ -1,84 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
- return new (P || (P = Promise))(function (resolve, reject) {
20
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
- step((generator = generator.apply(thisArg, _arguments || [])).next());
24
- });
25
- };
26
- var __generator = (this && this.__generator) || function (thisArg, body) {
27
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
28
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
- function verb(n) { return function (v) { return step([n, v]); }; }
30
- function step(op) {
31
- if (f) throw new TypeError("Generator is already executing.");
32
- while (_) try {
33
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
- if (y = 0, t) op = [op[0] & 2, t.value];
35
- switch (op[0]) {
36
- case 0: case 1: t = op; break;
37
- case 4: _.label++; return { value: op[1], done: false };
38
- case 5: _.label++; y = op[1]; op = [0]; continue;
39
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
- default:
41
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
- if (t[2]) _.ops.pop();
46
- _.trys.pop(); continue;
47
- }
48
- op = body.call(thisArg, _);
49
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
- }
52
- };
53
- var __importDefault = (this && this.__importDefault) || function (mod) {
54
- return (mod && mod.__esModule) ? mod : { "default": mod };
55
- };
56
- exports.__esModule = true;
57
- // RESOLVERS
58
- var ResolverBase_1 = __importDefault(require("./ResolverBase"));
59
- var AccountResolver = /** @class */ (function (_super) {
60
- __extends(AccountResolver, _super);
61
- // MEMBER METHODS
62
- function AccountResolver(context) {
63
- return _super.call(this, context) || this;
64
- }
65
- /**
66
- * @param email The email of the account to be logged into
67
- * @param userName The username associated with the account
68
- * @param password The password to the account
69
- * @returns The cookie string that can be used to authenticate against twitter
70
- */
71
- AccountResolver.prototype.resolveLogin = function (email, userName, password) {
72
- return __awaiter(this, void 0, void 0, function () {
73
- return __generator(this, function (_a) {
74
- switch (_a.label) {
75
- case 0: return [4 /*yield*/, this.context.account.login(email, userName, password)];
76
- case 1: return [2 /*return*/, _a.sent()];
77
- }
78
- });
79
- });
80
- };
81
- return AccountResolver;
82
- }(ResolverBase_1["default"]));
83
- exports["default"] = AccountResolver;
84
- //# sourceMappingURL=AccountResolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AccountResolver.js","sourceRoot":"","sources":["../../../src/graphql/resolvers/AccountResolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAY;AACZ,gEAA0C;AAK1C;IAA6C,mCAAY;IACrD,iBAAiB;IACjB,yBAAY,OAAqB;eAC7B,kBAAM,OAAO,CAAC;IAClB,CAAC;IAED;;;;;OAKG;IACG,sCAAY,GAAlB,UAAmB,KAAa,EAAE,QAAgB,EAAE,QAAgB;;;;4BACzD,qBAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAA;4BAAlE,sBAAO,SAA2D,EAAC;;;;KACtE;IACL,sBAAC;AAAD,CAAC,AAfD,CAA6C,yBAAY,GAexD"}
@@ -1,16 +0,0 @@
1
- import { GraphQLError } from 'graphql';
2
- import { IDataContext } from '../../types/Rettiwt';
3
- export default class ResolverBase {
4
- /** The current data context that can used for fetching data from Twitter. */
5
- protected context: IDataContext;
6
- /**
7
- * @param context The data context that will be used for fetching data from Twitter.
8
- */
9
- constructor(context: IDataContext);
10
- /**
11
- * @param error The error object received from the services.
12
- *
13
- * @returns The GraphQL error object that can be returned to the client.
14
- */
15
- protected getGraphQLError(error: Error): GraphQLError;
16
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- // PACKAGES
4
- var graphql_1 = require("graphql");
5
- var ResolverBase = /** @class */ (function () {
6
- /**
7
- * @param context The data context that will be used for fetching data from Twitter.
8
- */
9
- function ResolverBase(context) {
10
- this.context = context;
11
- }
12
- /**
13
- * @param error The error object received from the services.
14
- *
15
- * @returns The GraphQL error object that can be returned to the client.
16
- */
17
- ResolverBase.prototype.getGraphQLError = function (error) {
18
- return new graphql_1.GraphQLError(error.message, undefined, undefined, undefined, undefined, undefined, error);
19
- };
20
- return ResolverBase;
21
- }());
22
- exports["default"] = ResolverBase;
23
- //# sourceMappingURL=ResolverBase.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ResolverBase.js","sourceRoot":"","sources":["../../../src/graphql/resolvers/ResolverBase.ts"],"names":[],"mappings":";;AAAA,WAAW;AACX,mCAAsC;AAKtC;IAII;;OAEG;IACH,sBAAY,OAAqB;QAC7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED;;;;OAIG;IACO,sCAAe,GAAzB,UAA0B,KAAY;QAClC,OAAO,IAAI,sBAAY,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;IACzG,CAAC;IACL,mBAAC;AAAD,CAAC,AAnBD,IAmBC"}