@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/actions.d.ts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { User, Title, Single, Response, ArchiveSlug, ContinueWatchingTitle, StreamData, Notification, Download, IPlan, IUserLibrary } from '../entities';
|
|
2
|
-
/**
|
|
3
|
-
* @description Test connection to API endpoint
|
|
4
|
-
*/
|
|
5
|
-
export declare function test(this: any): Promise<Response<{
|
|
6
|
-
ip: {
|
|
7
|
-
ip: string;
|
|
8
|
-
country: string;
|
|
9
|
-
continent: string;
|
|
10
|
-
};
|
|
11
|
-
device: {
|
|
12
|
-
client: string;
|
|
13
|
-
os: string;
|
|
14
|
-
device: string;
|
|
15
|
-
brand: string;
|
|
16
|
-
model: string;
|
|
17
|
-
};
|
|
18
|
-
is_abroad: boolean;
|
|
19
|
-
}> | undefined>;
|
|
20
|
-
/**
|
|
21
|
-
* @returns Current session's user data
|
|
22
|
-
* @param {string} overrideSession Override current session token
|
|
23
|
-
*/
|
|
24
|
-
export declare function user(this: any, overrideSession?: string): Promise<Response<User> | undefined>;
|
|
25
|
-
/**
|
|
26
|
-
* @description Terminates current session token
|
|
27
|
-
*/
|
|
28
|
-
export declare function logout(this: any): Promise<Response<null> | undefined>;
|
|
29
|
-
/**
|
|
30
|
-
* @returns a new session token for user
|
|
31
|
-
* @param {string} user_login Username, email or mobile number
|
|
32
|
-
* @param {string} user_password User Password
|
|
33
|
-
*/
|
|
34
|
-
export declare function login(this: any, user_login: string, user_password: string, recaptcha_response?: string): Promise<Response<{
|
|
35
|
-
token: string;
|
|
36
|
-
}> | undefined>;
|
|
37
|
-
/**
|
|
38
|
-
* @description User authentication with email or mobile number (with OTP)
|
|
39
|
-
* @returns OTP options
|
|
40
|
-
* @param {string} user_login email or mobile number
|
|
41
|
-
*/
|
|
42
|
-
export declare function otp(this: any, user_login: string, recaptcha_response?: string): Promise<Response<{
|
|
43
|
-
user_id: number;
|
|
44
|
-
resend: number;
|
|
45
|
-
valid: number;
|
|
46
|
-
}, ["verify"]> | undefined>;
|
|
47
|
-
/**
|
|
48
|
-
* @description Verify user authentication with OTP
|
|
49
|
-
* @returns a new session token for user
|
|
50
|
-
* @param {string} user_login email or mobile number
|
|
51
|
-
* @param {string} user_code One time password
|
|
52
|
-
*/
|
|
53
|
-
export declare function otp_verify(this: any, user_login: string, user_code: string): Promise<Response<{
|
|
54
|
-
token: string;
|
|
55
|
-
}, ["resend"]> | undefined>;
|
|
56
|
-
/**
|
|
57
|
-
* @returns auth_code and url
|
|
58
|
-
*/
|
|
59
|
-
export declare function qrlogin_code(this: any): Promise<Response<{
|
|
60
|
-
code: string;
|
|
61
|
-
url: string;
|
|
62
|
-
}> | undefined>;
|
|
63
|
-
/**
|
|
64
|
-
* @returns Checks if auth_code is authenticated and if so, returns session token
|
|
65
|
-
* @param {string} auth_code Authentication Code for QrLogin
|
|
66
|
-
*/
|
|
67
|
-
export declare function qrlogin_login(this: any, auth_code: string): Promise<Response<{
|
|
68
|
-
token: string;
|
|
69
|
-
}> | undefined>;
|
|
70
|
-
/**
|
|
71
|
-
* Marks the auth_code as authenticated with current session
|
|
72
|
-
* @param {string} auth_code Authentication Code for QrLogin
|
|
73
|
-
*/
|
|
74
|
-
export declare function qrlogin_auth(this: any, auth_code: string): Promise<import("./types").Response | undefined>;
|
|
75
|
-
/**
|
|
76
|
-
* @returns Homepage data
|
|
77
|
-
*/
|
|
78
|
-
export declare function home(this: any): Promise<Response<{
|
|
79
|
-
hero_header: {
|
|
80
|
-
posts: Title[];
|
|
81
|
-
notes: {
|
|
82
|
-
title: string;
|
|
83
|
-
features: string[];
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
new_releases?: {
|
|
87
|
-
posts: Title[];
|
|
88
|
-
} | undefined;
|
|
89
|
-
suggested?: {
|
|
90
|
-
posts: Title[];
|
|
91
|
-
} | undefined;
|
|
92
|
-
top_10?: {
|
|
93
|
-
posts: Title[];
|
|
94
|
-
} | undefined;
|
|
95
|
-
movies?: {
|
|
96
|
-
posts: Title[];
|
|
97
|
-
} | undefined;
|
|
98
|
-
series?: {
|
|
99
|
-
posts: Title[];
|
|
100
|
-
} | undefined;
|
|
101
|
-
anime?: {
|
|
102
|
-
posts: Title[];
|
|
103
|
-
} | undefined;
|
|
104
|
-
}> | undefined>;
|
|
105
|
-
/**
|
|
106
|
-
* @returns Stream homepage data
|
|
107
|
-
*/
|
|
108
|
-
export declare function home_stream(this: any): Promise<Response<{
|
|
109
|
-
hero_header: {
|
|
110
|
-
posts: Title[];
|
|
111
|
-
notes: {
|
|
112
|
-
title: string;
|
|
113
|
-
features: string[];
|
|
114
|
-
};
|
|
115
|
-
};
|
|
116
|
-
suggested?: {
|
|
117
|
-
posts: Title[];
|
|
118
|
-
} | undefined;
|
|
119
|
-
movies?: {
|
|
120
|
-
posts: Title[];
|
|
121
|
-
} | undefined;
|
|
122
|
-
series?: {
|
|
123
|
-
posts: Title[];
|
|
124
|
-
} | undefined;
|
|
125
|
-
anime?: {
|
|
126
|
-
posts: Title[];
|
|
127
|
-
} | undefined;
|
|
128
|
-
}> | undefined>;
|
|
129
|
-
/**
|
|
130
|
-
* @returns Serialized data for a single post
|
|
131
|
-
* @param {number} post_id Post ID to get data for
|
|
132
|
-
*/
|
|
133
|
-
export declare function single(this: any, post_id: number): Promise<Response<Single> | undefined>;
|
|
134
|
-
/**
|
|
135
|
-
* @returns Categories and Genres for the menu
|
|
136
|
-
*/
|
|
137
|
-
export declare function menu(this: any): Promise<Response<{
|
|
138
|
-
genres: ArchiveSlug[];
|
|
139
|
-
categories: ArchiveSlug[];
|
|
140
|
-
}> | undefined>;
|
|
141
|
-
/**
|
|
142
|
-
* @returns Only post titles based on search query
|
|
143
|
-
* @param {string} query Search keyword, English/Farsi Title or IMDb ID
|
|
144
|
-
* @param {boolean} streamonly Only return streamable posts
|
|
145
|
-
* @param {number} page Search result page number
|
|
146
|
-
*/
|
|
147
|
-
export declare function search(this: any, query: string, streamonly: boolean, page: number): Promise<Response<{
|
|
148
|
-
posts: Title[];
|
|
149
|
-
page: number;
|
|
150
|
-
pages: number;
|
|
151
|
-
total: number;
|
|
152
|
-
}> | undefined>;
|
|
153
|
-
/**
|
|
154
|
-
* @returns Post titles that user have been watching recently
|
|
155
|
-
*/
|
|
156
|
-
export declare function continue_watching(this: any): Promise<Response<{
|
|
157
|
-
posts: ContinueWatchingTitle[];
|
|
158
|
-
}> | undefined>;
|
|
159
|
-
/**
|
|
160
|
-
* @description Removes a continue watching post
|
|
161
|
-
* @param {number} id Post ID
|
|
162
|
-
*/
|
|
163
|
-
export declare function continue_watching_dismiss(this: any, id: number): Promise<Response<null> | undefined>;
|
|
164
|
-
/**
|
|
165
|
-
* @returns Stream data for a single post
|
|
166
|
-
* @param {number} post_id Post ID to get data for
|
|
167
|
-
* @param {boolean} free_stream Pass this parameter for free posts
|
|
168
|
-
*/
|
|
169
|
-
export declare function stream(this: any, post_id: number, free_stream?: boolean): Promise<Response<StreamData> | undefined>;
|
|
170
|
-
/**
|
|
171
|
-
* @returns Only post titles based on search query
|
|
172
|
-
* @param {string} slugs Category to search in
|
|
173
|
-
* @param {string} orderby Order by
|
|
174
|
-
* @param {boolean} streamonly Only return streamable posts
|
|
175
|
-
* @param {number} page Search result page number
|
|
176
|
-
*/
|
|
177
|
-
export declare function archive(this: any, slugs: string[], streamonly: boolean, page: number, orderby?: 'relevant' | 'update' | 'year' | 'favorite' | 'imdb-rate' | '30nama-rate', order?: 'ASC' | 'DESC'): Promise<Response<{
|
|
178
|
-
posts: Title[];
|
|
179
|
-
page: number;
|
|
180
|
-
pages: number;
|
|
181
|
-
total: number;
|
|
182
|
-
}> | undefined>;
|
|
183
|
-
/**
|
|
184
|
-
* @returns Save current stream time for continue watching
|
|
185
|
-
* @param {number} post_id Current title ID
|
|
186
|
-
* @param {number} file_id Current source file ID
|
|
187
|
-
* @param {number} user_id User's ID
|
|
188
|
-
* @param {number} time Current time in seconds
|
|
189
|
-
* @param {number} duration Duration of the video in seconds
|
|
190
|
-
* @param {string} token HLS token
|
|
191
|
-
*/
|
|
192
|
-
export declare function observer(this: any, post_id: number, file_id: number, user_id: number, time: number, duration: number, token: string): Promise<Response<null> | undefined>;
|
|
193
|
-
/**
|
|
194
|
-
* @returns User notifications
|
|
195
|
-
* @param {number} page Page number `default: 1`
|
|
196
|
-
*/
|
|
197
|
-
export declare function notification(this: any, page?: number): Promise<Response<{
|
|
198
|
-
notifications: Notification[];
|
|
199
|
-
pages: number;
|
|
200
|
-
page: number;
|
|
201
|
-
total: number;
|
|
202
|
-
total_unread: number;
|
|
203
|
-
}> | undefined>;
|
|
204
|
-
/**
|
|
205
|
-
* @description Mark a notification as read
|
|
206
|
-
* @param {number} notification_id Notification ID to mark as read (return `all` to mark all as read)
|
|
207
|
-
*/
|
|
208
|
-
export declare function notification_read(this: any, notification_id: number | 'all'): Promise<Response<null> | undefined>;
|
|
209
|
-
/**
|
|
210
|
-
* @return Download links for a single post
|
|
211
|
-
* @param {number} post_id Post ID to get data for
|
|
212
|
-
* @param {boolean} free_download Pass this parameter for free posts
|
|
213
|
-
*/
|
|
214
|
-
export declare function download(this: any, post_id: number, free_download?: boolean): Promise<Response<{
|
|
215
|
-
seasons?: number[] | undefined;
|
|
216
|
-
total_seasons?: number | undefined;
|
|
217
|
-
download: {
|
|
218
|
-
[key: string]: Download[];
|
|
219
|
-
} | Download[];
|
|
220
|
-
}> | undefined>;
|
|
221
|
-
/**
|
|
222
|
-
* @returns Advanced search parameters
|
|
223
|
-
*/
|
|
224
|
-
export declare function advanced_search_parameters(this: any): Promise<Response<{
|
|
225
|
-
genre: {
|
|
226
|
-
title: string;
|
|
227
|
-
value: string;
|
|
228
|
-
}[];
|
|
229
|
-
type: {
|
|
230
|
-
title: string;
|
|
231
|
-
value: string;
|
|
232
|
-
}[];
|
|
233
|
-
imdb_rate: {
|
|
234
|
-
title: string;
|
|
235
|
-
value: string;
|
|
236
|
-
}[];
|
|
237
|
-
country: {
|
|
238
|
-
title: string;
|
|
239
|
-
value: string;
|
|
240
|
-
}[];
|
|
241
|
-
language: {
|
|
242
|
-
title: string;
|
|
243
|
-
value: string;
|
|
244
|
-
}[];
|
|
245
|
-
min_year: number;
|
|
246
|
-
max_year: number;
|
|
247
|
-
cast: string;
|
|
248
|
-
director: string;
|
|
249
|
-
creator: string;
|
|
250
|
-
channel: {
|
|
251
|
-
title: string;
|
|
252
|
-
value: string;
|
|
253
|
-
}[];
|
|
254
|
-
encoder: {
|
|
255
|
-
title: string;
|
|
256
|
-
value: string;
|
|
257
|
-
}[];
|
|
258
|
-
quality: {
|
|
259
|
-
title: string;
|
|
260
|
-
value: string;
|
|
261
|
-
}[];
|
|
262
|
-
x265: {
|
|
263
|
-
title: string;
|
|
264
|
-
value: string;
|
|
265
|
-
}[];
|
|
266
|
-
'3D': {
|
|
267
|
-
title: string;
|
|
268
|
-
value: string;
|
|
269
|
-
}[];
|
|
270
|
-
stream: {
|
|
271
|
-
title: string;
|
|
272
|
-
value: string;
|
|
273
|
-
}[];
|
|
274
|
-
age: {
|
|
275
|
-
title: string;
|
|
276
|
-
value: string;
|
|
277
|
-
}[];
|
|
278
|
-
}>>;
|
|
279
|
-
/**
|
|
280
|
-
* @returns Post titles based on advanced search query
|
|
281
|
-
* @param {object} parameters Search filters
|
|
282
|
-
* @param {string} orderby Order by `default: relevant`
|
|
283
|
-
* @param {string} order Order `default: ASC`
|
|
284
|
-
* @param {number} page Search result page number
|
|
285
|
-
*/
|
|
286
|
-
export declare function advanced_search(this: any, parameters: {
|
|
287
|
-
[key: string]: any;
|
|
288
|
-
}, orderby?: 'relevant' | 'update' | 'year' | 'favorite' | 'imdb-rate' | '30nama-rate', order?: 'ASC' | 'DESC', page?: number): Promise<Response<{
|
|
289
|
-
posts: Title[];
|
|
290
|
-
page: number;
|
|
291
|
-
pages: number;
|
|
292
|
-
total: number;
|
|
293
|
-
}> | undefined>;
|
|
294
|
-
/**
|
|
295
|
-
* @description Trigger logger by key
|
|
296
|
-
*/
|
|
297
|
-
export declare function checks(this: any, key: string): Promise<Response<null> | undefined>;
|
|
298
|
-
/**
|
|
299
|
-
*
|
|
300
|
-
* @returns Stream servers host and ips
|
|
301
|
-
*
|
|
302
|
-
*/
|
|
303
|
-
export declare function stream_servers(this: any): Promise<{
|
|
304
|
-
domain: string[];
|
|
305
|
-
ip: string[];
|
|
306
|
-
}[] | undefined>;
|
|
307
|
-
/**
|
|
308
|
-
*
|
|
309
|
-
* @returns Pricing plans
|
|
310
|
-
* @param {string} gateway Payment gateway
|
|
311
|
-
* @param {string} discount_code Discount code
|
|
312
|
-
*
|
|
313
|
-
*/
|
|
314
|
-
export declare function plans(this: any, gateway: 'shaparak' | 'paypal', discount_code?: string): Promise<Response<{
|
|
315
|
-
discount: {
|
|
316
|
-
use_discount: boolean;
|
|
317
|
-
discount_error?: string;
|
|
318
|
-
};
|
|
319
|
-
plans: IPlan[];
|
|
320
|
-
}> | undefined>;
|
|
321
|
-
/**
|
|
322
|
-
*
|
|
323
|
-
* @returns Shaparak gateway
|
|
324
|
-
* @param {string} plan_id plan id to buy (CTA id)
|
|
325
|
-
* @param {string} discount_code Discount code
|
|
326
|
-
*
|
|
327
|
-
*/
|
|
328
|
-
export declare function shaparak(this: any, plan_id: string, discount_code?: string): Promise<Response<{
|
|
329
|
-
invoice_id: number;
|
|
330
|
-
url: string;
|
|
331
|
-
html?: string | undefined;
|
|
332
|
-
}> | undefined>;
|
|
333
|
-
/**
|
|
334
|
-
*
|
|
335
|
-
* @returns Paypal gateway
|
|
336
|
-
* @param {string} plan_id plan id to buy (CTA id)
|
|
337
|
-
* @param {string} discount_code Discount code
|
|
338
|
-
*
|
|
339
|
-
*/
|
|
340
|
-
export declare function paypal(this: any, plan_id: string, discount_code?: string): Promise<Response<{
|
|
341
|
-
invoice_id: number;
|
|
342
|
-
url: string;
|
|
343
|
-
html?: string | undefined;
|
|
344
|
-
}> | undefined>;
|
|
345
|
-
/**
|
|
346
|
-
* @returns User full library
|
|
347
|
-
*/
|
|
348
|
-
export declare function user_mylist(this: any): Promise<Response<IUserLibrary> | undefined>;
|
|
349
|
-
/**
|
|
350
|
-
* @returns User list titles
|
|
351
|
-
* @param {string} group List type
|
|
352
|
-
* @param {string} orderby Order by `default: add_list`
|
|
353
|
-
* @param {string} order Order `default: ASC`
|
|
354
|
-
* @param {number} page Search result page number
|
|
355
|
-
*/
|
|
356
|
-
export declare function user_list(this: any, group: 'favorite' | 'watchlist' | 'downloadlist' | 'notify', page?: number, orderby?: 'add_list' | 'relevant' | 'update' | 'year' | 'favorite' | 'imdb-rate' | '30nama-rate', order?: 'ASC' | 'DESC'): Promise<Response<{
|
|
357
|
-
posts: Title[];
|
|
358
|
-
page: number;
|
|
359
|
-
pages: number;
|
|
360
|
-
total: number;
|
|
361
|
-
}> | undefined>;
|
|
362
|
-
/**
|
|
363
|
-
* @returns Wether item added or removed from list
|
|
364
|
-
* @param {string} group List type
|
|
365
|
-
* @param {number} post_id Post id
|
|
366
|
-
*/
|
|
367
|
-
export declare function user_list_toggle(this: any, group: 'favorite' | 'watchlist' | 'downloadlist' | 'notify', post_id: number): Promise<Response<{
|
|
368
|
-
action: 'add' | 'remove';
|
|
369
|
-
group: string;
|
|
370
|
-
}> | undefined>;
|
|
371
|
-
/**
|
|
372
|
-
* @description Apply voucher code to user account
|
|
373
|
-
* @param {string} voucher_code Voucher code
|
|
374
|
-
*/
|
|
375
|
-
export declare function voucher(this: any, voucher_code: string): Promise<Response<undefined> | undefined>;
|
|
376
|
-
/**
|
|
377
|
-
* @returns Offer details if available
|
|
378
|
-
*/
|
|
379
|
-
export declare function offer(this: any): Promise<Response<{
|
|
380
|
-
type: 'internal' | 'external';
|
|
381
|
-
text: string;
|
|
382
|
-
code: string;
|
|
383
|
-
url?: string | undefined;
|
|
384
|
-
} | null> | undefined>;
|