twitter-openapi-typescript-generated 0.0.5 → 0.0.6
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 +6 -1
- package/README.md +2 -2
- package/dist/apis/DefaultApi.d.ts +1 -0
- package/dist/apis/DefaultApi.d.ts.map +1 -1
- package/dist/apis/DefaultApi.js +4 -1
- package/dist/apis/DefaultApi.js.map +1 -1
- package/dist/apis/PostApi.d.ts +6 -0
- package/dist/apis/PostApi.d.ts.map +1 -1
- package/dist/apis/PostApi.js +24 -6
- package/dist/apis/PostApi.js.map +1 -1
- package/dist/apis/TweetApi.d.ts +9 -0
- package/dist/apis/TweetApi.d.ts.map +1 -1
- package/dist/apis/TweetApi.js +36 -9
- package/dist/apis/TweetApi.js.map +1 -1
- package/dist/apis/UserApi.d.ts +1 -0
- package/dist/apis/UserApi.d.ts.map +1 -1
- package/dist/apis/UserApi.js +4 -1
- package/dist/apis/UserApi.js.map +1 -1
- package/dist/apis/UserListApi.d.ts +2 -0
- package/dist/apis/UserListApi.d.ts.map +1 -1
- package/dist/apis/UserListApi.js +8 -2
- package/dist/apis/UserListApi.js.map +1 -1
- package/dist/models/Entities.d.ts +3 -2
- package/dist/models/Entities.d.ts.map +1 -1
- package/dist/models/Entities.js +3 -2
- package/dist/models/Entities.js.map +1 -1
- package/dist/models/PostCreateRetweetRequest.d.ts +3 -3
- package/dist/models/PostCreateRetweetRequest.d.ts.map +1 -1
- package/dist/models/PostCreateRetweetRequest.js +3 -3
- package/dist/models/PostCreateRetweetRequest.js.map +1 -1
- package/dist/models/PostCreateRetweetRequestVariables.d.ts +38 -0
- package/dist/models/PostCreateRetweetRequestVariables.d.ts.map +1 -0
- package/dist/models/PostCreateRetweetRequestVariables.js +54 -0
- package/dist/models/PostCreateRetweetRequestVariables.js.map +1 -0
- package/dist/models/PostDeleteTweetRequest.d.ts +3 -3
- package/dist/models/PostDeleteTweetRequest.d.ts.map +1 -1
- package/dist/models/PostDeleteTweetRequest.js +3 -3
- package/dist/models/PostDeleteTweetRequest.js.map +1 -1
- package/dist/models/PostFavoriteTweetRequest.d.ts +3 -3
- package/dist/models/PostFavoriteTweetRequest.d.ts.map +1 -1
- package/dist/models/PostFavoriteTweetRequest.js +3 -3
- package/dist/models/PostFavoriteTweetRequest.js.map +1 -1
- package/dist/models/PostUnfavoriteTweetRequest.d.ts +3 -3
- package/dist/models/PostUnfavoriteTweetRequest.d.ts.map +1 -1
- package/dist/models/PostUnfavoriteTweetRequest.js +3 -3
- package/dist/models/PostUnfavoriteTweetRequest.js.map +1 -1
- package/dist/models/Tweet.d.ts +7 -0
- package/dist/models/Tweet.d.ts.map +1 -1
- package/dist/models/Tweet.js +3 -0
- package/dist/models/Tweet.js.map +1 -1
- package/dist/models/TweetCard.d.ts +39 -0
- package/dist/models/TweetCard.d.ts.map +1 -0
- package/dist/models/TweetCard.js +54 -0
- package/dist/models/TweetCard.js.map +1 -0
- package/dist/models/TweetCardLegacy.d.ts +45 -0
- package/dist/models/TweetCardLegacy.d.ts.map +1 -0
- package/dist/models/TweetCardLegacy.js +58 -0
- package/dist/models/TweetCardLegacy.js.map +1 -0
- package/dist/models/TweetCardLegacyBindingValuesInner.d.ts +39 -0
- package/dist/models/TweetCardLegacyBindingValuesInner.d.ts.map +1 -0
- package/dist/models/TweetCardLegacyBindingValuesInner.js +55 -0
- package/dist/models/TweetCardLegacyBindingValuesInner.js.map +1 -0
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts +50 -0
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.d.ts.map +1 -0
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.js +58 -0
- package/dist/models/TweetCardLegacyBindingValuesInnerValue.js.map +1 -0
- package/dist/models/Url.d.ts +50 -0
- package/dist/models/Url.d.ts.map +1 -0
- package/dist/models/Url.js +60 -0
- package/dist/models/Url.js.map +1 -0
- package/dist/models/index.d.ts +6 -1
- package/dist/models/index.d.ts.map +1 -1
- package/dist/models/index.js +6 -1
- package/dist/models/index.js.map +1 -1
- package/package.json +1 -1
- package/src/apis/DefaultApi.ts +6 -1
- package/src/apis/PostApi.ts +36 -6
- package/src/apis/TweetApi.ts +54 -9
- package/src/apis/UserApi.ts +6 -1
- package/src/apis/UserListApi.ts +12 -2
- package/src/models/Entities.ts +10 -4
- package/src/models/PostCreateRetweetRequest.ts +9 -9
- package/src/models/{PostDeleteTweetRequestVariables.ts → PostCreateRetweetRequestVariables.ts} +10 -10
- package/src/models/PostDeleteTweetRequest.ts +9 -9
- package/src/models/PostFavoriteTweetRequest.ts +9 -9
- package/src/models/PostUnfavoriteTweetRequest.ts +9 -9
- package/src/models/Tweet.ts +14 -0
- package/src/models/TweetCard.ts +80 -0
- package/src/models/TweetCardLegacy.ts +91 -0
- package/src/models/TweetCardLegacyBindingValuesInner.ts +82 -0
- package/src/models/TweetCardLegacyBindingValuesInnerValue.ts +90 -0
- package/src/models/Url.ts +93 -0
- package/src/models/index.ts +6 -1
- package/tools/openapi-generator-config.yaml +1 -1
- package/tools/win/replace.py +20 -20
- package/twitter-openapi/README.md +4 -6
- package/twitter-openapi/dist/dart/openapi-3.0.yaml +38 -38
- package/twitter-openapi/dist/dart/paths/bookmarks.yaml +8 -1
- package/twitter-openapi/dist/dart/paths/follow.yaml +24 -10
- package/twitter-openapi/dist/dart/paths/post.yaml +157 -115
- package/twitter-openapi/dist/dart/paths/profile.yaml +8 -1
- package/twitter-openapi/dist/dart/paths/timeline.yaml +38 -17
- package/twitter-openapi/dist/dart/paths/tweet.yaml +8 -1
- package/twitter-openapi/dist/dart/paths/user.yaml +8 -1
- package/twitter-openapi/dist/dart/paths/usertweets.yaml +54 -26
- package/twitter-openapi/dist/dart/resources/parameters.yaml +13 -0
- package/twitter-openapi/dist/dart/schemas/tweet.yaml +57 -0
- package/twitter-openapi/dist/docs/openapi-3.0.yaml +38 -38
- package/twitter-openapi/dist/docs/paths/bookmarks.yaml +8 -1
- package/twitter-openapi/dist/docs/paths/follow.yaml +60 -46
- package/twitter-openapi/dist/docs/paths/post.yaml +124 -82
- package/twitter-openapi/dist/docs/paths/profile.yaml +8 -1
- package/twitter-openapi/dist/docs/paths/timeline.yaml +92 -71
- package/twitter-openapi/dist/docs/paths/tweet.yaml +8 -1
- package/twitter-openapi/dist/docs/paths/user.yaml +8 -1
- package/twitter-openapi/dist/docs/paths/usertweets.yaml +122 -94
- package/twitter-openapi/dist/docs/resources/parameters.yaml +13 -0
- package/twitter-openapi/dist/docs/schemas/tweet.yaml +57 -0
- package/twitter-openapi/dist/test/openapi-3.0.yaml +38 -38
- package/twitter-openapi/dist/test/paths/bookmarks.yaml +8 -1
- package/twitter-openapi/dist/test/paths/follow.yaml +24 -10
- package/twitter-openapi/dist/test/paths/post.yaml +108 -66
- package/twitter-openapi/dist/test/paths/profile.yaml +8 -1
- package/twitter-openapi/dist/test/paths/timeline.yaml +38 -17
- package/twitter-openapi/dist/test/paths/tweet.yaml +8 -1
- package/twitter-openapi/dist/test/paths/user.yaml +8 -1
- package/twitter-openapi/dist/test/paths/usertweets.yaml +54 -26
- package/twitter-openapi/dist/test/resources/parameters.yaml +13 -0
- package/twitter-openapi/dist/test/schemas/tweet.yaml +57 -0
- package/twitter-openapi/dist/typescript/openapi-3.0.yaml +38 -38
- package/twitter-openapi/dist/typescript/paths/bookmarks.yaml +8 -1
- package/twitter-openapi/dist/typescript/paths/follow.yaml +24 -10
- package/twitter-openapi/dist/typescript/paths/post.yaml +135 -93
- package/twitter-openapi/dist/typescript/paths/profile.yaml +8 -1
- package/twitter-openapi/dist/typescript/paths/timeline.yaml +38 -17
- package/twitter-openapi/dist/typescript/paths/tweet.yaml +8 -1
- package/twitter-openapi/dist/typescript/paths/user.yaml +8 -1
- package/twitter-openapi/dist/typescript/paths/usertweets.yaml +54 -26
- package/twitter-openapi/dist/typescript/resources/parameters.yaml +13 -0
- package/twitter-openapi/dist/typescript/schemas/tweet.yaml +57 -0
- package/twitter-openapi/src/openapi/paths/bookmarks.yaml +1 -1
- package/twitter-openapi/src/openapi/paths/follow.yaml +2 -2
- package/twitter-openapi/src/openapi/paths/post.yaml +6 -6
- package/twitter-openapi/src/openapi/paths/profile.yaml +1 -1
- package/twitter-openapi/src/openapi/paths/timeline.yaml +3 -3
- package/twitter-openapi/src/openapi/paths/tweet.yaml +1 -1
- package/twitter-openapi/src/openapi/paths/user.yaml +1 -1
- package/twitter-openapi/src/openapi/paths/usertweets.yaml +4 -4
- package/twitter-openapi/src/openapi/resources/parameters.yaml +15 -0
- package/twitter-openapi/src/openapi/schemas/tweet.yaml +58 -1
- package/twitter-openapi/tools/__pycache__/build_config.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/__pycache__/hooks.cpython-310.pyc +0 -0
- package/twitter-openapi/tools/build_config.py +12 -12
- package/twitter-openapi/tools/hooks.py +30 -6
- package/dist/models/PostDeleteTweetRequestVariables.d.ts +0 -38
- package/dist/models/PostDeleteTweetRequestVariables.d.ts.map +0 -1
- package/dist/models/PostDeleteTweetRequestVariables.js +0 -54
- package/dist/models/PostDeleteTweetRequestVariables.js.map +0 -1
package/src/apis/UserApi.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
} from '../models';
|
|
24
24
|
|
|
25
25
|
export interface GetUserByScreenNameRequest {
|
|
26
|
+
pathQueryId: string;
|
|
26
27
|
queryId: string;
|
|
27
28
|
variables: string;
|
|
28
29
|
features: string;
|
|
@@ -37,6 +38,10 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
37
38
|
* get user by screen name
|
|
38
39
|
*/
|
|
39
40
|
async getUserByScreenNameRaw(requestParameters: GetUserByScreenNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
|
|
41
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
42
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getUserByScreenName.');
|
|
43
|
+
}
|
|
44
|
+
|
|
40
45
|
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
41
46
|
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getUserByScreenName.');
|
|
42
47
|
}
|
|
@@ -98,7 +103,7 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
98
103
|
}
|
|
99
104
|
}
|
|
100
105
|
const response = await this.request({
|
|
101
|
-
path: `/graphql/
|
|
106
|
+
path: `/graphql/{pathQueryId}/UserByScreenName`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
102
107
|
method: 'GET',
|
|
103
108
|
headers: headerParameters,
|
|
104
109
|
query: queryParameters,
|
package/src/apis/UserListApi.ts
CHANGED
|
@@ -23,12 +23,14 @@ import {
|
|
|
23
23
|
} from '../models';
|
|
24
24
|
|
|
25
25
|
export interface GetFollowersRequest {
|
|
26
|
+
pathQueryId: string;
|
|
26
27
|
queryId: string;
|
|
27
28
|
variables: string;
|
|
28
29
|
features: string;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
export interface GetFollowingRequest {
|
|
33
|
+
pathQueryId: string;
|
|
32
34
|
queryId: string;
|
|
33
35
|
variables: string;
|
|
34
36
|
features: string;
|
|
@@ -43,6 +45,10 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
43
45
|
* get user list of followers
|
|
44
46
|
*/
|
|
45
47
|
async getFollowersRaw(requestParameters: GetFollowersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FollowResponse>> {
|
|
48
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
49
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getFollowers.');
|
|
50
|
+
}
|
|
51
|
+
|
|
46
52
|
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
47
53
|
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getFollowers.');
|
|
48
54
|
}
|
|
@@ -104,7 +110,7 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
104
110
|
}
|
|
105
111
|
}
|
|
106
112
|
const response = await this.request({
|
|
107
|
-
path: `/graphql/
|
|
113
|
+
path: `/graphql/{pathQueryId}/Followers`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
108
114
|
method: 'GET',
|
|
109
115
|
headers: headerParameters,
|
|
110
116
|
query: queryParameters,
|
|
@@ -125,6 +131,10 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
125
131
|
* get user list of following
|
|
126
132
|
*/
|
|
127
133
|
async getFollowingRaw(requestParameters: GetFollowingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<FollowResponse>> {
|
|
134
|
+
if (requestParameters.pathQueryId === null || requestParameters.pathQueryId === undefined) {
|
|
135
|
+
throw new runtime.RequiredError('pathQueryId','Required parameter requestParameters.pathQueryId was null or undefined when calling getFollowing.');
|
|
136
|
+
}
|
|
137
|
+
|
|
128
138
|
if (requestParameters.queryId === null || requestParameters.queryId === undefined) {
|
|
129
139
|
throw new runtime.RequiredError('queryId','Required parameter requestParameters.queryId was null or undefined when calling getFollowing.');
|
|
130
140
|
}
|
|
@@ -186,7 +196,7 @@ export class UserListApi extends runtime.BaseAPI {
|
|
|
186
196
|
}
|
|
187
197
|
}
|
|
188
198
|
const response = await this.request({
|
|
189
|
-
path: `/graphql/
|
|
199
|
+
path: `/graphql/{pathQueryId}/Following`.replace(`{${"pathQueryId"}}`, encodeURIComponent(String(requestParameters.pathQueryId))),
|
|
190
200
|
method: 'GET',
|
|
191
201
|
headers: headerParameters,
|
|
192
202
|
query: queryParameters,
|
package/src/models/Entities.ts
CHANGED
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
MediaFromJSONTyped,
|
|
20
20
|
MediaToJSON,
|
|
21
21
|
} from './Media';
|
|
22
|
+
import type { Url } from './Url';
|
|
23
|
+
import {
|
|
24
|
+
UrlFromJSON,
|
|
25
|
+
UrlFromJSONTyped,
|
|
26
|
+
UrlToJSON,
|
|
27
|
+
} from './Url';
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
*
|
|
@@ -46,10 +52,10 @@ export interface Entities {
|
|
|
46
52
|
symbols: Array<object>;
|
|
47
53
|
/**
|
|
48
54
|
*
|
|
49
|
-
* @type {Array<
|
|
55
|
+
* @type {Array<Url>}
|
|
50
56
|
* @memberof Entities
|
|
51
57
|
*/
|
|
52
|
-
urls: Array<
|
|
58
|
+
urls: Array<Url>;
|
|
53
59
|
/**
|
|
54
60
|
*
|
|
55
61
|
* @type {Array<object>}
|
|
@@ -84,7 +90,7 @@ export function EntitiesFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
84
90
|
'hashtags': json['hashtags'],
|
|
85
91
|
'media': !exists(json, 'media') ? undefined : ((json['media'] as Array<any>).map(MediaFromJSON)),
|
|
86
92
|
'symbols': json['symbols'],
|
|
87
|
-
'urls': json['urls'],
|
|
93
|
+
'urls': ((json['urls'] as Array<any>).map(UrlFromJSON)),
|
|
88
94
|
'userMentions': json['user_mentions'],
|
|
89
95
|
};
|
|
90
96
|
}
|
|
@@ -101,7 +107,7 @@ export function EntitiesToJSON(value?: Entities | null): any {
|
|
|
101
107
|
'hashtags': value.hashtags,
|
|
102
108
|
'media': value.media === undefined ? undefined : ((value.media as Array<any>).map(MediaToJSON)),
|
|
103
109
|
'symbols': value.symbols,
|
|
104
|
-
'urls': value.urls,
|
|
110
|
+
'urls': ((value.urls as Array<any>).map(UrlToJSON)),
|
|
105
111
|
'user_mentions': value.userMentions,
|
|
106
112
|
};
|
|
107
113
|
}
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { PostCreateRetweetRequestVariables } from './PostCreateRetweetRequestVariables';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
PostCreateRetweetRequestVariablesFromJSON,
|
|
19
|
+
PostCreateRetweetRequestVariablesFromJSONTyped,
|
|
20
|
+
PostCreateRetweetRequestVariablesToJSON,
|
|
21
|
+
} from './PostCreateRetweetRequestVariables';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -34,10 +34,10 @@ export interface PostCreateRetweetRequest {
|
|
|
34
34
|
queryId: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {PostCreateRetweetRequestVariables}
|
|
38
38
|
* @memberof PostCreateRetweetRequest
|
|
39
39
|
*/
|
|
40
|
-
variables:
|
|
40
|
+
variables: PostCreateRetweetRequestVariables;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -62,7 +62,7 @@ export function PostCreateRetweetRequestFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
62
62
|
return {
|
|
63
63
|
|
|
64
64
|
'queryId': json['queryId'],
|
|
65
|
-
'variables':
|
|
65
|
+
'variables': PostCreateRetweetRequestVariablesFromJSON(json['variables']),
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ export function PostCreateRetweetRequestToJSON(value?: PostCreateRetweetRequest
|
|
|
76
76
|
return {
|
|
77
77
|
|
|
78
78
|
'queryId': value.queryId,
|
|
79
|
-
'variables':
|
|
79
|
+
'variables': PostCreateRetweetRequestVariablesToJSON(value.variables),
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
package/src/models/{PostDeleteTweetRequestVariables.ts → PostCreateRetweetRequestVariables.ts}
RENAMED
|
@@ -16,27 +16,27 @@ import { exists, mapValues } from '../runtime';
|
|
|
16
16
|
/**
|
|
17
17
|
*
|
|
18
18
|
* @export
|
|
19
|
-
* @interface
|
|
19
|
+
* @interface PostCreateRetweetRequestVariables
|
|
20
20
|
*/
|
|
21
|
-
export interface
|
|
21
|
+
export interface PostCreateRetweetRequestVariables {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
24
|
* @type {boolean}
|
|
25
|
-
* @memberof
|
|
25
|
+
* @memberof PostCreateRetweetRequestVariables
|
|
26
26
|
*/
|
|
27
27
|
darkRequest: boolean;
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
30
30
|
* @type {string}
|
|
31
|
-
* @memberof
|
|
31
|
+
* @memberof PostCreateRetweetRequestVariables
|
|
32
32
|
*/
|
|
33
33
|
tweetId: string;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Check if a given object implements the
|
|
37
|
+
* Check if a given object implements the PostCreateRetweetRequestVariables interface.
|
|
38
38
|
*/
|
|
39
|
-
export function
|
|
39
|
+
export function instanceOfPostCreateRetweetRequestVariables(value: object): boolean {
|
|
40
40
|
let isInstance = true;
|
|
41
41
|
isInstance = isInstance && "darkRequest" in value;
|
|
42
42
|
isInstance = isInstance && "tweetId" in value;
|
|
@@ -44,11 +44,11 @@ export function instanceOfPostDeleteTweetRequestVariables(value: object): boolea
|
|
|
44
44
|
return isInstance;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
export function
|
|
48
|
-
return
|
|
47
|
+
export function PostCreateRetweetRequestVariablesFromJSON(json: any): PostCreateRetweetRequestVariables {
|
|
48
|
+
return PostCreateRetweetRequestVariablesFromJSONTyped(json, false);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function
|
|
51
|
+
export function PostCreateRetweetRequestVariablesFromJSONTyped(json: any, ignoreDiscriminator: boolean): PostCreateRetweetRequestVariables {
|
|
52
52
|
if ((json === undefined) || (json === null)) {
|
|
53
53
|
return json;
|
|
54
54
|
}
|
|
@@ -59,7 +59,7 @@ export function PostDeleteTweetRequestVariablesFromJSONTyped(json: any, ignoreDi
|
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export function
|
|
62
|
+
export function PostCreateRetweetRequestVariablesToJSON(value?: PostCreateRetweetRequestVariables | null): any {
|
|
63
63
|
if (value === undefined) {
|
|
64
64
|
return undefined;
|
|
65
65
|
}
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { PostCreateRetweetRequestVariables } from './PostCreateRetweetRequestVariables';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
PostCreateRetweetRequestVariablesFromJSON,
|
|
19
|
+
PostCreateRetweetRequestVariablesFromJSONTyped,
|
|
20
|
+
PostCreateRetweetRequestVariablesToJSON,
|
|
21
|
+
} from './PostCreateRetweetRequestVariables';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -34,10 +34,10 @@ export interface PostDeleteTweetRequest {
|
|
|
34
34
|
queryId: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {PostCreateRetweetRequestVariables}
|
|
38
38
|
* @memberof PostDeleteTweetRequest
|
|
39
39
|
*/
|
|
40
|
-
variables:
|
|
40
|
+
variables: PostCreateRetweetRequestVariables;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -62,7 +62,7 @@ export function PostDeleteTweetRequestFromJSONTyped(json: any, ignoreDiscriminat
|
|
|
62
62
|
return {
|
|
63
63
|
|
|
64
64
|
'queryId': json['queryId'],
|
|
65
|
-
'variables':
|
|
65
|
+
'variables': PostCreateRetweetRequestVariablesFromJSON(json['variables']),
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ export function PostDeleteTweetRequestToJSON(value?: PostDeleteTweetRequest | nu
|
|
|
76
76
|
return {
|
|
77
77
|
|
|
78
78
|
'queryId': value.queryId,
|
|
79
|
-
'variables':
|
|
79
|
+
'variables': PostCreateRetweetRequestVariablesToJSON(value.variables),
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { PostCreateRetweetRequestVariables } from './PostCreateRetweetRequestVariables';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
PostCreateRetweetRequestVariablesFromJSON,
|
|
19
|
+
PostCreateRetweetRequestVariablesFromJSONTyped,
|
|
20
|
+
PostCreateRetweetRequestVariablesToJSON,
|
|
21
|
+
} from './PostCreateRetweetRequestVariables';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -34,10 +34,10 @@ export interface PostFavoriteTweetRequest {
|
|
|
34
34
|
queryId: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {PostCreateRetweetRequestVariables}
|
|
38
38
|
* @memberof PostFavoriteTweetRequest
|
|
39
39
|
*/
|
|
40
|
-
variables:
|
|
40
|
+
variables: PostCreateRetweetRequestVariables;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -62,7 +62,7 @@ export function PostFavoriteTweetRequestFromJSONTyped(json: any, ignoreDiscrimin
|
|
|
62
62
|
return {
|
|
63
63
|
|
|
64
64
|
'queryId': json['queryId'],
|
|
65
|
-
'variables':
|
|
65
|
+
'variables': PostCreateRetweetRequestVariablesFromJSON(json['variables']),
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ export function PostFavoriteTweetRequestToJSON(value?: PostFavoriteTweetRequest
|
|
|
76
76
|
return {
|
|
77
77
|
|
|
78
78
|
'queryId': value.queryId,
|
|
79
|
-
'variables':
|
|
79
|
+
'variables': PostCreateRetweetRequestVariablesToJSON(value.variables),
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { exists, mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { PostCreateRetweetRequestVariables } from './PostCreateRetweetRequestVariables';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} from './
|
|
18
|
+
PostCreateRetweetRequestVariablesFromJSON,
|
|
19
|
+
PostCreateRetweetRequestVariablesFromJSONTyped,
|
|
20
|
+
PostCreateRetweetRequestVariablesToJSON,
|
|
21
|
+
} from './PostCreateRetweetRequestVariables';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
*
|
|
@@ -34,10 +34,10 @@ export interface PostUnfavoriteTweetRequest {
|
|
|
34
34
|
queryId: string;
|
|
35
35
|
/**
|
|
36
36
|
*
|
|
37
|
-
* @type {
|
|
37
|
+
* @type {PostCreateRetweetRequestVariables}
|
|
38
38
|
* @memberof PostUnfavoriteTweetRequest
|
|
39
39
|
*/
|
|
40
|
-
variables:
|
|
40
|
+
variables: PostCreateRetweetRequestVariables;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -62,7 +62,7 @@ export function PostUnfavoriteTweetRequestFromJSONTyped(json: any, ignoreDiscrim
|
|
|
62
62
|
return {
|
|
63
63
|
|
|
64
64
|
'queryId': json['queryId'],
|
|
65
|
-
'variables':
|
|
65
|
+
'variables': PostCreateRetweetRequestVariablesFromJSON(json['variables']),
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -76,7 +76,7 @@ export function PostUnfavoriteTweetRequestToJSON(value?: PostUnfavoriteTweetRequ
|
|
|
76
76
|
return {
|
|
77
77
|
|
|
78
78
|
'queryId': value.queryId,
|
|
79
|
-
'variables':
|
|
79
|
+
'variables': PostCreateRetweetRequestVariablesToJSON(value.variables),
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
|
package/src/models/Tweet.ts
CHANGED
|
@@ -19,6 +19,12 @@ import {
|
|
|
19
19
|
ItemResultFromJSONTyped,
|
|
20
20
|
ItemResultToJSON,
|
|
21
21
|
} from './ItemResult';
|
|
22
|
+
import type { TweetCard } from './TweetCard';
|
|
23
|
+
import {
|
|
24
|
+
TweetCardFromJSON,
|
|
25
|
+
TweetCardFromJSONTyped,
|
|
26
|
+
TweetCardToJSON,
|
|
27
|
+
} from './TweetCard';
|
|
22
28
|
import type { TweetEditControl } from './TweetEditControl';
|
|
23
29
|
import {
|
|
24
30
|
TweetEditControlFromJSON,
|
|
@@ -68,6 +74,12 @@ export interface Tweet {
|
|
|
68
74
|
* @memberof Tweet
|
|
69
75
|
*/
|
|
70
76
|
typename?: TypeName;
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @type {TweetCard}
|
|
80
|
+
* @memberof Tweet
|
|
81
|
+
*/
|
|
82
|
+
card?: TweetCard;
|
|
71
83
|
/**
|
|
72
84
|
*
|
|
73
85
|
* @type {UserResultCore}
|
|
@@ -151,6 +163,7 @@ export function TweetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Twe
|
|
|
151
163
|
return {
|
|
152
164
|
|
|
153
165
|
'typename': !exists(json, '__typename') ? undefined : TypeNameFromJSON(json['__typename']),
|
|
166
|
+
'card': !exists(json, 'card') ? undefined : TweetCardFromJSON(json['card']),
|
|
154
167
|
'core': UserResultCoreFromJSON(json['core']),
|
|
155
168
|
'editControl': TweetEditControlFromJSON(json['edit_control']),
|
|
156
169
|
'editPrespective': TweetEditPrespectiveFromJSON(json['edit_prespective']),
|
|
@@ -173,6 +186,7 @@ export function TweetToJSON(value?: Tweet | null): any {
|
|
|
173
186
|
return {
|
|
174
187
|
|
|
175
188
|
'__typename': TypeNameToJSON(value.typename),
|
|
189
|
+
'card': TweetCardToJSON(value.card),
|
|
176
190
|
'core': UserResultCoreToJSON(value.core),
|
|
177
191
|
'edit_control': TweetEditControlToJSON(value.editControl),
|
|
178
192
|
'edit_prespective': TweetEditPrespectiveToJSON(value.editPrespective),
|
|
@@ -0,0 +1,80 @@
|
|
|
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 { TweetCardLegacy } from './TweetCardLegacy';
|
|
17
|
+
import {
|
|
18
|
+
TweetCardLegacyFromJSON,
|
|
19
|
+
TweetCardLegacyFromJSONTyped,
|
|
20
|
+
TweetCardLegacyToJSON,
|
|
21
|
+
} from './TweetCardLegacy';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface TweetCard
|
|
27
|
+
*/
|
|
28
|
+
export interface TweetCard {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {TweetCardLegacy}
|
|
32
|
+
* @memberof TweetCard
|
|
33
|
+
*/
|
|
34
|
+
legacy?: TweetCardLegacy;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof TweetCard
|
|
39
|
+
*/
|
|
40
|
+
restId?: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the TweetCard interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfTweetCard(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
|
|
49
|
+
return isInstance;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function TweetCardFromJSON(json: any): TweetCard {
|
|
53
|
+
return TweetCardFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function TweetCardFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCard {
|
|
57
|
+
if ((json === undefined) || (json === null)) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'legacy': !exists(json, 'legacy') ? undefined : TweetCardLegacyFromJSON(json['legacy']),
|
|
63
|
+
'restId': !exists(json, 'rest_id') ? undefined : json['rest_id'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function TweetCardToJSON(value?: TweetCard | null): any {
|
|
68
|
+
if (value === undefined) {
|
|
69
|
+
return undefined;
|
|
70
|
+
}
|
|
71
|
+
if (value === null) {
|
|
72
|
+
return null;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'legacy': TweetCardLegacyToJSON(value.legacy),
|
|
77
|
+
'rest_id': value.restId,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
@@ -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 { TweetCardLegacyBindingValuesInner } from './TweetCardLegacyBindingValuesInner';
|
|
17
|
+
import {
|
|
18
|
+
TweetCardLegacyBindingValuesInnerFromJSON,
|
|
19
|
+
TweetCardLegacyBindingValuesInnerFromJSONTyped,
|
|
20
|
+
TweetCardLegacyBindingValuesInnerToJSON,
|
|
21
|
+
} from './TweetCardLegacyBindingValuesInner';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface TweetCardLegacy
|
|
27
|
+
*/
|
|
28
|
+
export interface TweetCardLegacy {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {Array<TweetCardLegacyBindingValuesInner>}
|
|
32
|
+
* @memberof TweetCardLegacy
|
|
33
|
+
*/
|
|
34
|
+
bindingValues: Array<TweetCardLegacyBindingValuesInner>;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof TweetCardLegacy
|
|
39
|
+
*/
|
|
40
|
+
name: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof TweetCardLegacy
|
|
45
|
+
*/
|
|
46
|
+
url: string;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Check if a given object implements the TweetCardLegacy interface.
|
|
51
|
+
*/
|
|
52
|
+
export function instanceOfTweetCardLegacy(value: object): boolean {
|
|
53
|
+
let isInstance = true;
|
|
54
|
+
isInstance = isInstance && "bindingValues" in value;
|
|
55
|
+
isInstance = isInstance && "name" in value;
|
|
56
|
+
isInstance = isInstance && "url" in value;
|
|
57
|
+
|
|
58
|
+
return isInstance;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function TweetCardLegacyFromJSON(json: any): TweetCardLegacy {
|
|
62
|
+
return TweetCardLegacyFromJSONTyped(json, false);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function TweetCardLegacyFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCardLegacy {
|
|
66
|
+
if ((json === undefined) || (json === null)) {
|
|
67
|
+
return json;
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'bindingValues': ((json['binding_values'] as Array<any>).map(TweetCardLegacyBindingValuesInnerFromJSON)),
|
|
72
|
+
'name': json['name'],
|
|
73
|
+
'url': json['url'],
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function TweetCardLegacyToJSON(value?: TweetCardLegacy | null): any {
|
|
78
|
+
if (value === undefined) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
if (value === null) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'binding_values': ((value.bindingValues as Array<any>).map(TweetCardLegacyBindingValuesInnerToJSON)),
|
|
87
|
+
'name': value.name,
|
|
88
|
+
'url': value.url,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
@@ -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 { TweetCardLegacyBindingValuesInnerValue } from './TweetCardLegacyBindingValuesInnerValue';
|
|
17
|
+
import {
|
|
18
|
+
TweetCardLegacyBindingValuesInnerValueFromJSON,
|
|
19
|
+
TweetCardLegacyBindingValuesInnerValueFromJSONTyped,
|
|
20
|
+
TweetCardLegacyBindingValuesInnerValueToJSON,
|
|
21
|
+
} from './TweetCardLegacyBindingValuesInnerValue';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
*
|
|
25
|
+
* @export
|
|
26
|
+
* @interface TweetCardLegacyBindingValuesInner
|
|
27
|
+
*/
|
|
28
|
+
export interface TweetCardLegacyBindingValuesInner {
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof TweetCardLegacyBindingValuesInner
|
|
33
|
+
*/
|
|
34
|
+
key: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {TweetCardLegacyBindingValuesInnerValue}
|
|
38
|
+
* @memberof TweetCardLegacyBindingValuesInner
|
|
39
|
+
*/
|
|
40
|
+
value: TweetCardLegacyBindingValuesInnerValue;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the TweetCardLegacyBindingValuesInner interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfTweetCardLegacyBindingValuesInner(value: object): boolean {
|
|
47
|
+
let isInstance = true;
|
|
48
|
+
isInstance = isInstance && "key" in value;
|
|
49
|
+
isInstance = isInstance && "value" in value;
|
|
50
|
+
|
|
51
|
+
return isInstance;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function TweetCardLegacyBindingValuesInnerFromJSON(json: any): TweetCardLegacyBindingValuesInner {
|
|
55
|
+
return TweetCardLegacyBindingValuesInnerFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function TweetCardLegacyBindingValuesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): TweetCardLegacyBindingValuesInner {
|
|
59
|
+
if ((json === undefined) || (json === null)) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
|
|
64
|
+
'key': json['key'],
|
|
65
|
+
'value': TweetCardLegacyBindingValuesInnerValueFromJSON(json['value']),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function TweetCardLegacyBindingValuesInnerToJSON(value?: TweetCardLegacyBindingValuesInner | null): any {
|
|
70
|
+
if (value === undefined) {
|
|
71
|
+
return undefined;
|
|
72
|
+
}
|
|
73
|
+
if (value === null) {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'key': value.key,
|
|
79
|
+
'value': TweetCardLegacyBindingValuesInnerValueToJSON(value.value),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|