@30nama/sdk 1.1.7 → 1.3.0

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,17 @@
1
+ import { BaseResponse } from '../types';
2
+ import { IBiography } from '../../entities';
3
+ type BiographyPagination = {
4
+ count: number;
5
+ previous_page?: number;
6
+ next_page: string;
7
+ last_page: number;
8
+ data: IBiography[];
9
+ };
10
+ export declare function biographyAddToFavorites(this: any, person_id: number): Promise<BaseResponse<void> | undefined>;
11
+ export declare function biographyRemoteFromFavorites(this: any, person_id: number): Promise<BaseResponse<void> | undefined>;
12
+ export declare function biographyFavorites(this: any): Promise<BaseResponse<any> | undefined>;
13
+ export declare function biographyPersonDetails(this: any, person_id: number): Promise<BaseResponse<IBiography> | undefined>;
14
+ type PersonGender = 'female' | 'male' | 'other';
15
+ type PersonProfession = 'actor' | 'director' | 'writer';
16
+ export declare function biographyPersonsList(this: any, page?: number, gender?: PersonGender, profession?: PersonProfession, search_text?: string): Promise<BaseResponse<BiographyPagination> | undefined>;
17
+ export {};
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.biographyPersonsList = exports.biographyPersonDetails = exports.biographyFavorites = exports.biographyRemoteFromFavorites = exports.biographyAddToFavorites = void 0;
13
+ const request_1 = require("../request");
14
+ const servicePath = 'biography';
15
+ function biographyAddToFavorites(person_id) {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ const This = this;
18
+ This.log('info', 'Running action: biographyAddToFavorites');
19
+ const req = new request_1.default(`biography/addtofavorites`, this);
20
+ req.withService(servicePath);
21
+ req.withMethod('get');
22
+ const response = (yield req.execute({ person_id }));
23
+ // TODO: remove-enforced-success
24
+ if (response) {
25
+ response.result = true;
26
+ response.success = true;
27
+ }
28
+ return response;
29
+ });
30
+ }
31
+ exports.biographyAddToFavorites = biographyAddToFavorites;
32
+ function biographyRemoteFromFavorites(person_id) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const This = this;
35
+ This.log('info', 'Running action: biographyAddToFavorites');
36
+ const req = new request_1.default(`biography/deletefromfavorites`, this);
37
+ req.withService(servicePath);
38
+ req.withMethod('get');
39
+ const response = (yield req.execute({ person_id }));
40
+ // TODO: remove-enforced-success
41
+ if (response) {
42
+ response.result = true;
43
+ response.success = true;
44
+ }
45
+ return response;
46
+ });
47
+ }
48
+ exports.biographyRemoteFromFavorites = biographyRemoteFromFavorites;
49
+ function biographyFavorites() {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const This = this;
52
+ This.log('info', 'Running action: biographyFavorites');
53
+ const req = new request_1.default(`biography/favorites`, this);
54
+ req.withService(servicePath);
55
+ req.withMethod('get');
56
+ const response = (yield req.execute());
57
+ // TODO: remove-enforced-success
58
+ if (response) {
59
+ response.result = true;
60
+ response.success = true;
61
+ }
62
+ return response;
63
+ });
64
+ }
65
+ exports.biographyFavorites = biographyFavorites;
66
+ function biographyPersonDetails(person_id) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const This = this;
69
+ This.log('info', 'Running action: biographyPersonDetails');
70
+ const req = new request_1.default(`biography/person/detail`, this);
71
+ req.withService(servicePath);
72
+ req.withMethod('get');
73
+ const response = (yield req.execute({ person_id }));
74
+ // TODO: remove-enforced-success
75
+ if (response) {
76
+ response.result = true;
77
+ response.success = true;
78
+ }
79
+ return response;
80
+ });
81
+ }
82
+ exports.biographyPersonDetails = biographyPersonDetails;
83
+ function biographyPersonsList(page, gender, profession, search_text) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const This = this;
86
+ This.log('info', 'Running action: biographyPersonsList');
87
+ const req = new request_1.default(`biography/persons`, this);
88
+ req.withService(servicePath);
89
+ req.withMethod('get');
90
+ const response = (yield req.execute({ page, gender, profession, search_text }));
91
+ // TODO: remove-enforced-success
92
+ if (response) {
93
+ response.result = true;
94
+ response.success = true;
95
+ }
96
+ return response;
97
+ });
98
+ }
99
+ exports.biographyPersonsList = biographyPersonsList;
100
+ //# sourceMappingURL=biography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biography.js","sourceRoot":"","sources":["../../../src/api/services/biography.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wCAAgC;AAGhC,MAAM,WAAW,GAAG,WAAW,CAAA;AAK/B,SAAsB,uBAAuB,CAAY,SAAiB;;QACtE,MAAM,IAAI,GAAG,IAAW,CAAA;QACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,yCAAyC,CAAC,CAAA;QAC3D,MAAM,GAAG,GAAG,IAAI,iBAAO,CAAC,0BAA0B,EAAE,IAAI,CAAC,CAAA;QACzD,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QAC5B,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;QAErB,MAAM,QAAQ,GAAG,CAAC,MAAM,GAAG,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,CAAC,CAAmC,CAAA;QAErF,gCAAgC;QAChC,IAAI,QAAQ,EAAE,CAAC;YACX,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAA;YACtB,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;QAC3B,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;CAAA;AAhBD,0DAgBC;AAED,SAAsB,4BAA4B,CAAY,SAAiB;;QAC3E,MAAM,IAAI,GAAG,IAAW,CAAA;QACxB,IA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 -15,4 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./videoContent"), exports);
18
+ __exportStar(require("./news"), exports);
19
+ __exportStar(require("./biography"), exports);
18
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA8B;AAC9B,yCAAsB;AACtB,8CAA2B"}
@@ -0,0 +1,20 @@
1
+ import { BaseResponse } from '../types';
2
+ import { IArticle, NewsCategory } from '../../entities/IArticle';
3
+ type NewsPagination = {
4
+ count: number;
5
+ previous_page?: number;
6
+ next_page: string;
7
+ last_page: number;
8
+ data: IArticle[];
9
+ };
10
+ export declare function newsBaseHome(this: any): Promise<BaseResponse<{
11
+ review: IArticle[];
12
+ news: IArticle[];
13
+ }> | undefined>;
14
+ export declare function newsDetail(this: any, id: number): Promise<BaseResponse<IArticle> | undefined>;
15
+ export declare function newsList(this: any, page: number, category: NewsCategory): Promise<BaseResponse<NewsPagination> | undefined>;
16
+ export declare function newsSearch(this: any, page: number, search_text: string): Promise<BaseResponse<NewsPagination> | undefined>;
17
+ export declare function newsVideoContent(this: any, video_content_id: string): Promise<BaseResponse<{
18
+ news: IArticle;
19
+ }> | undefined>;
20
+ export {};
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.newsVideoContent = exports.newsSearch = exports.newsList = exports.newsDetail = exports.newsBaseHome = void 0;
13
+ const request_1 = require("../request");
14
+ const servicePath = 'news';
15
+ function newsBaseHome() {
16
+ return __awaiter(this, void 0, void 0, function* () {
17
+ const This = this;
18
+ This.log('info', 'Running action: newsBaseHome');
19
+ const req = new request_1.default(`news/base_home`, this);
20
+ req.withService(servicePath);
21
+ req.withMethod('get');
22
+ const response = (yield req.execute());
23
+ // TODO: remove-enforced-success
24
+ if (response) {
25
+ response.result = true;
26
+ response.success = true;
27
+ }
28
+ return response;
29
+ });
30
+ }
31
+ exports.newsBaseHome = newsBaseHome;
32
+ function newsDetail(id) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const This = this;
35
+ This.log('info', 'Running action: newsDetail');
36
+ const req = new request_1.default(`news/detail`, this);
37
+ req.withService(servicePath);
38
+ req.withMethod('get');
39
+ const response = (yield req.execute({ news_id: id }));
40
+ // TODO: remove-enforced-success
41
+ if (response) {
42
+ response.result = true;
43
+ response.success = true;
44
+ }
45
+ return response;
46
+ });
47
+ }
48
+ exports.newsDetail = newsDetail;
49
+ function newsList(page, category) {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ const This = this;
52
+ This.log('info', 'Running action: newsList');
53
+ const req = new request_1.default(`news/list`, this);
54
+ req.withService(servicePath);
55
+ req.withMethod('get');
56
+ const response = (yield req.execute({ page, category }));
57
+ // TODO: remove-enforced-success
58
+ if (response) {
59
+ response.result = true;
60
+ response.success = true;
61
+ }
62
+ return response;
63
+ });
64
+ }
65
+ exports.newsList = newsList;
66
+ function newsSearch(page, search_text) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const This = this;
69
+ This.log('info', 'Running action: newsSearch');
70
+ const req = new request_1.default(`news/search`, this);
71
+ req.withService(servicePath);
72
+ req.withMethod('get');
73
+ const response = (yield req.execute({ page, search_text }));
74
+ // TODO: remove-enforced-success
75
+ if (response) {
76
+ response.result = true;
77
+ response.success = true;
78
+ }
79
+ return response;
80
+ });
81
+ }
82
+ exports.newsSearch = newsSearch;
83
+ function newsVideoContent(video_content_id) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ const This = this;
86
+ This.log('info', 'Running action: newsVideoContent');
87
+ const req = new request_1.default(`news/video_content`, this);
88
+ req.withService(servicePath);
89
+ req.withMethod('get');
90
+ const response = (yield req.execute({ video_content_id }));
91
+ // TODO: remove-enforced-success
92
+ if (response) {
93
+ response.result = true;
94
+ response.success = true;
95
+ }
96
+ return response;
97
+ });
98
+ }
99
+ exports.newsVideoContent = newsVideoContent;
100
+ //# sourceMappingURL=news.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"news.js","sourceRoot":"","sources":["../../../src/api/services/news.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wCAAgC;AAGhC,MAAM,WAAW,GAAG,MAAM,CAAA;AAK1B,SAAsB,YAAY;;QAC9B,MAAM,IAAI,GAAG,IAAW,CAAA;QACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,8BAA8B,CAAC,CAAA;QAChD,MAAM,GAAG,GAAG,IAAI,iBAAO,CAAC,gBAAgB,EAAE,IAAI,CAAC,CAAA;QAC/C,GAAG,CAAC,WAAW,CAAC,WAAW,CAAC,CAAA;QAC5B,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;QAErB,MAAM,QAAQ,GAAG,CAAC,MAAM,GAAG,CAAC,OAAO,EAAE,CAAuE,CAAA;QAE5G,gCAAgC;QAChC,IAAI,QAAQ,EAAE,CAAC;YACX,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAA;YACtB,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAA;QAC3B,CAAC;QAED,OAAO,QAAQ,CAA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B,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;CAAA;AAhBD,4CAgBC"}
@@ -20,12 +20,14 @@ export type API = {
20
20
  type SuccessResponse<Data> = {
21
21
  status_code: number;
22
22
  result: true;
23
+ success: true;
23
24
  message?: string;
24
25
  data: Data;
25
26
  };
26
27
  type ErrorResponse = {
27
28
  status_code: number;
28
29
  result: false;
30
+ success: false;
29
31
  message?: string;
30
32
  errors: any[];
31
33
  };
@@ -0,0 +1,38 @@
1
+ import BaseEntity from './BaseEntity';
2
+ interface INewsAttach {
3
+ id: number;
4
+ type: string;
5
+ order: number;
6
+ alt: string;
7
+ attach_link: {
8
+ id: number;
9
+ format: string;
10
+ size: string;
11
+ file_path: string;
12
+ };
13
+ }
14
+ interface INewsContent {
15
+ id: number;
16
+ language: string;
17
+ title: string;
18
+ excerpt: string;
19
+ content: string;
20
+ create_time: string;
21
+ }
22
+ export type NewsCategory = 'announcement' | 'interview_and_review' | 'news';
23
+ export declare class IArticle extends BaseEntity {
24
+ id: number;
25
+ status: string;
26
+ comment_status: string;
27
+ publish_date: string;
28
+ edit_time: string;
29
+ category: string;
30
+ news_attaches: INewsAttach[];
31
+ news_content: INewsContent[];
32
+ related_news: IArticle[];
33
+ video_content_ids: {
34
+ video_content_id: string;
35
+ }[];
36
+ constructor(partial: Partial<IArticle>);
37
+ }
38
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IArticle = void 0;
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class IArticle extends BaseEntity_1.default {
6
+ constructor(partial) {
7
+ super();
8
+ Object.assign(this, partial);
9
+ }
10
+ }
11
+ exports.IArticle = IArticle;
12
+ //# sourceMappingURL=IArticle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IArticle.js","sourceRoot":"","sources":["../../src/entities/IArticle.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AA0BrC,MAAa,QAAS,SAAQ,oBAAU;IAYpC,YAAY,OAA0B;QAClC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAhBD,4BAgBC"}
@@ -0,0 +1,30 @@
1
+ import BaseEntity from './BaseEntity';
2
+ export declare class IBiography extends BaseEntity {
3
+ id: number;
4
+ status: string;
5
+ comment_status: string;
6
+ names: {
7
+ id: number;
8
+ name: string;
9
+ full_name?: string;
10
+ language: string;
11
+ }[];
12
+ gender: string;
13
+ profession: string[];
14
+ birth_date: string;
15
+ death_date?: string;
16
+ publish_date: string;
17
+ edit_time: string;
18
+ id_connections: {
19
+ id: number;
20
+ imdb_id: number;
21
+ tmdb_id?: number;
22
+ }[];
23
+ posters: {
24
+ id: number;
25
+ file_path: string;
26
+ format: string;
27
+ size: string;
28
+ }[];
29
+ constructor(partial: Partial<IBiography>);
30
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IBiography = void 0;
4
+ const BaseEntity_1 = require("./BaseEntity");
5
+ class IBiography extends BaseEntity_1.default {
6
+ constructor(partial) {
7
+ super();
8
+ Object.assign(this, partial);
9
+ }
10
+ }
11
+ exports.IBiography = IBiography;
12
+ //# sourceMappingURL=IBiography.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IBiography.js","sourceRoot":"","sources":["../../src/entities/IBiography.ts"],"names":[],"mappings":";;;AAAA,6CAAqC;AAErC,MAAa,UAAW,SAAQ,oBAAU;IA4BtC,YAAY,OAA4B;QACpC,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;CACJ;AAhCD,gCAgCC"}
@@ -6,3 +6,5 @@ export * from './ICollection';
6
6
  export * from './IBoxOffice';
7
7
  export * from './IPerson';
8
8
  export * from './ITitle';
9
+ export * from './IArticle';
10
+ export * from './IBiography';
@@ -22,4 +22,6 @@ __exportStar(require("./ICollection"), exports);
22
22
  __exportStar(require("./IBoxOffice"), exports);
23
23
  __exportStar(require("./IPerson"), exports);
24
24
  __exportStar(require("./ITitle"), exports);
25
+ __exportStar(require("./IArticle"), exports);
26
+ __exportStar(require("./IBiography"), exports);
25
27
  //# 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;AAC5B,gDAA6B;AAC7B,+CAA4B;AAC5B,4CAAyB;AACzB,2CAAwB"}
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;AACxB,6CAA0B;AAC1B,+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.1.7",
4
+ "version": "1.3.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [