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
@@ -0,0 +1,62 @@
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
+ import { TimelineMessagePromptButtonFromJSON, TimelineMessagePromptButtonToJSON, } from './TimelineMessagePromptButton';
15
+ import { TimelineMessagePromptRichTextFromJSON, TimelineMessagePromptRichTextToJSON, } from './TimelineMessagePromptRichText';
16
+ /**
17
+ * @export
18
+ */
19
+ export const TimelineMessagePromptContentContentTypeEnum = {
20
+ TimelineInlinePrompt: 'TimelineInlinePrompt',
21
+ TimelineCompactPrompt: 'TimelineCompactPrompt',
22
+ };
23
+ /**
24
+ * Check if a given object implements the TimelineMessagePromptContent interface.
25
+ */
26
+ export function instanceOfTimelineMessagePromptContent(value) {
27
+ if (!('contentType' in value) || value['contentType'] === undefined)
28
+ return false;
29
+ if (!('headerText' in value) || value['headerText'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ export function TimelineMessagePromptContentFromJSON(json) {
34
+ return TimelineMessagePromptContentFromJSONTyped(json, false);
35
+ }
36
+ export function TimelineMessagePromptContentFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'bodyRichText': json['bodyRichText'] == null ? undefined : TimelineMessagePromptRichTextFromJSON(json['bodyRichText']),
42
+ 'bodyText': json['bodyText'] == null ? undefined : json['bodyText'],
43
+ 'contentType': json['contentType'],
44
+ 'headerText': json['headerText'],
45
+ 'primaryButtonAction': json['primaryButtonAction'] == null ? undefined : TimelineMessagePromptButtonFromJSON(json['primaryButtonAction']),
46
+ };
47
+ }
48
+ export function TimelineMessagePromptContentToJSON(json) {
49
+ return TimelineMessagePromptContentToJSONTyped(json, false);
50
+ }
51
+ export function TimelineMessagePromptContentToJSONTyped(value, ignoreDiscriminator = false) {
52
+ if (value == null) {
53
+ return value;
54
+ }
55
+ return {
56
+ 'bodyRichText': TimelineMessagePromptRichTextToJSON(value['bodyRichText']),
57
+ 'bodyText': value['bodyText'],
58
+ 'contentType': value['contentType'],
59
+ 'headerText': value['headerText'],
60
+ 'primaryButtonAction': TimelineMessagePromptButtonToJSON(value['primaryButtonAction']),
61
+ };
62
+ }
@@ -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 { TimelineMessagePromptRichTextEntity } from './TimelineMessagePromptRichTextEntity';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TimelineMessagePromptRichText
17
+ */
18
+ export interface TimelineMessagePromptRichText {
19
+ /**
20
+ *
21
+ */
22
+ entities: Array<TimelineMessagePromptRichTextEntity>;
23
+ /**
24
+ *
25
+ */
26
+ text: string;
27
+ }
28
+ /**
29
+ * Check if a given object implements the TimelineMessagePromptRichText interface.
30
+ */
31
+ export declare function instanceOfTimelineMessagePromptRichText(value: object): value is TimelineMessagePromptRichText;
32
+ export declare function TimelineMessagePromptRichTextFromJSON(json: any): TimelineMessagePromptRichText;
33
+ export declare function TimelineMessagePromptRichTextFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineMessagePromptRichText;
34
+ export declare function TimelineMessagePromptRichTextToJSON(json: any): TimelineMessagePromptRichText;
35
+ export declare function TimelineMessagePromptRichTextToJSONTyped(value?: TimelineMessagePromptRichText | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,48 @@
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
+ import { TimelineMessagePromptRichTextEntityFromJSON, TimelineMessagePromptRichTextEntityToJSON, } from './TimelineMessagePromptRichTextEntity';
15
+ /**
16
+ * Check if a given object implements the TimelineMessagePromptRichText interface.
17
+ */
18
+ export function instanceOfTimelineMessagePromptRichText(value) {
19
+ if (!('entities' in value) || value['entities'] === undefined)
20
+ return false;
21
+ if (!('text' in value) || value['text'] === undefined)
22
+ return false;
23
+ return true;
24
+ }
25
+ export function TimelineMessagePromptRichTextFromJSON(json) {
26
+ return TimelineMessagePromptRichTextFromJSONTyped(json, false);
27
+ }
28
+ export function TimelineMessagePromptRichTextFromJSONTyped(json, ignoreDiscriminator) {
29
+ if (json == null) {
30
+ return json;
31
+ }
32
+ return {
33
+ 'entities': (json['entities'].map(TimelineMessagePromptRichTextEntityFromJSON)),
34
+ 'text': json['text'],
35
+ };
36
+ }
37
+ export function TimelineMessagePromptRichTextToJSON(json) {
38
+ return TimelineMessagePromptRichTextToJSONTyped(json, false);
39
+ }
40
+ export function TimelineMessagePromptRichTextToJSONTyped(value, ignoreDiscriminator = false) {
41
+ if (value == null) {
42
+ return value;
43
+ }
44
+ return {
45
+ 'entities': (value['entities'].map(TimelineMessagePromptRichTextEntityToJSON)),
46
+ 'text': value['text'],
47
+ };
48
+ }
@@ -0,0 +1,39 @@
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 { TimelineMessagePromptRichTextEntityRef } from './TimelineMessagePromptRichTextEntityRef';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TimelineMessagePromptRichTextEntity
17
+ */
18
+ export interface TimelineMessagePromptRichTextEntity {
19
+ /**
20
+ *
21
+ */
22
+ fromIndex: number;
23
+ /**
24
+ *
25
+ */
26
+ ref: TimelineMessagePromptRichTextEntityRef;
27
+ /**
28
+ *
29
+ */
30
+ toIndex: number;
31
+ }
32
+ /**
33
+ * Check if a given object implements the TimelineMessagePromptRichTextEntity interface.
34
+ */
35
+ export declare function instanceOfTimelineMessagePromptRichTextEntity(value: object): value is TimelineMessagePromptRichTextEntity;
36
+ export declare function TimelineMessagePromptRichTextEntityFromJSON(json: any): TimelineMessagePromptRichTextEntity;
37
+ export declare function TimelineMessagePromptRichTextEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineMessagePromptRichTextEntity;
38
+ export declare function TimelineMessagePromptRichTextEntityToJSON(json: any): TimelineMessagePromptRichTextEntity;
39
+ export declare function TimelineMessagePromptRichTextEntityToJSONTyped(value?: TimelineMessagePromptRichTextEntity | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,52 @@
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
+ import { TimelineMessagePromptRichTextEntityRefFromJSON, TimelineMessagePromptRichTextEntityRefToJSON, } from './TimelineMessagePromptRichTextEntityRef';
15
+ /**
16
+ * Check if a given object implements the TimelineMessagePromptRichTextEntity interface.
17
+ */
18
+ export function instanceOfTimelineMessagePromptRichTextEntity(value) {
19
+ if (!('fromIndex' in value) || value['fromIndex'] === undefined)
20
+ return false;
21
+ if (!('ref' in value) || value['ref'] === undefined)
22
+ return false;
23
+ if (!('toIndex' in value) || value['toIndex'] === undefined)
24
+ return false;
25
+ return true;
26
+ }
27
+ export function TimelineMessagePromptRichTextEntityFromJSON(json) {
28
+ return TimelineMessagePromptRichTextEntityFromJSONTyped(json, false);
29
+ }
30
+ export function TimelineMessagePromptRichTextEntityFromJSONTyped(json, ignoreDiscriminator) {
31
+ if (json == null) {
32
+ return json;
33
+ }
34
+ return {
35
+ 'fromIndex': json['fromIndex'],
36
+ 'ref': TimelineMessagePromptRichTextEntityRefFromJSON(json['ref']),
37
+ 'toIndex': json['toIndex'],
38
+ };
39
+ }
40
+ export function TimelineMessagePromptRichTextEntityToJSON(json) {
41
+ return TimelineMessagePromptRichTextEntityToJSONTyped(json, false);
42
+ }
43
+ export function TimelineMessagePromptRichTextEntityToJSONTyped(value, ignoreDiscriminator = false) {
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'fromIndex': value['fromIndex'],
49
+ 'ref': TimelineMessagePromptRichTextEntityRefToJSON(value['ref']),
50
+ 'toIndex': value['toIndex'],
51
+ };
52
+ }
@@ -0,0 +1,52 @@
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 TimelineMessagePromptRichTextEntityRef
16
+ */
17
+ export interface TimelineMessagePromptRichTextEntityRef {
18
+ /**
19
+ *
20
+ */
21
+ type: TimelineMessagePromptRichTextEntityRefTypeEnum;
22
+ /**
23
+ *
24
+ */
25
+ url: string;
26
+ /**
27
+ *
28
+ */
29
+ urlType: TimelineMessagePromptRichTextEntityRefUrlTypeEnum;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const TimelineMessagePromptRichTextEntityRefTypeEnum: {
35
+ readonly TimelineUrl: "TimelineUrl";
36
+ };
37
+ export type TimelineMessagePromptRichTextEntityRefTypeEnum = typeof TimelineMessagePromptRichTextEntityRefTypeEnum[keyof typeof TimelineMessagePromptRichTextEntityRefTypeEnum];
38
+ /**
39
+ * @export
40
+ */
41
+ export declare const TimelineMessagePromptRichTextEntityRefUrlTypeEnum: {
42
+ readonly ExternalUrl: "ExternalUrl";
43
+ };
44
+ export type TimelineMessagePromptRichTextEntityRefUrlTypeEnum = typeof TimelineMessagePromptRichTextEntityRefUrlTypeEnum[keyof typeof TimelineMessagePromptRichTextEntityRefUrlTypeEnum];
45
+ /**
46
+ * Check if a given object implements the TimelineMessagePromptRichTextEntityRef interface.
47
+ */
48
+ export declare function instanceOfTimelineMessagePromptRichTextEntityRef(value: object): value is TimelineMessagePromptRichTextEntityRef;
49
+ export declare function TimelineMessagePromptRichTextEntityRefFromJSON(json: any): TimelineMessagePromptRichTextEntityRef;
50
+ export declare function TimelineMessagePromptRichTextEntityRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelineMessagePromptRichTextEntityRef;
51
+ export declare function TimelineMessagePromptRichTextEntityRefToJSON(json: any): TimelineMessagePromptRichTextEntityRef;
52
+ export declare function TimelineMessagePromptRichTextEntityRefToJSONTyped(value?: TimelineMessagePromptRichTextEntityRef | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
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
+ * @export
16
+ */
17
+ export const TimelineMessagePromptRichTextEntityRefTypeEnum = {
18
+ TimelineUrl: 'TimelineUrl',
19
+ };
20
+ /**
21
+ * @export
22
+ */
23
+ export const TimelineMessagePromptRichTextEntityRefUrlTypeEnum = {
24
+ ExternalUrl: 'ExternalUrl',
25
+ };
26
+ /**
27
+ * Check if a given object implements the TimelineMessagePromptRichTextEntityRef interface.
28
+ */
29
+ export function instanceOfTimelineMessagePromptRichTextEntityRef(value) {
30
+ if (!('type' in value) || value['type'] === undefined)
31
+ return false;
32
+ if (value['type'] !== 'TimelineUrl')
33
+ return false;
34
+ if (!('url' in value) || value['url'] === undefined)
35
+ return false;
36
+ if (!('urlType' in value) || value['urlType'] === undefined)
37
+ return false;
38
+ if (value['urlType'] !== 'ExternalUrl')
39
+ return false;
40
+ return true;
41
+ }
42
+ export function TimelineMessagePromptRichTextEntityRefFromJSON(json) {
43
+ return TimelineMessagePromptRichTextEntityRefFromJSONTyped(json, false);
44
+ }
45
+ export function TimelineMessagePromptRichTextEntityRefFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'type': json['type'],
51
+ 'url': json['url'],
52
+ 'urlType': json['urlType'],
53
+ };
54
+ }
55
+ export function TimelineMessagePromptRichTextEntityRefToJSON(json) {
56
+ return TimelineMessagePromptRichTextEntityRefToJSONTyped(json, false);
57
+ }
58
+ export function TimelineMessagePromptRichTextEntityRefToJSONTyped(value, ignoreDiscriminator = false) {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'type': value['type'],
64
+ 'url': value['url'],
65
+ 'urlType': value['urlType'],
66
+ };
67
+ }
@@ -9,18 +9,32 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TimelinePromptContent } from './TimelinePromptContent';
12
13
  import type { TypeName } from './TypeName';
14
+ import type { ClientEventInfo } from './ClientEventInfo';
15
+ import type { ContentItemType } from './ContentItemType';
13
16
  /**
14
17
  *
15
18
  * @export
16
19
  * @interface TimelinePrompt
17
20
  */
18
21
  export interface TimelinePrompt {
19
- [key: string]: any | any;
20
22
  /**
21
23
  *
22
24
  */
23
- typename?: TypeName;
25
+ typename: TypeName;
26
+ /**
27
+ *
28
+ */
29
+ clientEventInfo: ClientEventInfo;
30
+ /**
31
+ *
32
+ */
33
+ content: TimelinePromptContent;
34
+ /**
35
+ *
36
+ */
37
+ itemType: ContentItemType;
24
38
  }
25
39
  /**
26
40
  * Check if a given object implements the TimelinePrompt interface.
@@ -11,11 +11,22 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { TimelinePromptContentFromJSON, TimelinePromptContentToJSON, } from './TimelinePromptContent';
14
15
  import { TypeNameFromJSON, TypeNameToJSON, } from './TypeName';
16
+ import { ClientEventInfoFromJSON, ClientEventInfoToJSON, } from './ClientEventInfo';
17
+ import { ContentItemTypeFromJSON, ContentItemTypeToJSON, } from './ContentItemType';
15
18
  /**
16
19
  * Check if a given object implements the TimelinePrompt interface.
17
20
  */
18
21
  export function instanceOfTimelinePrompt(value) {
22
+ if ((!('typename' in value) && !('__typename' in value)) || (value['typename'] === undefined && value['__typename'] === undefined))
23
+ return false;
24
+ if (!('clientEventInfo' in value) || value['clientEventInfo'] === undefined)
25
+ return false;
26
+ if (!('content' in value) || value['content'] === undefined)
27
+ return false;
28
+ if (!('itemType' in value) || value['itemType'] === undefined)
29
+ return false;
19
30
  return true;
20
31
  }
21
32
  export function TimelinePromptFromJSON(json) {
@@ -25,7 +36,12 @@ export function TimelinePromptFromJSONTyped(json, ignoreDiscriminator) {
25
36
  if (json == null) {
26
37
  return json;
27
38
  }
28
- return Object.assign(Object.assign({}, json), { 'typename': json['__typename'] == null ? undefined : TypeNameFromJSON(json['__typename']) });
39
+ return {
40
+ 'typename': TypeNameFromJSON(json['__typename']),
41
+ 'clientEventInfo': ClientEventInfoFromJSON(json['clientEventInfo']),
42
+ 'content': TimelinePromptContentFromJSON(json['content']),
43
+ 'itemType': ContentItemTypeFromJSON(json['itemType']),
44
+ };
29
45
  }
30
46
  export function TimelinePromptToJSON(json) {
31
47
  return TimelinePromptToJSONTyped(json, false);
@@ -34,5 +50,10 @@ export function TimelinePromptToJSONTyped(value, ignoreDiscriminator = false) {
34
50
  if (value == null) {
35
51
  return value;
36
52
  }
37
- return Object.assign(Object.assign({}, value), { '__typename': TypeNameToJSON(value['typename']) });
53
+ return {
54
+ '__typename': TypeNameToJSON(value['typename']),
55
+ 'clientEventInfo': ClientEventInfoToJSON(value['clientEventInfo']),
56
+ 'content': TimelinePromptContentToJSON(value['content']),
57
+ 'itemType': ContentItemTypeToJSON(value['itemType']),
58
+ };
38
59
  }
@@ -0,0 +1,30 @@
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 TimelinePromptCallback
16
+ */
17
+ export interface TimelinePromptCallback {
18
+ /**
19
+ *
20
+ */
21
+ endpoint: string;
22
+ }
23
+ /**
24
+ * Check if a given object implements the TimelinePromptCallback interface.
25
+ */
26
+ export declare function instanceOfTimelinePromptCallback(value: object): value is TimelinePromptCallback;
27
+ export declare function TimelinePromptCallbackFromJSON(json: any): TimelinePromptCallback;
28
+ export declare function TimelinePromptCallbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelinePromptCallback;
29
+ export declare function TimelinePromptCallbackToJSON(json: any): TimelinePromptCallback;
30
+ export declare function TimelinePromptCallbackToJSONTyped(value?: TimelinePromptCallback | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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
+ * Check if a given object implements the TimelinePromptCallback interface.
16
+ */
17
+ export function instanceOfTimelinePromptCallback(value) {
18
+ if (!('endpoint' in value) || value['endpoint'] === undefined)
19
+ return false;
20
+ return true;
21
+ }
22
+ export function TimelinePromptCallbackFromJSON(json) {
23
+ return TimelinePromptCallbackFromJSONTyped(json, false);
24
+ }
25
+ export function TimelinePromptCallbackFromJSONTyped(json, ignoreDiscriminator) {
26
+ if (json == null) {
27
+ return json;
28
+ }
29
+ return {
30
+ 'endpoint': json['endpoint'],
31
+ };
32
+ }
33
+ export function TimelinePromptCallbackToJSON(json) {
34
+ return TimelinePromptCallbackToJSONTyped(json, false);
35
+ }
36
+ export function TimelinePromptCallbackToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'endpoint': value['endpoint'],
42
+ };
43
+ }
@@ -0,0 +1,73 @@
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 { TimelinePromptCallback } from './TimelinePromptCallback';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface TimelinePromptContent
17
+ */
18
+ export interface TimelinePromptContent {
19
+ /**
20
+ *
21
+ */
22
+ confirmation: string;
23
+ /**
24
+ *
25
+ */
26
+ contentType: TimelinePromptContentContentTypeEnum;
27
+ /**
28
+ *
29
+ */
30
+ displayType: TimelinePromptContentDisplayTypeEnum;
31
+ /**
32
+ *
33
+ */
34
+ isRelevantCallback: TimelinePromptCallback;
35
+ /**
36
+ *
37
+ */
38
+ isRelevantText: string;
39
+ /**
40
+ *
41
+ */
42
+ notRelevantCallback: TimelinePromptCallback;
43
+ /**
44
+ *
45
+ */
46
+ notRelevantText: string;
47
+ /**
48
+ *
49
+ */
50
+ title: string;
51
+ }
52
+ /**
53
+ * @export
54
+ */
55
+ export declare const TimelinePromptContentContentTypeEnum: {
56
+ readonly TimelineRelevancePrompt: "TimelineRelevancePrompt";
57
+ };
58
+ export type TimelinePromptContentContentTypeEnum = typeof TimelinePromptContentContentTypeEnum[keyof typeof TimelinePromptContentContentTypeEnum];
59
+ /**
60
+ * @export
61
+ */
62
+ export declare const TimelinePromptContentDisplayTypeEnum: {
63
+ readonly Compact: "Compact";
64
+ };
65
+ export type TimelinePromptContentDisplayTypeEnum = typeof TimelinePromptContentDisplayTypeEnum[keyof typeof TimelinePromptContentDisplayTypeEnum];
66
+ /**
67
+ * Check if a given object implements the TimelinePromptContent interface.
68
+ */
69
+ export declare function instanceOfTimelinePromptContent(value: object): value is TimelinePromptContent;
70
+ export declare function TimelinePromptContentFromJSON(json: any): TimelinePromptContent;
71
+ export declare function TimelinePromptContentFromJSONTyped(json: any, ignoreDiscriminator: boolean): TimelinePromptContent;
72
+ export declare function TimelinePromptContentToJSON(json: any): TimelinePromptContent;
73
+ export declare function TimelinePromptContentToJSONTyped(value?: TimelinePromptContent | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,88 @@
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
+ import { TimelinePromptCallbackFromJSON, TimelinePromptCallbackToJSON, } from './TimelinePromptCallback';
15
+ /**
16
+ * @export
17
+ */
18
+ export const TimelinePromptContentContentTypeEnum = {
19
+ TimelineRelevancePrompt: 'TimelineRelevancePrompt',
20
+ };
21
+ /**
22
+ * @export
23
+ */
24
+ export const TimelinePromptContentDisplayTypeEnum = {
25
+ Compact: 'Compact',
26
+ };
27
+ /**
28
+ * Check if a given object implements the TimelinePromptContent interface.
29
+ */
30
+ export function instanceOfTimelinePromptContent(value) {
31
+ if (!('confirmation' in value) || value['confirmation'] === undefined)
32
+ return false;
33
+ if (!('contentType' in value) || value['contentType'] === undefined)
34
+ return false;
35
+ if (value['contentType'] !== 'TimelineRelevancePrompt')
36
+ return false;
37
+ if (!('displayType' in value) || value['displayType'] === undefined)
38
+ return false;
39
+ if (value['displayType'] !== 'Compact')
40
+ return false;
41
+ if (!('isRelevantCallback' in value) || value['isRelevantCallback'] === undefined)
42
+ return false;
43
+ if (!('isRelevantText' in value) || value['isRelevantText'] === undefined)
44
+ return false;
45
+ if (!('notRelevantCallback' in value) || value['notRelevantCallback'] === undefined)
46
+ return false;
47
+ if (!('notRelevantText' in value) || value['notRelevantText'] === undefined)
48
+ return false;
49
+ if (!('title' in value) || value['title'] === undefined)
50
+ return false;
51
+ return true;
52
+ }
53
+ export function TimelinePromptContentFromJSON(json) {
54
+ return TimelinePromptContentFromJSONTyped(json, false);
55
+ }
56
+ export function TimelinePromptContentFromJSONTyped(json, ignoreDiscriminator) {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+ 'confirmation': json['confirmation'],
62
+ 'contentType': json['contentType'],
63
+ 'displayType': json['displayType'],
64
+ 'isRelevantCallback': TimelinePromptCallbackFromJSON(json['isRelevantCallback']),
65
+ 'isRelevantText': json['isRelevantText'],
66
+ 'notRelevantCallback': TimelinePromptCallbackFromJSON(json['notRelevantCallback']),
67
+ 'notRelevantText': json['notRelevantText'],
68
+ 'title': json['title'],
69
+ };
70
+ }
71
+ export function TimelinePromptContentToJSON(json) {
72
+ return TimelinePromptContentToJSONTyped(json, false);
73
+ }
74
+ export function TimelinePromptContentToJSONTyped(value, ignoreDiscriminator = false) {
75
+ if (value == null) {
76
+ return value;
77
+ }
78
+ return {
79
+ 'confirmation': value['confirmation'],
80
+ 'contentType': value['contentType'],
81
+ 'displayType': value['displayType'],
82
+ 'isRelevantCallback': TimelinePromptCallbackToJSON(value['isRelevantCallback']),
83
+ 'isRelevantText': value['isRelevantText'],
84
+ 'notRelevantCallback': TimelinePromptCallbackToJSON(value['notRelevantCallback']),
85
+ 'notRelevantText': value['notRelevantText'],
86
+ 'title': value['title'],
87
+ };
88
+ }