rettiwt-api 1.0.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.
Files changed (156) hide show
  1. package/.dockerignore +2 -0
  2. package/.gitattributes +3 -0
  3. package/Dockerfile +9 -0
  4. package/README.md +38 -0
  5. package/dist/config/env.d.ts +5 -0
  6. package/dist/config/env.js +9 -0
  7. package/dist/config/env.js.map +1 -0
  8. package/dist/index.d.ts +10 -0
  9. package/dist/index.js +23 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/models/graphql/Global.d.ts +4 -0
  12. package/dist/models/graphql/Global.js +13 -0
  13. package/dist/models/graphql/Global.js.map +1 -0
  14. package/dist/models/graphql/TweetTypes.d.ts +6 -0
  15. package/dist/models/graphql/TweetTypes.js +156 -0
  16. package/dist/models/graphql/TweetTypes.js.map +1 -0
  17. package/dist/models/graphql/UserTypes.d.ts +3 -0
  18. package/dist/models/graphql/UserTypes.js +139 -0
  19. package/dist/models/graphql/UserTypes.js.map +1 -0
  20. package/dist/queries/RootQuery.d.ts +4 -0
  21. package/dist/queries/RootQuery.js +59 -0
  22. package/dist/queries/RootQuery.js.map +1 -0
  23. package/dist/resolvers/ResolverBase.d.ts +5 -0
  24. package/dist/resolvers/ResolverBase.js +11 -0
  25. package/dist/resolvers/ResolverBase.js.map +1 -0
  26. package/dist/resolvers/TweetResolver.d.ts +54 -0
  27. package/dist/resolvers/TweetResolver.js +328 -0
  28. package/dist/resolvers/TweetResolver.js.map +1 -0
  29. package/dist/resolvers/UserResolver.d.ts +47 -0
  30. package/dist/resolvers/UserResolver.js +302 -0
  31. package/dist/resolvers/UserResolver.js.map +1 -0
  32. package/dist/server.d.ts +1 -0
  33. package/dist/server.js +75 -0
  34. package/dist/server.js.map +1 -0
  35. package/dist/services/AuthService.d.ts +17 -0
  36. package/dist/services/AuthService.js +103 -0
  37. package/dist/services/AuthService.js.map +1 -0
  38. package/dist/services/CacheService.d.ts +25 -0
  39. package/dist/services/CacheService.js +141 -0
  40. package/dist/services/CacheService.js.map +1 -0
  41. package/dist/services/FetcherService.d.ts +30 -0
  42. package/dist/services/FetcherService.js +171 -0
  43. package/dist/services/FetcherService.js.map +1 -0
  44. package/dist/services/data/TweetService.d.ts +43 -0
  45. package/dist/services/data/TweetService.js +229 -0
  46. package/dist/services/data/TweetService.js.map +1 -0
  47. package/dist/services/data/UserAccountService.d.ts +49 -0
  48. package/dist/services/data/UserAccountService.js +250 -0
  49. package/dist/services/data/UserAccountService.js.map +1 -0
  50. package/dist/services/helper/Deserializers.d.ts +19 -0
  51. package/dist/services/helper/Deserializers.js +115 -0
  52. package/dist/services/helper/Deserializers.js.map +1 -0
  53. package/dist/services/helper/Extractors.d.ts +101 -0
  54. package/dist/services/helper/Extractors.js +409 -0
  55. package/dist/services/helper/Extractors.js.map +1 -0
  56. package/dist/services/helper/Headers.d.ts +9 -0
  57. package/dist/services/helper/Headers.js +47 -0
  58. package/dist/services/helper/Headers.js.map +1 -0
  59. package/dist/services/helper/Parser.d.ts +28 -0
  60. package/dist/services/helper/Parser.js +104 -0
  61. package/dist/services/helper/Parser.js.map +1 -0
  62. package/dist/services/helper/Urls.d.ts +74 -0
  63. package/dist/services/helper/Urls.js +114 -0
  64. package/dist/services/helper/Urls.js.map +1 -0
  65. package/dist/test/Test.js +2 -0
  66. package/dist/test/Test.js.map +1 -0
  67. package/dist/types/Authentication.d.ts +15 -0
  68. package/dist/types/Authentication.js +5 -0
  69. package/dist/types/Authentication.js.map +1 -0
  70. package/dist/types/HTTP.d.ts +22 -0
  71. package/dist/types/HTTP.js +30 -0
  72. package/dist/types/HTTP.js.map +1 -0
  73. package/dist/types/Service.d.ts +27 -0
  74. package/dist/types/Service.js +19 -0
  75. package/dist/types/Service.js.map +1 -0
  76. package/dist/types/Tweet.d.ts +40 -0
  77. package/dist/types/Tweet.js +5 -0
  78. package/dist/types/Tweet.js.map +1 -0
  79. package/dist/types/UserAccount.d.ts +19 -0
  80. package/dist/types/UserAccount.js +4 -0
  81. package/dist/types/UserAccount.js.map +1 -0
  82. package/dist/types/graphql/Errors.d.ts +15 -0
  83. package/dist/types/graphql/Errors.js +23 -0
  84. package/dist/types/graphql/Errors.js.map +1 -0
  85. package/dist/types/raw/auth/Cookie.d.ts +16 -0
  86. package/dist/types/raw/auth/Cookie.js +3 -0
  87. package/dist/types/raw/auth/Cookie.js.map +1 -0
  88. package/dist/types/raw/tweet/Favouriters.d.ts +164 -0
  89. package/dist/types/raw/tweet/Favouriters.js +3 -0
  90. package/dist/types/raw/tweet/Favouriters.js.map +1 -0
  91. package/dist/types/raw/tweet/Retweeters.d.ts +171 -0
  92. package/dist/types/raw/tweet/Retweeters.js +3 -0
  93. package/dist/types/raw/tweet/Retweeters.js.map +1 -0
  94. package/dist/types/raw/tweet/Tweet.d.ts +746 -0
  95. package/dist/types/raw/tweet/Tweet.js +3 -0
  96. package/dist/types/raw/tweet/Tweet.js.map +1 -0
  97. package/dist/types/raw/tweet/Tweets.d.ts +386 -0
  98. package/dist/types/raw/tweet/Tweets.js +3 -0
  99. package/dist/types/raw/tweet/Tweets.js.map +1 -0
  100. package/dist/types/raw/user/Followers.d.ts +176 -0
  101. package/dist/types/raw/user/Followers.js +3 -0
  102. package/dist/types/raw/user/Followers.js.map +1 -0
  103. package/dist/types/raw/user/Following.d.ts +176 -0
  104. package/dist/types/raw/user/Following.js +3 -0
  105. package/dist/types/raw/user/Following.js.map +1 -0
  106. package/dist/types/raw/user/Likes.d.ts +1059 -0
  107. package/dist/types/raw/user/Likes.js +3 -0
  108. package/dist/types/raw/user/Likes.js.map +1 -0
  109. package/dist/types/raw/user/Tweets.d.ts +2428 -0
  110. package/dist/types/raw/user/Tweets.js +3 -0
  111. package/dist/types/raw/user/Tweets.js.map +1 -0
  112. package/dist/types/raw/user/User.d.ts +117 -0
  113. package/dist/types/raw/user/User.js +3 -0
  114. package/dist/types/raw/user/User.js.map +1 -0
  115. package/dist/types/raw/user/Users.d.ts +120 -0
  116. package/dist/types/raw/user/Users.js +3 -0
  117. package/dist/types/raw/user/Users.js.map +1 -0
  118. package/environment.d.ts +11 -0
  119. package/package.json +40 -0
  120. package/src/config/env.ts +5 -0
  121. package/src/index.ts +19 -0
  122. package/src/models/graphql/Global.ts +10 -0
  123. package/src/models/graphql/TweetTypes.ts +154 -0
  124. package/src/models/graphql/UserTypes.ts +137 -0
  125. package/src/queries/RootQuery.ts +56 -0
  126. package/src/resolvers/ResolverBase.ts +12 -0
  127. package/src/resolvers/TweetResolver.ts +257 -0
  128. package/src/resolvers/UserResolver.ts +239 -0
  129. package/src/server.ts +36 -0
  130. package/src/services/AuthService.ts +58 -0
  131. package/src/services/CacheService.ts +70 -0
  132. package/src/services/FetcherService.ts +84 -0
  133. package/src/services/data/TweetService.ts +163 -0
  134. package/src/services/data/UserAccountService.ts +187 -0
  135. package/src/services/helper/Deserializers.ts +95 -0
  136. package/src/services/helper/Extractors.ts +455 -0
  137. package/src/services/helper/Headers.ts +45 -0
  138. package/src/services/helper/Parser.ts +108 -0
  139. package/src/services/helper/Urls.ts +109 -0
  140. package/src/types/Authentication.ts +16 -0
  141. package/src/types/HTTP.ts +23 -0
  142. package/src/types/Service.ts +36 -0
  143. package/src/types/Tweet.ts +44 -0
  144. package/src/types/UserAccount.ts +21 -0
  145. package/src/types/graphql/Errors.ts +16 -0
  146. package/src/types/raw/auth/Cookie.ts +16 -0
  147. package/src/types/raw/tweet/Favouriters.ts +193 -0
  148. package/src/types/raw/tweet/Retweeters.ts +201 -0
  149. package/src/types/raw/tweet/Tweet.ts +882 -0
  150. package/src/types/raw/tweet/Tweets.ts +444 -0
  151. package/src/types/raw/user/Followers.ts +208 -0
  152. package/src/types/raw/user/Following.ts +208 -0
  153. package/src/types/raw/user/Likes.ts +1247 -0
  154. package/src/types/raw/user/Tweets.ts +2847 -0
  155. package/src/types/raw/user/User.ts +135 -0
  156. package/tsconfig.json +95 -0
@@ -0,0 +1,135 @@
1
+ export default interface Root {
2
+ data: Data
3
+ }
4
+
5
+ export interface Data {
6
+ user: User
7
+ }
8
+
9
+ export interface User {
10
+ result: Result
11
+ }
12
+
13
+ export interface Result {
14
+ __typename: string
15
+ id: string
16
+ rest_id: string
17
+ affiliates_highlighted_label: AffiliatesHighlightedLabel
18
+ has_nft_avatar: boolean
19
+ legacy: Legacy
20
+ smart_blocked_by: boolean
21
+ smart_blocking: boolean
22
+ super_follow_eligible: boolean
23
+ super_followed_by: boolean
24
+ super_following: boolean
25
+ legacy_extended_profile: LegacyExtendedProfile
26
+ is_profile_translatable: boolean
27
+ }
28
+
29
+ export interface AffiliatesHighlightedLabel { }
30
+
31
+ export interface Legacy {
32
+ blocked_by: boolean
33
+ blocking: boolean
34
+ can_dm: boolean
35
+ can_media_tag: boolean
36
+ created_at: string
37
+ default_profile: boolean
38
+ default_profile_image: boolean
39
+ description: string
40
+ entities: Entities
41
+ fast_followers_count: number
42
+ favourites_count: number
43
+ follow_request_sent: boolean
44
+ followed_by: boolean
45
+ followers_count: number
46
+ following: boolean
47
+ friends_count: number
48
+ has_custom_timelines: boolean
49
+ is_translator: boolean
50
+ listed_count: number
51
+ location: string
52
+ media_count: number
53
+ muting: boolean
54
+ name: string
55
+ normal_followers_count: number
56
+ notifications: boolean
57
+ pinned_tweet_ids_str: any[]
58
+ possibly_sensitive: boolean
59
+ profile_banner_extensions: ProfileBannerExtensions
60
+ profile_banner_url: string
61
+ profile_image_extensions: ProfileImageExtensions
62
+ profile_image_url_https: string
63
+ profile_interstitial_type: string
64
+ protected: boolean
65
+ screen_name: string
66
+ statuses_count: number
67
+ translator_type: string
68
+ verified: boolean
69
+ want_retweets: boolean
70
+ withheld_in_countries: any[]
71
+ }
72
+
73
+ export interface Entities {
74
+ description: Description
75
+ }
76
+
77
+ export interface Description {
78
+ urls: any[]
79
+ }
80
+
81
+ export interface ProfileBannerExtensions {
82
+ mediaColor: MediaColor
83
+ }
84
+
85
+ export interface MediaColor {
86
+ r: R
87
+ }
88
+
89
+ export interface R {
90
+ ok: Ok
91
+ }
92
+
93
+ export interface Ok {
94
+ palette: Palette[]
95
+ }
96
+
97
+ export interface Palette {
98
+ percentage: number
99
+ rgb: Rgb
100
+ }
101
+
102
+ export interface Rgb {
103
+ blue: number
104
+ green: number
105
+ red: number
106
+ }
107
+
108
+ export interface ProfileImageExtensions {
109
+ mediaColor: MediaColor2
110
+ }
111
+
112
+ export interface MediaColor2 {
113
+ r: R2
114
+ }
115
+
116
+ export interface R2 {
117
+ ok: Ok2
118
+ }
119
+
120
+ export interface Ok2 {
121
+ palette: Palette2[]
122
+ }
123
+
124
+ export interface Palette2 {
125
+ percentage: number
126
+ rgb: Rgb2
127
+ }
128
+
129
+ export interface Rgb2 {
130
+ blue: number
131
+ green: number
132
+ red: number
133
+ }
134
+
135
+ export interface LegacyExtendedProfile { }
package/tsconfig.json ADDED
@@ -0,0 +1,95 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Visit https://aka.ms/tsconfig to read more about this file */
4
+ /* Projects */
5
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
6
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
7
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
8
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
9
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
10
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
11
+ /* Language and Environment */
12
+ // "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
13
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
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. */
17
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
18
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
19
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
20
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
21
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
22
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
23
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
24
+ /* Modules */
25
+ // "module": "commonjs", /* Specify what module code is generated. */
26
+ // "rootDir": "./", /* Specify the root folder within your source files. */
27
+ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */
28
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
29
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
30
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
31
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
32
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
33
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
34
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
35
+ // "resolveJsonModule": true, /* Enable importing .json files. */
36
+ // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
37
+ /* JavaScript Support */
38
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
39
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
40
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
41
+ /* Emit */
42
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
43
+ // "declarationMap": true, /* Create sourcemaps for d.ts files. */
44
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
45
+ "sourceMap": true, /* Create source map files for emitted JavaScript files. */
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. */
48
+ // "removeComments": true, /* Disable emitting comments. */
49
+ // "noEmit": true, /* Disable emitting files from a compilation. */
50
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
51
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
52
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
53
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
54
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
55
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
56
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
57
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
58
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
59
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
60
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
61
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
62
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
63
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
64
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
65
+ /* Interop Constraints */
66
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
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. */
69
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
70
+ // "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
71
+ /* Type Checking */
72
+ "strict": true, /* Enable all strict type-checking options. */
73
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
74
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
75
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
76
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
77
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
78
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
79
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
80
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
81
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
82
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
83
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
84
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
85
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
86
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
87
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
88
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
89
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
90
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
91
+ /* Completeness */
92
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
93
+ // "skipLibCheck": true /* Skip type checking all .d.ts files. */
94
+ }
95
+ }