twitter-openapi-typescript-generated 0.0.9 → 0.0.11

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 (275) hide show
  1. package/.openapi-generator/FILES +27 -4
  2. package/LICENSE +31 -0
  3. package/{LICENSE.txt → LICENSE.AGPL} +661 -661
  4. package/README.md +2 -2
  5. package/dist/apis/DefaultApi.d.ts +14 -1
  6. package/dist/apis/DefaultApi.d.ts.map +1 -1
  7. package/dist/apis/DefaultApi.js +83 -0
  8. package/dist/apis/DefaultApi.js.map +1 -1
  9. package/dist/models/AdditionalMediaInfo.d.ts +32 -0
  10. package/dist/models/AdditionalMediaInfo.d.ts.map +1 -0
  11. package/dist/models/AdditionalMediaInfo.js +51 -0
  12. package/dist/models/AdditionalMediaInfo.js.map +1 -0
  13. package/dist/models/Callback.d.ts +32 -0
  14. package/dist/models/Callback.d.ts.map +1 -0
  15. package/dist/models/Callback.js +51 -0
  16. package/dist/models/Callback.js.map +1 -0
  17. package/dist/models/ClientEventInfo.d.ts +46 -0
  18. package/dist/models/ClientEventInfo.d.ts.map +1 -0
  19. package/dist/models/ClientEventInfo.js +55 -0
  20. package/dist/models/ClientEventInfo.js.map +1 -0
  21. package/dist/models/CoverCta.d.ts +66 -0
  22. package/dist/models/CoverCta.d.ts.map +1 -0
  23. package/dist/models/CoverCta.js +72 -0
  24. package/dist/models/CoverCta.js.map +1 -0
  25. package/dist/models/CtaClientEventInfo.d.ts +39 -0
  26. package/dist/models/CtaClientEventInfo.d.ts.map +1 -0
  27. package/dist/models/CtaClientEventInfo.js +57 -0
  28. package/dist/models/CtaClientEventInfo.js.map +1 -0
  29. package/dist/models/ExtMediaAvailability.d.ts +39 -0
  30. package/dist/models/ExtMediaAvailability.d.ts.map +1 -0
  31. package/dist/models/ExtMediaAvailability.js +57 -0
  32. package/dist/models/ExtMediaAvailability.js.map +1 -0
  33. package/dist/models/ExtendedEntities.d.ts +3 -3
  34. package/dist/models/ExtendedEntities.d.ts.map +1 -1
  35. package/dist/models/ExtendedEntities.js +3 -3
  36. package/dist/models/ExtendedEntities.js.map +1 -1
  37. package/dist/models/GetTweetResultByRestId200Response.d.ts +23 -0
  38. package/dist/models/GetTweetResultByRestId200Response.d.ts.map +1 -0
  39. package/dist/models/GetTweetResultByRestId200Response.js +57 -0
  40. package/dist/models/GetTweetResultByRestId200Response.js.map +1 -0
  41. package/dist/models/InstructionType.d.ts +1 -0
  42. package/dist/models/InstructionType.d.ts.map +1 -1
  43. package/dist/models/InstructionType.js +2 -1
  44. package/dist/models/InstructionType.js.map +1 -1
  45. package/dist/models/InstructionUnion.d.ts +3 -0
  46. package/dist/models/InstructionUnion.d.ts.map +1 -1
  47. package/dist/models/InstructionUnion.js +5 -0
  48. package/dist/models/InstructionUnion.js.map +1 -1
  49. package/dist/models/ItemResult.d.ts +1 -1
  50. package/dist/models/ItemResult.d.ts.map +1 -1
  51. package/dist/models/ItemResult.js +1 -2
  52. package/dist/models/ItemResult.js.map +1 -1
  53. package/dist/models/Media.d.ts +15 -15
  54. package/dist/models/Media.d.ts.map +1 -1
  55. package/dist/models/Media.js +14 -7
  56. package/dist/models/Media.js.map +1 -1
  57. package/dist/models/MediaExtended.d.ts +131 -0
  58. package/dist/models/MediaExtended.d.ts.map +1 -0
  59. package/dist/models/MediaExtended.js +104 -0
  60. package/dist/models/MediaExtended.js.map +1 -0
  61. package/dist/models/MediaOriginalInfo.d.ts +5 -6
  62. package/dist/models/MediaOriginalInfo.d.ts.map +1 -1
  63. package/dist/models/MediaOriginalInfo.js +7 -4
  64. package/dist/models/MediaOriginalInfo.js.map +1 -1
  65. package/dist/models/MediaOriginalInfoFocusRect.d.ts +50 -0
  66. package/dist/models/MediaOriginalInfoFocusRect.d.ts.map +1 -0
  67. package/dist/models/MediaOriginalInfoFocusRect.js +60 -0
  68. package/dist/models/MediaOriginalInfoFocusRect.js.map +1 -0
  69. package/dist/models/MediaSize.d.ts +52 -0
  70. package/dist/models/MediaSize.d.ts.map +1 -0
  71. package/dist/models/MediaSize.js +64 -0
  72. package/dist/models/MediaSize.js.map +1 -0
  73. package/dist/models/MediaSizes.d.ts +51 -0
  74. package/dist/models/MediaSizes.d.ts.map +1 -0
  75. package/dist/models/MediaSizes.js +61 -0
  76. package/dist/models/MediaSizes.js.map +1 -0
  77. package/dist/models/MediaStats.d.ts +32 -0
  78. package/dist/models/MediaStats.d.ts.map +1 -0
  79. package/dist/models/MediaStats.js +51 -0
  80. package/dist/models/MediaStats.js.map +1 -0
  81. package/dist/models/MediaVideoInfo.d.ts +45 -0
  82. package/dist/models/MediaVideoInfo.d.ts.map +1 -0
  83. package/dist/models/MediaVideoInfo.js +58 -0
  84. package/dist/models/MediaVideoInfo.js.map +1 -0
  85. package/dist/models/MediaVideoInfoVariant.d.ts +44 -0
  86. package/dist/models/MediaVideoInfoVariant.d.ts.map +1 -0
  87. package/dist/models/MediaVideoInfoVariant.js +57 -0
  88. package/dist/models/MediaVideoInfoVariant.js.map +1 -0
  89. package/dist/models/ModuleEntry.d.ts +3 -4
  90. package/dist/models/ModuleEntry.d.ts.map +1 -1
  91. package/dist/models/ModuleEntry.js +3 -2
  92. package/dist/models/ModuleEntry.js.map +1 -1
  93. package/dist/models/SelfThread.d.ts +32 -0
  94. package/dist/models/SelfThread.d.ts.map +1 -0
  95. package/dist/models/SelfThread.js +51 -0
  96. package/dist/models/SelfThread.js.map +1 -0
  97. package/dist/models/Session.d.ts +8 -1
  98. package/dist/models/Session.d.ts.map +1 -1
  99. package/dist/models/Session.js +7 -1
  100. package/dist/models/Session.js.map +1 -1
  101. package/dist/models/Text.d.ts +39 -0
  102. package/dist/models/Text.d.ts.map +1 -0
  103. package/dist/models/Text.js +55 -0
  104. package/dist/models/Text.js.map +1 -0
  105. package/dist/models/TextEntity.d.ts +45 -0
  106. package/dist/models/TextEntity.d.ts.map +1 -0
  107. package/dist/models/TextEntity.js +58 -0
  108. package/dist/models/TextEntity.js.map +1 -0
  109. package/dist/models/TextEntityRef.d.ts +58 -0
  110. package/dist/models/TextEntityRef.d.ts.map +1 -0
  111. package/dist/models/TextEntityRef.js +69 -0
  112. package/dist/models/TextEntityRef.js.map +1 -0
  113. package/dist/models/TimelineCoverBehavior.d.ts +39 -0
  114. package/dist/models/TimelineCoverBehavior.d.ts.map +1 -0
  115. package/dist/models/TimelineCoverBehavior.js +57 -0
  116. package/dist/models/TimelineCoverBehavior.js.map +1 -0
  117. package/dist/models/TimelineHalfCover.d.ts +85 -0
  118. package/dist/models/TimelineHalfCover.d.ts.map +1 -0
  119. package/dist/models/TimelineHalfCover.js +84 -0
  120. package/dist/models/TimelineHalfCover.js.map +1 -0
  121. package/dist/models/TimelineShowCover.d.ts +47 -0
  122. package/dist/models/TimelineShowCover.d.ts.map +1 -0
  123. package/dist/models/TimelineShowCover.js +60 -0
  124. package/dist/models/TimelineShowCover.js.map +1 -0
  125. package/dist/models/TimelineTimelineItem.d.ts +3 -4
  126. package/dist/models/TimelineTimelineItem.d.ts.map +1 -1
  127. package/dist/models/TimelineTimelineItem.js +3 -2
  128. package/dist/models/TimelineTimelineItem.js.map +1 -1
  129. package/dist/models/TimelineTimelineModule.d.ts +9 -1
  130. package/dist/models/TimelineTimelineModule.d.ts.map +1 -1
  131. package/dist/models/TimelineTimelineModule.js +8 -1
  132. package/dist/models/TimelineTimelineModule.js.map +1 -1
  133. package/dist/models/TimelineUser.d.ts +10 -1
  134. package/dist/models/TimelineUser.d.ts.map +1 -1
  135. package/dist/models/TimelineUser.js +9 -1
  136. package/dist/models/TimelineUser.js.map +1 -1
  137. package/dist/models/Tweet.d.ts +11 -5
  138. package/dist/models/Tweet.d.ts.map +1 -1
  139. package/dist/models/Tweet.js +7 -7
  140. package/dist/models/Tweet.js.map +1 -1
  141. package/dist/models/TweetCardLegacy.d.ts +3 -3
  142. package/dist/models/TweetCardLegacy.d.ts.map +1 -1
  143. package/dist/models/TweetCardLegacy.js +3 -3
  144. package/dist/models/TweetCardLegacy.js.map +1 -1
  145. package/dist/models/TweetCardLegacyBindingValue.d.ts +39 -0
  146. package/dist/models/TweetCardLegacyBindingValue.d.ts.map +1 -0
  147. package/dist/models/TweetCardLegacyBindingValue.js +55 -0
  148. package/dist/models/TweetCardLegacyBindingValue.js.map +1 -0
  149. package/dist/models/TweetCardLegacyBindingValueData.d.ts +50 -0
  150. package/dist/models/TweetCardLegacyBindingValueData.d.ts.map +1 -0
  151. package/dist/models/{TweetCardLegacyBindingValuesInnerValue.js → TweetCardLegacyBindingValueData.js} +12 -12
  152. package/dist/models/TweetCardLegacyBindingValueData.js.map +1 -0
  153. package/dist/models/TweetEditControl.d.ts +13 -0
  154. package/dist/models/TweetEditControl.d.ts.map +1 -1
  155. package/dist/models/TweetEditControl.js +5 -0
  156. package/dist/models/TweetEditControl.js.map +1 -1
  157. package/dist/models/TweetEditControlInitial.d.ts +50 -0
  158. package/dist/models/TweetEditControlInitial.d.ts.map +1 -0
  159. package/dist/models/TweetEditControlInitial.js +60 -0
  160. package/dist/models/TweetEditControlInitial.js.map +1 -0
  161. package/dist/models/TweetLegacy.d.ts +3 -3
  162. package/dist/models/TweetLegacy.d.ts.map +1 -1
  163. package/dist/models/TweetLegacy.js +3 -3
  164. package/dist/models/TweetLegacy.js.map +1 -1
  165. package/dist/models/TweetResultByRestIdData.d.ts +33 -0
  166. package/dist/models/TweetResultByRestIdData.d.ts.map +1 -0
  167. package/dist/models/TweetResultByRestIdData.js +52 -0
  168. package/dist/models/TweetResultByRestIdData.js.map +1 -0
  169. package/dist/models/TweetResultByRestIdResponse.d.ts +33 -0
  170. package/dist/models/TweetResultByRestIdResponse.d.ts.map +1 -0
  171. package/dist/models/TweetResultByRestIdResponse.js +52 -0
  172. package/dist/models/TweetResultByRestIdResponse.js.map +1 -0
  173. package/dist/models/TweetView.d.ts +45 -0
  174. package/dist/models/TweetView.d.ts.map +1 -0
  175. package/dist/models/{TweetViews.js → TweetView.js} +20 -13
  176. package/dist/models/TweetView.js.map +1 -0
  177. package/dist/models/TypeName.d.ts +1 -0
  178. package/dist/models/TypeName.d.ts.map +1 -1
  179. package/dist/models/TypeName.js +1 -0
  180. package/dist/models/TypeName.js.map +1 -1
  181. package/dist/models/index.d.ts +27 -4
  182. package/dist/models/index.d.ts.map +1 -1
  183. package/dist/models/index.js +27 -4
  184. package/dist/models/index.js.map +1 -1
  185. package/package.json +2 -2
  186. package/src/apis/DefaultApi.ts +87 -0
  187. package/src/models/AdditionalMediaInfo.ts +66 -0
  188. package/src/models/Callback.ts +66 -0
  189. package/src/models/ClientEventInfo.ts +81 -0
  190. package/src/models/CoverCta.ts +130 -0
  191. package/src/models/CtaClientEventInfo.ts +76 -0
  192. package/src/models/ExtMediaAvailability.ts +75 -0
  193. package/src/models/ExtendedEntities.ts +9 -9
  194. package/src/models/GetTweetResultByRestId200Response.ts +65 -0
  195. package/src/models/InstructionType.ts +2 -1
  196. package/src/models/InstructionUnion.ts +12 -1
  197. package/src/models/ItemResult.ts +2 -3
  198. package/src/models/Media.ts +27 -17
  199. package/src/models/MediaExtended.ts +237 -0
  200. package/src/models/MediaOriginalInfo.ts +17 -8
  201. package/src/models/MediaOriginalInfoFocusRect.ts +93 -0
  202. package/src/models/MediaSize.ts +95 -0
  203. package/src/models/MediaSizes.ts +100 -0
  204. package/src/models/MediaStats.ts +66 -0
  205. package/src/models/MediaVideoInfo.ts +90 -0
  206. package/src/models/MediaVideoInfoVariant.ts +83 -0
  207. package/src/models/ModuleEntry.ts +10 -4
  208. package/src/models/{TweetLegacySelfThread.ts → SelfThread.ts} +9 -9
  209. package/src/models/Session.ts +11 -1
  210. package/src/models/Text.ts +82 -0
  211. package/src/models/TextEntity.ts +91 -0
  212. package/src/models/TextEntityRef.ts +102 -0
  213. package/src/models/TimelineCoverBehavior.ts +76 -0
  214. package/src/models/TimelineHalfCover.ts +157 -0
  215. package/src/models/TimelineShowCover.ts +103 -0
  216. package/src/models/TimelineTimelineItem.ts +10 -4
  217. package/src/models/TimelineTimelineModule.ts +12 -1
  218. package/src/models/TimelineUser.ts +13 -1
  219. package/src/models/Tweet.ts +21 -15
  220. package/src/models/TweetCardLegacy.ts +9 -9
  221. package/src/models/TweetCardLegacyBindingValue.ts +82 -0
  222. package/src/models/{TweetCardLegacyBindingValuesInnerValue.ts → TweetCardLegacyBindingValueData.ts} +12 -12
  223. package/src/models/TweetEditControl.ts +23 -0
  224. package/src/models/TweetEditControlInitial.ts +93 -0
  225. package/src/models/TweetLegacy.ts +9 -9
  226. package/src/models/TweetResultByRestIdData.ts +73 -0
  227. package/src/models/TweetResultByRestIdResponse.ts +73 -0
  228. package/src/models/{TweetViews.ts → TweetView.ts} +23 -12
  229. package/src/models/TypeName.ts +1 -0
  230. package/src/models/index.ts +27 -4
  231. package/tools/openapi-generator-config.yaml +1 -1
  232. package/tools/win/replace.py +1 -1
  233. package/twitter-openapi/.vscode/tasks.json +3 -0
  234. package/twitter-openapi/LICENSE +31 -0
  235. package/twitter-openapi/{LICENSE.txt → LICENSE.AGPL} +3 -3
  236. package/twitter-openapi/README.md +4 -1
  237. package/twitter-openapi/dist/compatible/openapi-3.0.yaml +4 -2
  238. package/twitter-openapi/dist/compatible/paths/other.yaml +2 -0
  239. package/twitter-openapi/dist/compatible/paths/tweet.yaml +94 -0
  240. package/twitter-openapi/dist/compatible/schemas/content.yaml +19 -6
  241. package/twitter-openapi/dist/compatible/schemas/instruction.yaml +130 -0
  242. package/twitter-openapi/dist/compatible/schemas/tweet.yaml +279 -94
  243. package/twitter-openapi/dist/compatible/schemas/typename.yaml +1 -0
  244. package/twitter-openapi/dist/docs/openapi-3.0.yaml +4 -2
  245. package/twitter-openapi/dist/docs/paths/other.yaml +2 -0
  246. package/twitter-openapi/dist/docs/paths/tweet.yaml +191 -0
  247. package/twitter-openapi/dist/docs/schemas/content.yaml +19 -6
  248. package/twitter-openapi/dist/docs/schemas/instruction.yaml +130 -0
  249. package/twitter-openapi/dist/docs/schemas/tweet.yaml +279 -94
  250. package/twitter-openapi/dist/docs/schemas/typename.yaml +1 -0
  251. package/twitter-openapi/src/config/placeholder.json +34 -2
  252. package/twitter-openapi/src/openapi/openapi-3.0.yaml +2 -2
  253. package/twitter-openapi/src/openapi/paths/other.yaml +2 -1
  254. package/twitter-openapi/src/openapi/paths/tweet.yaml +30 -0
  255. package/twitter-openapi/src/openapi/schemas/content.yaml +20 -7
  256. package/twitter-openapi/src/openapi/schemas/instruction.yaml +134 -0
  257. package/twitter-openapi/src/openapi/schemas/tweet.yaml +306 -107
  258. package/twitter-openapi/src/openapi/schemas/typename.yaml +1 -0
  259. package/twitter-openapi/test/python/replace.py +23 -0
  260. package/twitter-openapi/test/python/test_serialize.py +191 -91
  261. package/dist/models/TweetCardLegacyBindingValuesInner.d.ts +0 -39
  262. package/dist/models/TweetCardLegacyBindingValuesInner.d.ts.map +0 -1
  263. package/dist/models/TweetCardLegacyBindingValuesInner.js +0 -55
  264. package/dist/models/TweetCardLegacyBindingValuesInner.js.map +0 -1
  265. package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts +0 -50
  266. package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts.map +0 -1
  267. package/dist/models/TweetCardLegacyBindingValuesInnerValue.js.map +0 -1
  268. package/dist/models/TweetLegacySelfThread.d.ts +0 -32
  269. package/dist/models/TweetLegacySelfThread.d.ts.map +0 -1
  270. package/dist/models/TweetLegacySelfThread.js +0 -51
  271. package/dist/models/TweetLegacySelfThread.js.map +0 -1
  272. package/dist/models/TweetViews.d.ts +0 -38
  273. package/dist/models/TweetViews.d.ts.map +0 -1
  274. package/dist/models/TweetViews.js.map +0 -1
  275. package/src/models/TweetCardLegacyBindingValuesInner.ts +0 -82
@@ -0,0 +1,157 @@
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 { Callback } from './Callback';
17
+ import {
18
+ CallbackFromJSON,
19
+ CallbackFromJSONTyped,
20
+ CallbackToJSON,
21
+ } from './Callback';
22
+ import type { CoverCta } from './CoverCta';
23
+ import {
24
+ CoverCtaFromJSON,
25
+ CoverCtaFromJSONTyped,
26
+ CoverCtaToJSON,
27
+ } from './CoverCta';
28
+ import type { Text } from './Text';
29
+ import {
30
+ TextFromJSON,
31
+ TextFromJSONTyped,
32
+ TextToJSON,
33
+ } from './Text';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface TimelineHalfCover
39
+ */
40
+ export interface TimelineHalfCover {
41
+ /**
42
+ *
43
+ * @type {boolean}
44
+ * @memberof TimelineHalfCover
45
+ */
46
+ dismissible: boolean;
47
+ /**
48
+ *
49
+ * @type {string}
50
+ * @memberof TimelineHalfCover
51
+ */
52
+ halfCoverDisplayType: TimelineHalfCoverHalfCoverDisplayTypeEnum;
53
+ /**
54
+ *
55
+ * @type {Array<Callback>}
56
+ * @memberof TimelineHalfCover
57
+ */
58
+ impressionCallbacks: Array<Callback>;
59
+ /**
60
+ *
61
+ * @type {CoverCta}
62
+ * @memberof TimelineHalfCover
63
+ */
64
+ primaryCoverCta: CoverCta;
65
+ /**
66
+ *
67
+ * @type {Text}
68
+ * @memberof TimelineHalfCover
69
+ */
70
+ primaryText: Text;
71
+ /**
72
+ *
73
+ * @type {Text}
74
+ * @memberof TimelineHalfCover
75
+ */
76
+ secondaryText: Text;
77
+ /**
78
+ *
79
+ * @type {string}
80
+ * @memberof TimelineHalfCover
81
+ */
82
+ type: TimelineHalfCoverTypeEnum;
83
+ }
84
+
85
+
86
+ /**
87
+ * @export
88
+ */
89
+ export const TimelineHalfCoverHalfCoverDisplayTypeEnum = {
90
+ Cover: 'Cover'
91
+ } as const;
92
+ export type TimelineHalfCoverHalfCoverDisplayTypeEnum = typeof TimelineHalfCoverHalfCoverDisplayTypeEnum[keyof typeof TimelineHalfCoverHalfCoverDisplayTypeEnum];
93
+
94
+ /**
95
+ * @export
96
+ */
97
+ export const TimelineHalfCoverTypeEnum = {
98
+ TimelineHalfCover: 'TimelineHalfCover'
99
+ } as const;
100
+ export type TimelineHalfCoverTypeEnum = typeof TimelineHalfCoverTypeEnum[keyof typeof TimelineHalfCoverTypeEnum];
101
+
102
+
103
+ /**
104
+ * Check if a given object implements the TimelineHalfCover interface.
105
+ */
106
+ export function instanceOfTimelineHalfCover(value: object): boolean {
107
+ let isInstance = true;
108
+ isInstance = isInstance && "dismissible" in value;
109
+ isInstance = isInstance && "halfCoverDisplayType" in value;
110
+ isInstance = isInstance && "impressionCallbacks" in value;
111
+ isInstance = isInstance && "primaryCoverCta" in value;
112
+ isInstance = isInstance && "primaryText" in value;
113
+ isInstance = isInstance && "secondaryText" in value;
114
+ isInstance = isInstance && "type" in value;
115
+
116
+ return isInstance;
117
+ }
118
+
119
+ export function TimelineHalfCoverFromJSON(json: any): TimelineHalfCover {
120
+ return TimelineHalfCoverFromJSONTyped(json, false);
121
+ }
122
+
123
+ export function TimelineHalfCoverFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineHalfCover {
124
+ if ((json === undefined) || (json === null)) {
125
+ return json;
126
+ }
127
+ return {
128
+
129
+ 'dismissible': json['dismissible'],
130
+ 'halfCoverDisplayType': json['halfCoverDisplayType'],
131
+ 'impressionCallbacks': ((json['impressionCallbacks'] as Array<any>).map(CallbackFromJSON)),
132
+ 'primaryCoverCta': CoverCtaFromJSON(json['primaryCoverCta']),
133
+ 'primaryText': TextFromJSON(json['primaryText']),
134
+ 'secondaryText': TextFromJSON(json['secondaryText']),
135
+ 'type': json['type'],
136
+ };
137
+ }
138
+
139
+ export function TimelineHalfCoverToJSON(value?: TimelineHalfCover | null): any {
140
+ if (value === undefined) {
141
+ return undefined;
142
+ }
143
+ if (value === null) {
144
+ return null;
145
+ }
146
+ return {
147
+
148
+ 'dismissible': value.dismissible,
149
+ 'halfCoverDisplayType': value.halfCoverDisplayType,
150
+ 'impressionCallbacks': ((value.impressionCallbacks as Array<any>).map(CallbackToJSON)),
151
+ 'primaryCoverCta': CoverCtaToJSON(value.primaryCoverCta),
152
+ 'primaryText': TextToJSON(value.primaryText),
153
+ 'secondaryText': TextToJSON(value.secondaryText),
154
+ 'type': value.type,
155
+ };
156
+ }
157
+
@@ -0,0 +1,103 @@
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 { ClientEventInfo } from './ClientEventInfo';
17
+ import {
18
+ ClientEventInfoFromJSON,
19
+ ClientEventInfoFromJSONTyped,
20
+ ClientEventInfoToJSON,
21
+ } from './ClientEventInfo';
22
+ import type { InstructionType } from './InstructionType';
23
+ import {
24
+ InstructionTypeFromJSON,
25
+ InstructionTypeFromJSONTyped,
26
+ InstructionTypeToJSON,
27
+ } from './InstructionType';
28
+ import type { TimelineHalfCover } from './TimelineHalfCover';
29
+ import {
30
+ TimelineHalfCoverFromJSON,
31
+ TimelineHalfCoverFromJSONTyped,
32
+ TimelineHalfCoverToJSON,
33
+ } from './TimelineHalfCover';
34
+
35
+ /**
36
+ *
37
+ * @export
38
+ * @interface TimelineShowCover
39
+ */
40
+ export interface TimelineShowCover {
41
+ /**
42
+ *
43
+ * @type {ClientEventInfo}
44
+ * @memberof TimelineShowCover
45
+ */
46
+ clientEventInfo: ClientEventInfo;
47
+ /**
48
+ *
49
+ * @type {TimelineHalfCover}
50
+ * @memberof TimelineShowCover
51
+ */
52
+ cover: TimelineHalfCover;
53
+ /**
54
+ *
55
+ * @type {InstructionType}
56
+ * @memberof TimelineShowCover
57
+ */
58
+ type: InstructionType;
59
+ }
60
+
61
+ /**
62
+ * Check if a given object implements the TimelineShowCover interface.
63
+ */
64
+ export function instanceOfTimelineShowCover(value: object): boolean {
65
+ let isInstance = true;
66
+ isInstance = isInstance && "clientEventInfo" in value;
67
+ isInstance = isInstance && "cover" in value;
68
+ isInstance = isInstance && "type" in value;
69
+
70
+ return isInstance;
71
+ }
72
+
73
+ export function TimelineShowCoverFromJSON(json: any): TimelineShowCover {
74
+ return TimelineShowCoverFromJSONTyped(json, false);
75
+ }
76
+
77
+ export function TimelineShowCoverFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineShowCover {
78
+ if ((json === undefined) || (json === null)) {
79
+ return json;
80
+ }
81
+ return {
82
+
83
+ 'clientEventInfo': ClientEventInfoFromJSON(json['clientEventInfo']),
84
+ 'cover': TimelineHalfCoverFromJSON(json['cover']),
85
+ 'type': InstructionTypeFromJSON(json['type']),
86
+ };
87
+ }
88
+
89
+ export function TimelineShowCoverToJSON(value?: TimelineShowCover | null): any {
90
+ if (value === undefined) {
91
+ return undefined;
92
+ }
93
+ if (value === null) {
94
+ return null;
95
+ }
96
+ return {
97
+
98
+ 'clientEventInfo': ClientEventInfoToJSON(value.clientEventInfo),
99
+ 'cover': TimelineHalfCoverToJSON(value.cover),
100
+ 'type': InstructionTypeToJSON(value.type),
101
+ };
102
+ }
103
+
@@ -13,6 +13,12 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
+ import type { ClientEventInfo } from './ClientEventInfo';
17
+ import {
18
+ ClientEventInfoFromJSON,
19
+ ClientEventInfoFromJSONTyped,
20
+ ClientEventInfoToJSON,
21
+ } from './ClientEventInfo';
16
22
  import type { ContentEntryType } from './ContentEntryType';
17
23
  import {
18
24
  ContentEntryTypeFromJSON,
@@ -46,10 +52,10 @@ export interface TimelineTimelineItem {
46
52
  typename: TypeName;
47
53
  /**
48
54
  *
49
- * @type {{ [key: string]: any; }}
55
+ * @type {ClientEventInfo}
50
56
  * @memberof TimelineTimelineItem
51
57
  */
52
- clientEventInfo?: { [key: string]: any; };
58
+ clientEventInfo?: ClientEventInfo;
53
59
  /**
54
60
  *
55
61
  * @type {ContentEntryType}
@@ -93,7 +99,7 @@ export function TimelineTimelineItemFromJSONTyped(json: any, ignoreDiscriminator
93
99
  return {
94
100
 
95
101
  'typename': TypeNameFromJSON(json['__typename']),
96
- 'clientEventInfo': !exists(json, 'clientEventInfo') ? undefined : json['clientEventInfo'],
102
+ 'clientEventInfo': !exists(json, 'clientEventInfo') ? undefined : ClientEventInfoFromJSON(json['clientEventInfo']),
97
103
  'entryType': ContentEntryTypeFromJSON(json['entryType']),
98
104
  'feedbackInfo': !exists(json, 'feedbackInfo') ? undefined : json['feedbackInfo'],
99
105
  'itemContent': ItemContentUnionFromJSON(json['itemContent']),
@@ -110,7 +116,7 @@ export function TimelineTimelineItemToJSON(value?: TimelineTimelineItem | null):
110
116
  return {
111
117
 
112
118
  '__typename': TypeNameToJSON(value.typename),
113
- 'clientEventInfo': value.clientEventInfo,
119
+ 'clientEventInfo': ClientEventInfoToJSON(value.clientEventInfo),
114
120
  'entryType': ContentEntryTypeToJSON(value.entryType),
115
121
  'feedbackInfo': value.feedbackInfo,
116
122
  'itemContent': ItemContentUnionToJSON(value.itemContent),
@@ -55,7 +55,7 @@ export interface TimelineTimelineModule {
55
55
  * @type {string}
56
56
  * @memberof TimelineTimelineModule
57
57
  */
58
- displayType: string;
58
+ displayType: TimelineTimelineModuleDisplayTypeEnum;
59
59
  /**
60
60
  *
61
61
  * @type {ContentEntryType}
@@ -82,6 +82,17 @@ export interface TimelineTimelineModule {
82
82
  items?: Array<ModuleItem>;
83
83
  }
84
84
 
85
+
86
+ /**
87
+ * @export
88
+ */
89
+ export const TimelineTimelineModuleDisplayTypeEnum = {
90
+ Vertical: 'Vertical',
91
+ VerticalConversation: 'VerticalConversation'
92
+ } as const;
93
+ export type TimelineTimelineModuleDisplayTypeEnum = typeof TimelineTimelineModuleDisplayTypeEnum[keyof typeof TimelineTimelineModuleDisplayTypeEnum];
94
+
95
+
85
96
  /**
86
97
  * Check if a given object implements the TimelineTimelineModule interface.
87
98
  */
@@ -67,7 +67,7 @@ export interface TimelineUser {
67
67
  * @type {string}
68
68
  * @memberof TimelineUser
69
69
  */
70
- userDisplayType: string;
70
+ userDisplayType: TimelineUserUserDisplayTypeEnum;
71
71
  /**
72
72
  *
73
73
  * @type {UserResults}
@@ -76,6 +76,18 @@ export interface TimelineUser {
76
76
  userResults: UserResults;
77
77
  }
78
78
 
79
+
80
+ /**
81
+ * @export
82
+ */
83
+ export const TimelineUserUserDisplayTypeEnum = {
84
+ User: 'User',
85
+ UserDetailed: 'UserDetailed',
86
+ SubscribableUser: 'SubscribableUser'
87
+ } as const;
88
+ export type TimelineUserUserDisplayTypeEnum = typeof TimelineUserUserDisplayTypeEnum[keyof typeof TimelineUserUserDisplayTypeEnum];
89
+
90
+
79
91
  /**
80
92
  * Check if a given object implements the TimelineUser interface.
81
93
  */
@@ -43,12 +43,12 @@ import {
43
43
  TweetLegacyFromJSONTyped,
44
44
  TweetLegacyToJSON,
45
45
  } from './TweetLegacy';
46
- import type { TweetViews } from './TweetViews';
46
+ import type { TweetView } from './TweetView';
47
47
  import {
48
- TweetViewsFromJSON,
49
- TweetViewsFromJSONTyped,
50
- TweetViewsToJSON,
51
- } from './TweetViews';
48
+ TweetViewFromJSON,
49
+ TweetViewFromJSONTyped,
50
+ TweetViewToJSON,
51
+ } from './TweetView';
52
52
  import type { TypeName } from './TypeName';
53
53
  import {
54
54
  TypeNameFromJSON,
@@ -85,7 +85,7 @@ export interface Tweet {
85
85
  * @type {UserResultCore}
86
86
  * @memberof Tweet
87
87
  */
88
- core: UserResultCore;
88
+ core?: UserResultCore;
89
89
  /**
90
90
  *
91
91
  * @type {TweetEditControl}
@@ -109,7 +109,7 @@ export interface Tweet {
109
109
  * @type {TweetLegacy}
110
110
  * @memberof Tweet
111
111
  */
112
- legacy: TweetLegacy;
112
+ legacy?: TweetLegacy;
113
113
  /**
114
114
  *
115
115
  * @type {ItemResult}
@@ -122,6 +122,12 @@ export interface Tweet {
122
122
  * @memberof Tweet
123
123
  */
124
124
  restId: string;
125
+ /**
126
+ *
127
+ * @type {string}
128
+ * @memberof Tweet
129
+ */
130
+ source?: string;
125
131
  /**
126
132
  *
127
133
  * @type {{ [key: string]: any; }}
@@ -130,10 +136,10 @@ export interface Tweet {
130
136
  unmentionData?: { [key: string]: any; };
131
137
  /**
132
138
  *
133
- * @type {TweetViews}
139
+ * @type {TweetView}
134
140
  * @memberof Tweet
135
141
  */
136
- views: TweetViews;
142
+ views: TweetView;
137
143
  }
138
144
 
139
145
  /**
@@ -141,10 +147,8 @@ export interface Tweet {
141
147
  */
142
148
  export function instanceOfTweet(value: object): boolean {
143
149
  let isInstance = true;
144
- isInstance = isInstance && "core" in value;
145
150
  isInstance = isInstance && "editControl" in value;
146
151
  isInstance = isInstance && "isTranslatable" in value;
147
- isInstance = isInstance && "legacy" in value;
148
152
  isInstance = isInstance && "restId" in value;
149
153
  isInstance = isInstance && "views" in value;
150
154
 
@@ -163,15 +167,16 @@ export function TweetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Twe
163
167
 
164
168
  'typename': !exists(json, '__typename') ? undefined : TypeNameFromJSON(json['__typename']),
165
169
  'card': !exists(json, 'card') ? undefined : TweetCardFromJSON(json['card']),
166
- 'core': UserResultCoreFromJSON(json['core']),
170
+ 'core': !exists(json, 'core') ? undefined : UserResultCoreFromJSON(json['core']),
167
171
  'editControl': TweetEditControlFromJSON(json['edit_control']),
168
172
  'editPrespective': !exists(json, 'edit_prespective') ? undefined : TweetEditPrespectiveFromJSON(json['edit_prespective']),
169
173
  'isTranslatable': json['is_translatable'],
170
- 'legacy': TweetLegacyFromJSON(json['legacy']),
174
+ 'legacy': !exists(json, 'legacy') ? undefined : TweetLegacyFromJSON(json['legacy']),
171
175
  'quotedStatusResult': !exists(json, 'quoted_status_result') ? undefined : ItemResultFromJSON(json['quoted_status_result']),
172
176
  'restId': json['rest_id'],
177
+ 'source': !exists(json, 'source') ? undefined : json['source'],
173
178
  'unmentionData': !exists(json, 'unmention_data') ? undefined : json['unmention_data'],
174
- 'views': TweetViewsFromJSON(json['views']),
179
+ 'views': TweetViewFromJSON(json['views']),
175
180
  };
176
181
  }
177
182
 
@@ -193,8 +198,9 @@ export function TweetToJSON(value?: Tweet | null): any {
193
198
  'legacy': TweetLegacyToJSON(value.legacy),
194
199
  'quoted_status_result': ItemResultToJSON(value.quotedStatusResult),
195
200
  'rest_id': value.restId,
201
+ 'source': value.source,
196
202
  'unmention_data': value.unmentionData,
197
- 'views': TweetViewsToJSON(value.views),
203
+ 'views': TweetViewToJSON(value.views),
198
204
  };
199
205
  }
200
206
 
@@ -13,12 +13,12 @@
13
13
  */
14
14
 
15
15
  import { exists, mapValues } from '../runtime';
16
- import type { TweetCardLegacyBindingValuesInner } from './TweetCardLegacyBindingValuesInner';
16
+ import type { TweetCardLegacyBindingValue } from './TweetCardLegacyBindingValue';
17
17
  import {
18
- TweetCardLegacyBindingValuesInnerFromJSON,
19
- TweetCardLegacyBindingValuesInnerFromJSONTyped,
20
- TweetCardLegacyBindingValuesInnerToJSON,
21
- } from './TweetCardLegacyBindingValuesInner';
18
+ TweetCardLegacyBindingValueFromJSON,
19
+ TweetCardLegacyBindingValueFromJSONTyped,
20
+ TweetCardLegacyBindingValueToJSON,
21
+ } from './TweetCardLegacyBindingValue';
22
22
 
23
23
  /**
24
24
  *
@@ -28,10 +28,10 @@ import {
28
28
  export interface TweetCardLegacy {
29
29
  /**
30
30
  *
31
- * @type {Array<TweetCardLegacyBindingValuesInner>}
31
+ * @type {Array<TweetCardLegacyBindingValue>}
32
32
  * @memberof TweetCardLegacy
33
33
  */
34
- bindingValues: Array<TweetCardLegacyBindingValuesInner>;
34
+ bindingValues: Array<TweetCardLegacyBindingValue>;
35
35
  /**
36
36
  *
37
37
  * @type {string}
@@ -68,7 +68,7 @@ export function TweetCardLegacyFromJSONTyped(json: any, ignoreDiscriminator: boo
68
68
  }
69
69
  return {
70
70
 
71
- 'bindingValues': ((json['binding_values'] as Array<any>).map(TweetCardLegacyBindingValuesInnerFromJSON)),
71
+ 'bindingValues': ((json['binding_values'] as Array<any>).map(TweetCardLegacyBindingValueFromJSON)),
72
72
  'name': json['name'],
73
73
  'url': json['url'],
74
74
  };
@@ -83,7 +83,7 @@ export function TweetCardLegacyToJSON(value?: TweetCardLegacy | null): any {
83
83
  }
84
84
  return {
85
85
 
86
- 'binding_values': ((value.bindingValues as Array<any>).map(TweetCardLegacyBindingValuesInnerToJSON)),
86
+ 'binding_values': ((value.bindingValues as Array<any>).map(TweetCardLegacyBindingValueToJSON)),
87
87
  'name': value.name,
88
88
  'url': value.url,
89
89
  };
@@ -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 { TweetCardLegacyBindingValueData } from './TweetCardLegacyBindingValueData';
17
+ import {
18
+ TweetCardLegacyBindingValueDataFromJSON,
19
+ TweetCardLegacyBindingValueDataFromJSONTyped,
20
+ TweetCardLegacyBindingValueDataToJSON,
21
+ } from './TweetCardLegacyBindingValueData';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface TweetCardLegacyBindingValue
27
+ */
28
+ export interface TweetCardLegacyBindingValue {
29
+ /**
30
+ *
31
+ * @type {string}
32
+ * @memberof TweetCardLegacyBindingValue
33
+ */
34
+ key: string;
35
+ /**
36
+ *
37
+ * @type {TweetCardLegacyBindingValueData}
38
+ * @memberof TweetCardLegacyBindingValue
39
+ */
40
+ value: TweetCardLegacyBindingValueData;
41
+ }
42
+
43
+ /**
44
+ * Check if a given object implements the TweetCardLegacyBindingValue interface.
45
+ */
46
+ export function instanceOfTweetCardLegacyBindingValue(value: object): boolean {
47
+ let isInstance = true;
48
+ isInstance = isInstance && "key" in value;
49
+ isInstance = isInstance && "value" in value;
50
+
51
+ return isInstance;
52
+ }
53
+
54
+ export function TweetCardLegacyBindingValueFromJSON(json: any): TweetCardLegacyBindingValue {
55
+ return TweetCardLegacyBindingValueFromJSONTyped(json, false);
56
+ }
57
+
58
+ export function TweetCardLegacyBindingValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCardLegacyBindingValue {
59
+ if ((json === undefined) || (json === null)) {
60
+ return json;
61
+ }
62
+ return {
63
+
64
+ 'key': json['key'],
65
+ 'value': TweetCardLegacyBindingValueDataFromJSON(json['value']),
66
+ };
67
+ }
68
+
69
+ export function TweetCardLegacyBindingValueToJSON(value?: TweetCardLegacyBindingValue | null): any {
70
+ if (value === undefined) {
71
+ return undefined;
72
+ }
73
+ if (value === null) {
74
+ return null;
75
+ }
76
+ return {
77
+
78
+ 'key': value.key,
79
+ 'value': TweetCardLegacyBindingValueDataToJSON(value.value),
80
+ };
81
+ }
82
+
@@ -16,50 +16,50 @@ import { exists, mapValues } from '../runtime';
16
16
  /**
17
17
  *
18
18
  * @export
19
- * @interface TweetCardLegacyBindingValuesInnerValue
19
+ * @interface TweetCardLegacyBindingValueData
20
20
  */
21
- export interface TweetCardLegacyBindingValuesInnerValue {
21
+ export interface TweetCardLegacyBindingValueData {
22
22
  /**
23
23
  *
24
24
  * @type {boolean}
25
- * @memberof TweetCardLegacyBindingValuesInnerValue
25
+ * @memberof TweetCardLegacyBindingValueData
26
26
  */
27
27
  booleanValue?: boolean;
28
28
  /**
29
29
  *
30
30
  * @type {string}
31
- * @memberof TweetCardLegacyBindingValuesInnerValue
31
+ * @memberof TweetCardLegacyBindingValueData
32
32
  */
33
33
  scribeKey?: string;
34
34
  /**
35
35
  *
36
36
  * @type {string}
37
- * @memberof TweetCardLegacyBindingValuesInnerValue
37
+ * @memberof TweetCardLegacyBindingValueData
38
38
  */
39
39
  stringValue?: string;
40
40
  /**
41
41
  *
42
42
  * @type {string}
43
- * @memberof TweetCardLegacyBindingValuesInnerValue
43
+ * @memberof TweetCardLegacyBindingValueData
44
44
  */
45
45
  type: string;
46
46
  }
47
47
 
48
48
  /**
49
- * Check if a given object implements the TweetCardLegacyBindingValuesInnerValue interface.
49
+ * Check if a given object implements the TweetCardLegacyBindingValueData interface.
50
50
  */
51
- export function instanceOfTweetCardLegacyBindingValuesInnerValue(value: object): boolean {
51
+ export function instanceOfTweetCardLegacyBindingValueData(value: object): boolean {
52
52
  let isInstance = true;
53
53
  isInstance = isInstance && "type" in value;
54
54
 
55
55
  return isInstance;
56
56
  }
57
57
 
58
- export function TweetCardLegacyBindingValuesInnerValueFromJSON(json: any): TweetCardLegacyBindingValuesInnerValue {
59
- return TweetCardLegacyBindingValuesInnerValueFromJSONTyped(json, false);
58
+ export function TweetCardLegacyBindingValueDataFromJSON(json: any): TweetCardLegacyBindingValueData {
59
+ return TweetCardLegacyBindingValueDataFromJSONTyped(json, false);
60
60
  }
61
61
 
62
- export function TweetCardLegacyBindingValuesInnerValueFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCardLegacyBindingValuesInnerValue {
62
+ export function TweetCardLegacyBindingValueDataFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCardLegacyBindingValueData {
63
63
  if ((json === undefined) || (json === null)) {
64
64
  return json;
65
65
  }
@@ -72,7 +72,7 @@ export function TweetCardLegacyBindingValuesInnerValueFromJSONTyped(json: any, i
72
72
  };
73
73
  }
74
74
 
75
- export function TweetCardLegacyBindingValuesInnerValueToJSON(value?: TweetCardLegacyBindingValuesInnerValue | null): any {
75
+ export function TweetCardLegacyBindingValueDataToJSON(value?: TweetCardLegacyBindingValueData | null): any {
76
76
  if (value === undefined) {
77
77
  return undefined;
78
78
  }