twitter-openapi-typescript-generated 0.0.11 → 0.0.13

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 (261) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/LICENSE +31 -31
  3. package/LICENSE.AGPL +660 -660
  4. package/README.md +2 -2
  5. package/dist/apis/DefaultApi.d.ts.map +1 -1
  6. package/dist/apis/DefaultApi.js +86 -18
  7. package/dist/apis/DefaultApi.js.map +1 -1
  8. package/dist/apis/OtherApi.d.ts.map +1 -1
  9. package/dist/apis/OtherApi.js +43 -9
  10. package/dist/apis/OtherApi.js.map +1 -1
  11. package/dist/apis/PostApi.d.ts.map +1 -1
  12. package/dist/apis/PostApi.js +264 -60
  13. package/dist/apis/PostApi.js.map +1 -1
  14. package/dist/apis/TweetApi.d.ts +1 -2
  15. package/dist/apis/TweetApi.d.ts.map +1 -1
  16. package/dist/apis/TweetApi.js +479 -111
  17. package/dist/apis/TweetApi.js.map +1 -1
  18. package/dist/apis/UserApi.d.ts +1 -0
  19. package/dist/apis/UserApi.d.ts.map +1 -1
  20. package/dist/apis/UserApi.js +92 -18
  21. package/dist/apis/UserApi.js.map +1 -1
  22. package/dist/apis/UserListApi.d.ts +0 -1
  23. package/dist/apis/UserListApi.d.ts.map +1 -1
  24. package/dist/apis/UserListApi.js +215 -51
  25. package/dist/apis/UserListApi.js.map +1 -1
  26. package/dist/apis/UsersApi.d.ts.map +1 -1
  27. package/dist/apis/UsersApi.js +43 -9
  28. package/dist/apis/UsersApi.js.map +1 -1
  29. package/dist/apis/V11GetApi.d.ts.map +1 -1
  30. package/dist/apis/V11GetApi.js +86 -18
  31. package/dist/apis/V11GetApi.js.map +1 -1
  32. package/dist/apis/V11PostApi.d.ts.map +1 -1
  33. package/dist/apis/V11PostApi.js +72 -6
  34. package/dist/apis/V11PostApi.js.map +1 -1
  35. package/dist/apis/V20GetApi.d.ts.map +1 -1
  36. package/dist/apis/V20GetApi.js +43 -9
  37. package/dist/apis/V20GetApi.js.map +1 -1
  38. package/dist/models/BirdwatchEntity.d.ts +45 -0
  39. package/dist/models/BirdwatchEntity.d.ts.map +1 -0
  40. package/dist/models/BirdwatchEntity.js +58 -0
  41. package/dist/models/BirdwatchEntity.js.map +1 -0
  42. package/dist/models/BirdwatchEntityRef.d.ts +58 -0
  43. package/dist/models/BirdwatchEntityRef.d.ts.map +1 -0
  44. package/dist/models/BirdwatchEntityRef.js +69 -0
  45. package/dist/models/BirdwatchEntityRef.js.map +1 -0
  46. package/dist/models/BirdwatchPivot.d.ts +91 -0
  47. package/dist/models/BirdwatchPivot.d.ts.map +1 -0
  48. package/dist/models/BirdwatchPivot.js +87 -0
  49. package/dist/models/BirdwatchPivot.js.map +1 -0
  50. package/dist/models/BirdwatchPivotFooter.d.ts +39 -0
  51. package/dist/models/BirdwatchPivotFooter.d.ts.map +1 -0
  52. package/dist/models/BirdwatchPivotFooter.js +55 -0
  53. package/dist/models/BirdwatchPivotFooter.js.map +1 -0
  54. package/dist/models/BirdwatchPivotNote.d.ts +32 -0
  55. package/dist/models/BirdwatchPivotNote.d.ts.map +1 -0
  56. package/dist/models/BirdwatchPivotNote.js +51 -0
  57. package/dist/models/BirdwatchPivotNote.js.map +1 -0
  58. package/dist/models/BirdwatchPivotSubtitle.d.ts +39 -0
  59. package/dist/models/BirdwatchPivotSubtitle.d.ts.map +1 -0
  60. package/dist/models/BirdwatchPivotSubtitle.js +55 -0
  61. package/dist/models/BirdwatchPivotSubtitle.js.map +1 -0
  62. package/dist/models/ContentItemType.d.ts +1 -0
  63. package/dist/models/ContentItemType.d.ts.map +1 -1
  64. package/dist/models/ContentItemType.js +2 -1
  65. package/dist/models/ContentItemType.js.map +1 -1
  66. package/dist/models/CoverCta.d.ts +1 -1
  67. package/dist/models/CoverCta.d.ts.map +1 -1
  68. package/dist/models/CoverCta.js +1 -2
  69. package/dist/models/CoverCta.js.map +1 -1
  70. package/dist/models/DeleteRetweet.d.ts +33 -0
  71. package/dist/models/DeleteRetweet.d.ts.map +1 -0
  72. package/dist/models/DeleteRetweet.js +52 -0
  73. package/dist/models/DeleteRetweet.js.map +1 -0
  74. package/dist/models/DeleteRetweetResponseResult.d.ts +33 -0
  75. package/dist/models/DeleteRetweetResponseResult.d.ts.map +1 -0
  76. package/dist/models/DeleteRetweetResponseResult.js +52 -0
  77. package/dist/models/DeleteRetweetResponseResult.js.map +1 -0
  78. package/dist/models/ErrorResponse.d.ts +33 -0
  79. package/dist/models/ErrorResponse.d.ts.map +1 -0
  80. package/dist/models/ErrorResponse.js +52 -0
  81. package/dist/models/ErrorResponse.js.map +1 -0
  82. package/dist/models/ExtMediaAvailability.d.ts +7 -0
  83. package/dist/models/ExtMediaAvailability.d.ts.map +1 -1
  84. package/dist/models/ExtMediaAvailability.js +4 -1
  85. package/dist/models/ExtMediaAvailability.js.map +1 -1
  86. package/dist/models/Extensions.d.ts +57 -0
  87. package/dist/models/Extensions.d.ts.map +1 -0
  88. package/dist/models/Extensions.js +64 -0
  89. package/dist/models/Extensions.js.map +1 -0
  90. package/dist/models/ItemContentUnion.d.ts +3 -0
  91. package/dist/models/ItemContentUnion.d.ts.map +1 -1
  92. package/dist/models/ItemContentUnion.js +5 -0
  93. package/dist/models/ItemContentUnion.js.map +1 -1
  94. package/dist/models/ListTweetsTimeline.d.ts +1 -1
  95. package/dist/models/ListTweetsTimeline.d.ts.map +1 -1
  96. package/dist/models/ListTweetsTimeline.js +2 -2
  97. package/dist/models/ListTweetsTimeline.js.map +1 -1
  98. package/dist/models/MediaExtended.d.ts +1 -1
  99. package/dist/models/MediaExtended.d.ts.map +1 -1
  100. package/dist/models/MediaExtended.js +1 -2
  101. package/dist/models/MediaExtended.js.map +1 -1
  102. package/dist/models/NoteTweet.d.ts +39 -0
  103. package/dist/models/NoteTweet.d.ts.map +1 -0
  104. package/dist/models/NoteTweet.js +55 -0
  105. package/dist/models/NoteTweet.js.map +1 -0
  106. package/dist/models/NoteTweetResult.d.ts +33 -0
  107. package/dist/models/NoteTweetResult.d.ts.map +1 -0
  108. package/dist/models/NoteTweetResult.js +52 -0
  109. package/dist/models/NoteTweetResult.js.map +1 -0
  110. package/dist/models/NoteTweetResultData.d.ts +59 -0
  111. package/dist/models/NoteTweetResultData.d.ts.map +1 -0
  112. package/dist/models/NoteTweetResultData.js +65 -0
  113. package/dist/models/NoteTweetResultData.js.map +1 -0
  114. package/dist/models/NoteTweetResultMedia.d.ts +32 -0
  115. package/dist/models/NoteTweetResultMedia.d.ts.map +1 -0
  116. package/dist/models/NoteTweetResultMedia.js +51 -0
  117. package/dist/models/NoteTweetResultMedia.js.map +1 -0
  118. package/dist/models/NoteTweetResultRichText.d.ts +33 -0
  119. package/dist/models/NoteTweetResultRichText.d.ts.map +1 -0
  120. package/dist/models/NoteTweetResultRichText.js +52 -0
  121. package/dist/models/NoteTweetResultRichText.js.map +1 -0
  122. package/dist/models/NoteTweetResultRichTextTag.d.ts +52 -0
  123. package/dist/models/NoteTweetResultRichTextTag.d.ts.map +1 -0
  124. package/dist/models/NoteTweetResultRichTextTag.js +64 -0
  125. package/dist/models/NoteTweetResultRichTextTag.js.map +1 -0
  126. package/dist/models/PostCreateTweetRequestFeatures.d.ts +9 -15
  127. package/dist/models/PostCreateTweetRequestFeatures.d.ts.map +1 -1
  128. package/dist/models/PostCreateTweetRequestFeatures.js +9 -12
  129. package/dist/models/PostCreateTweetRequestFeatures.js.map +1 -1
  130. package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts +3 -2
  131. package/dist/models/PostCreateTweetRequestVariablesMedia.d.ts.map +1 -1
  132. package/dist/models/PostCreateTweetRequestVariablesMedia.js +3 -2
  133. package/dist/models/PostCreateTweetRequestVariablesMedia.js.map +1 -1
  134. package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.d.ts +38 -0
  135. package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.d.ts.map +1 -0
  136. package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.js +54 -0
  137. package/dist/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.js.map +1 -0
  138. package/dist/models/TimelineCommunity.d.ts +34 -0
  139. package/dist/models/TimelineCommunity.d.ts.map +1 -0
  140. package/dist/models/TimelineCommunity.js +59 -0
  141. package/dist/models/TimelineCommunity.js.map +1 -0
  142. package/dist/models/Tweet.d.ts +20 -0
  143. package/dist/models/Tweet.d.ts.map +1 -1
  144. package/dist/models/Tweet.js +8 -0
  145. package/dist/models/Tweet.js.map +1 -1
  146. package/dist/models/TypeName.d.ts +1 -0
  147. package/dist/models/TypeName.d.ts.map +1 -1
  148. package/dist/models/TypeName.js +1 -0
  149. package/dist/models/TypeName.js.map +1 -1
  150. package/dist/models/UserResults.d.ts +1 -1
  151. package/dist/models/UserResults.d.ts.map +1 -1
  152. package/dist/models/UserResults.js +2 -2
  153. package/dist/models/UserResults.js.map +1 -1
  154. package/dist/models/index.d.ts +18 -0
  155. package/dist/models/index.d.ts.map +1 -1
  156. package/dist/models/index.js +18 -0
  157. package/dist/models/index.js.map +1 -1
  158. package/package.json +2 -3
  159. package/src/apis/DefaultApi.ts +94 -6
  160. package/src/apis/OtherApi.ts +47 -3
  161. package/src/apis/PostApi.ts +282 -18
  162. package/src/apis/TweetApi.ts +526 -51
  163. package/src/apis/UserApi.ts +103 -6
  164. package/src/apis/UserListApi.ts +235 -24
  165. package/src/apis/UsersApi.ts +47 -3
  166. package/src/apis/V11GetApi.ts +94 -6
  167. package/src/apis/V11PostApi.ts +94 -6
  168. package/src/apis/V20GetApi.ts +47 -3
  169. package/src/models/BirdwatchEntity.ts +91 -0
  170. package/src/models/BirdwatchEntityRef.ts +102 -0
  171. package/src/models/BirdwatchPivot.ts +165 -0
  172. package/src/models/BirdwatchPivotFooter.ts +82 -0
  173. package/src/models/BirdwatchPivotNote.ts +66 -0
  174. package/src/models/BirdwatchPivotSubtitle.ts +82 -0
  175. package/src/models/ContentItemType.ts +2 -1
  176. package/src/models/CoverCta.ts +2 -3
  177. package/src/models/DeleteRetweet.ts +73 -0
  178. package/src/models/DeleteRetweetResponseResult.ts +72 -0
  179. package/src/models/ErrorResponse.ts +73 -0
  180. package/src/models/ExtMediaAvailability.ts +10 -1
  181. package/src/models/Extensions.ts +109 -0
  182. package/src/models/ItemContentUnion.ts +12 -1
  183. package/src/models/ListTweetsTimeline.ts +2 -3
  184. package/src/models/MediaExtended.ts +2 -3
  185. package/src/models/NoteTweet.ts +82 -0
  186. package/src/models/NoteTweetResult.ts +73 -0
  187. package/src/models/NoteTweetResultData.ts +119 -0
  188. package/src/models/NoteTweetResultMedia.ts +66 -0
  189. package/src/models/NoteTweetResultRichText.ts +73 -0
  190. package/src/models/NoteTweetResultRichTextTag.ts +95 -0
  191. package/src/models/PostCreateTweetRequestFeatures.ts +18 -27
  192. package/src/models/PostCreateTweetRequestVariablesMedia.ts +11 -4
  193. package/src/models/PostCreateTweetRequestVariablesMediaMediaEntitiesInner.ts +75 -0
  194. package/src/models/TimelineCommunity.ts +75 -0
  195. package/src/models/Tweet.ts +36 -0
  196. package/src/models/TypeName.ts +1 -0
  197. package/src/models/UserResults.ts +2 -3
  198. package/src/models/index.ts +18 -0
  199. package/tools/openapi-generator-config.yaml +1 -1
  200. package/twitter-openapi/.vscode/launch.json +8 -0
  201. package/twitter-openapi/README.md +2 -0
  202. package/twitter-openapi/dist/compatible/openapi-3.0.yaml +5189 -34
  203. package/twitter-openapi/dist/docs/openapi-3.0.yaml +6987 -34
  204. package/twitter-openapi/src/config/component/security_schemes.yaml +148 -0
  205. package/twitter-openapi/src/config/placeholder.json +145 -112
  206. package/twitter-openapi/src/openapi/paths/timeline.yaml +0 -2
  207. package/twitter-openapi/src/openapi/schemas/content.yaml +9 -1
  208. package/twitter-openapi/src/openapi/schemas/general.yaml +2 -2
  209. package/twitter-openapi/src/openapi/schemas/instruction.yaml +0 -1
  210. package/twitter-openapi/src/openapi/schemas/tweet.yaml +169 -2
  211. package/twitter-openapi/src/openapi/schemas/typename.yaml +1 -0
  212. package/twitter-openapi/src/openapi/schemas/user.yaml +0 -2
  213. package/twitter-openapi/test/python/test_serialize.py +24 -0
  214. package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
  215. package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
  216. package/twitter-openapi/tools/build.py +35 -31
  217. package/twitter-openapi/tools/build_config.py +7 -10
  218. package/twitter-openapi/dist/compatible/paths/bookmarks.yaml +0 -107
  219. package/twitter-openapi/dist/compatible/paths/follow.yaml +0 -301
  220. package/twitter-openapi/dist/compatible/paths/other.yaml +0 -99
  221. package/twitter-openapi/dist/compatible/paths/post.yaml +0 -714
  222. package/twitter-openapi/dist/compatible/paths/profile.yaml +0 -126
  223. package/twitter-openapi/dist/compatible/paths/timeline.yaml +0 -416
  224. package/twitter-openapi/dist/compatible/paths/tweet.yaml +0 -397
  225. package/twitter-openapi/dist/compatible/paths/user.yaml +0 -233
  226. package/twitter-openapi/dist/compatible/paths/usertweets.yaml +0 -504
  227. package/twitter-openapi/dist/compatible/paths/v1.1-get.yaml +0 -242
  228. package/twitter-openapi/dist/compatible/paths/v1.1-post.yaml +0 -237
  229. package/twitter-openapi/dist/compatible/paths/v2.0-get.yaml +0 -302
  230. package/twitter-openapi/dist/compatible/resources/parameters.yaml +0 -13
  231. package/twitter-openapi/dist/compatible/response/error.yaml +0 -90
  232. package/twitter-openapi/dist/compatible/schemas/content.yaml +0 -214
  233. package/twitter-openapi/dist/compatible/schemas/error.yaml +0 -94
  234. package/twitter-openapi/dist/compatible/schemas/general.yaml +0 -13
  235. package/twitter-openapi/dist/compatible/schemas/instruction.yaml +0 -286
  236. package/twitter-openapi/dist/compatible/schemas/timeline.yaml +0 -27
  237. package/twitter-openapi/dist/compatible/schemas/tweet.yaml +0 -508
  238. package/twitter-openapi/dist/compatible/schemas/typename.yaml +0 -23
  239. package/twitter-openapi/dist/compatible/schemas/user.yaml +0 -222
  240. package/twitter-openapi/dist/docs/paths/bookmarks.yaml +0 -201
  241. package/twitter-openapi/dist/docs/paths/follow.yaml +0 -587
  242. package/twitter-openapi/dist/docs/paths/other.yaml +0 -99
  243. package/twitter-openapi/dist/docs/paths/post.yaml +0 -692
  244. package/twitter-openapi/dist/docs/paths/profile.yaml +0 -134
  245. package/twitter-openapi/dist/docs/paths/timeline.yaml +0 -811
  246. package/twitter-openapi/dist/docs/paths/tweet.yaml +0 -797
  247. package/twitter-openapi/dist/docs/paths/user.yaml +0 -338
  248. package/twitter-openapi/dist/docs/paths/usertweets.yaml +0 -1046
  249. package/twitter-openapi/dist/docs/paths/v1.1-get.yaml +0 -242
  250. package/twitter-openapi/dist/docs/paths/v1.1-post.yaml +0 -237
  251. package/twitter-openapi/dist/docs/paths/v2.0-get.yaml +0 -302
  252. package/twitter-openapi/dist/docs/resources/parameters.yaml +0 -13
  253. package/twitter-openapi/dist/docs/response/error.yaml +0 -90
  254. package/twitter-openapi/dist/docs/schemas/content.yaml +0 -214
  255. package/twitter-openapi/dist/docs/schemas/error.yaml +0 -94
  256. package/twitter-openapi/dist/docs/schemas/general.yaml +0 -13
  257. package/twitter-openapi/dist/docs/schemas/instruction.yaml +0 -286
  258. package/twitter-openapi/dist/docs/schemas/timeline.yaml +0 -27
  259. package/twitter-openapi/dist/docs/schemas/tweet.yaml +0 -508
  260. package/twitter-openapi/dist/docs/schemas/typename.yaml +0 -23
  261. package/twitter-openapi/dist/docs/schemas/user.yaml +0 -222
@@ -0,0 +1,109 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Tracing } from './Tracing';
17
+ import {
18
+ TracingFromJSON,
19
+ TracingFromJSONTyped,
20
+ TracingToJSON,
21
+ } from './Tracing';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface Extensions
27
+ */
28
+ export interface Extensions {
29
+ /**
30
+ *
31
+ * @type {number}
32
+ * @memberof Extensions
33
+ */
34
+ code: number;
35
+ /**
36
+ *
37
+ * @type {string}
38
+ * @memberof Extensions
39
+ */
40
+ kind: string;
41
+ /**
42
+ *
43
+ * @type {string}
44
+ * @memberof Extensions
45
+ */
46
+ name: string;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof Extensions
51
+ */
52
+ source: string;
53
+ /**
54
+ *
55
+ * @type {Tracing}
56
+ * @memberof Extensions
57
+ */
58
+ tracing: Tracing;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the Extensions interface.
63
+ */
64
+ export function instanceOfExtensions(value: object): boolean {
65
+ let isInstance = true;
66
+ isInstance = isInstance && "code" in value;
67
+ isInstance = isInstance && "kind" in value;
68
+ isInstance = isInstance && "name" in value;
69
+ isInstance = isInstance && "source" in value;
70
+ isInstance = isInstance && "tracing" in value;
71
+
72
+ return isInstance;
73
+ }
74
+
75
+ export function ExtensionsFromJSON(json: any): Extensions {
76
+ return ExtensionsFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function ExtensionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): Extensions {
80
+ if ((json === undefined) || (json === null)) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'code': json['code'],
86
+ 'kind': json['kind'],
87
+ 'name': json['name'],
88
+ 'source': json['source'],
89
+ 'tracing': TracingFromJSON(json['tracing']),
90
+ };
91
+ }
92
+
93
+ export function ExtensionsToJSON(value?: Extensions | null): any {
94
+ if (value === undefined) {
95
+ return undefined;
96
+ }
97
+ if (value === null) {
98
+ return null;
99
+ }
100
+ return {
101
+
102
+ 'code': value.code,
103
+ 'kind': value.kind,
104
+ 'name': value.name,
105
+ 'source': value.source,
106
+ 'tracing': TracingToJSON(value.tracing),
107
+ };
108
+ }
109
+
@@ -12,6 +12,13 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
+ import {
16
+ TimelineCommunity,
17
+ instanceOfTimelineCommunity,
18
+ TimelineCommunityFromJSON,
19
+ TimelineCommunityFromJSONTyped,
20
+ TimelineCommunityToJSON,
21
+ } from './TimelineCommunity';
15
22
  import {
16
23
  TimelineMessagePrompt,
17
24
  instanceOfTimelineMessagePrompt,
@@ -53,7 +60,7 @@ import {
53
60
  *
54
61
  * @export
55
62
  */
56
- export type ItemContentUnion = { typename: 'TimelineMessagePrompt' } & TimelineMessagePrompt | { typename: 'TimelinePrompt' } & TimelinePrompt | { typename: 'TimelineTimelineCursor' } & TimelineTimelineCursor | { typename: 'TimelineTweet' } & TimelineTweet | { typename: 'TimelineUser' } & TimelineUser;
63
+ export type ItemContentUnion = { typename: 'TimelineCommunity' } & TimelineCommunity | { typename: 'TimelineMessagePrompt' } & TimelineMessagePrompt | { typename: 'TimelinePrompt' } & TimelinePrompt | { typename: 'TimelineTimelineCursor' } & TimelineTimelineCursor | { typename: 'TimelineTweet' } & TimelineTweet | { typename: 'TimelineUser' } & TimelineUser;
57
64
 
58
65
  export function ItemContentUnionFromJSON(json: any): ItemContentUnion {
59
66
  return ItemContentUnionFromJSONTyped(json, false);
@@ -64,6 +71,8 @@ export function ItemContentUnionFromJSONTyped(json: any, ignoreDiscriminator: bo
64
71
  return json;
65
72
  }
66
73
  switch (json['__typename']) {
74
+ case 'TimelineCommunity':
75
+ return {...TimelineCommunityFromJSONTyped(json, true), typename: 'TimelineCommunity'};
67
76
  case 'TimelineMessagePrompt':
68
77
  return {...TimelineMessagePromptFromJSONTyped(json, true), typename: 'TimelineMessagePrompt'};
69
78
  case 'TimelinePrompt':
@@ -87,6 +96,8 @@ export function ItemContentUnionToJSON(value?: ItemContentUnion | null): any {
87
96
  return null;
88
97
  }
89
98
  switch (value['typename']) {
99
+ case 'TimelineCommunity':
100
+ return TimelineCommunityToJSON(value);
90
101
  case 'TimelineMessagePrompt':
91
102
  return TimelineMessagePromptToJSON(value);
92
103
  case 'TimelinePrompt':
@@ -31,7 +31,7 @@ export interface ListTweetsTimeline {
31
31
  * @type {Timeline}
32
32
  * @memberof ListTweetsTimeline
33
33
  */
34
- timeline: Timeline;
34
+ timeline?: Timeline;
35
35
  }
36
36
 
37
37
  /**
@@ -39,7 +39,6 @@ export interface ListTweetsTimeline {
39
39
  */
40
40
  export function instanceOfListTweetsTimeline(value: object): boolean {
41
41
  let isInstance = true;
42
- isInstance = isInstance && "timeline" in value;
43
42
 
44
43
  return isInstance;
45
44
  }
@@ -54,7 +53,7 @@ export function ListTweetsTimelineFromJSONTyped(json: any, ignoreDiscriminator:
54
53
  }
55
54
  return {
56
55
 
57
- 'timeline': TimelineFromJSON(json['timeline']),
56
+ 'timeline': !exists(json, 'timeline') ? undefined : TimelineFromJSON(json['timeline']),
58
57
  };
59
58
  }
60
59
 
@@ -79,7 +79,7 @@ export interface MediaExtended {
79
79
  * @type {ExtMediaAvailability}
80
80
  * @memberof MediaExtended
81
81
  */
82
- extMediaAvailability: ExtMediaAvailability;
82
+ extMediaAvailability?: ExtMediaAvailability;
83
83
  /**
84
84
  *
85
85
  * @type {object}
@@ -167,7 +167,6 @@ export function instanceOfMediaExtended(value: object): boolean {
167
167
  let isInstance = true;
168
168
  isInstance = isInstance && "displayUrl" in value;
169
169
  isInstance = isInstance && "expandedUrl" in value;
170
- isInstance = isInstance && "extMediaAvailability" in value;
171
170
  isInstance = isInstance && "idStr" in value;
172
171
  isInstance = isInstance && "indices" in value;
173
172
  isInstance = isInstance && "mediaKey" in value;
@@ -193,7 +192,7 @@ export function MediaExtendedFromJSONTyped(json: any, ignoreDiscriminator: boole
193
192
  'additionalMediaInfo': !exists(json, 'additional_media_info') ? undefined : AdditionalMediaInfoFromJSON(json['additional_media_info']),
194
193
  'displayUrl': json['display_url'],
195
194
  'expandedUrl': json['expanded_url'],
196
- 'extMediaAvailability': ExtMediaAvailabilityFromJSON(json['ext_media_availability']),
195
+ 'extMediaAvailability': !exists(json, 'ext_media_availability') ? undefined : ExtMediaAvailabilityFromJSON(json['ext_media_availability']),
197
196
  'features': !exists(json, 'features') ? undefined : json['features'],
198
197
  'idStr': json['id_str'],
199
198
  'indices': json['indices'],
@@ -0,0 +1,82 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { NoteTweetResult } from './NoteTweetResult';
17
+ import {
18
+ NoteTweetResultFromJSON,
19
+ NoteTweetResultFromJSONTyped,
20
+ NoteTweetResultToJSON,
21
+ } from './NoteTweetResult';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface NoteTweet
27
+ */
28
+ export interface NoteTweet {
29
+ /**
30
+ *
31
+ * @type {boolean}
32
+ * @memberof NoteTweet
33
+ */
34
+ isExpandable: boolean;
35
+ /**
36
+ *
37
+ * @type {NoteTweetResult}
38
+ * @memberof NoteTweet
39
+ */
40
+ noteTweetResults: NoteTweetResult;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the NoteTweet interface.
45
+ */
46
+ export function instanceOfNoteTweet(value: object): boolean {
47
+ let isInstance = true;
48
+ isInstance = isInstance && "isExpandable" in value;
49
+ isInstance = isInstance && "noteTweetResults" in value;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function NoteTweetFromJSON(json: any): NoteTweet {
55
+ return NoteTweetFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function NoteTweetFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweet {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'isExpandable': json['is_expandable'],
65
+ 'noteTweetResults': NoteTweetResultFromJSON(json['note_tweet_results']),
66
+ };
67
+ }
68
+
69
+ export function NoteTweetToJSON(value?: NoteTweet | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'is_expandable': value.isExpandable,
79
+ 'note_tweet_results': NoteTweetResultToJSON(value.noteTweetResults),
80
+ };
81
+ }
82
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { NoteTweetResultData } from './NoteTweetResultData';
17
+ import {
18
+ NoteTweetResultDataFromJSON,
19
+ NoteTweetResultDataFromJSONTyped,
20
+ NoteTweetResultDataToJSON,
21
+ } from './NoteTweetResultData';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface NoteTweetResult
27
+ */
28
+ export interface NoteTweetResult {
29
+ /**
30
+ *
31
+ * @type {NoteTweetResultData}
32
+ * @memberof NoteTweetResult
33
+ */
34
+ result: NoteTweetResultData;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the NoteTweetResult interface.
39
+ */
40
+ export function instanceOfNoteTweetResult(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "result" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function NoteTweetResultFromJSON(json: any): NoteTweetResult {
48
+ return NoteTweetResultFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function NoteTweetResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweetResult {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'result': NoteTweetResultDataFromJSON(json['result']),
58
+ };
59
+ }
60
+
61
+ export function NoteTweetResultToJSON(value?: NoteTweetResult | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'result': NoteTweetResultDataToJSON(value.result),
71
+ };
72
+ }
73
+
@@ -0,0 +1,119 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { Entities } from './Entities';
17
+ import {
18
+ EntitiesFromJSON,
19
+ EntitiesFromJSONTyped,
20
+ EntitiesToJSON,
21
+ } from './Entities';
22
+ import type { NoteTweetResultMedia } from './NoteTweetResultMedia';
23
+ import {
24
+ NoteTweetResultMediaFromJSON,
25
+ NoteTweetResultMediaFromJSONTyped,
26
+ NoteTweetResultMediaToJSON,
27
+ } from './NoteTweetResultMedia';
28
+ import type { NoteTweetResultRichText } from './NoteTweetResultRichText';
29
+ import {
30
+ NoteTweetResultRichTextFromJSON,
31
+ NoteTweetResultRichTextFromJSONTyped,
32
+ NoteTweetResultRichTextToJSON,
33
+ } from './NoteTweetResultRichText';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface NoteTweetResultData
39
+ */
40
+ export interface NoteTweetResultData {
41
+ /**
42
+ *
43
+ * @type {Entities}
44
+ * @memberof NoteTweetResultData
45
+ */
46
+ entitySet: Entities;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof NoteTweetResultData
51
+ */
52
+ id: string;
53
+ /**
54
+ *
55
+ * @type {NoteTweetResultMedia}
56
+ * @memberof NoteTweetResultData
57
+ */
58
+ media?: NoteTweetResultMedia;
59
+ /**
60
+ *
61
+ * @type {NoteTweetResultRichText}
62
+ * @memberof NoteTweetResultData
63
+ */
64
+ richtext?: NoteTweetResultRichText;
65
+ /**
66
+ *
67
+ * @type {string}
68
+ * @memberof NoteTweetResultData
69
+ */
70
+ text: string;
71
+ }
72
+
73
+ /**
74
+ * Check if a given object implements the NoteTweetResultData interface.
75
+ */
76
+ export function instanceOfNoteTweetResultData(value: object): boolean {
77
+ let isInstance = true;
78
+ isInstance = isInstance && "entitySet" in value;
79
+ isInstance = isInstance && "id" in value;
80
+ isInstance = isInstance && "text" in value;
81
+
82
+ return isInstance;
83
+ }
84
+
85
+ export function NoteTweetResultDataFromJSON(json: any): NoteTweetResultData {
86
+ return NoteTweetResultDataFromJSONTyped(json, false);
87
+ }
88
+
89
+ export function NoteTweetResultDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweetResultData {
90
+ if ((json === undefined) || (json === null)) {
91
+ return json;
92
+ }
93
+ return {
94
+
95
+ 'entitySet': EntitiesFromJSON(json['entity_set']),
96
+ 'id': json['id'],
97
+ 'media': !exists(json, 'media') ? undefined : NoteTweetResultMediaFromJSON(json['media']),
98
+ 'richtext': !exists(json, 'richtext') ? undefined : NoteTweetResultRichTextFromJSON(json['richtext']),
99
+ 'text': json['text'],
100
+ };
101
+ }
102
+
103
+ export function NoteTweetResultDataToJSON(value?: NoteTweetResultData | null): any {
104
+ if (value === undefined) {
105
+ return undefined;
106
+ }
107
+ if (value === null) {
108
+ return null;
109
+ }
110
+ return {
111
+
112
+ 'entity_set': EntitiesToJSON(value.entitySet),
113
+ 'id': value.id,
114
+ 'media': NoteTweetResultMediaToJSON(value.media),
115
+ 'richtext': NoteTweetResultRichTextToJSON(value.richtext),
116
+ 'text': value.text,
117
+ };
118
+ }
119
+
@@ -0,0 +1,66 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface NoteTweetResultMedia
20
+ */
21
+ export interface NoteTweetResultMedia {
22
+ /**
23
+ *
24
+ * @type {Array<object>}
25
+ * @memberof NoteTweetResultMedia
26
+ */
27
+ inlineMedia: Array<object>;
28
+ }
29
+
30
+ /**
31
+ * Check if a given object implements the NoteTweetResultMedia interface.
32
+ */
33
+ export function instanceOfNoteTweetResultMedia(value: object): boolean {
34
+ let isInstance = true;
35
+ isInstance = isInstance && "inlineMedia" in value;
36
+
37
+ return isInstance;
38
+ }
39
+
40
+ export function NoteTweetResultMediaFromJSON(json: any): NoteTweetResultMedia {
41
+ return NoteTweetResultMediaFromJSONTyped(json, false);
42
+ }
43
+
44
+ export function NoteTweetResultMediaFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweetResultMedia {
45
+ if ((json === undefined) || (json === null)) {
46
+ return json;
47
+ }
48
+ return {
49
+
50
+ 'inlineMedia': json['inline_media'],
51
+ };
52
+ }
53
+
54
+ export function NoteTweetResultMediaToJSON(value?: NoteTweetResultMedia | null): any {
55
+ if (value === undefined) {
56
+ return undefined;
57
+ }
58
+ if (value === null) {
59
+ return null;
60
+ }
61
+ return {
62
+
63
+ 'inline_media': value.inlineMedia,
64
+ };
65
+ }
66
+
@@ -0,0 +1,73 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Twitter OpenAPI
5
+ * Twitter OpenAPI(Swagger) specification
6
+ *
7
+ * The version of the OpenAPI document: 0.0.1
8
+ * Contact: yuki@yuki0311.com
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { exists, mapValues } from '../runtime';
16
+ import type { NoteTweetResultRichTextTag } from './NoteTweetResultRichTextTag';
17
+ import {
18
+ NoteTweetResultRichTextTagFromJSON,
19
+ NoteTweetResultRichTextTagFromJSONTyped,
20
+ NoteTweetResultRichTextTagToJSON,
21
+ } from './NoteTweetResultRichTextTag';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface NoteTweetResultRichText
27
+ */
28
+ export interface NoteTweetResultRichText {
29
+ /**
30
+ *
31
+ * @type {Array<NoteTweetResultRichTextTag>}
32
+ * @memberof NoteTweetResultRichText
33
+ */
34
+ richtextTags: Array<NoteTweetResultRichTextTag>;
35
+ }
36
+
37
+ /**
38
+ * Check if a given object implements the NoteTweetResultRichText interface.
39
+ */
40
+ export function instanceOfNoteTweetResultRichText(value: object): boolean {
41
+ let isInstance = true;
42
+ isInstance = isInstance && "richtextTags" in value;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function NoteTweetResultRichTextFromJSON(json: any): NoteTweetResultRichText {
48
+ return NoteTweetResultRichTextFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function NoteTweetResultRichTextFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweetResultRichText {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'richtextTags': ((json['richtext_tags'] as Array<any>).map(NoteTweetResultRichTextTagFromJSON)),
58
+ };
59
+ }
60
+
61
+ export function NoteTweetResultRichTextToJSON(value?: NoteTweetResultRichText | null): any {
62
+ if (value === undefined) {
63
+ return undefined;
64
+ }
65
+ if (value === null) {
66
+ return null;
67
+ }
68
+ return {
69
+
70
+ 'richtext_tags': ((value.richtextTags as Array<any>).map(NoteTweetResultRichTextTagToJSON)),
71
+ };
72
+ }
73
+