twitter-openapi-typescript-generated 0.1.0 → 0.1.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 (74) hide show
  1. package/README.md +11 -2
  2. package/dist/esm/models/Community.d.ts +4 -0
  3. package/dist/esm/models/Community.js +2 -0
  4. package/dist/esm/models/ErrorExtensions.d.ts +1 -1
  5. package/dist/esm/models/ErrorExtensions.js +1 -3
  6. package/dist/esm/models/ErrorResponse.d.ts +1 -1
  7. package/dist/esm/models/ErrorResponse.js +1 -3
  8. package/dist/esm/models/GroupedTrend.d.ts +35 -0
  9. package/dist/esm/models/GroupedTrend.js +48 -0
  10. package/dist/esm/models/SearchTimeline.d.ts +1 -1
  11. package/dist/esm/models/SearchTimeline.js +1 -3
  12. package/dist/esm/models/TimelineCommunity.d.ts +11 -2
  13. package/dist/esm/models/TimelineCommunity.js +18 -2
  14. package/dist/esm/models/TimelineMessagePrompt.d.ts +11 -2
  15. package/dist/esm/models/TimelineMessagePrompt.js +18 -2
  16. package/dist/esm/models/TimelineMessagePromptButton.d.ts +35 -0
  17. package/dist/esm/models/TimelineMessagePromptButton.js +48 -0
  18. package/dist/esm/models/TimelineMessagePromptButtonAction.d.ts +34 -0
  19. package/dist/esm/models/TimelineMessagePromptButtonAction.js +47 -0
  20. package/dist/esm/models/TimelineMessagePromptContent.d.ts +56 -0
  21. package/dist/esm/models/TimelineMessagePromptContent.js +62 -0
  22. package/dist/esm/models/TimelineMessagePromptRichText.d.ts +35 -0
  23. package/dist/esm/models/TimelineMessagePromptRichText.js +48 -0
  24. package/dist/esm/models/TimelineMessagePromptRichTextEntity.d.ts +39 -0
  25. package/dist/esm/models/TimelineMessagePromptRichTextEntity.js +52 -0
  26. package/dist/esm/models/TimelineMessagePromptRichTextEntityRef.d.ts +52 -0
  27. package/dist/esm/models/TimelineMessagePromptRichTextEntityRef.js +67 -0
  28. package/dist/esm/models/TimelinePrompt.d.ts +16 -2
  29. package/dist/esm/models/TimelinePrompt.js +23 -2
  30. package/dist/esm/models/TimelinePromptCallback.d.ts +30 -0
  31. package/dist/esm/models/TimelinePromptCallback.js +43 -0
  32. package/dist/esm/models/TimelinePromptContent.d.ts +73 -0
  33. package/dist/esm/models/TimelinePromptContent.js +88 -0
  34. package/dist/esm/models/TimelineTrend.d.ts +5 -0
  35. package/dist/esm/models/TimelineTrend.js +3 -0
  36. package/dist/esm/models/index.d.ts +9 -0
  37. package/dist/esm/models/index.js +9 -0
  38. package/dist/models/Community.d.ts +4 -0
  39. package/dist/models/Community.js +2 -0
  40. package/dist/models/ErrorExtensions.d.ts +1 -1
  41. package/dist/models/ErrorExtensions.js +1 -3
  42. package/dist/models/ErrorResponse.d.ts +1 -1
  43. package/dist/models/ErrorResponse.js +1 -3
  44. package/dist/models/GroupedTrend.d.ts +35 -0
  45. package/dist/models/GroupedTrend.js +55 -0
  46. package/dist/models/SearchTimeline.d.ts +1 -1
  47. package/dist/models/SearchTimeline.js +1 -3
  48. package/dist/models/TimelineCommunity.d.ts +11 -2
  49. package/dist/models/TimelineCommunity.js +18 -2
  50. package/dist/models/TimelineMessagePrompt.d.ts +11 -2
  51. package/dist/models/TimelineMessagePrompt.js +18 -2
  52. package/dist/models/TimelineMessagePromptButton.d.ts +35 -0
  53. package/dist/models/TimelineMessagePromptButton.js +55 -0
  54. package/dist/models/TimelineMessagePromptButtonAction.d.ts +34 -0
  55. package/dist/models/TimelineMessagePromptButtonAction.js +54 -0
  56. package/dist/models/TimelineMessagePromptContent.d.ts +56 -0
  57. package/dist/models/TimelineMessagePromptContent.js +70 -0
  58. package/dist/models/TimelineMessagePromptRichText.d.ts +35 -0
  59. package/dist/models/TimelineMessagePromptRichText.js +55 -0
  60. package/dist/models/TimelineMessagePromptRichTextEntity.d.ts +39 -0
  61. package/dist/models/TimelineMessagePromptRichTextEntity.js +59 -0
  62. package/dist/models/TimelineMessagePromptRichTextEntityRef.d.ts +52 -0
  63. package/dist/models/TimelineMessagePromptRichTextEntityRef.js +75 -0
  64. package/dist/models/TimelinePrompt.d.ts +16 -2
  65. package/dist/models/TimelinePrompt.js +23 -2
  66. package/dist/models/TimelinePromptCallback.d.ts +30 -0
  67. package/dist/models/TimelinePromptCallback.js +50 -0
  68. package/dist/models/TimelinePromptContent.d.ts +73 -0
  69. package/dist/models/TimelinePromptContent.js +96 -0
  70. package/dist/models/TimelineTrend.d.ts +5 -0
  71. package/dist/models/TimelineTrend.js +3 -0
  72. package/dist/models/index.d.ts +9 -0
  73. package/dist/models/index.js +9 -0
  74. package/package.json +1 -1
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { GroupedTrend } from './GroupedTrend';
12
13
  import type { TypeName } from './TypeName';
13
14
  import type { SocialContextUnion } from './SocialContextUnion';
14
15
  import type { ThumbnailImage } from './ThumbnailImage';
@@ -26,6 +27,10 @@ export interface TimelineTrend {
26
27
  *
27
28
  */
28
29
  typename: TypeName;
30
+ /**
31
+ *
32
+ */
33
+ groupedTrends?: Array<GroupedTrend>;
29
34
  /**
30
35
  *
31
36
  */
@@ -11,6 +11,7 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { GroupedTrendFromJSON, GroupedTrendToJSON, } from './GroupedTrend';
14
15
  import { TypeNameFromJSON, TypeNameToJSON, } from './TypeName';
15
16
  import { SocialContextUnionFromJSON, SocialContextUnionToJSON, } from './SocialContextUnion';
16
17
  import { ThumbnailImageFromJSON, ThumbnailImageToJSON, } from './ThumbnailImage';
@@ -41,6 +42,7 @@ export function TimelineTrendFromJSONTyped(json, ignoreDiscriminator) {
41
42
  }
42
43
  return {
43
44
  'typename': TypeNameFromJSON(json['__typename']),
45
+ 'groupedTrends': json['grouped_trends'] == null ? undefined : (json['grouped_trends'].map(GroupedTrendFromJSON)),
44
46
  'images': json['images'] == null ? undefined : (json['images'].map(TrendImageFromJSON)),
45
47
  'isAiTrend': json['is_ai_trend'] == null ? undefined : json['is_ai_trend'],
46
48
  'itemType': json['itemType'] == null ? undefined : ContentItemTypeFromJSON(json['itemType']),
@@ -61,6 +63,7 @@ export function TimelineTrendToJSONTyped(value, ignoreDiscriminator = false) {
61
63
  }
62
64
  return {
63
65
  '__typename': TypeNameToJSON(value['typename']),
66
+ 'grouped_trends': value['groupedTrends'] == null ? undefined : (value['groupedTrends'].map(GroupedTrendToJSON)),
64
67
  'images': value['images'] == null ? undefined : (value['images'].map(TrendImageToJSON)),
65
68
  'is_ai_trend': value['isAiTrend'],
66
69
  'itemType': ContentItemTypeToJSON(value['itemType']),
@@ -162,6 +162,7 @@ export * from './GrokTranslatedCommunityNote';
162
162
  export * from './GrokTranslatedCommunityNoteWithAvailability';
163
163
  export * from './GrokTranslatedPost';
164
164
  export * from './GrokTranslatedPostWithAvailability';
165
+ export * from './GroupedTrend';
165
166
  export * from './Hashtag';
166
167
  export * from './Highlight';
167
168
  export * from './HomeTimelineHome';
@@ -328,10 +329,18 @@ export * from './TimelineHalfCover';
328
329
  export * from './TimelineLabel';
329
330
  export * from './TimelineMarkEntriesUnreadGreaterThanSortIndex';
330
331
  export * from './TimelineMessagePrompt';
332
+ export * from './TimelineMessagePromptButton';
333
+ export * from './TimelineMessagePromptButtonAction';
334
+ export * from './TimelineMessagePromptContent';
335
+ export * from './TimelineMessagePromptRichText';
336
+ export * from './TimelineMessagePromptRichTextEntity';
337
+ export * from './TimelineMessagePromptRichTextEntityRef';
331
338
  export * from './TimelineMetadata';
332
339
  export * from './TimelineNotification';
333
340
  export * from './TimelinePinEntry';
334
341
  export * from './TimelinePrompt';
342
+ export * from './TimelinePromptCallback';
343
+ export * from './TimelinePromptContent';
335
344
  export * from './TimelineReplaceEntry';
336
345
  export * from './TimelineResponse';
337
346
  export * from './TimelineResponseObjects';
@@ -164,6 +164,7 @@ export * from './GrokTranslatedCommunityNote';
164
164
  export * from './GrokTranslatedCommunityNoteWithAvailability';
165
165
  export * from './GrokTranslatedPost';
166
166
  export * from './GrokTranslatedPostWithAvailability';
167
+ export * from './GroupedTrend';
167
168
  export * from './Hashtag';
168
169
  export * from './Highlight';
169
170
  export * from './HomeTimelineHome';
@@ -330,10 +331,18 @@ export * from './TimelineHalfCover';
330
331
  export * from './TimelineLabel';
331
332
  export * from './TimelineMarkEntriesUnreadGreaterThanSortIndex';
332
333
  export * from './TimelineMessagePrompt';
334
+ export * from './TimelineMessagePromptButton';
335
+ export * from './TimelineMessagePromptButtonAction';
336
+ export * from './TimelineMessagePromptContent';
337
+ export * from './TimelineMessagePromptRichText';
338
+ export * from './TimelineMessagePromptRichTextEntity';
339
+ export * from './TimelineMessagePromptRichTextEntityRef';
333
340
  export * from './TimelineMetadata';
334
341
  export * from './TimelineNotification';
335
342
  export * from './TimelinePinEntry';
336
343
  export * from './TimelinePrompt';
344
+ export * from './TimelinePromptCallback';
345
+ export * from './TimelinePromptContent';
337
346
  export * from './TimelineReplaceEntry';
338
347
  export * from './TimelineResponse';
339
348
  export * from './TimelineResponseObjects';
@@ -69,6 +69,10 @@ export interface Community {
69
69
  *
70
70
  */
71
71
  invitesResult?: CommunityInvitesResult;
72
+ /**
73
+ *
74
+ */
75
+ isNsfw?: boolean;
72
76
  /**
73
77
  *
74
78
  */
@@ -76,6 +76,7 @@ function CommunityFromJSONTyped(json, ignoreDiscriminator) {
76
76
  'idStr': json['id_str'] == null ? undefined : json['id_str'],
77
77
  'invitesPolicy': json['invites_policy'] == null ? undefined : json['invites_policy'],
78
78
  'invitesResult': json['invites_result'] == null ? undefined : (0, CommunityInvitesResult_1.CommunityInvitesResultFromJSON)(json['invites_result']),
79
+ 'isNsfw': json['is_nsfw'] == null ? undefined : json['is_nsfw'],
79
80
  'isPinned': json['is_pinned'] == null ? undefined : json['is_pinned'],
80
81
  'joinPolicy': json['join_policy'] == null ? undefined : json['join_policy'],
81
82
  'joinRequestsResult': json['join_requests_result'] == null ? undefined : (0, CommunityJoinRequestsResult_1.CommunityJoinRequestsResultFromJSON)(json['join_requests_result']),
@@ -112,6 +113,7 @@ function CommunityToJSONTyped(value, ignoreDiscriminator = false) {
112
113
  'id_str': value['idStr'],
113
114
  'invites_policy': value['invitesPolicy'],
114
115
  'invites_result': (0, CommunityInvitesResult_1.CommunityInvitesResultToJSON)(value['invitesResult']),
116
+ 'is_nsfw': value['isNsfw'],
115
117
  'is_pinned': value['isPinned'],
116
118
  'join_policy': value['joinPolicy'],
117
119
  'join_requests_result': (0, CommunityJoinRequestsResult_1.CommunityJoinRequestsResultToJSON)(value['joinRequestsResult']),
@@ -19,7 +19,7 @@ export interface ErrorExtensions {
19
19
  /**
20
20
  *
21
21
  */
22
- code: number;
22
+ code?: number;
23
23
  /**
24
24
  *
25
25
  */
@@ -23,8 +23,6 @@ const Tracing_1 = require("./Tracing");
23
23
  * Check if a given object implements the ErrorExtensions interface.
24
24
  */
25
25
  function instanceOfErrorExtensions(value) {
26
- if (!('code' in value) || value['code'] === undefined)
27
- return false;
28
26
  if (!('kind' in value) || value['kind'] === undefined)
29
27
  return false;
30
28
  if (!('name' in value) || value['name'] === undefined)
@@ -41,7 +39,7 @@ function ErrorExtensionsFromJSONTyped(json, ignoreDiscriminator) {
41
39
  return json;
42
40
  }
43
41
  return {
44
- 'code': json['code'],
42
+ 'code': json['code'] == null ? undefined : json['code'],
45
43
  'kind': json['kind'],
46
44
  'name': json['name'],
47
45
  'retryAfter': json['retry_after'] == null ? undefined : json['retry_after'],
@@ -22,7 +22,7 @@ export interface ErrorResponse {
22
22
  /**
23
23
  *
24
24
  */
25
- code: number;
25
+ code?: number;
26
26
  /**
27
27
  *
28
28
  */
@@ -26,8 +26,6 @@ const Location_1 = require("./Location");
26
26
  * Check if a given object implements the ErrorResponse interface.
27
27
  */
28
28
  function instanceOfErrorResponse(value) {
29
- if (!('code' in value) || value['code'] === undefined)
30
- return false;
31
29
  if (!('extensions' in value) || value['extensions'] === undefined)
32
30
  return false;
33
31
  if (!('kind' in value) || value['kind'] === undefined)
@@ -52,7 +50,7 @@ function ErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
52
50
  return json;
53
51
  }
54
52
  return {
55
- 'code': json['code'],
53
+ 'code': json['code'] == null ? undefined : json['code'],
56
54
  'extensions': (0, ErrorExtensions_1.ErrorExtensionsFromJSON)(json['extensions']),
57
55
  'kind': json['kind'],
58
56
  'locations': (json['locations'].map(Location_1.LocationFromJSON)),
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Twitter OpenAPI
3
+ * Twitter OpenAPI(Swagger) specification
4
+ *
5
+ * The version of the OpenAPI document: 0.0.1
6
+ * Contact: yuki@yuki0311.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { SocialContextLandingUrl } from './SocialContextLandingUrl';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface GroupedTrend
17
+ */
18
+ export interface GroupedTrend {
19
+ /**
20
+ *
21
+ */
22
+ name: string;
23
+ /**
24
+ *
25
+ */
26
+ url: SocialContextLandingUrl;
27
+ }
28
+ /**
29
+ * Check if a given object implements the GroupedTrend interface.
30
+ */
31
+ export declare function instanceOfGroupedTrend(value: object): value is GroupedTrend;
32
+ export declare function GroupedTrendFromJSON(json: any): GroupedTrend;
33
+ export declare function GroupedTrendFromJSONTyped(json: any, ignoreDiscriminator: boolean): GroupedTrend;
34
+ export declare function GroupedTrendToJSON(json: any): GroupedTrend;
35
+ export declare function GroupedTrendToJSONTyped(value?: GroupedTrend | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Twitter OpenAPI
6
+ * Twitter OpenAPI(Swagger) specification
7
+ *
8
+ * The version of the OpenAPI document: 0.0.1
9
+ * Contact: yuki@yuki0311.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfGroupedTrend = instanceOfGroupedTrend;
17
+ exports.GroupedTrendFromJSON = GroupedTrendFromJSON;
18
+ exports.GroupedTrendFromJSONTyped = GroupedTrendFromJSONTyped;
19
+ exports.GroupedTrendToJSON = GroupedTrendToJSON;
20
+ exports.GroupedTrendToJSONTyped = GroupedTrendToJSONTyped;
21
+ const SocialContextLandingUrl_1 = require("./SocialContextLandingUrl");
22
+ /**
23
+ * Check if a given object implements the GroupedTrend interface.
24
+ */
25
+ function instanceOfGroupedTrend(value) {
26
+ if (!('name' in value) || value['name'] === undefined)
27
+ return false;
28
+ if (!('url' in value) || value['url'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function GroupedTrendFromJSON(json) {
33
+ return GroupedTrendFromJSONTyped(json, false);
34
+ }
35
+ function GroupedTrendFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'name': json['name'],
41
+ 'url': (0, SocialContextLandingUrl_1.SocialContextLandingUrlFromJSON)(json['url']),
42
+ };
43
+ }
44
+ function GroupedTrendToJSON(json) {
45
+ return GroupedTrendToJSONTyped(json, false);
46
+ }
47
+ function GroupedTrendToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'name': value['name'],
53
+ 'url': (0, SocialContextLandingUrl_1.SocialContextLandingUrlToJSON)(value['url']),
54
+ };
55
+ }
@@ -19,7 +19,7 @@ export interface SearchTimeline {
19
19
  /**
20
20
  *
21
21
  */
22
- timeline: Timeline;
22
+ timeline?: Timeline;
23
23
  }
24
24
  /**
25
25
  * Check if a given object implements the SearchTimeline interface.
@@ -23,8 +23,6 @@ const Timeline_1 = require("./Timeline");
23
23
  * Check if a given object implements the SearchTimeline interface.
24
24
  */
25
25
  function instanceOfSearchTimeline(value) {
26
- if (!('timeline' in value) || value['timeline'] === undefined)
27
- return false;
28
26
  return true;
29
27
  }
30
28
  function SearchTimelineFromJSON(json) {
@@ -35,7 +33,7 @@ function SearchTimelineFromJSONTyped(json, ignoreDiscriminator) {
35
33
  return json;
36
34
  }
37
35
  return {
38
- 'timeline': (0, Timeline_1.TimelineFromJSON)(json['timeline']),
36
+ 'timeline': json['timeline'] == null ? undefined : (0, Timeline_1.TimelineFromJSON)(json['timeline']),
39
37
  };
40
38
  }
41
39
  function SearchTimelineToJSON(json) {
@@ -9,18 +9,27 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { CommunityResult } from './CommunityResult';
12
13
  import type { TypeName } from './TypeName';
14
+ import type { ContentItemType } from './ContentItemType';
13
15
  /**
14
16
  *
15
17
  * @export
16
18
  * @interface TimelineCommunity
17
19
  */
18
20
  export interface TimelineCommunity {
19
- [key: string]: any | any;
20
21
  /**
21
22
  *
22
23
  */
23
- typename?: TypeName;
24
+ typename: TypeName;
25
+ /**
26
+ *
27
+ */
28
+ communityResults: CommunityResult;
29
+ /**
30
+ *
31
+ */
32
+ itemType: ContentItemType;
24
33
  }
25
34
  /**
26
35
  * Check if a given object implements the TimelineCommunity interface.
@@ -18,11 +18,19 @@ exports.TimelineCommunityFromJSON = TimelineCommunityFromJSON;
18
18
  exports.TimelineCommunityFromJSONTyped = TimelineCommunityFromJSONTyped;
19
19
  exports.TimelineCommunityToJSON = TimelineCommunityToJSON;
20
20
  exports.TimelineCommunityToJSONTyped = TimelineCommunityToJSONTyped;
21
+ const CommunityResult_1 = require("./CommunityResult");
21
22
  const TypeName_1 = require("./TypeName");
23
+ const ContentItemType_1 = require("./ContentItemType");
22
24
  /**
23
25
  * Check if a given object implements the TimelineCommunity interface.
24
26
  */
25
27
  function instanceOfTimelineCommunity(value) {
28
+ if ((!('typename' in value) && !('__typename' in value)) || (value['typename'] === undefined && value['__typename'] === undefined))
29
+ return false;
30
+ if ((!('communityResults' in value) && !('community_results' in value)) || (value['communityResults'] === undefined && value['community_results'] === undefined))
31
+ return false;
32
+ if (!('itemType' in value) || value['itemType'] === undefined)
33
+ return false;
26
34
  return true;
27
35
  }
28
36
  function TimelineCommunityFromJSON(json) {
@@ -32,7 +40,11 @@ function TimelineCommunityFromJSONTyped(json, ignoreDiscriminator) {
32
40
  if (json == null) {
33
41
  return json;
34
42
  }
35
- return Object.assign(Object.assign({}, json), { 'typename': json['__typename'] == null ? undefined : (0, TypeName_1.TypeNameFromJSON)(json['__typename']) });
43
+ return {
44
+ 'typename': (0, TypeName_1.TypeNameFromJSON)(json['__typename']),
45
+ 'communityResults': (0, CommunityResult_1.CommunityResultFromJSON)(json['community_results']),
46
+ 'itemType': (0, ContentItemType_1.ContentItemTypeFromJSON)(json['itemType']),
47
+ };
36
48
  }
37
49
  function TimelineCommunityToJSON(json) {
38
50
  return TimelineCommunityToJSONTyped(json, false);
@@ -41,5 +53,9 @@ function TimelineCommunityToJSONTyped(value, ignoreDiscriminator = false) {
41
53
  if (value == null) {
42
54
  return value;
43
55
  }
44
- return Object.assign(Object.assign({}, value), { '__typename': (0, TypeName_1.TypeNameToJSON)(value['typename']) });
56
+ return {
57
+ '__typename': (0, TypeName_1.TypeNameToJSON)(value['typename']),
58
+ 'community_results': (0, CommunityResult_1.CommunityResultToJSON)(value['communityResults']),
59
+ 'itemType': (0, ContentItemType_1.ContentItemTypeToJSON)(value['itemType']),
60
+ };
45
61
  }
@@ -10,17 +10,26 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import type { TypeName } from './TypeName';
13
+ import type { TimelineMessagePromptContent } from './TimelineMessagePromptContent';
14
+ import type { ContentItemType } from './ContentItemType';
13
15
  /**
14
16
  *
15
17
  * @export
16
18
  * @interface TimelineMessagePrompt
17
19
  */
18
20
  export interface TimelineMessagePrompt {
19
- [key: string]: any | any;
20
21
  /**
21
22
  *
22
23
  */
23
- typename?: TypeName;
24
+ typename: TypeName;
25
+ /**
26
+ *
27
+ */
28
+ content: TimelineMessagePromptContent;
29
+ /**
30
+ *
31
+ */
32
+ itemType: ContentItemType;
24
33
  }
25
34
  /**
26
35
  * Check if a given object implements the TimelineMessagePrompt interface.
@@ -19,10 +19,18 @@ exports.TimelineMessagePromptFromJSONTyped = TimelineMessagePromptFromJSONTyped;
19
19
  exports.TimelineMessagePromptToJSON = TimelineMessagePromptToJSON;
20
20
  exports.TimelineMessagePromptToJSONTyped = TimelineMessagePromptToJSONTyped;
21
21
  const TypeName_1 = require("./TypeName");
22
+ const TimelineMessagePromptContent_1 = require("./TimelineMessagePromptContent");
23
+ const ContentItemType_1 = require("./ContentItemType");
22
24
  /**
23
25
  * Check if a given object implements the TimelineMessagePrompt interface.
24
26
  */
25
27
  function instanceOfTimelineMessagePrompt(value) {
28
+ if ((!('typename' in value) && !('__typename' in value)) || (value['typename'] === undefined && value['__typename'] === undefined))
29
+ return false;
30
+ if (!('content' in value) || value['content'] === undefined)
31
+ return false;
32
+ if (!('itemType' in value) || value['itemType'] === undefined)
33
+ return false;
26
34
  return true;
27
35
  }
28
36
  function TimelineMessagePromptFromJSON(json) {
@@ -32,7 +40,11 @@ function TimelineMessagePromptFromJSONTyped(json, ignoreDiscriminator) {
32
40
  if (json == null) {
33
41
  return json;
34
42
  }
35
- return Object.assign(Object.assign({}, json), { 'typename': json['__typename'] == null ? undefined : (0, TypeName_1.TypeNameFromJSON)(json['__typename']) });
43
+ return {
44
+ 'typename': (0, TypeName_1.TypeNameFromJSON)(json['__typename']),
45
+ 'content': (0, TimelineMessagePromptContent_1.TimelineMessagePromptContentFromJSON)(json['content']),
46
+ 'itemType': (0, ContentItemType_1.ContentItemTypeFromJSON)(json['itemType']),
47
+ };
36
48
  }
37
49
  function TimelineMessagePromptToJSON(json) {
38
50
  return TimelineMessagePromptToJSONTyped(json, false);
@@ -41,5 +53,9 @@ function TimelineMessagePromptToJSONTyped(value, ignoreDiscriminator = false) {
41
53
  if (value == null) {
42
54
  return value;
43
55
  }
44
- return Object.assign(Object.assign({}, value), { '__typename': (0, TypeName_1.TypeNameToJSON)(value['typename']) });
56
+ return {
57
+ '__typename': (0, TypeName_1.TypeNameToJSON)(value['typename']),
58
+ 'content': (0, TimelineMessagePromptContent_1.TimelineMessagePromptContentToJSON)(value['content']),
59
+ 'itemType': (0, ContentItemType_1.ContentItemTypeToJSON)(value['itemType']),
60
+ };
45
61
  }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Twitter OpenAPI
3
+ * Twitter OpenAPI(Swagger) specification
4
+ *
5
+ * The version of the OpenAPI document: 0.0.1
6
+ * Contact: yuki@yuki0311.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { TimelineMessagePromptButtonAction } from './TimelineMessagePromptButtonAction';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TimelineMessagePromptButton
17
+ */
18
+ export interface TimelineMessagePromptButton {
19
+ /**
20
+ *
21
+ */
22
+ action: TimelineMessagePromptButtonAction;
23
+ /**
24
+ *
25
+ */
26
+ text: string;
27
+ }
28
+ /**
29
+ * Check if a given object implements the TimelineMessagePromptButton interface.
30
+ */
31
+ export declare function instanceOfTimelineMessagePromptButton(value: object): value is TimelineMessagePromptButton;
32
+ export declare function TimelineMessagePromptButtonFromJSON(json: any): TimelineMessagePromptButton;
33
+ export declare function TimelineMessagePromptButtonFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineMessagePromptButton;
34
+ export declare function TimelineMessagePromptButtonToJSON(json: any): TimelineMessagePromptButton;
35
+ export declare function TimelineMessagePromptButtonToJSONTyped(value?: TimelineMessagePromptButton | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Twitter OpenAPI
6
+ * Twitter OpenAPI(Swagger) specification
7
+ *
8
+ * The version of the OpenAPI document: 0.0.1
9
+ * Contact: yuki@yuki0311.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfTimelineMessagePromptButton = instanceOfTimelineMessagePromptButton;
17
+ exports.TimelineMessagePromptButtonFromJSON = TimelineMessagePromptButtonFromJSON;
18
+ exports.TimelineMessagePromptButtonFromJSONTyped = TimelineMessagePromptButtonFromJSONTyped;
19
+ exports.TimelineMessagePromptButtonToJSON = TimelineMessagePromptButtonToJSON;
20
+ exports.TimelineMessagePromptButtonToJSONTyped = TimelineMessagePromptButtonToJSONTyped;
21
+ const TimelineMessagePromptButtonAction_1 = require("./TimelineMessagePromptButtonAction");
22
+ /**
23
+ * Check if a given object implements the TimelineMessagePromptButton interface.
24
+ */
25
+ function instanceOfTimelineMessagePromptButton(value) {
26
+ if (!('action' in value) || value['action'] === undefined)
27
+ return false;
28
+ if (!('text' in value) || value['text'] === undefined)
29
+ return false;
30
+ return true;
31
+ }
32
+ function TimelineMessagePromptButtonFromJSON(json) {
33
+ return TimelineMessagePromptButtonFromJSONTyped(json, false);
34
+ }
35
+ function TimelineMessagePromptButtonFromJSONTyped(json, ignoreDiscriminator) {
36
+ if (json == null) {
37
+ return json;
38
+ }
39
+ return {
40
+ 'action': (0, TimelineMessagePromptButtonAction_1.TimelineMessagePromptButtonActionFromJSON)(json['action']),
41
+ 'text': json['text'],
42
+ };
43
+ }
44
+ function TimelineMessagePromptButtonToJSON(json) {
45
+ return TimelineMessagePromptButtonToJSONTyped(json, false);
46
+ }
47
+ function TimelineMessagePromptButtonToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'action': (0, TimelineMessagePromptButtonAction_1.TimelineMessagePromptButtonActionToJSON)(value['action']),
53
+ 'text': value['text'],
54
+ };
55
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Twitter OpenAPI
3
+ * Twitter OpenAPI(Swagger) specification
4
+ *
5
+ * The version of the OpenAPI document: 0.0.1
6
+ * Contact: yuki@yuki0311.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface TimelineMessagePromptButtonAction
16
+ */
17
+ export interface TimelineMessagePromptButtonAction {
18
+ /**
19
+ *
20
+ */
21
+ dismissOnClick: boolean;
22
+ /**
23
+ *
24
+ */
25
+ url: string;
26
+ }
27
+ /**
28
+ * Check if a given object implements the TimelineMessagePromptButtonAction interface.
29
+ */
30
+ export declare function instanceOfTimelineMessagePromptButtonAction(value: object): value is TimelineMessagePromptButtonAction;
31
+ export declare function TimelineMessagePromptButtonActionFromJSON(json: any): TimelineMessagePromptButtonAction;
32
+ export declare function TimelineMessagePromptButtonActionFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineMessagePromptButtonAction;
33
+ export declare function TimelineMessagePromptButtonActionToJSON(json: any): TimelineMessagePromptButtonAction;
34
+ export declare function TimelineMessagePromptButtonActionToJSONTyped(value?: TimelineMessagePromptButtonAction | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Twitter OpenAPI
6
+ * Twitter OpenAPI(Swagger) specification
7
+ *
8
+ * The version of the OpenAPI document: 0.0.1
9
+ * Contact: yuki@yuki0311.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfTimelineMessagePromptButtonAction = instanceOfTimelineMessagePromptButtonAction;
17
+ exports.TimelineMessagePromptButtonActionFromJSON = TimelineMessagePromptButtonActionFromJSON;
18
+ exports.TimelineMessagePromptButtonActionFromJSONTyped = TimelineMessagePromptButtonActionFromJSONTyped;
19
+ exports.TimelineMessagePromptButtonActionToJSON = TimelineMessagePromptButtonActionToJSON;
20
+ exports.TimelineMessagePromptButtonActionToJSONTyped = TimelineMessagePromptButtonActionToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the TimelineMessagePromptButtonAction interface.
23
+ */
24
+ function instanceOfTimelineMessagePromptButtonAction(value) {
25
+ if (!('dismissOnClick' in value) || value['dismissOnClick'] === undefined)
26
+ return false;
27
+ if (!('url' in value) || value['url'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function TimelineMessagePromptButtonActionFromJSON(json) {
32
+ return TimelineMessagePromptButtonActionFromJSONTyped(json, false);
33
+ }
34
+ function TimelineMessagePromptButtonActionFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'dismissOnClick': json['dismissOnClick'],
40
+ 'url': json['url'],
41
+ };
42
+ }
43
+ function TimelineMessagePromptButtonActionToJSON(json) {
44
+ return TimelineMessagePromptButtonActionToJSONTyped(json, false);
45
+ }
46
+ function TimelineMessagePromptButtonActionToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'dismissOnClick': value['dismissOnClick'],
52
+ 'url': value['url'],
53
+ };
54
+ }