@30nama/sdk 1.0.0 → 1.0.3
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/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +8 -6
- package/dist/api/index.js.map +1 -1
- package/dist/api/request.d.ts +8 -4
- package/dist/api/request.js +12 -15
- package/dist/api/request.js.map +1 -1
- package/dist/api/services/index.d.ts +1 -0
- package/dist/api/services/index.js +18 -0
- package/dist/api/services/index.js.map +1 -0
- package/dist/api/services/videoContent.d.ts +130 -0
- package/dist/api/services/videoContent.js +388 -0
- package/dist/api/services/videoContent.js.map +1 -0
- package/dist/api/types.d.ts +13 -9
- package/dist/core.d.ts +1 -3
- package/dist/core.js +1 -37
- package/dist/core.js.map +1 -1
- package/dist/entities/IAttachment.d.ts +29 -0
- package/dist/entities/IAttachment.js +3 -0
- package/dist/entities/IAttachment.js.map +1 -0
- package/dist/entities/IBoxOffice.d.ts +41 -0
- package/dist/entities/IBoxOffice.js +10 -0
- package/dist/entities/IBoxOffice.js.map +1 -0
- package/dist/entities/ICollection.d.ts +19 -0
- package/dist/entities/ICollection.js +10 -0
- package/dist/entities/ICollection.js.map +1 -0
- package/dist/entities/{ArchiveSlug.d.ts → ICollector.d.ts} +9 -9
- package/dist/entities/ICollector.js +3 -0
- package/dist/entities/ICollector.js.map +1 -0
- package/dist/entities/IPerson.d.ts +19 -0
- package/dist/entities/IPerson.js +3 -0
- package/dist/entities/IPerson.js.map +1 -0
- package/dist/entities/IRating.d.ts +9 -0
- package/dist/entities/IRating.js +3 -0
- package/dist/entities/IRating.js.map +1 -0
- package/dist/entities/ITitle.d.ts +52 -0
- package/dist/entities/ITitle.js +16 -0
- package/dist/entities/ITitle.js.map +1 -0
- package/dist/entities/IVideoContent.d.ts +60 -0
- package/dist/entities/IVideoContent.js +10 -0
- package/dist/entities/IVideoContent.js.map +1 -0
- package/dist/entities/index.d.ts +4 -53
- package/dist/entities/index.js +18 -31
- package/dist/entities/index.js.map +1 -1
- package/package.json +7 -7
- package/dist/api/actions.d.ts +0 -384
- package/dist/api/actions.js +0 -526
- package/dist/api/actions.js.map +0 -1
- package/dist/entities/ArchiveSlug.js +0 -13
- package/dist/entities/ArchiveSlug.js.map +0 -1
- package/dist/entities/ContinueWatchingTitle.d.ts +0 -12
- package/dist/entities/ContinueWatchingTitle.js +0 -11
- package/dist/entities/ContinueWatchingTitle.js.map +0 -1
- package/dist/entities/Download.d.ts +0 -31
- package/dist/entities/Download.js +0 -22
- package/dist/entities/Download.js.map +0 -1
- package/dist/entities/Downloadable.d.ts +0 -27
- package/dist/entities/Downloadable.js +0 -19
- package/dist/entities/Downloadable.js.map +0 -1
- package/dist/entities/Notification.d.ts +0 -15
- package/dist/entities/Notification.js +0 -18
- package/dist/entities/Notification.js.map +0 -1
- package/dist/entities/Person.d.ts +0 -23
- package/dist/entities/Person.js +0 -12
- package/dist/entities/Person.js.map +0 -1
- package/dist/entities/Plan.d.ts +0 -22
- package/dist/entities/Plan.js +0 -14
- package/dist/entities/Plan.js.map +0 -1
- package/dist/entities/PlayerData.d.ts +0 -37
- package/dist/entities/PlayerData.js +0 -14
- package/dist/entities/PlayerData.js.map +0 -1
- package/dist/entities/Single.d.ts +0 -52
- package/dist/entities/Single.js +0 -18
- package/dist/entities/Single.js.map +0 -1
- package/dist/entities/Stranger.d.ts +0 -5
- package/dist/entities/Stranger.js +0 -10
- package/dist/entities/Stranger.js.map +0 -1
- package/dist/entities/StreamData.d.ts +0 -53
- package/dist/entities/StreamData.js +0 -13
- package/dist/entities/StreamData.js.map +0 -1
- package/dist/entities/Title.d.ts +0 -103
- package/dist/entities/Title.js +0 -25
- package/dist/entities/Title.js.map +0 -1
- package/dist/entities/User.d.ts +0 -20
- package/dist/entities/User.js +0 -21
- package/dist/entities/User.js.map +0 -1
- package/dist/entities/UserLibrary.d.ts +0 -14
- package/dist/entities/UserLibrary.js +0 -12
- package/dist/entities/UserLibrary.js.map +0 -1
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.API = void 0;
|
|
13
|
-
const actions = require("./
|
|
13
|
+
const actions = require("./services");
|
|
14
14
|
const request_1 = require("./request");
|
|
15
15
|
const apisauce_1 = require("apisauce");
|
|
16
16
|
const getFastestResponse = (promises) => {
|
|
@@ -46,7 +46,7 @@ exports.API = {
|
|
|
46
46
|
const testRes = yield testReq.execute();
|
|
47
47
|
if (!testRes)
|
|
48
48
|
return;
|
|
49
|
-
if (!testRes.
|
|
49
|
+
if (!testRes.result)
|
|
50
50
|
return;
|
|
51
51
|
return host;
|
|
52
52
|
}
|
|
@@ -70,9 +70,11 @@ exports.API = {
|
|
|
70
70
|
// Node 1
|
|
71
71
|
const getEndpointsFromAPI = () => __awaiter(this, void 0, void 0, function* () {
|
|
72
72
|
try {
|
|
73
|
-
|
|
74
|
-
const
|
|
75
|
-
|
|
73
|
+
// TODO: Implement this
|
|
74
|
+
// const getEndpointsReq = new request('endpoint', this)
|
|
75
|
+
// const endpointsRes = await (getEndpointsReq.execute() as Promise<BaseResponse<Endpoints> | undefined>)
|
|
76
|
+
// return endpointsRes?. as { location: string; host: string }[]
|
|
77
|
+
return [];
|
|
76
78
|
}
|
|
77
79
|
catch (err) {
|
|
78
80
|
this.log('warn', '(getEndpointsFromAPI)', err);
|
|
@@ -111,7 +113,7 @@ exports.API = {
|
|
|
111
113
|
// Try current endpoint, if it's valid, return true
|
|
112
114
|
const testReq = new request_1.default('test', this);
|
|
113
115
|
const testRes = yield testReq.execute(undefined, 1000 * 15);
|
|
114
|
-
if (testRes === null || testRes === void 0 ? void 0 : testRes.
|
|
116
|
+
if (testRes === null || testRes === void 0 ? void 0 : testRes.result)
|
|
115
117
|
return true;
|
|
116
118
|
const endpoints = yield getFastestResponse([getEndpointsFromAPI(), getEndpointsFromGithub(), getEndpointsFromArvanCloud()]);
|
|
117
119
|
if (!endpoints || !(yield this.useTransferEndpoint(endpoints)))
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sCAAqC;AACrC,uCAA+B;AAC/B,uCAAiC;AAYjC,MAAM,kBAAkB,GAAG,CAAI,QAAwB,EAAc,EAAE;IACnE,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAe,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IAC/H,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAA;IACzD,OAAO,OAAO,CAAC,IAAI,CAAC,WAAW,CAAQ,CAAA;AAC3C,CAAC,CAAA;AAED,aAAa;AACA,QAAA,GAAG,GAAG;IACf,OAAO,EAAE,EAAoB;IAE7B,MAAM,EAAE,EAAY;IACpB,SAAS,CAAC,MAAuB;QAC7B,IAAI,CAAC,MAAM,mCAAQ,IAAI,CAAC,MAAM,GAAK,MAAM,CAAE,CAAA;IAC/C,CAAC;IAED,KAAK,EAAE,GAAS,EAAE,kDAAE,CAAC,CAAA;IACrB,WAAW,CAAC,aAAgD;QACxD,IAAI,CAAC,KAAK,GAAG,aAAa,CAAA;IAC9B,CAAC;IAED,OAAO,EAA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AAO,CAAC,OAAO,CAAC;IAAG,WAAG,CAAC,OAAe,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,WAAU,CAAC,CAAA"}
|
package/dist/api/request.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { API,
|
|
1
|
+
import { API, BaseResponse } from './types';
|
|
2
2
|
export type RequestHeaders = Record<string, string | number | boolean>;
|
|
3
|
+
export type RequestMethod = 'get' | 'post' | 'put' | 'delete';
|
|
3
4
|
export default class {
|
|
4
|
-
private token;
|
|
5
5
|
private overrideSession?;
|
|
6
|
+
private method;
|
|
6
7
|
private config;
|
|
7
8
|
private actionUrl;
|
|
9
|
+
private servicePath;
|
|
8
10
|
private emmiter;
|
|
9
11
|
private store;
|
|
10
12
|
private log;
|
|
@@ -12,7 +14,9 @@ export default class {
|
|
|
12
14
|
private buildUrl;
|
|
13
15
|
private buildHeaders;
|
|
14
16
|
private sendRequest;
|
|
15
|
-
execute(body?: {
|
|
17
|
+
execute<T>(body?: {
|
|
16
18
|
[key: string]: any;
|
|
17
|
-
}, timeout?: number): Promise<
|
|
19
|
+
}, timeout?: number): Promise<BaseResponse<T> | undefined>;
|
|
20
|
+
withService(servicePath: string): this;
|
|
21
|
+
withMethod(method: RequestMethod): this;
|
|
18
22
|
}
|
package/dist/api/request.js
CHANGED
|
@@ -12,21 +12,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const apisauce_1 = require("apisauce");
|
|
13
13
|
const QueryString = require("qs");
|
|
14
14
|
const core_1 = require("../core");
|
|
15
|
-
// types
|
|
16
|
-
const platformToken = {
|
|
17
|
-
DESKTOP: 'z8rT8vme3KvhpuvM8xkXVZ24N5mP5zIkPMGVUMwJ6YPtyFFMYvXRvFJwEhtIYvfP',
|
|
18
|
-
HYBRID: 'ZAw2TH8tLtqcXtdmbFRRdpeP5ME2bnJUm5CAewCgHGNamawRt6U4cKGNknf4UwR4',
|
|
19
|
-
ANDROIDTV: 'vJK4ByHBJaXNXDuG5P8WwNtqCR7YNsQRZSNXCXaLmTxpEJLEBdudVydBZwbdVfaC',
|
|
20
|
-
WEBTV: '83hRzBabjDnuv9SmV2GFaftpxjhZSHXYe7UnBuX5DdANdpzPvXu46jvKZHPb97As',
|
|
21
|
-
WEBSITE: 'B9gA4Dr8gefwtd999YYw7SNRzPzq2TDPEJvXVJLnPDWFL2H4RcVq83TZy7dHY9Z4',
|
|
22
|
-
MOBILE: 'PGfRhTuxjbku2pm3NZ6yWzBwGj8xAtfn49NEB77GgNNCu5eF463EKQw4mVxd5SNR',
|
|
23
|
-
SYSTEM: 'QguPhpFdjNQD73cmakvtIYwdMDHry8UDuG6qACvDshWTrXa2UaKtccAL5GAuIHZm',
|
|
24
|
-
DEVELOPMENT: 'BqnpVqrUNX8ReMWcurMK2Vr8yBPcxpaVzJ4eTgnfpd338X6fW4ChUjnVSLfBmpwb'
|
|
25
|
-
};
|
|
26
15
|
class default_1 {
|
|
27
16
|
constructor(actionUrl, instance, overrideSession) {
|
|
17
|
+
this.method = 'post';
|
|
18
|
+
this.servicePath = 'videocontent';
|
|
28
19
|
const { config, emmiter, store, log } = instance;
|
|
29
|
-
this.token = platformToken[config.platform];
|
|
30
20
|
this.config = config;
|
|
31
21
|
this.actionUrl = actionUrl;
|
|
32
22
|
this.overrideSession = overrideSession;
|
|
@@ -35,13 +25,12 @@ class default_1 {
|
|
|
35
25
|
this.log = log;
|
|
36
26
|
}
|
|
37
27
|
buildUrl() {
|
|
38
|
-
return `${this.config.endpoint}
|
|
28
|
+
return `${this.config.endpoint}/${this.servicePath}/${this.actionUrl}`;
|
|
39
29
|
}
|
|
40
30
|
buildHeaders() {
|
|
41
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
32
|
const headers = {
|
|
43
33
|
'Content-Type': 'application/x-www-form-urlencoded',
|
|
44
|
-
'c-api-key': this.token,
|
|
45
34
|
'c-token': this.overrideSession || (yield this.store()) || '',
|
|
46
35
|
'c-version-number': this.config.version,
|
|
47
36
|
'c-bypass-limits': this.config.debug ? 'true' : '',
|
|
@@ -60,7 +49,7 @@ class default_1 {
|
|
|
60
49
|
sendRequest(body_1) {
|
|
61
50
|
return __awaiter(this, arguments, void 0, function* (body, retry = 1) {
|
|
62
51
|
try {
|
|
63
|
-
const response = yield (0, apisauce_1.create)({ baseURL:
|
|
52
|
+
const response = yield (0, apisauce_1.create)({ baseURL: this.config.endpoint, headers: yield this.buildHeaders() })[this.method](this.actionUrl, QueryString.stringify(body));
|
|
64
53
|
if (!response.ok)
|
|
65
54
|
throw response.originalError;
|
|
66
55
|
this.log('info', `Request to ${this.buildUrl()} was successful.`);
|
|
@@ -94,6 +83,14 @@ class default_1 {
|
|
|
94
83
|
return result;
|
|
95
84
|
});
|
|
96
85
|
}
|
|
86
|
+
withService(servicePath) {
|
|
87
|
+
this.servicePath = servicePath;
|
|
88
|
+
return this;
|
|
89
|
+
}
|
|
90
|
+
withMethod(method) {
|
|
91
|
+
this.method = method;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
97
94
|
}
|
|
98
95
|
exports.default = default_1;
|
|
99
96
|
//# sourceMappingURL=request.js.map
|
package/dist/api/request.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/api/request.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAAiC;AACjC,kCAAkC;AAClC,kCAA+B;
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../../src/api/request.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uCAAiC;AACjC,kCAAkC;AAClC,kCAA+B;AAO/B;IASI,YAAY,SAAiB,EAAE,QAAa,EAAE,eAAwB;QAP9D,WAAM,GAAkB,MAAM,CAAA;QAG9B,gBAAW,GAAG,cAAc,CAAA;QAKhC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAA;QAChD,IA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,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,CAAC,CAAA;YAClD,CAAC;QACL,CAAC;KAAA;IAEK,OAAO,CAAI,IAA6B,EAAE,OAAgB;;YAC5D,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,CAAI,IAAI,CAAC,CAAA;YACjD,IAAI,CAAC,OAAO;gBAAE,OAAO,MAAM,eAAe,CAAA;YAE1C,MAAM,cAAc,GAAG,IAAA,YAAK,EAAC,OAAO,CAAC,CAAA;YACrC,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC,CAAA;YAChE,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAA;YAC7B,IAAI,MAAM;gBAAE,OAAO,MAAM,CAAA;QAC7B,CAAC;KAAA;IAED,WAAW,CAAC,WAAmB;QAC3B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,OAAO,IAAI,CAAA;IACf,CAAC;IAED,UAAU,CAAC,MAAqB;QAC5B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,OAAO,IAAI,CAAA;IACf,CAAC;CACJ;AApFD,4BAoFC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './videoContent';
|
|
@@ -0,0 +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("./videoContent"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { BaseResponse } from '../types';
|
|
2
|
+
import { ICollector, IVideoContent } from '../../entities';
|
|
3
|
+
import { ICollection } from '../../entities/ICollection';
|
|
4
|
+
import { IHeroTitle, ITitle } from '../../entities/ITitle';
|
|
5
|
+
import { IBoxOffice } from '../../entities/IBoxOffice';
|
|
6
|
+
import { IPerson } from '../../entities/IPerson';
|
|
7
|
+
type PaginatedContentList = {
|
|
8
|
+
count: number;
|
|
9
|
+
next: number;
|
|
10
|
+
previous?: number;
|
|
11
|
+
items: IHeroTitle[];
|
|
12
|
+
};
|
|
13
|
+
export declare function videoContentRate(this: any, score: number, video_content_id: string): Promise<BaseResponse<any> | undefined>;
|
|
14
|
+
export declare function videoContentGetUserPick(this: any, pick_type: 'favorite' | 'download' | 'stream', filters?: {
|
|
15
|
+
category?: 'movies' | 'series' | 'anime' | 'animation' | 'documentary' | 'concert' | 'ceremony';
|
|
16
|
+
order_by?: 'new_added' | 'old_added' | 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date';
|
|
17
|
+
page?: number;
|
|
18
|
+
limit?: number;
|
|
19
|
+
}): Promise<BaseResponse<any> | undefined>;
|
|
20
|
+
export declare function videoContentManageUserPick(this: any, pick_type: 'favorite' | 'download' | 'stream', video_content_id: string): Promise<BaseResponse<any> | undefined>;
|
|
21
|
+
export declare function videoContentNotificationAdd(this: any, notification_type_slug: 'all', video_content_id: string): Promise<BaseResponse<any> | undefined>;
|
|
22
|
+
export declare function videoContentGetNotificationList(this: any, filters?: {
|
|
23
|
+
category?: 'movies' | 'series' | 'anime' | 'animation' | 'documentary' | 'concert' | 'ceremony';
|
|
24
|
+
order_by?: 'new_added' | 'old_added' | 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date';
|
|
25
|
+
page?: number;
|
|
26
|
+
limit?: number;
|
|
27
|
+
}): Promise<BaseResponse<any> | undefined>;
|
|
28
|
+
export declare function videoContentGetCollectorList(this: any, collector_name: 'category' | 'genre' | 'option'): Promise<BaseResponse<ICollector[]> | undefined>;
|
|
29
|
+
export declare function videoContentGetCollectionList(this: any, filters?: {
|
|
30
|
+
search?: string;
|
|
31
|
+
page?: number;
|
|
32
|
+
limit?: number;
|
|
33
|
+
}): Promise<BaseResponse<{
|
|
34
|
+
count: number;
|
|
35
|
+
next: number;
|
|
36
|
+
previous?: number | undefined;
|
|
37
|
+
items: ICollection[];
|
|
38
|
+
}> | undefined>;
|
|
39
|
+
export declare function videoContentGetCollectionData(this: any, slug: string): Promise<BaseResponse<IHeroTitle[]> | undefined>;
|
|
40
|
+
export declare function videoContentList(this: any, filters?: {
|
|
41
|
+
category_slug?: string;
|
|
42
|
+
genre_slug?: string;
|
|
43
|
+
order_by?: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest';
|
|
44
|
+
page?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
}): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
47
|
+
export declare function videoContentGetFeatured(this: any, filters?: {
|
|
48
|
+
genre_slug?: string;
|
|
49
|
+
order_by?: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest';
|
|
50
|
+
page?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
}): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
53
|
+
export declare function videoContentGetComingSoon(this: any, filters?: {
|
|
54
|
+
genre_slug?: string;
|
|
55
|
+
order_by?: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest';
|
|
56
|
+
page?: number;
|
|
57
|
+
limit?: number;
|
|
58
|
+
}): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
59
|
+
export declare function videoContentGetStreams(this: any, category: 'series' | 'anime' | 'movies' | 'featured' | 'free-stream', order_by: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest', page?: number, limit?: number): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
60
|
+
export declare function videoContentGetHomepage(this: any, limit: number): Promise<BaseResponse<{
|
|
61
|
+
featured: IHeroTitle[];
|
|
62
|
+
top_ten: IHeroTitle[];
|
|
63
|
+
new_releases: IHeroTitle[];
|
|
64
|
+
movies: IHeroTitle[];
|
|
65
|
+
series: IHeroTitle[];
|
|
66
|
+
anime: IHeroTitle[];
|
|
67
|
+
}> | undefined>;
|
|
68
|
+
export declare function videoContentGetCastContents(this: any, cast_imdb_code: string, page?: number, limit?: number): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
69
|
+
export declare function videoContentGetWeeklyScheduleContents(this: any, filters?: {
|
|
70
|
+
week_day?: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun';
|
|
71
|
+
category_slug?: 'series' | 'anime';
|
|
72
|
+
}): Promise<BaseResponse<ITitle[]> | undefined>;
|
|
73
|
+
export declare function videoContentGetNewReleases(this: any, filters?: {
|
|
74
|
+
genre_slug?: string;
|
|
75
|
+
order_by?: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest';
|
|
76
|
+
page?: number;
|
|
77
|
+
limit?: number;
|
|
78
|
+
}): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
79
|
+
export declare function videoContentGetBoxOffice(this: any, source: 'usa' | 'iran'): Promise<BaseResponse<IBoxOffice[]> | undefined>;
|
|
80
|
+
export declare function videoContentGetVipHeroSection(this: any): Promise<BaseResponse<IHeroTitle[]> | undefined>;
|
|
81
|
+
export declare function videoContentGetGuestHeroSection(this: any): Promise<BaseResponse<{
|
|
82
|
+
id: string;
|
|
83
|
+
attachment: string;
|
|
84
|
+
order: number;
|
|
85
|
+
}[]> | undefined>;
|
|
86
|
+
export declare function videoContentGetTopContents(this: any, source: 'imdb' | '30nama', content_type: 'movie' | 'series', page?: number, limit?: number): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
87
|
+
export declare function videoContentDetail(this: any, video_content_id: string): Promise<BaseResponse<IVideoContent> | undefined>;
|
|
88
|
+
export declare function videoContentQuotes(this: any, video_content_id: string): Promise<BaseResponse<{
|
|
89
|
+
character_name: string;
|
|
90
|
+
actor_name: string;
|
|
91
|
+
quote: string;
|
|
92
|
+
}[]> | undefined>;
|
|
93
|
+
export declare function videoContentGetPersons(this: any, video_content_id: string): Promise<BaseResponse<IPerson[]> | undefined>;
|
|
94
|
+
export declare function videoContentExplore(this: any, payload?: {
|
|
95
|
+
search?: string;
|
|
96
|
+
type?: 'movies' | 'series' | 'concert' | 'ceremony' | 'miniseries' | 'anime_movie' | 'anime_series' | 'animation' | 'documentary';
|
|
97
|
+
genre_slug?: string;
|
|
98
|
+
actor?: string;
|
|
99
|
+
director?: string;
|
|
100
|
+
writer?: string;
|
|
101
|
+
quality?: string;
|
|
102
|
+
encoder?: string;
|
|
103
|
+
country_id?: string;
|
|
104
|
+
language_id?: string;
|
|
105
|
+
mpaa?: string;
|
|
106
|
+
score?: 'up_9' | 'up_8_5' | 'up_8' | 'up_7_5' | 'up_7' | 'up_6_5' | 'up_6' | 'up_5' | 'down_5';
|
|
107
|
+
three_d?: boolean;
|
|
108
|
+
has_stream?: boolean;
|
|
109
|
+
x265?: boolean;
|
|
110
|
+
channel?: string;
|
|
111
|
+
order_by?: 'newest' | 'populate' | 'imdb_score' | 'site_score' | 'release_date' | 'updatest';
|
|
112
|
+
year_min?: number;
|
|
113
|
+
year_max?: number;
|
|
114
|
+
page?: number;
|
|
115
|
+
limit?: number;
|
|
116
|
+
}): Promise<BaseResponse<PaginatedContentList> | undefined>;
|
|
117
|
+
export declare function videoContentGetCountryLanguage(this: any, type: 'language' | 'country'): Promise<BaseResponse<{
|
|
118
|
+
id: string;
|
|
119
|
+
name: string;
|
|
120
|
+
code: string;
|
|
121
|
+
}[]> | undefined>;
|
|
122
|
+
export declare function videoContentMpaa(this: any): Promise<BaseResponse<{
|
|
123
|
+
id: string;
|
|
124
|
+
range: string;
|
|
125
|
+
}[]> | undefined>;
|
|
126
|
+
export declare function videoContentChannel(this: any): Promise<BaseResponse<{
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
}[]> | undefined>;
|
|
130
|
+
export {};
|