twitter-openapi-typescript-generated 0.0.10 → 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.
- package/.openapi-generator/FILES +24 -4
- package/LICENSE +31 -0
- package/{LICENSE.txt → LICENSE.AGPL} +661 -661
- package/README.md +2 -2
- package/dist/apis/DefaultApi.js +1 -1
- package/dist/apis/OtherApi.js +1 -1
- package/dist/apis/PostApi.js +1 -1
- package/dist/apis/TweetApi.js +1 -1
- package/dist/apis/UserApi.js +1 -1
- package/dist/apis/UserListApi.js +1 -1
- package/dist/apis/UsersApi.js +1 -1
- package/dist/apis/V11GetApi.js +1 -1
- package/dist/apis/V11PostApi.js +1 -1
- package/dist/apis/V20GetApi.js +1 -1
- package/dist/models/AdditionalMediaInfo.d.ts +32 -0
- package/dist/models/AdditionalMediaInfo.d.ts.map +1 -0
- package/dist/models/AdditionalMediaInfo.js +51 -0
- package/dist/models/AdditionalMediaInfo.js.map +1 -0
- package/dist/models/Callback.d.ts +32 -0
- package/dist/models/Callback.d.ts.map +1 -0
- package/dist/models/Callback.js +51 -0
- package/dist/models/Callback.js.map +1 -0
- package/dist/models/ClientEventInfo.d.ts +46 -0
- package/dist/models/ClientEventInfo.d.ts.map +1 -0
- package/dist/models/ClientEventInfo.js +55 -0
- package/dist/models/ClientEventInfo.js.map +1 -0
- package/dist/models/ContentEntryType.d.ts +1 -1
- package/dist/models/ContentEntryType.d.ts.map +1 -1
- package/dist/models/ContentItemType.d.ts +1 -1
- package/dist/models/ContentItemType.d.ts.map +1 -1
- package/dist/models/ContentUnion.d.ts +1 -1
- package/dist/models/ContentUnion.d.ts.map +1 -1
- package/dist/models/CoverCta.d.ts +66 -0
- package/dist/models/CoverCta.d.ts.map +1 -0
- package/dist/models/CoverCta.js +72 -0
- package/dist/models/CoverCta.js.map +1 -0
- package/dist/models/CtaClientEventInfo.d.ts +39 -0
- package/dist/models/CtaClientEventInfo.d.ts.map +1 -0
- package/dist/models/CtaClientEventInfo.js +57 -0
- package/dist/models/CtaClientEventInfo.js.map +1 -0
- package/dist/models/CursorType.d.ts +1 -1
- package/dist/models/CursorType.d.ts.map +1 -1
- package/dist/models/ExtMediaAvailability.d.ts +39 -0
- package/dist/models/ExtMediaAvailability.d.ts.map +1 -0
- package/dist/models/ExtMediaAvailability.js +57 -0
- package/dist/models/ExtMediaAvailability.js.map +1 -0
- package/dist/models/ExtendedEntities.d.ts +3 -3
- package/dist/models/ExtendedEntities.d.ts.map +1 -1
- package/dist/models/ExtendedEntities.js +3 -3
- package/dist/models/ExtendedEntities.js.map +1 -1
- package/dist/models/GetBookmarks200Response.d.ts +1 -1
- package/dist/models/GetBookmarks200Response.d.ts.map +1 -1
- package/dist/models/GetFavoriters200Response.d.ts +1 -1
- package/dist/models/GetFavoriters200Response.d.ts.map +1 -1
- package/dist/models/GetFollowers200Response.d.ts +1 -1
- package/dist/models/GetFollowers200Response.d.ts.map +1 -1
- package/dist/models/GetHomeLatestTimeline200Response.d.ts +1 -1
- package/dist/models/GetHomeLatestTimeline200Response.d.ts.map +1 -1
- package/dist/models/GetLikes200Response.d.ts +1 -1
- package/dist/models/GetLikes200Response.d.ts.map +1 -1
- package/dist/models/GetListLatestTweetsTimeline200Response.d.ts +1 -1
- package/dist/models/GetListLatestTweetsTimeline200Response.d.ts.map +1 -1
- package/dist/models/GetProfileSpotlightsQuery200Response.d.ts +1 -1
- package/dist/models/GetProfileSpotlightsQuery200Response.d.ts.map +1 -1
- package/dist/models/GetRetweeters200Response.d.ts +1 -1
- package/dist/models/GetRetweeters200Response.d.ts.map +1 -1
- package/dist/models/GetSearchTimeline200Response.d.ts +1 -1
- package/dist/models/GetSearchTimeline200Response.d.ts.map +1 -1
- package/dist/models/GetTweetDetail200Response.d.ts +1 -1
- package/dist/models/GetTweetDetail200Response.d.ts.map +1 -1
- package/dist/models/GetTweetResultByRestId200Response.d.ts +1 -1
- package/dist/models/GetTweetResultByRestId200Response.d.ts.map +1 -1
- package/dist/models/GetUserByRestId200Response.d.ts +1 -1
- package/dist/models/GetUserByRestId200Response.d.ts.map +1 -1
- package/dist/models/GetUserHighlightsTweets200Response.d.ts +1 -1
- package/dist/models/GetUserHighlightsTweets200Response.d.ts.map +1 -1
- package/dist/models/GetUsersByRestIds200Response.d.ts +1 -1
- package/dist/models/GetUsersByRestIds200Response.d.ts.map +1 -1
- package/dist/models/InstructionType.d.ts +2 -1
- package/dist/models/InstructionType.d.ts.map +1 -1
- package/dist/models/InstructionType.js +2 -1
- package/dist/models/InstructionType.js.map +1 -1
- package/dist/models/InstructionUnion.d.ts +4 -1
- package/dist/models/InstructionUnion.d.ts.map +1 -1
- package/dist/models/InstructionUnion.js +5 -0
- package/dist/models/InstructionUnion.js.map +1 -1
- package/dist/models/ItemContentUnion.d.ts +1 -1
- package/dist/models/ItemContentUnion.d.ts.map +1 -1
- package/dist/models/ItemResult.d.ts +1 -1
- package/dist/models/ItemResult.d.ts.map +1 -1
- package/dist/models/ItemResult.js +1 -2
- package/dist/models/ItemResult.js.map +1 -1
- package/dist/models/Media.d.ts +15 -15
- package/dist/models/Media.d.ts.map +1 -1
- package/dist/models/Media.js +14 -7
- package/dist/models/Media.js.map +1 -1
- package/dist/models/MediaExtended.d.ts +131 -0
- package/dist/models/MediaExtended.d.ts.map +1 -0
- package/dist/models/MediaExtended.js +104 -0
- package/dist/models/MediaExtended.js.map +1 -0
- package/dist/models/MediaOriginalInfo.d.ts +5 -6
- package/dist/models/MediaOriginalInfo.d.ts.map +1 -1
- package/dist/models/MediaOriginalInfo.js +7 -4
- package/dist/models/MediaOriginalInfo.js.map +1 -1
- package/dist/models/MediaOriginalInfoFocusRect.d.ts +50 -0
- package/dist/models/MediaOriginalInfoFocusRect.d.ts.map +1 -0
- package/dist/models/MediaOriginalInfoFocusRect.js +60 -0
- package/dist/models/MediaOriginalInfoFocusRect.js.map +1 -0
- package/dist/models/MediaSize.d.ts +52 -0
- package/dist/models/MediaSize.d.ts.map +1 -0
- package/dist/models/MediaSize.js +64 -0
- package/dist/models/MediaSize.js.map +1 -0
- package/dist/models/MediaSizes.d.ts +51 -0
- package/dist/models/MediaSizes.d.ts.map +1 -0
- package/dist/models/MediaSizes.js +61 -0
- package/dist/models/MediaSizes.js.map +1 -0
- package/dist/models/MediaStats.d.ts +32 -0
- package/dist/models/MediaStats.d.ts.map +1 -0
- package/dist/models/MediaStats.js +51 -0
- package/dist/models/MediaStats.js.map +1 -0
- package/dist/models/MediaVideoInfo.d.ts +45 -0
- package/dist/models/MediaVideoInfo.d.ts.map +1 -0
- package/dist/models/MediaVideoInfo.js +58 -0
- package/dist/models/MediaVideoInfo.js.map +1 -0
- package/dist/models/MediaVideoInfoVariant.d.ts +44 -0
- package/dist/models/MediaVideoInfoVariant.d.ts.map +1 -0
- package/dist/models/MediaVideoInfoVariant.js +57 -0
- package/dist/models/MediaVideoInfoVariant.js.map +1 -0
- package/dist/models/ModuleEntry.d.ts +3 -4
- package/dist/models/ModuleEntry.d.ts.map +1 -1
- package/dist/models/ModuleEntry.js +3 -2
- package/dist/models/ModuleEntry.js.map +1 -1
- package/dist/models/Other200Response.d.ts +1 -1
- package/dist/models/Other200Response.d.ts.map +1 -1
- package/dist/models/PostCreateRetweet200Response.d.ts +1 -1
- package/dist/models/PostCreateRetweet200Response.d.ts.map +1 -1
- package/dist/models/PostCreateTweet200Response.d.ts +1 -1
- package/dist/models/PostCreateTweet200Response.d.ts.map +1 -1
- package/dist/models/PostDeleteRetweet200Response.d.ts +1 -1
- package/dist/models/PostDeleteRetweet200Response.d.ts.map +1 -1
- package/dist/models/PostDeleteTweet200Response.d.ts +1 -1
- package/dist/models/PostDeleteTweet200Response.d.ts.map +1 -1
- package/dist/models/PostFavoriteTweet200Response.d.ts +1 -1
- package/dist/models/PostFavoriteTweet200Response.d.ts.map +1 -1
- package/dist/models/PostUnfavoriteTweet200Response.d.ts +1 -1
- package/dist/models/PostUnfavoriteTweet200Response.d.ts.map +1 -1
- package/dist/models/SelfThread.d.ts +32 -0
- package/dist/models/SelfThread.d.ts.map +1 -0
- package/dist/models/SelfThread.js +51 -0
- package/dist/models/SelfThread.js.map +1 -0
- package/dist/models/Session.d.ts +8 -1
- package/dist/models/Session.d.ts.map +1 -1
- package/dist/models/Session.js +7 -1
- package/dist/models/Session.js.map +1 -1
- package/dist/models/Text.d.ts +39 -0
- package/dist/models/Text.d.ts.map +1 -0
- package/dist/models/Text.js +55 -0
- package/dist/models/Text.js.map +1 -0
- package/dist/models/TextEntity.d.ts +45 -0
- package/dist/models/TextEntity.d.ts.map +1 -0
- package/dist/models/TextEntity.js +58 -0
- package/dist/models/TextEntity.js.map +1 -0
- package/dist/models/TextEntityRef.d.ts +58 -0
- package/dist/models/TextEntityRef.d.ts.map +1 -0
- package/dist/models/TextEntityRef.js +69 -0
- package/dist/models/TextEntityRef.js.map +1 -0
- package/dist/models/TimelineCoverBehavior.d.ts +39 -0
- package/dist/models/TimelineCoverBehavior.d.ts.map +1 -0
- package/dist/models/TimelineCoverBehavior.js +57 -0
- package/dist/models/TimelineCoverBehavior.js.map +1 -0
- package/dist/models/TimelineHalfCover.d.ts +85 -0
- package/dist/models/TimelineHalfCover.d.ts.map +1 -0
- package/dist/models/TimelineHalfCover.js +84 -0
- package/dist/models/TimelineHalfCover.js.map +1 -0
- package/dist/models/TimelineShowAlert.d.ts +2 -2
- package/dist/models/TimelineShowAlert.d.ts.map +1 -1
- package/dist/models/TimelineShowCover.d.ts +47 -0
- package/dist/models/TimelineShowCover.d.ts.map +1 -0
- package/dist/models/TimelineShowCover.js +60 -0
- package/dist/models/TimelineShowCover.js.map +1 -0
- package/dist/models/TimelineTerminateTimeline.d.ts +1 -1
- package/dist/models/TimelineTerminateTimeline.d.ts.map +1 -1
- package/dist/models/TimelineTimelineItem.d.ts +3 -4
- package/dist/models/TimelineTimelineItem.d.ts.map +1 -1
- package/dist/models/TimelineTimelineItem.js +3 -2
- package/dist/models/TimelineTimelineItem.js.map +1 -1
- package/dist/models/TimelineTimelineModule.d.ts +9 -1
- package/dist/models/TimelineTimelineModule.d.ts.map +1 -1
- package/dist/models/TimelineTimelineModule.js +8 -1
- package/dist/models/TimelineTimelineModule.js.map +1 -1
- package/dist/models/TimelineUser.d.ts +10 -1
- package/dist/models/TimelineUser.d.ts.map +1 -1
- package/dist/models/TimelineUser.js +9 -1
- package/dist/models/TimelineUser.js.map +1 -1
- package/dist/models/Tweet.d.ts +11 -5
- package/dist/models/Tweet.d.ts.map +1 -1
- package/dist/models/Tweet.js +7 -7
- package/dist/models/Tweet.js.map +1 -1
- package/dist/models/TweetCardLegacy.d.ts +3 -3
- package/dist/models/TweetCardLegacy.d.ts.map +1 -1
- package/dist/models/TweetCardLegacy.js +3 -3
- package/dist/models/TweetCardLegacy.js.map +1 -1
- package/dist/models/TweetCardLegacyBindingValue.d.ts +39 -0
- package/dist/models/TweetCardLegacyBindingValue.d.ts.map +1 -0
- package/dist/models/TweetCardLegacyBindingValue.js +55 -0
- package/dist/models/TweetCardLegacyBindingValue.js.map +1 -0
- package/dist/models/TweetCardLegacyBindingValueData.d.ts +50 -0
- package/dist/models/TweetCardLegacyBindingValueData.d.ts.map +1 -0
- package/dist/models/{TweetCardLegacyBindingValuesInnerValue.js → TweetCardLegacyBindingValueData.js} +12 -12
- package/dist/models/TweetCardLegacyBindingValueData.js.map +1 -0
- package/dist/models/TweetEditControl.d.ts +13 -0
- package/dist/models/TweetEditControl.d.ts.map +1 -1
- package/dist/models/TweetEditControl.js +5 -0
- package/dist/models/TweetEditControl.js.map +1 -1
- package/dist/models/TweetEditControlInitial.d.ts +50 -0
- package/dist/models/TweetEditControlInitial.d.ts.map +1 -0
- package/dist/models/TweetEditControlInitial.js +60 -0
- package/dist/models/TweetEditControlInitial.js.map +1 -0
- package/dist/models/TweetLegacy.d.ts +3 -3
- package/dist/models/TweetLegacy.d.ts.map +1 -1
- package/dist/models/TweetLegacy.js +3 -3
- package/dist/models/TweetLegacy.js.map +1 -1
- package/dist/models/TweetUnion.d.ts +1 -1
- package/dist/models/TweetUnion.d.ts.map +1 -1
- package/dist/models/TweetView.d.ts +45 -0
- package/dist/models/TweetView.d.ts.map +1 -0
- package/dist/models/{TweetViews.js → TweetView.js} +20 -13
- package/dist/models/TweetView.js.map +1 -0
- package/dist/models/TypeName.d.ts +2 -1
- package/dist/models/TypeName.d.ts.map +1 -1
- package/dist/models/TypeName.js +1 -0
- package/dist/models/TypeName.js.map +1 -1
- package/dist/models/UserUnion.d.ts +1 -1
- package/dist/models/UserUnion.d.ts.map +1 -1
- package/dist/models/index.d.ts +24 -4
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +24 -4
- package/dist/models/index.js.map +1 -1
- package/dist/runtime.d.ts +9 -9
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1 -1
- package/package.json +2 -2
- package/src/models/AdditionalMediaInfo.ts +66 -0
- package/src/models/Callback.ts +66 -0
- package/src/models/ClientEventInfo.ts +81 -0
- package/src/models/CoverCta.ts +130 -0
- package/src/models/CtaClientEventInfo.ts +76 -0
- package/src/models/ExtMediaAvailability.ts +75 -0
- package/src/models/ExtendedEntities.ts +9 -9
- package/src/models/InstructionType.ts +2 -1
- package/src/models/InstructionUnion.ts +12 -1
- package/src/models/ItemResult.ts +2 -3
- package/src/models/Media.ts +27 -17
- package/src/models/MediaExtended.ts +237 -0
- package/src/models/MediaOriginalInfo.ts +17 -8
- package/src/models/MediaOriginalInfoFocusRect.ts +93 -0
- package/src/models/MediaSize.ts +95 -0
- package/src/models/MediaSizes.ts +100 -0
- package/src/models/MediaStats.ts +66 -0
- package/src/models/MediaVideoInfo.ts +90 -0
- package/src/models/MediaVideoInfoVariant.ts +83 -0
- package/src/models/ModuleEntry.ts +10 -4
- package/src/models/{TweetLegacySelfThread.ts → SelfThread.ts} +9 -9
- package/src/models/Session.ts +11 -1
- package/src/models/Text.ts +82 -0
- package/src/models/TextEntity.ts +91 -0
- package/src/models/TextEntityRef.ts +102 -0
- package/src/models/TimelineCoverBehavior.ts +76 -0
- package/src/models/TimelineHalfCover.ts +157 -0
- package/src/models/TimelineShowCover.ts +103 -0
- package/src/models/TimelineTimelineItem.ts +10 -4
- package/src/models/TimelineTimelineModule.ts +12 -1
- package/src/models/TimelineUser.ts +13 -1
- package/src/models/Tweet.ts +21 -15
- package/src/models/TweetCardLegacy.ts +9 -9
- package/src/models/TweetCardLegacyBindingValue.ts +82 -0
- package/src/models/{TweetCardLegacyBindingValuesInnerValue.ts → TweetCardLegacyBindingValueData.ts} +12 -12
- package/src/models/TweetEditControl.ts +23 -0
- package/src/models/TweetEditControlInitial.ts +93 -0
- package/src/models/TweetLegacy.ts +9 -9
- package/src/models/{TweetViews.ts → TweetView.ts} +23 -12
- package/src/models/TypeName.ts +1 -0
- package/src/models/index.ts +24 -4
- package/tools/openapi-generator-config.yaml +1 -1
- package/tools/win/replace.py +1 -1
- package/twitter-openapi/.vscode/tasks.json +3 -0
- package/twitter-openapi/LICENSE +31 -0
- package/twitter-openapi/{LICENSE.txt → LICENSE.AGPL} +3 -3
- package/twitter-openapi/README.md +4 -1
- package/twitter-openapi/dist/compatible/openapi-3.0.yaml +2 -2
- package/twitter-openapi/dist/compatible/paths/other.yaml +2 -0
- package/twitter-openapi/dist/compatible/schemas/content.yaml +19 -6
- package/twitter-openapi/dist/compatible/schemas/instruction.yaml +130 -0
- package/twitter-openapi/dist/compatible/schemas/tweet.yaml +279 -94
- package/twitter-openapi/dist/compatible/schemas/typename.yaml +1 -0
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +2 -2
- package/twitter-openapi/dist/docs/paths/other.yaml +2 -0
- package/twitter-openapi/dist/docs/schemas/content.yaml +19 -6
- package/twitter-openapi/dist/docs/schemas/instruction.yaml +130 -0
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +279 -94
- package/twitter-openapi/dist/docs/schemas/typename.yaml +1 -0
- package/twitter-openapi/src/openapi/openapi-3.0.yaml +2 -2
- package/twitter-openapi/src/openapi/paths/other.yaml +2 -1
- package/twitter-openapi/src/openapi/schemas/content.yaml +20 -7
- package/twitter-openapi/src/openapi/schemas/instruction.yaml +134 -0
- package/twitter-openapi/src/openapi/schemas/tweet.yaml +306 -107
- package/twitter-openapi/src/openapi/schemas/typename.yaml +1 -0
- package/twitter-openapi/test/python/replace.py +23 -0
- package/twitter-openapi/test/python/test_serialize.py +191 -91
- package/dist/models/TweetCardLegacyBindingValuesInner.d.ts +0 -39
- package/dist/models/TweetCardLegacyBindingValuesInner.d.ts.map +0 -1
- package/dist/models/TweetCardLegacyBindingValuesInner.js +0 -55
- package/dist/models/TweetCardLegacyBindingValuesInner.js.map +0 -1
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts +0 -50
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts.map +0 -1
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.js.map +0 -1
- package/dist/models/TweetLegacySelfThread.d.ts +0 -32
- package/dist/models/TweetLegacySelfThread.d.ts.map +0 -1
- package/dist/models/TweetLegacySelfThread.js +0 -51
- package/dist/models/TweetLegacySelfThread.js.map +0 -1
- package/dist/models/TweetViews.d.ts +0 -38
- package/dist/models/TweetViews.d.ts.map +0 -1
- package/dist/models/TweetViews.js.map +0 -1
- package/src/models/TweetCardLegacyBindingValuesInner.ts +0 -82
|
@@ -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 MediaStats
|
|
20
|
+
*/
|
|
21
|
+
export interface MediaStats {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MediaStats
|
|
26
|
+
*/
|
|
27
|
+
viewCount: number;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the MediaStats interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfMediaStats(value: object): boolean {
|
|
34
|
+
let isInstance = true;
|
|
35
|
+
isInstance = isInstance && "viewCount" in value;
|
|
36
|
+
|
|
37
|
+
return isInstance;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function MediaStatsFromJSON(json: any): MediaStats {
|
|
41
|
+
return MediaStatsFromJSONTyped(json, false);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function MediaStatsFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaStats {
|
|
45
|
+
if ((json === undefined) || (json === null)) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
|
|
50
|
+
'viewCount': json['viewCount'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function MediaStatsToJSON(value?: MediaStats | null): any {
|
|
55
|
+
if (value === undefined) {
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
if (value === null) {
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'viewCount': value.viewCount,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { MediaVideoInfoVariant } from './MediaVideoInfoVariant';
|
|
17
|
+
import {
|
|
18
|
+
MediaVideoInfoVariantFromJSON,
|
|
19
|
+
MediaVideoInfoVariantFromJSONTyped,
|
|
20
|
+
MediaVideoInfoVariantToJSON,
|
|
21
|
+
} from './MediaVideoInfoVariant';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface MediaVideoInfo
|
|
27
|
+
*/
|
|
28
|
+
export interface MediaVideoInfo {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<number>}
|
|
32
|
+
* @memberof MediaVideoInfo
|
|
33
|
+
*/
|
|
34
|
+
aspectRatio: Array<number>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {number}
|
|
38
|
+
* @memberof MediaVideoInfo
|
|
39
|
+
*/
|
|
40
|
+
durationMillis?: number;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {Array<MediaVideoInfoVariant>}
|
|
44
|
+
* @memberof MediaVideoInfo
|
|
45
|
+
*/
|
|
46
|
+
variants: Array<MediaVideoInfoVariant>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the MediaVideoInfo interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfMediaVideoInfo(value: object): boolean {
|
|
53
|
+
let isInstance = true;
|
|
54
|
+
isInstance = isInstance && "aspectRatio" in value;
|
|
55
|
+
isInstance = isInstance && "variants" in value;
|
|
56
|
+
|
|
57
|
+
return isInstance;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function MediaVideoInfoFromJSON(json: any): MediaVideoInfo {
|
|
61
|
+
return MediaVideoInfoFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function MediaVideoInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaVideoInfo {
|
|
65
|
+
if ((json === undefined) || (json === null)) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'aspectRatio': json['aspect_ratio'],
|
|
71
|
+
'durationMillis': !exists(json, 'duration_millis') ? undefined : json['duration_millis'],
|
|
72
|
+
'variants': ((json['variants'] as Array<any>).map(MediaVideoInfoVariantFromJSON)),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function MediaVideoInfoToJSON(value?: MediaVideoInfo | null): any {
|
|
77
|
+
if (value === undefined) {
|
|
78
|
+
return undefined;
|
|
79
|
+
}
|
|
80
|
+
if (value === null) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'aspect_ratio': value.aspectRatio,
|
|
86
|
+
'duration_millis': value.durationMillis,
|
|
87
|
+
'variants': ((value.variants as Array<any>).map(MediaVideoInfoVariantToJSON)),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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 MediaVideoInfoVariant
|
|
20
|
+
*/
|
|
21
|
+
export interface MediaVideoInfoVariant {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof MediaVideoInfoVariant
|
|
26
|
+
*/
|
|
27
|
+
bitrate?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof MediaVideoInfoVariant
|
|
32
|
+
*/
|
|
33
|
+
contentType: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof MediaVideoInfoVariant
|
|
38
|
+
*/
|
|
39
|
+
url: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the MediaVideoInfoVariant interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfMediaVideoInfoVariant(value: object): boolean {
|
|
46
|
+
let isInstance = true;
|
|
47
|
+
isInstance = isInstance && "contentType" in value;
|
|
48
|
+
isInstance = isInstance && "url" in value;
|
|
49
|
+
|
|
50
|
+
return isInstance;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function MediaVideoInfoVariantFromJSON(json: any): MediaVideoInfoVariant {
|
|
54
|
+
return MediaVideoInfoVariantFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function MediaVideoInfoVariantFromJSONTyped(json: any, ignoreDiscriminator: boolean): MediaVideoInfoVariant {
|
|
58
|
+
if ((json === undefined) || (json === null)) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'bitrate': !exists(json, 'bitrate') ? undefined : json['bitrate'],
|
|
64
|
+
'contentType': json['content_type'],
|
|
65
|
+
'url': json['url'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function MediaVideoInfoVariantToJSON(value?: MediaVideoInfoVariant | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'bitrate': value.bitrate,
|
|
79
|
+
'content_type': value.contentType,
|
|
80
|
+
'url': value.url,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
@@ -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 { ItemContentUnion } from './ItemContentUnion';
|
|
17
23
|
import {
|
|
18
24
|
ItemContentUnionFromJSON,
|
|
@@ -28,10 +34,10 @@ import {
|
|
|
28
34
|
export interface ModuleEntry {
|
|
29
35
|
/**
|
|
30
36
|
*
|
|
31
|
-
* @type {
|
|
37
|
+
* @type {ClientEventInfo}
|
|
32
38
|
* @memberof ModuleEntry
|
|
33
39
|
*/
|
|
34
|
-
clientEventInfo:
|
|
40
|
+
clientEventInfo: ClientEventInfo;
|
|
35
41
|
/**
|
|
36
42
|
*
|
|
37
43
|
* @type {ItemContentUnion}
|
|
@@ -61,7 +67,7 @@ export function ModuleEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean
|
|
|
61
67
|
}
|
|
62
68
|
return {
|
|
63
69
|
|
|
64
|
-
'clientEventInfo': json['clientEventInfo'],
|
|
70
|
+
'clientEventInfo': ClientEventInfoFromJSON(json['clientEventInfo']),
|
|
65
71
|
'itemContent': ItemContentUnionFromJSON(json['itemContent']),
|
|
66
72
|
};
|
|
67
73
|
}
|
|
@@ -75,7 +81,7 @@ export function ModuleEntryToJSON(value?: ModuleEntry | null): any {
|
|
|
75
81
|
}
|
|
76
82
|
return {
|
|
77
83
|
|
|
78
|
-
'clientEventInfo': value.clientEventInfo,
|
|
84
|
+
'clientEventInfo': ClientEventInfoToJSON(value.clientEventInfo),
|
|
79
85
|
'itemContent': ItemContentUnionToJSON(value.itemContent),
|
|
80
86
|
};
|
|
81
87
|
}
|
|
@@ -16,32 +16,32 @@ import { exists, mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface SelfThread
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface SelfThread {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {string}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof SelfThread
|
|
26
26
|
*/
|
|
27
27
|
idStr: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Check if a given object implements the
|
|
31
|
+
* Check if a given object implements the SelfThread interface.
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function instanceOfSelfThread(value: object): boolean {
|
|
34
34
|
let isInstance = true;
|
|
35
35
|
isInstance = isInstance && "idStr" in value;
|
|
36
36
|
|
|
37
37
|
return isInstance;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export function
|
|
41
|
-
return
|
|
40
|
+
export function SelfThreadFromJSON(json: any): SelfThread {
|
|
41
|
+
return SelfThreadFromJSONTyped(json, false);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
export function
|
|
44
|
+
export function SelfThreadFromJSONTyped(json: any, ignoreDiscriminator: boolean): SelfThread {
|
|
45
45
|
if ((json === undefined) || (json === null)) {
|
|
46
46
|
return json;
|
|
47
47
|
}
|
|
@@ -51,7 +51,7 @@ export function TweetLegacySelfThreadFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function
|
|
54
|
+
export function SelfThreadToJSON(value?: SelfThread | null): any {
|
|
55
55
|
if (value === undefined) {
|
|
56
56
|
return undefined;
|
|
57
57
|
}
|
package/src/models/Session.ts
CHANGED
|
@@ -109,7 +109,7 @@ export interface Session {
|
|
|
109
109
|
* @type {string}
|
|
110
110
|
* @memberof Session
|
|
111
111
|
*/
|
|
112
|
-
superFollowsApplicationStatus:
|
|
112
|
+
superFollowsApplicationStatus: SessionSuperFollowsApplicationStatusEnum;
|
|
113
113
|
/**
|
|
114
114
|
*
|
|
115
115
|
* @type {UserFeatures}
|
|
@@ -124,6 +124,16 @@ export interface Session {
|
|
|
124
124
|
userId: string;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @export
|
|
130
|
+
*/
|
|
131
|
+
export const SessionSuperFollowsApplicationStatusEnum = {
|
|
132
|
+
NotStarted: 'NotStarted'
|
|
133
|
+
} as const;
|
|
134
|
+
export type SessionSuperFollowsApplicationStatusEnum = typeof SessionSuperFollowsApplicationStatusEnum[keyof typeof SessionSuperFollowsApplicationStatusEnum];
|
|
135
|
+
|
|
136
|
+
|
|
127
137
|
/**
|
|
128
138
|
* Check if a given object implements the Session interface.
|
|
129
139
|
*/
|
|
@@ -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 { TextEntity } from './TextEntity';
|
|
17
|
+
import {
|
|
18
|
+
TextEntityFromJSON,
|
|
19
|
+
TextEntityFromJSONTyped,
|
|
20
|
+
TextEntityToJSON,
|
|
21
|
+
} from './TextEntity';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface Text
|
|
27
|
+
*/
|
|
28
|
+
export interface Text {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<TextEntity>}
|
|
32
|
+
* @memberof Text
|
|
33
|
+
*/
|
|
34
|
+
entities: Array<TextEntity>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof Text
|
|
39
|
+
*/
|
|
40
|
+
text: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the Text interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfText(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
isInstance = isInstance && "entities" in value;
|
|
49
|
+
isInstance = isInstance && "text" in value;
|
|
50
|
+
|
|
51
|
+
return isInstance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function TextFromJSON(json: any): Text {
|
|
55
|
+
return TextFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function TextFromJSONTyped(json: any, ignoreDiscriminator: boolean): Text {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'entities': ((json['entities'] as Array<any>).map(TextEntityFromJSON)),
|
|
65
|
+
'text': json['text'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function TextToJSON(value?: Text | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'entities': ((value.entities as Array<any>).map(TextEntityToJSON)),
|
|
79
|
+
'text': value.text,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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 { TextEntityRef } from './TextEntityRef';
|
|
17
|
+
import {
|
|
18
|
+
TextEntityRefFromJSON,
|
|
19
|
+
TextEntityRefFromJSONTyped,
|
|
20
|
+
TextEntityRefToJSON,
|
|
21
|
+
} from './TextEntityRef';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface TextEntity
|
|
27
|
+
*/
|
|
28
|
+
export interface TextEntity {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {number}
|
|
32
|
+
* @memberof TextEntity
|
|
33
|
+
*/
|
|
34
|
+
fromIndex: number;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {TextEntityRef}
|
|
38
|
+
* @memberof TextEntity
|
|
39
|
+
*/
|
|
40
|
+
ref: TextEntityRef;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @memberof TextEntity
|
|
45
|
+
*/
|
|
46
|
+
toIndex: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the TextEntity interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfTextEntity(value: object): boolean {
|
|
53
|
+
let isInstance = true;
|
|
54
|
+
isInstance = isInstance && "fromIndex" in value;
|
|
55
|
+
isInstance = isInstance && "ref" in value;
|
|
56
|
+
isInstance = isInstance && "toIndex" in value;
|
|
57
|
+
|
|
58
|
+
return isInstance;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function TextEntityFromJSON(json: any): TextEntity {
|
|
62
|
+
return TextEntityFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function TextEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextEntity {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'fromIndex': json['fromIndex'],
|
|
72
|
+
'ref': TextEntityRefFromJSON(json['ref']),
|
|
73
|
+
'toIndex': json['toIndex'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function TextEntityToJSON(value?: TextEntity | null): any {
|
|
78
|
+
if (value === undefined) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (value === null) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'fromIndex': value.fromIndex,
|
|
87
|
+
'ref': TextEntityRefToJSON(value.ref),
|
|
88
|
+
'toIndex': value.toIndex,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 TextEntityRef
|
|
20
|
+
*/
|
|
21
|
+
export interface TextEntityRef {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof TextEntityRef
|
|
26
|
+
*/
|
|
27
|
+
type: TextEntityRefTypeEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof TextEntityRef
|
|
32
|
+
*/
|
|
33
|
+
url: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof TextEntityRef
|
|
38
|
+
*/
|
|
39
|
+
urlType: TextEntityRefUrlTypeEnum;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const TextEntityRefTypeEnum = {
|
|
47
|
+
TimelineUrl: 'TimelineUrl'
|
|
48
|
+
} as const;
|
|
49
|
+
export type TextEntityRefTypeEnum = typeof TextEntityRefTypeEnum[keyof typeof TextEntityRefTypeEnum];
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
export const TextEntityRefUrlTypeEnum = {
|
|
55
|
+
ExternalUrl: 'ExternalUrl'
|
|
56
|
+
} as const;
|
|
57
|
+
export type TextEntityRefUrlTypeEnum = typeof TextEntityRefUrlTypeEnum[keyof typeof TextEntityRefUrlTypeEnum];
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Check if a given object implements the TextEntityRef interface.
|
|
62
|
+
*/
|
|
63
|
+
export function instanceOfTextEntityRef(value: object): boolean {
|
|
64
|
+
let isInstance = true;
|
|
65
|
+
isInstance = isInstance && "type" in value;
|
|
66
|
+
isInstance = isInstance && "url" in value;
|
|
67
|
+
isInstance = isInstance && "urlType" in value;
|
|
68
|
+
|
|
69
|
+
return isInstance;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function TextEntityRefFromJSON(json: any): TextEntityRef {
|
|
73
|
+
return TextEntityRefFromJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function TextEntityRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): TextEntityRef {
|
|
77
|
+
if ((json === undefined) || (json === null)) {
|
|
78
|
+
return json;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'type': json['type'],
|
|
83
|
+
'url': json['url'],
|
|
84
|
+
'urlType': json['urlType'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function TextEntityRefToJSON(value?: TextEntityRef | null): any {
|
|
89
|
+
if (value === undefined) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
if (value === null) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
|
|
97
|
+
'type': value.type,
|
|
98
|
+
'url': value.url,
|
|
99
|
+
'urlType': value.urlType,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|