twitter-openapi-typescript 0.0.5 → 0.0.7
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/README.md +38 -17
- package/dist/src/api.d.ts +41 -33
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +239 -151
- package/dist/src/api.js.map +1 -1
- package/dist/src/apis/defaultApi.d.ts +15 -17
- package/dist/src/apis/defaultApi.d.ts.map +1 -1
- package/dist/src/apis/defaultApi.js +106 -106
- package/dist/src/apis/defaultApi.js.map +1 -1
- package/dist/src/apis/index.d.ts +9 -9
- package/dist/src/apis/index.js +21 -21
- package/dist/src/apis/initialStateApi.d.ts +2 -2
- package/dist/src/apis/initialStateApi.js +9 -9
- package/dist/src/apis/postApi.d.ts +51 -51
- package/dist/src/apis/postApi.d.ts.map +1 -1
- package/dist/src/apis/postApi.js +236 -236
- package/dist/src/apis/postApi.js.map +1 -1
- package/dist/src/apis/tweetApi.d.ts +87 -88
- package/dist/src/apis/tweetApi.d.ts.map +1 -1
- package/dist/src/apis/tweetApi.js +277 -277
- package/dist/src/apis/tweetApi.js.map +1 -1
- package/dist/src/apis/userApi.d.ts +16 -17
- package/dist/src/apis/userApi.d.ts.map +1 -1
- package/dist/src/apis/userApi.js +101 -101
- package/dist/src/apis/userApi.js.map +1 -1
- package/dist/src/apis/userListApi.d.ts +27 -28
- package/dist/src/apis/userListApi.d.ts.map +1 -1
- package/dist/src/apis/userListApi.js +135 -135
- package/dist/src/apis/userListApi.js.map +1 -1
- package/dist/src/apis/v11GetApi.d.ts +7 -7
- package/dist/src/apis/v11GetApi.d.ts.map +1 -1
- package/dist/src/apis/v11GetApi.js +11 -11
- package/dist/src/apis/v11PostApi.d.ts +22 -22
- package/dist/src/apis/v11PostApi.d.ts.map +1 -1
- package/dist/src/apis/v11PostApi.js +93 -93
- package/dist/src/apis/v11PostApi.js.map +1 -1
- package/dist/src/apis/v20GetApi.d.ts +7 -7
- package/dist/src/apis/v20GetApi.d.ts.map +1 -1
- package/dist/src/apis/v20GetApi.js +11 -11
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +20 -20
- package/dist/src/index.js.map +1 -1
- package/dist/src/{types → models}/flag.d.ts +5 -5
- package/dist/src/models/flag.d.ts.map +1 -0
- package/dist/src/{types → models}/flag.js +2 -2
- package/dist/src/{types → models}/flag.js.map +1 -1
- package/dist/src/{types → models}/header.d.ts +14 -14
- package/dist/src/models/header.d.ts.map +1 -0
- package/dist/src/models/{type.js → header.js} +3 -3
- package/dist/src/{types → models}/header.js.map +1 -1
- package/dist/src/models/index.d.ts +8 -2
- package/dist/src/models/index.d.ts.map +1 -1
- package/dist/src/models/index.js +24 -18
- package/dist/src/models/index.js.map +1 -1
- package/dist/src/{types → models}/response.d.ts +9 -9
- package/dist/src/models/response.d.ts.map +1 -0
- package/dist/src/{types/header.js → models/response.js} +3 -3
- package/dist/src/{types → models}/response.js.map +1 -1
- package/dist/src/{types → models}/timeline.d.ts +10 -10
- package/dist/src/models/timeline.d.ts.map +1 -0
- package/dist/src/models/timeline.js +3 -0
- package/dist/src/{types → models}/timeline.js.map +1 -1
- package/dist/src/{types → models}/tweet.d.ts +17 -17
- package/dist/src/models/tweet.d.ts.map +1 -0
- package/dist/src/{types → models}/tweet.js +2 -2
- package/dist/src/{types → models}/tweet.js.map +1 -1
- package/dist/src/{types → models}/user.d.ts +10 -10
- package/dist/src/models/user.d.ts.map +1 -0
- package/dist/src/{types → models}/user.js +2 -2
- package/dist/src/{types → models}/user.js.map +1 -1
- package/dist/src/{types → models}/user_list.d.ts +12 -12
- package/dist/src/models/user_list.d.ts.map +1 -0
- package/dist/src/models/user_list.js +3 -0
- package/dist/src/{types → models}/user_list.js.map +1 -1
- package/dist/src/models/{type.d.ts → utils.d.ts} +16 -16
- package/dist/src/models/utils.d.ts.map +1 -0
- package/dist/src/models/utils.js +3 -0
- package/dist/src/models/utils.js.map +1 -0
- package/dist/src/{models → utils}/api.d.ts +17 -17
- package/dist/src/utils/api.d.ts.map +1 -0
- package/dist/src/{models → utils}/api.js +130 -130
- package/dist/src/utils/api.js.map +1 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/index.d.ts.map +1 -0
- package/dist/src/{types → utils}/index.js +17 -23
- package/dist/src/utils/index.js.map +1 -0
- package/package.json +4 -4
- package/src/api.ts +92 -36
- package/src/apis/defaultApi.ts +2 -3
- package/src/apis/postApi.ts +3 -3
- package/src/apis/tweetApi.ts +2 -2
- package/src/apis/userApi.ts +2 -2
- package/src/apis/userListApi.ts +2 -9
- package/src/apis/v11GetApi.ts +1 -1
- package/src/apis/v11PostApi.ts +2 -2
- package/src/apis/v20GetApi.ts +1 -1
- package/src/index.ts +1 -1
- package/src/models/index.ts +8 -2
- package/src/{types → models}/response.ts +1 -1
- package/src/{types → models}/tweet.ts +1 -1
- package/src/{types → models}/user.ts +1 -1
- package/src/{types → models}/user_list.ts +1 -1
- package/src/{models → utils}/api.ts +1 -1
- package/src/utils/index.ts +1 -0
- package/test/api/defaultApi.test.ts +0 -1
- package/test/init.ts +2 -2
- package/test/util.ts +1 -1
- package/dist/src/models/api.d.ts.map +0 -1
- package/dist/src/models/api.js.map +0 -1
- package/dist/src/models/type.d.ts.map +0 -1
- package/dist/src/models/type.js.map +0 -1
- package/dist/src/types/flag.d.ts.map +0 -1
- package/dist/src/types/header.d.ts.map +0 -1
- package/dist/src/types/index.d.ts +0 -8
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/types/response.d.ts.map +0 -1
- package/dist/src/types/response.js +0 -3
- package/dist/src/types/timeline.d.ts.map +0 -1
- package/dist/src/types/timeline.js +0 -3
- package/dist/src/types/tweet.d.ts.map +0 -1
- package/dist/src/types/user.d.ts.map +0 -1
- package/dist/src/types/user_list.d.ts.map +0 -1
- package/dist/src/types/user_list.js +0 -3
- package/src/types/index.ts +0 -7
- /package/src/{types → models}/flag.ts +0 -0
- /package/src/{types → models}/header.ts +0 -0
- /package/src/{types → models}/timeline.ts +0 -0
- /package/src/models/{type.ts → utils.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tweet.d.ts","sourceRoot":"","sources":["../../../src/models/tweet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sCAAsC,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/E,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,WAAW,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,CAAC,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC;IACf,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;IACb,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,SAAS,CAAC,EAAE,iBAAiB,CAAC;IAC9B,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACxB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=tweet.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tweet.js","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"tweet.js","sourceRoot":"","sources":["../../../src/models/tweet.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
-
import { ApiUtilsHeader } from './';
|
|
3
|
-
export type UserApiUtilsResponse = {
|
|
4
|
-
raw: UserApiUtilsRaw;
|
|
5
|
-
header: ApiUtilsHeader;
|
|
6
|
-
data: i.User;
|
|
7
|
-
};
|
|
8
|
-
export type UserApiUtilsRaw = {
|
|
9
|
-
response: Response;
|
|
10
|
-
};
|
|
1
|
+
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
+
import { ApiUtilsHeader } from './';
|
|
3
|
+
export type UserApiUtilsResponse = {
|
|
4
|
+
raw: UserApiUtilsRaw;
|
|
5
|
+
header: ApiUtilsHeader;
|
|
6
|
+
data: i.User;
|
|
7
|
+
};
|
|
8
|
+
export type UserApiUtilsRaw = {
|
|
9
|
+
response: Response;
|
|
10
|
+
};
|
|
11
11
|
//# sourceMappingURL=user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../../src/models/user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sCAAsC,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,MAAM,oBAAoB,GAAG;IACjC,GAAG,EAAE,eAAe,CAAC;IACrB,MAAM,EAAE,cAAc,CAAC;IACvB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=user.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"user.js","sourceRoot":"","sources":["../../../src/models/user.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
-
import { ApiUtilsRaw, CursorApiUtilsResponse, ApiUtilsHeader } from './';
|
|
3
|
-
export type UserListApiUtilsResponse = {
|
|
4
|
-
raw: ApiUtilsRaw;
|
|
5
|
-
header: ApiUtilsHeader;
|
|
6
|
-
cursor: CursorApiUtilsResponse;
|
|
7
|
-
data: UserApiUtilsData[];
|
|
8
|
-
};
|
|
9
|
-
export type UserApiUtilsData = {
|
|
10
|
-
raw: i.TimelineUser;
|
|
11
|
-
user: i.User;
|
|
12
|
-
};
|
|
1
|
+
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
+
import { ApiUtilsRaw, CursorApiUtilsResponse, ApiUtilsHeader } from './';
|
|
3
|
+
export type UserListApiUtilsResponse = {
|
|
4
|
+
raw: ApiUtilsRaw;
|
|
5
|
+
header: ApiUtilsHeader;
|
|
6
|
+
cursor: CursorApiUtilsResponse;
|
|
7
|
+
data: UserApiUtilsData[];
|
|
8
|
+
};
|
|
9
|
+
export type UserApiUtilsData = {
|
|
10
|
+
raw: i.TimelineUser;
|
|
11
|
+
user: i.User;
|
|
12
|
+
};
|
|
13
13
|
//# sourceMappingURL=user_list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user_list.d.ts","sourceRoot":"","sources":["../../../src/models/user_list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sCAAsC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/E,MAAM,MAAM,wBAAwB,GAAG;IACrC,GAAG,EAAE,WAAW,CAAC;IACjB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,IAAI,EAAE,gBAAgB,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,CAAC,CAAC,YAAY,CAAC;IACpB,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_list.js","sourceRoot":"","sources":["../../../src/
|
|
1
|
+
{"version":3,"file":"user_list.js","sourceRoot":"","sources":["../../../src/models/user_list.ts"],"names":[],"mappings":""}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
-
export type ApiFunction<T> = (requestParameters: {
|
|
3
|
-
queryId: string;
|
|
4
|
-
variables: string;
|
|
5
|
-
features: string;
|
|
6
|
-
}) => Promise<i.ApiResponse<T>>;
|
|
7
|
-
export type RequestParam<T1, T2> = {
|
|
8
|
-
apiFn: ApiFunction<T2>;
|
|
9
|
-
convertFn: ConvertFunction<T1, T2>;
|
|
10
|
-
key: string;
|
|
11
|
-
param: {
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type ConvertFunction<T1, T2> = (arg0: T2) => T1;
|
|
16
|
-
//# sourceMappingURL=
|
|
1
|
+
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
+
export type ApiFunction<T> = (requestParameters: {
|
|
3
|
+
queryId: string;
|
|
4
|
+
variables: string;
|
|
5
|
+
features: string;
|
|
6
|
+
}) => Promise<i.ApiResponse<T>>;
|
|
7
|
+
export type RequestParam<T1, T2> = {
|
|
8
|
+
apiFn: ApiFunction<T2>;
|
|
9
|
+
convertFn: ConvertFunction<T1, T2>;
|
|
10
|
+
key: string;
|
|
11
|
+
param: {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export type ConvertFunction<T1, T2> = (arg0: T2) => T1;
|
|
16
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/models/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sCAAsC,CAAC;AAE1D,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,iBAAiB,EAAE;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,KAAK,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;AAEhC,MAAM,MAAM,YAAY,CAAC,EAAE,EAAE,EAAE,IAAI;IACjC,KAAK,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;IACvB,SAAS,EAAE,eAAe,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/models/utils.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
-
import { TweetApiUtilsData, UserApiUtilsData, CursorApiUtilsResponse, ApiUtilsHeader } from '../
|
|
3
|
-
export declare const instructionToEntry: (item: i.InstructionUnion[]) => i.TimelineAddEntry[];
|
|
4
|
-
export declare const tweetEntriesConverter: (item: i.TimelineAddEntry[]) => TweetApiUtilsData[];
|
|
5
|
-
type buildTweetApiUtilsArgs = {
|
|
6
|
-
result: i.ItemResult;
|
|
7
|
-
promotedMetadata?: any;
|
|
8
|
-
reply?: i.TimelineTweet[];
|
|
9
|
-
};
|
|
10
|
-
export declare const buildTweetApiUtils: (args: buildTweetApiUtilsArgs) => TweetApiUtilsData | undefined;
|
|
11
|
-
export declare const tweetResultsConverter: (tweetResults: i.ItemResult) => i.Tweet | undefined;
|
|
12
|
-
export declare const userEntriesConverter: (item: i.TimelineAddEntry[]) => i.TimelineUser[];
|
|
13
|
-
export declare const buildUserResponse: (user: i.TimelineUser) => UserApiUtilsData;
|
|
14
|
-
export declare const entriesCursor: (item: i.TimelineAddEntry[]) => CursorApiUtilsResponse;
|
|
15
|
-
export declare const buildCursor: (cursorList: i.TimelineTimelineCursor[]) => CursorApiUtilsResponse;
|
|
16
|
-
export declare const buildHeader: (headers: Headers) => ApiUtilsHeader;
|
|
17
|
-
export {};
|
|
1
|
+
import * as i from 'twitter-openapi-typescript-generated';
|
|
2
|
+
import { TweetApiUtilsData, UserApiUtilsData, CursorApiUtilsResponse, ApiUtilsHeader } from '../models';
|
|
3
|
+
export declare const instructionToEntry: (item: i.InstructionUnion[]) => i.TimelineAddEntry[];
|
|
4
|
+
export declare const tweetEntriesConverter: (item: i.TimelineAddEntry[]) => TweetApiUtilsData[];
|
|
5
|
+
type buildTweetApiUtilsArgs = {
|
|
6
|
+
result: i.ItemResult;
|
|
7
|
+
promotedMetadata?: any;
|
|
8
|
+
reply?: i.TimelineTweet[];
|
|
9
|
+
};
|
|
10
|
+
export declare const buildTweetApiUtils: (args: buildTweetApiUtilsArgs) => TweetApiUtilsData | undefined;
|
|
11
|
+
export declare const tweetResultsConverter: (tweetResults: i.ItemResult) => i.Tweet | undefined;
|
|
12
|
+
export declare const userEntriesConverter: (item: i.TimelineAddEntry[]) => i.TimelineUser[];
|
|
13
|
+
export declare const buildUserResponse: (user: i.TimelineUser) => UserApiUtilsData;
|
|
14
|
+
export declare const entriesCursor: (item: i.TimelineAddEntry[]) => CursorApiUtilsResponse;
|
|
15
|
+
export declare const buildCursor: (cursorList: i.TimelineTimelineCursor[]) => CursorApiUtilsResponse;
|
|
16
|
+
export declare const buildHeader: (headers: Headers) => ApiUtilsHeader;
|
|
17
|
+
export {};
|
|
18
18
|
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/utils/api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,sCAAsC,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEvG,eAAO,MAAM,kBAAkB,SAAU,EAAE,gBAAgB,EAAE,KAAG,EAAE,gBAAgB,EAIjF,CAAC;AAEF,eAAO,MAAM,qBAAqB,SAAU,EAAE,gBAAgB,EAAE,KAAG,iBAAiB,EA0BnF,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC;IACrB,gBAAgB,CAAC,EAAE,GAAG,CAAC;IACvB,KAAK,CAAC,EAAE,CAAC,CAAC,aAAa,EAAE,CAAC;CAC3B,CAAC;AACF,eAAO,MAAM,kBAAkB,SAAU,sBAAsB,KAAG,iBAAiB,GAAG,SAgBrF,CAAC;AAEF,eAAO,MAAM,qBAAqB,iBAAkB,EAAE,UAAU,KAAG,EAAE,KAAK,GAAG,SAU5E,CAAC;AAEF,eAAO,MAAM,oBAAoB,SAAU,EAAE,gBAAgB,EAAE,KAAG,EAAE,YAAY,EAS/E,CAAC;AAEF,eAAO,MAAM,iBAAiB,SAAU,EAAE,YAAY,KAAG,gBAKxD,CAAC;AAEF,eAAO,MAAM,aAAa,SAAU,EAAE,gBAAgB,EAAE,KAAG,sBAc1D,CAAC;AAEF,eAAO,MAAM,WAAW,eAAgB,EAAE,sBAAsB,EAAE,KAAG,sBAKpE,CAAC;AAEF,eAAO,MAAM,WAAW,YAAa,OAAO,KAAG,cAe9C,CAAC"}
|
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildHeader = exports.buildCursor = exports.entriesCursor = exports.buildUserResponse = exports.userEntriesConverter = exports.tweetResultsConverter = exports.buildTweetApiUtils = exports.tweetEntriesConverter = exports.instructionToEntry = void 0;
|
|
4
|
-
var i = require("twitter-openapi-typescript-generated");
|
|
5
|
-
var instructionToEntry = function (item) {
|
|
6
|
-
return item
|
|
7
|
-
.map(function (e) { return (e.type == i.InstructionType.TimelineAddEntries ? e : null); })
|
|
8
|
-
.find(function (e) { return e; }).entries;
|
|
9
|
-
};
|
|
10
|
-
exports.instructionToEntry = instructionToEntry;
|
|
11
|
-
var tweetEntriesConverter = function (item) {
|
|
12
|
-
return item
|
|
13
|
-
.map(function (e) {
|
|
14
|
-
var _a;
|
|
15
|
-
if (e.content.entryType == i.ContentEntryType.TimelineTimelineItem) {
|
|
16
|
-
var item_1 = e.content.itemContent;
|
|
17
|
-
var timeline = item_1.itemType == i.ContentItemType.TimelineTweet ? item_1 : null;
|
|
18
|
-
if (timeline == null)
|
|
19
|
-
return null;
|
|
20
|
-
return (0, exports.buildTweetApiUtils)({
|
|
21
|
-
result: timeline.tweetResults,
|
|
22
|
-
promotedMetadata: timeline.promotedMetadata,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
else if (e.content.entryType == i.ContentEntryType.TimelineTimelineModule) {
|
|
26
|
-
var item_2 = (_a = e.content.items) !== null && _a !== void 0 ? _a : [];
|
|
27
|
-
var timelineList = item_2
|
|
28
|
-
.filter(function (e) { return e.item.itemContent.itemType == i.ContentItemType.TimelineTweet; })
|
|
29
|
-
.map(function (e) { return e.item.itemContent; });
|
|
30
|
-
if (timelineList.length == 0)
|
|
31
|
-
return null;
|
|
32
|
-
var timeline = timelineList[0];
|
|
33
|
-
return (0, exports.buildTweetApiUtils)({
|
|
34
|
-
result: timeline.tweetResults,
|
|
35
|
-
promotedMetadata: timeline.promotedMetadata,
|
|
36
|
-
reply: timelineList.slice(1),
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
.filter(function (e) { return e != null; });
|
|
41
|
-
};
|
|
42
|
-
exports.tweetEntriesConverter = tweetEntriesConverter;
|
|
43
|
-
var buildTweetApiUtils = function (args) {
|
|
44
|
-
var _a, _b;
|
|
45
|
-
var tweet = (0, exports.tweetResultsConverter)(args.result);
|
|
46
|
-
if (tweet == null)
|
|
47
|
-
return undefined;
|
|
48
|
-
var quoted = tweet.quotedStatusResult;
|
|
49
|
-
var retweeted = tweet.legacy.retweetedStatusResult;
|
|
50
|
-
return {
|
|
51
|
-
raw: args.result,
|
|
52
|
-
promotedMetadata: args.promotedMetadata,
|
|
53
|
-
tweet: tweet,
|
|
54
|
-
user: tweet.core.userResults.result,
|
|
55
|
-
reply: (_b = (_a = args.reply) === null || _a === void 0 ? void 0 : _a.map(function (e) { return (0, exports.buildTweetApiUtils)({ result: e.tweetResults, promotedMetadata: e.promotedMetadata }); }).filter(function (e) { return e != null; })) !== null && _b !== void 0 ? _b : [],
|
|
56
|
-
quoted: quoted == undefined ? undefined : (0, exports.buildTweetApiUtils)({ result: quoted }),
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
exports.buildTweetApiUtils = buildTweetApiUtils;
|
|
60
|
-
var tweetResultsConverter = function (tweetResults) {
|
|
61
|
-
switch (tweetResults.result.typename) {
|
|
62
|
-
case i.TypeName.Tweet:
|
|
63
|
-
return tweetResults.result;
|
|
64
|
-
case i.TypeName.TweetWithVisibilityResults:
|
|
65
|
-
return tweetResults.result.tweet;
|
|
66
|
-
case i.TypeName.TweetTombstone:
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
throw Error();
|
|
70
|
-
};
|
|
71
|
-
exports.tweetResultsConverter = tweetResultsConverter;
|
|
72
|
-
var userEntriesConverter = function (item) {
|
|
73
|
-
return item
|
|
74
|
-
.map(function (e) {
|
|
75
|
-
if (e.content.typename == i.TypeName.TimelineTimelineItem) {
|
|
76
|
-
var item_3 = e.content.itemContent;
|
|
77
|
-
return item_3.itemType == i.ContentItemType.TimelineUser ? item_3 : null;
|
|
78
|
-
}
|
|
79
|
-
})
|
|
80
|
-
.filter(function (e) { return e != null; });
|
|
81
|
-
};
|
|
82
|
-
exports.userEntriesConverter = userEntriesConverter;
|
|
83
|
-
var buildUserResponse = function (user) {
|
|
84
|
-
return {
|
|
85
|
-
raw: user,
|
|
86
|
-
user: user.userResults.result,
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
exports.buildUserResponse = buildUserResponse;
|
|
90
|
-
var entriesCursor = function (item) {
|
|
91
|
-
var cursorList = item
|
|
92
|
-
.map(function (e) {
|
|
93
|
-
if (e.content.entryType == i.ContentEntryType.TimelineTimelineCursor) {
|
|
94
|
-
return e.content;
|
|
95
|
-
}
|
|
96
|
-
else if (e.content.entryType == i.ContentEntryType.TimelineTimelineItem) {
|
|
97
|
-
var item_4 = e.content;
|
|
98
|
-
if (item_4.itemContent.itemType == i.ContentItemType.TimelineTimelineCursor) {
|
|
99
|
-
return item_4.itemContent;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
})
|
|
103
|
-
.filter(function (e) { return e != null; });
|
|
104
|
-
return (0, exports.buildCursor)(cursorList);
|
|
105
|
-
};
|
|
106
|
-
exports.entriesCursor = entriesCursor;
|
|
107
|
-
var buildCursor = function (cursorList) {
|
|
108
|
-
return {
|
|
109
|
-
top: cursorList.find(function (e) { return e.cursorType == i.TimelineTimelineCursorCursorTypeEnum.Top; }),
|
|
110
|
-
bottom: cursorList.find(function (e) { return e.cursorType == i.TimelineTimelineCursorCursorTypeEnum.Bottom; }),
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
exports.buildCursor = buildCursor;
|
|
114
|
-
var buildHeader = function (headers) {
|
|
115
|
-
return {
|
|
116
|
-
raw: headers,
|
|
117
|
-
connectionHash: headers.get('x-connection-hash'),
|
|
118
|
-
contentTypeOptions: headers.get('x-content-type-options'),
|
|
119
|
-
frameOptions: headers.get('x-frame-options'),
|
|
120
|
-
rateLimitLimit: Number(headers.get('x-rate-limit-limit')),
|
|
121
|
-
rateLimitRemaining: Number(headers.get('x-rate-limit-remaining')),
|
|
122
|
-
rateLimitReset: Number(headers.get('x-rate-limit-reset')),
|
|
123
|
-
responseTime: Number(headers.get('x-response-time')),
|
|
124
|
-
tfePreserveBody: headers.get('x-tfe-preserve-body') == 'true',
|
|
125
|
-
transactionId: headers.get('x-transaction-id'),
|
|
126
|
-
twitterResponseTags: headers.get('x-twitter-response-tags'),
|
|
127
|
-
xssProtection: Number(headers.get('x-xss-protection')),
|
|
128
|
-
};
|
|
129
|
-
};
|
|
130
|
-
exports.buildHeader = buildHeader;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildHeader = exports.buildCursor = exports.entriesCursor = exports.buildUserResponse = exports.userEntriesConverter = exports.tweetResultsConverter = exports.buildTweetApiUtils = exports.tweetEntriesConverter = exports.instructionToEntry = void 0;
|
|
4
|
+
var i = require("twitter-openapi-typescript-generated");
|
|
5
|
+
var instructionToEntry = function (item) {
|
|
6
|
+
return item
|
|
7
|
+
.map(function (e) { return (e.type == i.InstructionType.TimelineAddEntries ? e : null); })
|
|
8
|
+
.find(function (e) { return e; }).entries;
|
|
9
|
+
};
|
|
10
|
+
exports.instructionToEntry = instructionToEntry;
|
|
11
|
+
var tweetEntriesConverter = function (item) {
|
|
12
|
+
return item
|
|
13
|
+
.map(function (e) {
|
|
14
|
+
var _a;
|
|
15
|
+
if (e.content.entryType == i.ContentEntryType.TimelineTimelineItem) {
|
|
16
|
+
var item_1 = e.content.itemContent;
|
|
17
|
+
var timeline = item_1.itemType == i.ContentItemType.TimelineTweet ? item_1 : null;
|
|
18
|
+
if (timeline == null)
|
|
19
|
+
return null;
|
|
20
|
+
return (0, exports.buildTweetApiUtils)({
|
|
21
|
+
result: timeline.tweetResults,
|
|
22
|
+
promotedMetadata: timeline.promotedMetadata,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
else if (e.content.entryType == i.ContentEntryType.TimelineTimelineModule) {
|
|
26
|
+
var item_2 = (_a = e.content.items) !== null && _a !== void 0 ? _a : [];
|
|
27
|
+
var timelineList = item_2
|
|
28
|
+
.filter(function (e) { return e.item.itemContent.itemType == i.ContentItemType.TimelineTweet; })
|
|
29
|
+
.map(function (e) { return e.item.itemContent; });
|
|
30
|
+
if (timelineList.length == 0)
|
|
31
|
+
return null;
|
|
32
|
+
var timeline = timelineList[0];
|
|
33
|
+
return (0, exports.buildTweetApiUtils)({
|
|
34
|
+
result: timeline.tweetResults,
|
|
35
|
+
promotedMetadata: timeline.promotedMetadata,
|
|
36
|
+
reply: timelineList.slice(1),
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
.filter(function (e) { return e != null; });
|
|
41
|
+
};
|
|
42
|
+
exports.tweetEntriesConverter = tweetEntriesConverter;
|
|
43
|
+
var buildTweetApiUtils = function (args) {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
var tweet = (0, exports.tweetResultsConverter)(args.result);
|
|
46
|
+
if (tweet == null)
|
|
47
|
+
return undefined;
|
|
48
|
+
var quoted = tweet.quotedStatusResult;
|
|
49
|
+
var retweeted = tweet.legacy.retweetedStatusResult;
|
|
50
|
+
return {
|
|
51
|
+
raw: args.result,
|
|
52
|
+
promotedMetadata: args.promotedMetadata,
|
|
53
|
+
tweet: tweet,
|
|
54
|
+
user: tweet.core.userResults.result,
|
|
55
|
+
reply: (_b = (_a = args.reply) === null || _a === void 0 ? void 0 : _a.map(function (e) { return (0, exports.buildTweetApiUtils)({ result: e.tweetResults, promotedMetadata: e.promotedMetadata }); }).filter(function (e) { return e != null; })) !== null && _b !== void 0 ? _b : [],
|
|
56
|
+
quoted: quoted == undefined ? undefined : (0, exports.buildTweetApiUtils)({ result: quoted }),
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
exports.buildTweetApiUtils = buildTweetApiUtils;
|
|
60
|
+
var tweetResultsConverter = function (tweetResults) {
|
|
61
|
+
switch (tweetResults.result.typename) {
|
|
62
|
+
case i.TypeName.Tweet:
|
|
63
|
+
return tweetResults.result;
|
|
64
|
+
case i.TypeName.TweetWithVisibilityResults:
|
|
65
|
+
return tweetResults.result.tweet;
|
|
66
|
+
case i.TypeName.TweetTombstone:
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
throw Error();
|
|
70
|
+
};
|
|
71
|
+
exports.tweetResultsConverter = tweetResultsConverter;
|
|
72
|
+
var userEntriesConverter = function (item) {
|
|
73
|
+
return item
|
|
74
|
+
.map(function (e) {
|
|
75
|
+
if (e.content.typename == i.TypeName.TimelineTimelineItem) {
|
|
76
|
+
var item_3 = e.content.itemContent;
|
|
77
|
+
return item_3.itemType == i.ContentItemType.TimelineUser ? item_3 : null;
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
.filter(function (e) { return e != null; });
|
|
81
|
+
};
|
|
82
|
+
exports.userEntriesConverter = userEntriesConverter;
|
|
83
|
+
var buildUserResponse = function (user) {
|
|
84
|
+
return {
|
|
85
|
+
raw: user,
|
|
86
|
+
user: user.userResults.result,
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
exports.buildUserResponse = buildUserResponse;
|
|
90
|
+
var entriesCursor = function (item) {
|
|
91
|
+
var cursorList = item
|
|
92
|
+
.map(function (e) {
|
|
93
|
+
if (e.content.entryType == i.ContentEntryType.TimelineTimelineCursor) {
|
|
94
|
+
return e.content;
|
|
95
|
+
}
|
|
96
|
+
else if (e.content.entryType == i.ContentEntryType.TimelineTimelineItem) {
|
|
97
|
+
var item_4 = e.content;
|
|
98
|
+
if (item_4.itemContent.itemType == i.ContentItemType.TimelineTimelineCursor) {
|
|
99
|
+
return item_4.itemContent;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.filter(function (e) { return e != null; });
|
|
104
|
+
return (0, exports.buildCursor)(cursorList);
|
|
105
|
+
};
|
|
106
|
+
exports.entriesCursor = entriesCursor;
|
|
107
|
+
var buildCursor = function (cursorList) {
|
|
108
|
+
return {
|
|
109
|
+
top: cursorList.find(function (e) { return e.cursorType == i.TimelineTimelineCursorCursorTypeEnum.Top; }),
|
|
110
|
+
bottom: cursorList.find(function (e) { return e.cursorType == i.TimelineTimelineCursorCursorTypeEnum.Bottom; }),
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
exports.buildCursor = buildCursor;
|
|
114
|
+
var buildHeader = function (headers) {
|
|
115
|
+
return {
|
|
116
|
+
raw: headers,
|
|
117
|
+
connectionHash: headers.get('x-connection-hash'),
|
|
118
|
+
contentTypeOptions: headers.get('x-content-type-options'),
|
|
119
|
+
frameOptions: headers.get('x-frame-options'),
|
|
120
|
+
rateLimitLimit: Number(headers.get('x-rate-limit-limit')),
|
|
121
|
+
rateLimitRemaining: Number(headers.get('x-rate-limit-remaining')),
|
|
122
|
+
rateLimitReset: Number(headers.get('x-rate-limit-reset')),
|
|
123
|
+
responseTime: Number(headers.get('x-response-time')),
|
|
124
|
+
tfePreserveBody: headers.get('x-tfe-preserve-body') == 'true',
|
|
125
|
+
transactionId: headers.get('x-transaction-id'),
|
|
126
|
+
twitterResponseTags: headers.get('x-twitter-response-tags'),
|
|
127
|
+
xssProtection: Number(headers.get('x-xss-protection')),
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
exports.buildHeader = buildHeader;
|
|
131
131
|
//# sourceMappingURL=api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/utils/api.ts"],"names":[],"mappings":";;;AAAA,wDAA0D;AAGnD,IAAM,kBAAkB,GAAG,UAAC,IAA0B;IAC3D,OAAO,IAAI;SACR,GAAG,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,eAAe,CAAC,kB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EAAE,OAAO;QACZ,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAChD,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;QACzD,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;QAC5C,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACzD,kBAAkB,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACjE,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QACzD,YAAY,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACpD,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,MAAM;QAC7D,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;QAC9C,mBAAmB,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC;QAC3D,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;KACvD,CAAC;AACJ,CAAC,CAAC;AAfW,QAAA,WAAW,eAetB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC"}
|
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./header"), exports);
|
|
19
|
-
__exportStar(require("./timeline"), exports);
|
|
20
|
-
__exportStar(require("./tweet"), exports);
|
|
21
|
-
__exportStar(require("./user_list"), exports);
|
|
22
|
-
__exportStar(require("./user"), exports);
|
|
23
|
-
__exportStar(require("./response"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./api"), exports);
|
|
24
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twitter-openapi-typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"description": "Implementation of Twitter internal API in TypeScript",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"main": "./dist/src/index.js",
|
|
22
22
|
"typings": "./dist/src/index.d.ts",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"twitter-openapi-typescript-generated": "^0.0.
|
|
24
|
+
"twitter-openapi-typescript-generated": "^0.0.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/jest": "^28.0.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@typescript-eslint/parser": "^5.53.0",
|
|
32
32
|
"dotenv": "^16.0.0",
|
|
33
33
|
"eslint": "^8.0.0",
|
|
34
|
-
"eslint-config-standard-with-typescript": "^
|
|
34
|
+
"eslint-config-standard-with-typescript": "^35.0.0",
|
|
35
35
|
"eslint-plugin-import": "^2.25.0",
|
|
36
36
|
"eslint-plugin-n": "^15.0.0",
|
|
37
37
|
"eslint-plugin-promise": "^6.0.0",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"log4js": "^6.9.1",
|
|
40
40
|
"node-fetch": "^2.0.0",
|
|
41
41
|
"ts-jest": "^28.0.0",
|
|
42
|
-
"typescript": "^
|
|
42
|
+
"typescript": "^5.1"
|
|
43
43
|
}
|
|
44
44
|
}
|