@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.
Files changed (88) hide show
  1. package/dist/api/index.d.ts +1 -1
  2. package/dist/api/index.js +8 -6
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/request.d.ts +8 -4
  5. package/dist/api/request.js +12 -15
  6. package/dist/api/request.js.map +1 -1
  7. package/dist/api/services/index.d.ts +1 -0
  8. package/dist/api/services/index.js +18 -0
  9. package/dist/api/services/index.js.map +1 -0
  10. package/dist/api/services/videoContent.d.ts +130 -0
  11. package/dist/api/services/videoContent.js +388 -0
  12. package/dist/api/services/videoContent.js.map +1 -0
  13. package/dist/api/types.d.ts +13 -9
  14. package/dist/core.d.ts +1 -3
  15. package/dist/core.js +1 -37
  16. package/dist/core.js.map +1 -1
  17. package/dist/entities/IAttachment.d.ts +29 -0
  18. package/dist/entities/IAttachment.js +3 -0
  19. package/dist/entities/IAttachment.js.map +1 -0
  20. package/dist/entities/IBoxOffice.d.ts +41 -0
  21. package/dist/entities/IBoxOffice.js +10 -0
  22. package/dist/entities/IBoxOffice.js.map +1 -0
  23. package/dist/entities/ICollection.d.ts +19 -0
  24. package/dist/entities/ICollection.js +10 -0
  25. package/dist/entities/ICollection.js.map +1 -0
  26. package/dist/entities/{ArchiveSlug.d.ts → ICollector.d.ts} +9 -9
  27. package/dist/entities/ICollector.js +3 -0
  28. package/dist/entities/ICollector.js.map +1 -0
  29. package/dist/entities/IPerson.d.ts +19 -0
  30. package/dist/entities/IPerson.js +3 -0
  31. package/dist/entities/IPerson.js.map +1 -0
  32. package/dist/entities/IRating.d.ts +9 -0
  33. package/dist/entities/IRating.js +3 -0
  34. package/dist/entities/IRating.js.map +1 -0
  35. package/dist/entities/ITitle.d.ts +52 -0
  36. package/dist/entities/ITitle.js +16 -0
  37. package/dist/entities/ITitle.js.map +1 -0
  38. package/dist/entities/IVideoContent.d.ts +60 -0
  39. package/dist/entities/IVideoContent.js +10 -0
  40. package/dist/entities/IVideoContent.js.map +1 -0
  41. package/dist/entities/index.d.ts +4 -53
  42. package/dist/entities/index.js +18 -31
  43. package/dist/entities/index.js.map +1 -1
  44. package/package.json +7 -7
  45. package/dist/api/actions.d.ts +0 -384
  46. package/dist/api/actions.js +0 -526
  47. package/dist/api/actions.js.map +0 -1
  48. package/dist/entities/ArchiveSlug.js +0 -13
  49. package/dist/entities/ArchiveSlug.js.map +0 -1
  50. package/dist/entities/ContinueWatchingTitle.d.ts +0 -12
  51. package/dist/entities/ContinueWatchingTitle.js +0 -11
  52. package/dist/entities/ContinueWatchingTitle.js.map +0 -1
  53. package/dist/entities/Download.d.ts +0 -31
  54. package/dist/entities/Download.js +0 -22
  55. package/dist/entities/Download.js.map +0 -1
  56. package/dist/entities/Downloadable.d.ts +0 -27
  57. package/dist/entities/Downloadable.js +0 -19
  58. package/dist/entities/Downloadable.js.map +0 -1
  59. package/dist/entities/Notification.d.ts +0 -15
  60. package/dist/entities/Notification.js +0 -18
  61. package/dist/entities/Notification.js.map +0 -1
  62. package/dist/entities/Person.d.ts +0 -23
  63. package/dist/entities/Person.js +0 -12
  64. package/dist/entities/Person.js.map +0 -1
  65. package/dist/entities/Plan.d.ts +0 -22
  66. package/dist/entities/Plan.js +0 -14
  67. package/dist/entities/Plan.js.map +0 -1
  68. package/dist/entities/PlayerData.d.ts +0 -37
  69. package/dist/entities/PlayerData.js +0 -14
  70. package/dist/entities/PlayerData.js.map +0 -1
  71. package/dist/entities/Single.d.ts +0 -52
  72. package/dist/entities/Single.js +0 -18
  73. package/dist/entities/Single.js.map +0 -1
  74. package/dist/entities/Stranger.d.ts +0 -5
  75. package/dist/entities/Stranger.js +0 -10
  76. package/dist/entities/Stranger.js.map +0 -1
  77. package/dist/entities/StreamData.d.ts +0 -53
  78. package/dist/entities/StreamData.js +0 -13
  79. package/dist/entities/StreamData.js.map +0 -1
  80. package/dist/entities/Title.d.ts +0 -103
  81. package/dist/entities/Title.js +0 -25
  82. package/dist/entities/Title.js.map +0 -1
  83. package/dist/entities/User.d.ts +0 -20
  84. package/dist/entities/User.js +0 -21
  85. package/dist/entities/User.js.map +0 -1
  86. package/dist/entities/UserLibrary.d.ts +0 -14
  87. package/dist/entities/UserLibrary.js +0 -12
  88. package/dist/entities/UserLibrary.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ export declare class ICollection {
2
+ id: string;
3
+ parent_name?: string;
4
+ parent_id?: string;
5
+ slug: string;
6
+ name: string;
7
+ description?: string;
8
+ poster?: {
9
+ jpg: {
10
+ full: string;
11
+ thumb: string;
12
+ };
13
+ webp: {
14
+ full: string;
15
+ thumb: string;
16
+ };
17
+ };
18
+ constructor(partial: Partial<ICollection>);
19
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ICollection = void 0;
4
+ class ICollection {
5
+ constructor(partial) {
6
+ Object.assign(this, partial);
7
+ }
8
+ }
9
+ exports.ICollection = ICollection;
10
+ //# sourceMappingURL=ICollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICollection.js","sourceRoot":"","sources":["../../src/entities/ICollection.ts"],"names":[],"mappings":";;;AAAA,MAAa,WAAW;IAiBpB,YAAY,OAA6B;QACrC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AApBD,kCAoBC"}
@@ -1,17 +1,17 @@
1
- export default class ArchiveSlug {
2
- id: number;
1
+ export interface ICollector {
2
+ id: string;
3
3
  name: string;
4
4
  slug: string;
5
- count: number;
6
- image: {
7
- webp: {
8
- thumb: string;
9
- full: string;
10
- };
5
+ poster: {
11
6
  jpg: {
7
+ full: string;
12
8
  thumb: string;
9
+ };
10
+ webp: {
13
11
  full: string;
12
+ thumb: string;
14
13
  };
15
14
  };
16
- constructor(archive: any);
17
15
  }
16
+ export type IGenre = ICollector;
17
+ export type ICategory = ICollector;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ICollector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICollector.js","sourceRoot":"","sources":["../../src/entities/ICollector.ts"],"names":[],"mappings":""}
@@ -0,0 +1,19 @@
1
+ export interface IPerson {
2
+ character_name: string;
3
+ imdb_code: string;
4
+ name: string;
5
+ person_id?: string;
6
+ order: 0;
7
+ poster: {
8
+ jpg: {
9
+ full: string;
10
+ thumb: string;
11
+ };
12
+ webp: {
13
+ full: string;
14
+ thumb: string;
15
+ };
16
+ };
17
+ }
18
+ export interface ICrew extends Omit<IPerson, 'character_name' | 'poster'> {
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IPerson.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IPerson.js","sourceRoot":"","sources":["../../src/entities/IPerson.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ export interface IRatingScore {
2
+ sub_path?: string;
3
+ score: number;
4
+ votes: string;
5
+ }
6
+ export type IRatingProvider = '30nama' | 'imdb' | 'rottentomatoes' | 'metacritic' | 'myanimelist' | 'mydramalist';
7
+ export type IRating = {
8
+ [key in IRatingProvider]: IRatingScore;
9
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRating.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IRating.js","sourceRoot":"","sources":["../../src/entities/IRating.ts"],"names":[],"mappings":""}
@@ -0,0 +1,52 @@
1
+ import { IAttachment } from './IAttachment';
2
+ import { IGenre } from './ICollector';
3
+ import { IRating } from './IRating';
4
+ export type ISOLocales = 'en' | 'fa';
5
+ export type VideoContentInfoData = {
6
+ title: string;
7
+ description?: string;
8
+ };
9
+ export type VideoContentInfo = {
10
+ [key in ISOLocales]: VideoContentInfoData;
11
+ };
12
+ export type VideoContentOption = 'featured' | 'persian-subtitle' | 'streams';
13
+ type SeriesMeta = {
14
+ air_status: string;
15
+ air_days: string[];
16
+ last_episode_date?: string;
17
+ last_episode: string;
18
+ next_episode_date?: string;
19
+ };
20
+ export declare class ITitle {
21
+ id: string;
22
+ info: VideoContentInfo;
23
+ ratings: IRating;
24
+ attachments: Omit<IAttachment, 'covers'>;
25
+ options: VideoContentOption[];
26
+ genres: IGenre[];
27
+ series_meta: SeriesMeta;
28
+ is_imdb_top: boolean;
29
+ is_cinama_top: boolean;
30
+ year: number;
31
+ year_end?: number;
32
+ budget?: string;
33
+ download_id?: string;
34
+ constructor(partial: Partial<ITitle>);
35
+ }
36
+ export declare class IHeroTitle {
37
+ id: string;
38
+ info: VideoContentInfo;
39
+ ratings: IRating;
40
+ attachments: IAttachment;
41
+ options: VideoContentOption[];
42
+ genres: IGenre[];
43
+ series_meta: SeriesMeta;
44
+ is_imdb_top: boolean;
45
+ is_cinama_top: boolean;
46
+ year: number;
47
+ year_end?: number;
48
+ budget?: string;
49
+ download_id?: string;
50
+ constructor(partial: Partial<ITitle>);
51
+ }
52
+ export {};
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IHeroTitle = exports.ITitle = void 0;
4
+ class ITitle {
5
+ constructor(partial) {
6
+ Object.assign(this, partial);
7
+ }
8
+ }
9
+ exports.ITitle = ITitle;
10
+ class IHeroTitle {
11
+ constructor(partial) {
12
+ Object.assign(this, partial);
13
+ }
14
+ }
15
+ exports.IHeroTitle = IHeroTitle;
16
+ //# sourceMappingURL=ITitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITitle.js","sourceRoot":"","sources":["../../src/entities/ITitle.ts"],"names":[],"mappings":";;;AAiBA,MAAa,MAAM;IAcf,YAAY,OAAwB;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAjBD,wBAiBC;AAED,MAAa,UAAU;IAcnB,YAAY,OAAwB;QAChC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAjBD,gCAiBC"}
@@ -0,0 +1,60 @@
1
+ import { IAttachment } from './IAttachment';
2
+ import { ICollection } from './ICollection';
3
+ import { ICollector, IGenre } from './ICollector';
4
+ import { IPerson, ICrew } from './IPerson';
5
+ import { IRating } from './IRating';
6
+ export type ISOLocales = 'en' | 'fa';
7
+ export type VideoContentInfoData = {
8
+ title: string;
9
+ description?: string;
10
+ };
11
+ export type VideoContentInfo = {
12
+ [key in ISOLocales]: VideoContentInfoData;
13
+ };
14
+ export type VideoContentOption = 'featured' | 'persian-subtitle' | 'streams';
15
+ type SeriesMeta = {
16
+ air_status: string;
17
+ air_days: string[];
18
+ last_episode_date?: string;
19
+ last_episode: string;
20
+ next_episode_date?: string;
21
+ };
22
+ export declare class IVideoContent {
23
+ id: string;
24
+ info: VideoContentInfo;
25
+ ratings: IRating;
26
+ attachments: IAttachment;
27
+ options: VideoContentOption[];
28
+ genres: IGenre[];
29
+ collections: ICollection[];
30
+ languages: ICollector[];
31
+ countries: ICollector[];
32
+ times: {
33
+ id: string;
34
+ name: string;
35
+ time: number;
36
+ }[];
37
+ series_meta: SeriesMeta;
38
+ is_imdb_top: boolean;
39
+ is_cinama_top: boolean;
40
+ year: number;
41
+ year_end?: number;
42
+ budget?: string;
43
+ channel?: string;
44
+ mpaa: string;
45
+ notifications: any[];
46
+ user_action_count_data: {
47
+ total_notification_list: number;
48
+ total_watch_list: number;
49
+ total_favorite_list: number;
50
+ total_download_list: number;
51
+ };
52
+ casts: IPerson[];
53
+ crews: {
54
+ crews: ICrew[];
55
+ profession_name: string;
56
+ profession_id?: number;
57
+ }[];
58
+ constructor(partial: Partial<IVideoContent>);
59
+ }
60
+ export {};
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IVideoContent = void 0;
4
+ class IVideoContent {
5
+ constructor(partial) {
6
+ Object.assign(this, partial);
7
+ }
8
+ }
9
+ exports.IVideoContent = IVideoContent;
10
+ //# sourceMappingURL=IVideoContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IVideoContent.js","sourceRoot":"","sources":["../../src/entities/IVideoContent.ts"],"names":[],"mappings":";;;AAmBA,MAAa,aAAa;IA4BtB,YAAY,OAA+B;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AA/BD,sCA+BC"}
@@ -1,53 +1,4 @@
1
- import User from './User';
2
- import Single from './Single';
3
- import Title from './Title';
4
- import Stranger from './Stranger';
5
- import Person from './Person';
6
- import PlayerData from './PlayerData';
7
- import ArchiveSlug from './ArchiveSlug';
8
- import ContinueWatchingTitle from './ContinueWatchingTitle';
9
- import StreamData from './StreamData';
10
- import Notification from './Notification';
11
- import Download from './Download';
12
- import Downloadable from './Downloadable';
13
- import Plan from './Plan';
14
- import UserLibrary from './UserLibrary';
15
- export { User, Single, Title, Stranger, Person, PlayerData, ArchiveSlug, ContinueWatchingTitle, StreamData, Notification, Download, Downloadable, Plan, UserLibrary };
16
- export interface IUser extends User {
17
- }
18
- export interface ISingle extends Single {
19
- }
20
- export interface ITitle extends Title {
21
- }
22
- export interface IStranger extends Stranger {
23
- }
24
- export interface IPerson extends Person {
25
- }
26
- export interface IPlayerData extends PlayerData {
27
- }
28
- export interface IArchiveSlug extends ArchiveSlug {
29
- }
30
- export interface IContinueWatchingTitle extends ContinueWatchingTitle {
31
- }
32
- export interface IStreamData extends StreamData {
33
- }
34
- export interface INotification extends Notification {
35
- }
36
- export interface IDownload extends Download {
37
- }
38
- export interface IDownloadable extends Downloadable {
39
- }
40
- export interface IPlan extends Plan {
41
- }
42
- export interface IUserLibrary extends UserLibrary {
43
- }
44
- export type Response<Res, Actions = any[]> = {
45
- status: number;
46
- success: boolean;
47
- error: boolean;
48
- msg: string;
49
- result: Res;
50
- action?: Actions;
51
- seo?: any;
52
- timestamp: number;
53
- };
1
+ export * from './IVideoContent';
2
+ export * from './IRating';
3
+ export * from './IAttachment';
4
+ export * from './ICollector';
@@ -1,34 +1,21 @@
1
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
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.UserLibrary = exports.Plan = exports.Downloadable = exports.Download = exports.Notification = exports.StreamData = exports.ContinueWatchingTitle = exports.ArchiveSlug = exports.PlayerData = exports.Person = exports.Stranger = exports.Title = exports.Single = exports.User = void 0;
4
- // Constructors
5
- // ------------
6
- const User_1 = require("./User");
7
- exports.User = User_1.default;
8
- const Single_1 = require("./Single");
9
- exports.Single = Single_1.default;
10
- const Title_1 = require("./Title");
11
- exports.Title = Title_1.default;
12
- const Stranger_1 = require("./Stranger");
13
- exports.Stranger = Stranger_1.default;
14
- const Person_1 = require("./Person");
15
- exports.Person = Person_1.default;
16
- const PlayerData_1 = require("./PlayerData");
17
- exports.PlayerData = PlayerData_1.default;
18
- const ArchiveSlug_1 = require("./ArchiveSlug");
19
- exports.ArchiveSlug = ArchiveSlug_1.default;
20
- const ContinueWatchingTitle_1 = require("./ContinueWatchingTitle");
21
- exports.ContinueWatchingTitle = ContinueWatchingTitle_1.default;
22
- const StreamData_1 = require("./StreamData");
23
- exports.StreamData = StreamData_1.default;
24
- const Notification_1 = require("./Notification");
25
- exports.Notification = Notification_1.default;
26
- const Download_1 = require("./Download");
27
- exports.Download = Download_1.default;
28
- const Downloadable_1 = require("./Downloadable");
29
- exports.Downloadable = Downloadable_1.default;
30
- const Plan_1 = require("./Plan");
31
- exports.Plan = Plan_1.default;
32
- const UserLibrary_1 = require("./UserLibrary");
33
- exports.UserLibrary = UserLibrary_1.default;
17
+ __exportStar(require("./IVideoContent"), exports);
18
+ __exportStar(require("./IRating"), exports);
19
+ __exportStar(require("./IAttachment"), exports);
20
+ __exportStar(require("./ICollector"), exports);
34
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,eAAe;AACf,iCAAyB;AAchB,eAdF,cAAI,CAcE;AAbb,qCAA6B;AAad,iBAbR,gBAAM,CAaQ;AAZrB,mCAA2B;AAYJ,gBAZhB,eAAK,CAYgB;AAX5B,yCAAiC;AAWH,mBAXvB,kBAAQ,CAWuB;AAVtC,qCAA6B;AAUW,iBAVjC,gBAAM,CAUiC;AAT9C,6CAAqC;AASW,qBATzC,oBAAU,CASyC;AAR1D,+CAAuC;AAQqB,sBARrD,qBAAW,CAQqD;AAPvE,mEAA2D;AAOc,gCAPlE,+BAAqB,CAOkE;AAN9F,6CAAqC;AAM2D,qBANzF,oBAAU,CAMyF;AAL1G,iDAAyC;AAKmE,uBALrG,sBAAY,CAKqG;AAJxH,yCAAiC;AAIyF,mBAJnH,kBAAQ,CAImH;AAHlI,iDAAyC;AAG2F,uBAH7H,sBAAY,CAG6H;AAFhJ,iCAAyB;AAEyH,eAF3I,cAAI,CAE2I;AADtJ,+CAAuC;AACiH,sBADjJ,qBAAW,CACiJ"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB;AACzB,gDAA6B;AAC7B,+CAA4B"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@30nama/sdk",
3
3
  "description": "30nama SDK for Node.js",
4
- "version": "1.0.0",
4
+ "version": "1.0.3",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
@@ -17,19 +17,19 @@
17
17
  "author": "EternalC0der <s.eternalcoder@gmail.com>",
18
18
  "license": "ISC",
19
19
  "devDependencies": {
20
- "@types/node": "^20.11.25",
21
- "@types/qs": "^6.9.12",
22
- "@typescript-eslint/eslint-plugin": "^7.1.1",
23
- "@typescript-eslint/parser": "^7.1.1",
20
+ "@types/node": "^20.12.7",
21
+ "@types/qs": "^6.9.15",
22
+ "@typescript-eslint/eslint-plugin": "^7.7.0",
23
+ "@typescript-eslint/parser": "^7.7.0",
24
24
  "eslint": "^8.57.0",
25
25
  "eslint-config-prettier": "^9.1.0",
26
26
  "eslint-plugin-import": "^2.29.1",
27
27
  "eslint-plugin-prettier": "^5.1.3",
28
28
  "prettier": "^3.2.5",
29
- "typescript": "^5.4.2"
29
+ "typescript": "^5.4.5"
30
30
  },
31
31
  "dependencies": {
32
32
  "apisauce": "^3.0.1",
33
- "qs": "^6.12.0"
33
+ "qs": "^6.12.1"
34
34
  }
35
35
  }