@30nama/sdk 1.0.6 → 1.0.8

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.
@@ -0,0 +1,3 @@
1
+ export default class BaseEntity {
2
+ toJSON(): this;
3
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class BaseEntity {
4
+ toJSON() {
5
+ return Object.assign({}, this);
6
+ }
7
+ }
8
+ exports.default = BaseEntity;
9
+ //# sourceMappingURL=BaseEntity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BaseEntity.js","sourceRoot":"","sources":["../../src/entities/BaseEntity.ts"],"names":[],"mappings":";;AAAA,MAAqB,UAAU;IAC3B,MAAM;QACF,yBAAY,IAAI,EAAE;IACtB,CAAC;CACJ;AAJD,6BAIC"}
@@ -1,15 +1,8 @@
1
+ import BaseEntity from './BaseEntity';
1
2
  import { IAttachment } from './IAttachment';
2
3
  import { IGenre } from './ICollector';
3
4
  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';
5
+ import { VideoContentInfo, VideoContentOption } from './IVideoContent';
13
6
  type SeriesMeta = {
14
7
  air_status: string;
15
8
  air_days: string[];
@@ -17,7 +10,7 @@ type SeriesMeta = {
17
10
  last_episode: string;
18
11
  next_episode_date?: string;
19
12
  };
20
- export declare class IBoxOffice {
13
+ export declare class IBoxOffice extends BaseEntity {
21
14
  id: string;
22
15
  content_id: string;
23
16
  info: VideoContentInfo;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IBoxOffice = void 0;
4
- class IBoxOffice {
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class IBoxOffice extends BaseEntity_1.default {
5
6
  constructor(partial) {
7
+ super();
6
8
  Object.assign(this, partial);
7
9
  }
8
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IBoxOffice.js","sourceRoot":"","sources":["../../src/entities/IBoxOffice.ts"],"names":[],"mappings":";;;AAiBA,MAAa,UAAU;IAmBnB,YAAY,OAA4B;QACpC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAtBD,gCAsBC"}
1
+ {"version":3,"file":"IBoxOffice.js","sourceRoot":"","sources":["../../src/entities/IBoxOffice.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAcrC,MAAa,UAAW,SAAQ,oBAAU;IAmBtC,YAAY,OAA4B;QACpC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAvBD,gCAuBC"}
@@ -1,4 +1,5 @@
1
- export declare class ICollection {
1
+ import BaseEntity from './BaseEntity';
2
+ export declare class ICollection extends BaseEntity {
2
3
  id: string;
3
4
  parent_name?: string;
4
5
  parent_id?: string;
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ICollection = void 0;
4
- class ICollection {
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class ICollection extends BaseEntity_1.default {
5
6
  constructor(partial) {
7
+ super();
6
8
  Object.assign(this, partial);
7
9
  }
8
10
  }
@@ -1 +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
+ {"version":3,"file":"ICollection.js","sourceRoot":"","sources":["../../src/entities/ICollection.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAErC,MAAa,WAAY,SAAQ,oBAAU;IAiBvC,YAAY,OAA6B;QACrC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AArBD,kCAqBC"}
@@ -1,23 +1,9 @@
1
+ import BaseEntity from './BaseEntity';
1
2
  import { IAttachment } from './IAttachment';
2
3
  import { IGenre } from './ICollector';
3
4
  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 {
5
+ import { SeriesMeta, VideoContentInfo, VideoContentOption } from './IVideoContent';
6
+ export declare class ITitle extends BaseEntity {
21
7
  id: string;
22
8
  info: VideoContentInfo;
23
9
  ratings: IRating;
@@ -33,7 +19,7 @@ export declare class ITitle {
33
19
  download_id?: string;
34
20
  constructor(partial: Partial<ITitle>);
35
21
  }
36
- export declare class IHeroTitle {
22
+ export declare class IHeroTitle extends BaseEntity {
37
23
  id: string;
38
24
  info: VideoContentInfo;
39
25
  ratings: IRating;
@@ -49,4 +35,3 @@ export declare class IHeroTitle {
49
35
  download_id?: string;
50
36
  constructor(partial: Partial<ITitle>);
51
37
  }
52
- export {};
@@ -1,14 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IHeroTitle = exports.ITitle = void 0;
4
- class ITitle {
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class ITitle extends BaseEntity_1.default {
5
6
  constructor(partial) {
7
+ super();
6
8
  Object.assign(this, partial);
7
9
  }
8
10
  }
9
11
  exports.ITitle = ITitle;
10
- class IHeroTitle {
12
+ class IHeroTitle extends BaseEntity_1.default {
11
13
  constructor(partial) {
14
+ super();
12
15
  Object.assign(this, partial);
13
16
  }
14
17
  }
@@ -1 +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"}
1
+ {"version":3,"file":"ITitle.js","sourceRoot":"","sources":["../../src/entities/ITitle.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAMrC,MAAa,MAAO,SAAQ,oBAAU;IAelC,YAAY,OAAwB;QAChC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAnBD,wBAmBC;AAED,MAAa,UAAW,SAAQ,oBAAU;IActC,YAAY,OAAwB;QAChC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAlBD,gCAkBC"}
@@ -1,3 +1,4 @@
1
+ import BaseEntity from './BaseEntity';
1
2
  import { IAttachment } from './IAttachment';
2
3
  import { ICollection } from './ICollection';
3
4
  import { ICollector, IGenre } from './ICollector';
@@ -12,14 +13,14 @@ export type VideoContentInfo = {
12
13
  [key in ISOLocales]: VideoContentInfoData;
13
14
  };
14
15
  export type VideoContentOption = 'featured' | 'persian-subtitle' | 'streams';
15
- type SeriesMeta = {
16
+ export type SeriesMeta = {
16
17
  air_status: string;
17
18
  air_days: string[];
18
19
  last_episode_date?: string;
19
20
  last_episode: string;
20
21
  next_episode_date?: string;
21
22
  };
22
- export declare class IVideoContent {
23
+ export declare class IVideoContent extends BaseEntity {
23
24
  id: string;
24
25
  info: VideoContentInfo;
25
26
  ratings: IRating;
@@ -57,4 +58,3 @@ export declare class IVideoContent {
57
58
  }[];
58
59
  constructor(partial: Partial<IVideoContent>);
59
60
  }
60
- export {};
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IVideoContent = void 0;
4
- class IVideoContent {
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class IVideoContent extends BaseEntity_1.default {
5
6
  constructor(partial) {
7
+ super();
6
8
  Object.assign(this, partial);
7
9
  }
8
10
  }
@@ -1 +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
+ {"version":3,"file":"IVideoContent.js","sourceRoot":"","sources":["../../src/entities/IVideoContent.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAoBrC,MAAa,aAAc,SAAQ,oBAAU;IA4BzC,YAAY,OAA+B;QACvC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAhCD,sCAgCC"}
@@ -2,3 +2,7 @@ export * from './IVideoContent';
2
2
  export * from './IRating';
3
3
  export * from './IAttachment';
4
4
  export * from './ICollector';
5
+ export * from './ICollection';
6
+ export * from './IBoxOffice';
7
+ export * from './IPerson';
8
+ export * from './ITitle';
@@ -18,4 +18,8 @@ __exportStar(require("./IVideoContent"), exports);
18
18
  __exportStar(require("./IRating"), exports);
19
19
  __exportStar(require("./IAttachment"), exports);
20
20
  __exportStar(require("./ICollector"), exports);
21
+ __exportStar(require("./ICollection"), exports);
22
+ __exportStar(require("./IBoxOffice"), exports);
23
+ __exportStar(require("./IPerson"), exports);
24
+ __exportStar(require("./ITitle"), exports);
21
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB;AACzB,gDAA6B;AAC7B,+CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB;AACzB,gDAA6B;AAC7B,+CAA4B;AAC5B,gDAA6B;AAC7B,+CAA4B;AAC5B,4CAAyB;AACzB,2CAAwB"}
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.6",
4
+ "version": "1.0.8",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [