twitter-openapi-typescript-generated 0.0.12 → 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 (108) hide show
  1. package/.openapi-generator/FILES +13 -0
  2. package/README.md +2 -2
  3. package/dist/models/BirdwatchEntity.d.ts +45 -0
  4. package/dist/models/BirdwatchEntity.d.ts.map +1 -0
  5. package/dist/models/BirdwatchEntity.js +58 -0
  6. package/dist/models/BirdwatchEntity.js.map +1 -0
  7. package/dist/models/BirdwatchEntityRef.d.ts +58 -0
  8. package/dist/models/BirdwatchEntityRef.d.ts.map +1 -0
  9. package/dist/models/BirdwatchEntityRef.js +69 -0
  10. package/dist/models/BirdwatchEntityRef.js.map +1 -0
  11. package/dist/models/BirdwatchPivot.d.ts +91 -0
  12. package/dist/models/BirdwatchPivot.d.ts.map +1 -0
  13. package/dist/models/BirdwatchPivot.js +87 -0
  14. package/dist/models/BirdwatchPivot.js.map +1 -0
  15. package/dist/models/BirdwatchPivotFooter.d.ts +39 -0
  16. package/dist/models/BirdwatchPivotFooter.d.ts.map +1 -0
  17. package/dist/models/BirdwatchPivotFooter.js +55 -0
  18. package/dist/models/BirdwatchPivotFooter.js.map +1 -0
  19. package/dist/models/BirdwatchPivotNote.d.ts +32 -0
  20. package/dist/models/BirdwatchPivotNote.d.ts.map +1 -0
  21. package/dist/models/BirdwatchPivotNote.js +51 -0
  22. package/dist/models/BirdwatchPivotNote.js.map +1 -0
  23. package/dist/models/BirdwatchPivotSubtitle.d.ts +39 -0
  24. package/dist/models/BirdwatchPivotSubtitle.d.ts.map +1 -0
  25. package/dist/models/BirdwatchPivotSubtitle.js +55 -0
  26. package/dist/models/BirdwatchPivotSubtitle.js.map +1 -0
  27. package/dist/models/ContentItemType.d.ts +1 -0
  28. package/dist/models/ContentItemType.d.ts.map +1 -1
  29. package/dist/models/ContentItemType.js +2 -1
  30. package/dist/models/ContentItemType.js.map +1 -1
  31. package/dist/models/ExtMediaAvailability.d.ts +7 -0
  32. package/dist/models/ExtMediaAvailability.d.ts.map +1 -1
  33. package/dist/models/ExtMediaAvailability.js +4 -1
  34. package/dist/models/ExtMediaAvailability.js.map +1 -1
  35. package/dist/models/ItemContentUnion.d.ts +3 -0
  36. package/dist/models/ItemContentUnion.d.ts.map +1 -1
  37. package/dist/models/ItemContentUnion.js +5 -0
  38. package/dist/models/ItemContentUnion.js.map +1 -1
  39. package/dist/models/NoteTweet.d.ts +39 -0
  40. package/dist/models/NoteTweet.d.ts.map +1 -0
  41. package/dist/models/NoteTweet.js +55 -0
  42. package/dist/models/NoteTweet.js.map +1 -0
  43. package/dist/models/NoteTweetResult.d.ts +33 -0
  44. package/dist/models/NoteTweetResult.d.ts.map +1 -0
  45. package/dist/models/NoteTweetResult.js +52 -0
  46. package/dist/models/NoteTweetResult.js.map +1 -0
  47. package/dist/models/NoteTweetResultData.d.ts +59 -0
  48. package/dist/models/NoteTweetResultData.d.ts.map +1 -0
  49. package/dist/models/NoteTweetResultData.js +65 -0
  50. package/dist/models/NoteTweetResultData.js.map +1 -0
  51. package/dist/models/NoteTweetResultMedia.d.ts +32 -0
  52. package/dist/models/NoteTweetResultMedia.d.ts.map +1 -0
  53. package/dist/models/NoteTweetResultMedia.js +51 -0
  54. package/dist/models/NoteTweetResultMedia.js.map +1 -0
  55. package/dist/models/NoteTweetResultRichText.d.ts +33 -0
  56. package/dist/models/NoteTweetResultRichText.d.ts.map +1 -0
  57. package/dist/models/NoteTweetResultRichText.js +52 -0
  58. package/dist/models/NoteTweetResultRichText.js.map +1 -0
  59. package/dist/models/NoteTweetResultRichTextTag.d.ts +52 -0
  60. package/dist/models/NoteTweetResultRichTextTag.d.ts.map +1 -0
  61. package/dist/models/NoteTweetResultRichTextTag.js +64 -0
  62. package/dist/models/NoteTweetResultRichTextTag.js.map +1 -0
  63. package/dist/models/TimelineCommunity.d.ts +34 -0
  64. package/dist/models/TimelineCommunity.d.ts.map +1 -0
  65. package/dist/models/TimelineCommunity.js +59 -0
  66. package/dist/models/TimelineCommunity.js.map +1 -0
  67. package/dist/models/Tweet.d.ts +20 -0
  68. package/dist/models/Tweet.d.ts.map +1 -1
  69. package/dist/models/Tweet.js +8 -0
  70. package/dist/models/Tweet.js.map +1 -1
  71. package/dist/models/TypeName.d.ts +1 -0
  72. package/dist/models/TypeName.d.ts.map +1 -1
  73. package/dist/models/TypeName.js +1 -0
  74. package/dist/models/TypeName.js.map +1 -1
  75. package/dist/models/index.d.ts +13 -0
  76. package/dist/models/index.d.ts.map +1 -1
  77. package/dist/models/index.js +13 -0
  78. package/dist/models/index.js.map +1 -1
  79. package/package.json +2 -3
  80. package/src/models/BirdwatchEntity.ts +91 -0
  81. package/src/models/BirdwatchEntityRef.ts +102 -0
  82. package/src/models/BirdwatchPivot.ts +165 -0
  83. package/src/models/BirdwatchPivotFooter.ts +82 -0
  84. package/src/models/BirdwatchPivotNote.ts +66 -0
  85. package/src/models/BirdwatchPivotSubtitle.ts +82 -0
  86. package/src/models/ContentItemType.ts +2 -1
  87. package/src/models/ExtMediaAvailability.ts +10 -1
  88. package/src/models/ItemContentUnion.ts +12 -1
  89. package/src/models/NoteTweet.ts +82 -0
  90. package/src/models/NoteTweetResult.ts +73 -0
  91. package/src/models/NoteTweetResultData.ts +119 -0
  92. package/src/models/NoteTweetResultMedia.ts +66 -0
  93. package/src/models/NoteTweetResultRichText.ts +73 -0
  94. package/src/models/NoteTweetResultRichTextTag.ts +95 -0
  95. package/src/models/TimelineCommunity.ts +75 -0
  96. package/src/models/Tweet.ts +36 -0
  97. package/src/models/TypeName.ts +1 -0
  98. package/src/models/index.ts +13 -0
  99. package/tools/openapi-generator-config.yaml +1 -1
  100. package/twitter-openapi/README.md +2 -0
  101. package/twitter-openapi/dist/compatible/openapi-3.0.yaml +172 -0
  102. package/twitter-openapi/dist/docs/openapi-3.0.yaml +172 -0
  103. package/twitter-openapi/src/openapi/schemas/content.yaml +9 -0
  104. package/twitter-openapi/src/openapi/schemas/tweet.yaml +168 -1
  105. package/twitter-openapi/src/openapi/schemas/typename.yaml +1 -0
  106. package/twitter-openapi/test/python/test_serialize.py +24 -0
  107. package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
  108. package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
@@ -19,6 +19,12 @@ import { exists, mapValues } from '../runtime';
19
19
  * @interface ExtMediaAvailability
20
20
  */
21
21
  export interface ExtMediaAvailability {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ExtMediaAvailability
26
+ */
27
+ reason?: string;
22
28
  /**
23
29
  *
24
30
  * @type {string}
@@ -32,7 +38,8 @@ export interface ExtMediaAvailability {
32
38
  * @export
33
39
  */
34
40
  export const ExtMediaAvailabilityStatusEnum = {
35
- Available: 'Available'
41
+ Available: 'Available',
42
+ Unavailable: 'Unavailable'
36
43
  } as const;
37
44
  export type ExtMediaAvailabilityStatusEnum = typeof ExtMediaAvailabilityStatusEnum[keyof typeof ExtMediaAvailabilityStatusEnum];
38
45
 
@@ -56,6 +63,7 @@ export function ExtMediaAvailabilityFromJSONTyped(json: any, ignoreDiscriminator
56
63
  }
57
64
  return {
58
65
 
66
+ 'reason': !exists(json, 'reason') ? undefined : json['reason'],
59
67
  'status': !exists(json, 'status') ? undefined : json['status'],
60
68
  };
61
69
  }
@@ -69,6 +77,7 @@ export function ExtMediaAvailabilityToJSON(value?: ExtMediaAvailability | null):
69
77
  }
70
78
  return {
71
79
 
80
+ 'reason': value.reason,
72
81
  'status': value.status,
73
82
  };
74
83
  }
@@ -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':
@@ -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
+
@@ -0,0 +1,95 @@
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 NoteTweetResultRichTextTag
20
+ */
21
+ export interface NoteTweetResultRichTextTag {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof NoteTweetResultRichTextTag
26
+ */
27
+ fromIndex: number;
28
+ /**
29
+ *
30
+ * @type {Array<string>}
31
+ * @memberof NoteTweetResultRichTextTag
32
+ */
33
+ richtextTypes: Array<NoteTweetResultRichTextTagRichtextTypesEnum>;
34
+ /**
35
+ *
36
+ * @type {number}
37
+ * @memberof NoteTweetResultRichTextTag
38
+ */
39
+ toIndex: number;
40
+ }
41
+
42
+
43
+ /**
44
+ * @export
45
+ */
46
+ export const NoteTweetResultRichTextTagRichtextTypesEnum = {
47
+ Bold: 'Bold',
48
+ Italic: 'Italic'
49
+ } as const;
50
+ export type NoteTweetResultRichTextTagRichtextTypesEnum = typeof NoteTweetResultRichTextTagRichtextTypesEnum[keyof typeof NoteTweetResultRichTextTagRichtextTypesEnum];
51
+
52
+
53
+ /**
54
+ * Check if a given object implements the NoteTweetResultRichTextTag interface.
55
+ */
56
+ export function instanceOfNoteTweetResultRichTextTag(value: object): boolean {
57
+ let isInstance = true;
58
+ isInstance = isInstance && "fromIndex" in value;
59
+ isInstance = isInstance && "richtextTypes" in value;
60
+ isInstance = isInstance && "toIndex" in value;
61
+
62
+ return isInstance;
63
+ }
64
+
65
+ export function NoteTweetResultRichTextTagFromJSON(json: any): NoteTweetResultRichTextTag {
66
+ return NoteTweetResultRichTextTagFromJSONTyped(json, false);
67
+ }
68
+
69
+ export function NoteTweetResultRichTextTagFromJSONTyped(json: any, ignoreDiscriminator: boolean): NoteTweetResultRichTextTag {
70
+ if ((json === undefined) || (json === null)) {
71
+ return json;
72
+ }
73
+ return {
74
+
75
+ 'fromIndex': json['from_index'],
76
+ 'richtextTypes': json['richtext_types'],
77
+ 'toIndex': json['to_index'],
78
+ };
79
+ }
80
+
81
+ export function NoteTweetResultRichTextTagToJSON(value?: NoteTweetResultRichTextTag | null): any {
82
+ if (value === undefined) {
83
+ return undefined;
84
+ }
85
+ if (value === null) {
86
+ return null;
87
+ }
88
+ return {
89
+
90
+ 'from_index': value.fromIndex,
91
+ 'richtext_types': value.richtextTypes,
92
+ 'to_index': value.toIndex,
93
+ };
94
+ }
95
+
@@ -0,0 +1,75 @@
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 { TypeName } from './TypeName';
17
+ import {
18
+ TypeNameFromJSON,
19
+ TypeNameFromJSONTyped,
20
+ TypeNameToJSON,
21
+ } from './TypeName';
22
+
23
+ /**
24
+ *
25
+ * @export
26
+ * @interface TimelineCommunity
27
+ */
28
+ export interface TimelineCommunity {
29
+ [key: string]: any | any;
30
+ /**
31
+ *
32
+ * @type {TypeName}
33
+ * @memberof TimelineCommunity
34
+ */
35
+ typename?: TypeName;
36
+ }
37
+
38
+ /**
39
+ * Check if a given object implements the TimelineCommunity interface.
40
+ */
41
+ export function instanceOfTimelineCommunity(value: object): boolean {
42
+ let isInstance = true;
43
+
44
+ return isInstance;
45
+ }
46
+
47
+ export function TimelineCommunityFromJSON(json: any): TimelineCommunity {
48
+ return TimelineCommunityFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function TimelineCommunityFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineCommunity {
52
+ if ((json === undefined) || (json === null)) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ ...json,
58
+ 'typename': !exists(json, '__typename') ? undefined : TypeNameFromJSON(json['__typename']),
59
+ };
60
+ }
61
+
62
+ export function TimelineCommunityToJSON(value?: TimelineCommunity | null): any {
63
+ if (value === undefined) {
64
+ return undefined;
65
+ }
66
+ if (value === null) {
67
+ return null;
68
+ }
69
+ return {
70
+
71
+ ...value,
72
+ '__typename': TypeNameToJSON(value.typename),
73
+ };
74
+ }
75
+