jd_platform_sdk 0.0.6 → 0.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.
Files changed (44) hide show
  1. package/dist/index.d.ts +8 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +10 -0
  4. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts +6 -0
  5. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts.map +1 -0
  6. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +21 -0
  7. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +15 -0
  8. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
  9. package/dist/sdk/models/modules/geolocation/jdCountry.js +16 -0
  10. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +17 -0
  11. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
  12. package/dist/sdk/models/modules/karaoke/jdKtvShop.js +18 -0
  13. package/dist/sdk/models/modules/music/jdAlbum.d.ts +84 -0
  14. package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -0
  15. package/dist/sdk/models/modules/music/jdAlbum.js +131 -0
  16. package/dist/sdk/models/modules/music/jdArtist.d.ts +75 -0
  17. package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -0
  18. package/dist/sdk/models/modules/music/jdArtist.js +115 -0
  19. package/dist/sdk/models/modules/music/jdComposer.d.ts +76 -0
  20. package/dist/sdk/models/modules/music/jdComposer.d.ts.map +1 -0
  21. package/dist/sdk/models/modules/music/jdComposer.js +115 -0
  22. package/dist/sdk/models/modules/music/jdMusicCombinations.d.ts +6 -0
  23. package/dist/sdk/models/modules/music/jdMusicCombinations.d.ts.map +1 -0
  24. package/dist/sdk/models/modules/music/jdMusicCombinations.js +21 -0
  25. package/dist/sdk/models/modules/music/jdSong.d.ts +5 -2
  26. package/dist/sdk/models/modules/music/jdSong.d.ts.map +1 -1
  27. package/dist/sdk/models/modules/music/jdSong.js +9 -5
  28. package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +48 -0
  29. package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -0
  30. package/dist/sdk/models/modules/radio_station/jdRadioStation.js +95 -0
  31. package/dist/sdk/models/modules/user/jdPermission.d.ts +14 -0
  32. package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
  33. package/dist/sdk/models/modules/user/jdPermission.js +16 -0
  34. package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +47 -0
  35. package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -0
  36. package/dist/sdk/models/modules/user/jdPermissionGroup.js +66 -0
  37. package/dist/sdk/models/modules/user/jdUser.d.ts +22 -0
  38. package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
  39. package/dist/sdk/models/modules/user/jdUser.js +18 -0
  40. package/dist/sdk/models/modules/user/jdUserRole.d.ts +52 -0
  41. package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -0
  42. package/dist/sdk/models/modules/user/jdUserRole.js +72 -0
  43. package/package.json +3 -1
  44. package/readme.md +9 -0
package/dist/index.d.ts CHANGED
@@ -9,11 +9,19 @@ export * from "./sdk/utilities/stringUtils";
9
9
  export * from "./sdk/utilities/utils";
10
10
  export * from "./sdk/models/jdResource";
11
11
  export * from "./sdk/models/jdApplication";
12
+ export * from "./sdk/models/modules/dashboard/jdDashboardCombinations";
12
13
  export * from "./sdk/models/modules/user/jdUser";
14
+ export * from "./sdk/models/modules/user/jdUserRole";
13
15
  export * from "./sdk/models/modules/user/jdSessionUser";
14
16
  export * from "./sdk/models/modules/user/jdPermission";
17
+ export * from "./sdk/models/modules/user/jdPermissionGroup";
15
18
  export * from "./sdk/models/modules/karaoke/jdKtvShop";
19
+ export * from "./sdk/models/modules/radio_station/jdRadioStation";
20
+ export * from "./sdk/models/modules/music/jdAlbum";
16
21
  export * from "./sdk/models/modules/music/jdSong";
22
+ export * from "./sdk/models/modules/music/jdArtist";
23
+ export * from "./sdk/models/modules/music/jdComposer";
24
+ export * from "./sdk/models/modules/music/jdMusicCombinations";
17
25
  export * from "./sdk/models/modules/geolocation/jdCountry";
18
26
  export * from "./sdk/models/modules/geolocation/jdState";
19
27
  export * from "./sdk/models/modules/geolocation/jdCity";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AAGvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AAGtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,wCAAwC,CAAC;AAGvD,cAAc,mCAAmC,CAAC;AAGlD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AAGvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AAGtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,wDAAwD,CAAC;AAGvE,cAAc,kCAAkC,CAAC;AACjD,cAAc,sCAAsC,CAAC;AACrD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,6CAA6C,CAAC;AAG5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,mDAAmD,CAAC;AAGlE,cAAc,oCAAoC,CAAC;AACnD,cAAc,mCAAmC,CAAC;AAClD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,gDAAgD,CAAC;AAG/D,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC"}
package/dist/index.js CHANGED
@@ -11,14 +11,24 @@ export * from "./sdk/utilities/utils";
11
11
  // Generic Models for different possible modules for all platforms
12
12
  export * from "./sdk/models/jdResource";
13
13
  export * from "./sdk/models/jdApplication";
14
+ //Dashboard
15
+ export * from "./sdk/models/modules/dashboard/jdDashboardCombinations";
14
16
  //User
15
17
  export * from "./sdk/models/modules/user/jdUser";
18
+ export * from "./sdk/models/modules/user/jdUserRole";
16
19
  export * from "./sdk/models/modules/user/jdSessionUser";
17
20
  export * from "./sdk/models/modules/user/jdPermission";
21
+ export * from "./sdk/models/modules/user/jdPermissionGroup";
18
22
  //Karaoke
19
23
  export * from "./sdk/models/modules/karaoke/jdKtvShop";
24
+ //Radio Station
25
+ export * from "./sdk/models/modules/radio_station/jdRadioStation";
20
26
  //Music
27
+ export * from "./sdk/models/modules/music/jdAlbum";
21
28
  export * from "./sdk/models/modules/music/jdSong";
29
+ export * from "./sdk/models/modules/music/jdArtist";
30
+ export * from "./sdk/models/modules/music/jdComposer";
31
+ export * from "./sdk/models/modules/music/jdMusicCombinations";
22
32
  //Geolocation
23
33
  export * from "./sdk/models/modules/geolocation/jdCountry";
24
34
  export * from "./sdk/models/modules/geolocation/jdState";
@@ -0,0 +1,6 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JdDashboardCombinations extends JDResource {
3
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
4
+ getOverview(): Promise<import("../../../jdConnector").SimpleResponse>;
5
+ }
6
+ //# sourceMappingURL=jdDashboardCombinations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdDashboardCombinations.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/dashboard/jdDashboardCombinations.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,uBAAwB,SAAQ,UAAU;gBAC1C,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAI9F,WAAW;CAIjB"}
@@ -0,0 +1,21 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ export class JdDashboardCombinations extends JDResource {
12
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
13
+ super(connectorInfo);
14
+ this.setData(data);
15
+ }
16
+ getOverview() {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ return yield this.getRelative('/modules/dashboard/combinations/overview', {});
19
+ });
20
+ }
21
+ }
@@ -3,8 +3,23 @@ export declare class JDCountry extends JDResource {
3
3
  constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
4
4
  setData(data: Record<string, any>): void;
5
5
  getCountries(orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
6
+ paginateContents({ title_en, title_mm, published, orderBy, order, pageIndex, countPerPage, fields }: {
7
+ title_en?: string | null;
8
+ title_mm?: string | null;
9
+ published?: boolean | null;
10
+ orderBy?: string | null;
11
+ order?: string | null;
12
+ pageIndex?: number | null;
13
+ countPerPage?: number | null;
14
+ fields?: string | null;
15
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
6
16
  findCountries(title: string, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
7
17
  getStates(countryId: string, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
8
18
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
19
+ updateSingleFields(id: string, { published, recommended, note }: {
20
+ published?: boolean | null;
21
+ recommended?: boolean | null;
22
+ note?: string | null;
23
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
9
24
  }
10
25
  //# sourceMappingURL=jdCountry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdCountry.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdCountry.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,UAAU;gBAC5B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,YAAY,CAAC,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKlG,aAAa,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EA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,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,SAAS,CAAC,SAAS,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QACtF,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -22,6 +22,16 @@ export class JDCountry extends JDResource {
22
22
  return yield this.getRelative('/modules/geolocation/countries', params);
23
23
  });
24
24
  }
25
+ paginateContents(_a) {
26
+ return __awaiter(this, arguments, void 0, function* ({ title_en = "", title_mm = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
27
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
28
+ //Addon filters
29
+ params['title.en'] = title_en;
30
+ params['title.mm'] = title_mm;
31
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
32
+ return yield this.getRelative('/modules/geolocation/countries/paginate', params);
33
+ });
34
+ }
25
35
  findCountries(title_1) {
26
36
  return __awaiter(this, arguments, void 0, function* (title, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '') {
27
37
  const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
@@ -39,4 +49,10 @@ export class JDCountry extends JDResource {
39
49
  return yield this.getRelative(`/modules/geolocation/countries/${id}`, {});
40
50
  });
41
51
  }
52
+ updateSingleFields(id_1, _a) {
53
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
54
+ const body = { published, recommended, note };
55
+ return yield this.postRelative(`/modules/geolocation/countries/${id}/update/single_fields`, body);
56
+ });
57
+ }
42
58
  }
@@ -25,7 +25,24 @@ export declare class JDKtvShop extends JDResource {
25
25
  constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
26
26
  setData(data: Record<string, any>): void;
27
27
  getKtvShops(isRecommended?: boolean, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
28
+ paginateKtvShops({ titleEN, titleMM, published, recommended, note, orderBy, order, pageIndex, countPerPage, fields }: {
29
+ titleEN?: string | null;
30
+ titleMM?: string | null;
31
+ published?: boolean | null;
32
+ recommended?: boolean | null;
33
+ note?: string | null;
34
+ orderBy?: string | null;
35
+ order?: string | null;
36
+ pageIndex?: number | null;
37
+ countPerPage?: number | null;
38
+ fields?: string | null;
39
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
28
40
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
29
41
  updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
42
+ updateSingleFields(id: string, { published, recommended, note }: {
43
+ published?: boolean | null;
44
+ recommended?: boolean | null;
45
+ note?: string | null;
46
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
30
47
  }
31
48
  //# sourceMappingURL=jdKtvShop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdKtvShop.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/karaoke/jdKtvShop.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,UAAU;IACxC,UAAU,EAAC,MAAM,CAAM;IACvB,gBAAgB,EAAC,MAAM,CAAK;IAC5B,mBAAmB,EAAC,MAAM,CAAK;IAE/B,SAAS,EAAC,M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+64,18 @@ export class JDKtvShop extends JDResource {
64
64
  return yield this.getRelative('/modules/karaoke/ktv_shops', params);
65
65
  });
66
66
  }
67
+ paginateKtvShops(_a) {
68
+ return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", published = null, recommended = null, note = '', orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
69
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
70
+ //Addon filters
71
+ params['title.en'] = titleEN;
72
+ params['title.mm'] = titleMM;
73
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
74
+ params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
75
+ params['note'] = note;
76
+ return yield this.getRelative('/modules/karaoke/ktv_shops/paginate', params);
77
+ });
78
+ }
67
79
  getInfo(id) {
68
80
  return __awaiter(this, void 0, void 0, function* () {
69
81
  return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
@@ -74,4 +86,10 @@ export class JDKtvShop extends JDResource {
74
86
  return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
75
87
  });
76
88
  }
89
+ updateSingleFields(id_1, _a) {
90
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
91
+ const body = { published, recommended, note };
92
+ return yield this.postRelative(`/modules/karaoke/ktv_shops/${id}/update/single_fields`, body);
93
+ });
94
+ }
77
95
  }
@@ -0,0 +1,84 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JDAlbum extends JDResource {
3
+ albumTypeId: string;
4
+ languageId: string;
5
+ note: string;
6
+ recommended: boolean;
7
+ promoted: boolean;
8
+ downloadable: boolean;
9
+ tracksCount: number;
10
+ validatedTracksCount: number;
11
+ durationSeconds: number;
12
+ releasedYear: number;
13
+ listensCount: number;
14
+ language: Record<string, any>;
15
+ keywords: Record<string, any>;
16
+ albumType: Record<string, any>;
17
+ categoryMusics: any[];
18
+ artists: any[];
19
+ composers: any[];
20
+ bands: any[];
21
+ categoryMusicIds: any[];
22
+ artistIds: any[];
23
+ composerIds: any[];
24
+ bandIds: any[];
25
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
26
+ setData(data: Record<string, any>): void;
27
+ getAlbums({ titleEn, keywordEn, published, recommended, downloadable, languageId, year, orderBy, order, pageIndex, countPerPage, fields }: {
28
+ titleEn?: string | undefined;
29
+ keywordEn?: string | undefined;
30
+ published?: string | undefined;
31
+ recommended?: string | undefined;
32
+ downloadable?: string | undefined;
33
+ languageId?: string | undefined;
34
+ year?: string | undefined;
35
+ orderBy?: string | undefined;
36
+ order?: string | undefined;
37
+ pageIndex?: number | undefined;
38
+ countPerPage?: number | undefined;
39
+ fields?: string | undefined;
40
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
41
+ paginateAlbums({ titleEN, titleMM, keywordsEN, keywordsMM, published, recommended, downloadable, not_validated, languageId, released_year, note, orderBy, order, pageIndex, countPerPage, fields }: {
42
+ titleEN?: string | null;
43
+ titleMM?: string | null;
44
+ keywordsEN?: string | null;
45
+ keywordsMM?: string | null;
46
+ published?: boolean | null;
47
+ recommended?: boolean | null;
48
+ downloadable?: boolean | null;
49
+ not_validated?: boolean | null;
50
+ languageId?: string | null;
51
+ released_year?: number | null;
52
+ note?: string | null;
53
+ orderBy?: string | null;
54
+ order?: string | null;
55
+ pageIndex?: number | null;
56
+ countPerPage?: number | null;
57
+ fields?: string | null;
58
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
59
+ getSongs(albumId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
60
+ orderBy?: string | undefined;
61
+ order?: string | undefined;
62
+ pageIndex?: number | undefined;
63
+ countPerPage?: number | undefined;
64
+ fields?: string | undefined;
65
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
66
+ findAlbums({ title, published, orderBy, order, pageIndex, countPerPage, fields }: {
67
+ title?: string | undefined;
68
+ published?: string | undefined;
69
+ orderBy?: string | undefined;
70
+ order?: string | undefined;
71
+ pageIndex?: number | undefined;
72
+ countPerPage?: number | undefined;
73
+ fields?: string | undefined;
74
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
75
+ getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
76
+ updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
77
+ updateSingleFields(id: string, { published, recommended, downloadable, note }: {
78
+ published?: boolean | null;
79
+ recommended?: boolean | null;
80
+ downloadable?: boolean | null;
81
+ note?: string | null;
82
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
83
+ }
84
+ //# sourceMappingURL=jdAlbum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdAlbum.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdAlbum.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,OAAQ,SAAQ,UAAU;IACtC,WAAW,EAAC,MAAM,CAAM;IACxB,UAAU,EAAC,MAAM,CAAM;IACvB,IAAI,EAAC,MAAM,CAAM;IAEjB,WAAW,EAAC,OAAO,CAAS;IAC5B,QAAQ,EAAC,OAAO,CAAS;IACzB,YAAY,EAAC,OAAO,CAAS;IAE7B,WAAW,EAAC,MAAM,CAAK;IACvB,oBAAoB,EAAC,MAAM,CAAK;IAChC,eAAe,EAAC,MAAM,CAAK;IAC3B,YAAY,EAAC,MAAM,CAAK;IACxB,YAAY,EAAC,MAAM,CAAK;IAExB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACnC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAEpC,cAAc,EAAE,GAAG,EAAE,CAAM;IAC3B,OAAO,EAAE,GAAG,EAAE,CAAM;IACpB,SAAS,EAAE,GA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AAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAuBK,QAAQ,CAAC,OAAO,EAAC,MAAM,EAAG,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;KAAA;IAMlH,UAAU,CAAC,EAAE,KAAU,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAS/H,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,IAAI;IAIlF,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,YAAmB,EAAE,IAAU,EAAC,EAAE;QAC3G,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -0,0 +1,131 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ import { Utils } from "../../../utilities/utils";
12
+ export class JDAlbum extends JDResource {
13
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
14
+ super(connectorInfo);
15
+ this.albumTypeId = "";
16
+ this.languageId = "";
17
+ this.note = "";
18
+ this.recommended = false;
19
+ this.promoted = false;
20
+ this.downloadable = false;
21
+ this.tracksCount = 0;
22
+ this.validatedTracksCount = 0;
23
+ this.durationSeconds = 0;
24
+ this.releasedYear = 0;
25
+ this.listensCount = 0;
26
+ this.language = {};
27
+ this.keywords = {};
28
+ this.albumType = {};
29
+ this.categoryMusics = [];
30
+ this.artists = [];
31
+ this.composers = [];
32
+ this.bands = [];
33
+ this.categoryMusicIds = [];
34
+ this.artistIds = [];
35
+ this.composerIds = [];
36
+ this.bandIds = [];
37
+ this.setData(data);
38
+ }
39
+ setData(data) {
40
+ super.setData(data);
41
+ this.albumTypeId = Utils.getString(data, "album_type_id");
42
+ this.languageId = Utils.getString(data, "language_id");
43
+ this.note = Utils.getString(data, "note");
44
+ this.recommended = Utils.getBoolean(data, "recommended");
45
+ this.promoted = Utils.getBoolean(data, "promoted");
46
+ this.downloadable = Utils.getBoolean(data, "downloadable");
47
+ this.durationSeconds = Utils.getInteger(data, "duration_seconds");
48
+ this.tracksCount = Utils.getInteger(data, "tracks_count");
49
+ this.validatedTracksCount = Utils.getInteger(data, "validated_tracks_count");
50
+ this.releasedYear = Utils.getInteger(data, "released_year");
51
+ this.listensCount = Utils.getInteger(data, "listens_count");
52
+ this.language = Utils.getObject(data, "language");
53
+ this.keywords = Utils.getObject(data, "keywords");
54
+ this.albumType = Utils.getObject(data, "album_type");
55
+ this.categoryMusics = Utils.getArray(data, "category_musics");
56
+ this.artists = Utils.getArray(data, "artists");
57
+ this.composers = Utils.getArray(data, "composers");
58
+ this.bands = Utils.getArray(data, "bands");
59
+ this.categoryMusicIds = Utils.getArray(data, "category_music_ids");
60
+ this.artistIds = Utils.getArray(data, "artist_ids");
61
+ this.composerIds = Utils.getArray(data, "composer_ids");
62
+ this.bandIds = Utils.getArray(data, "band_ids");
63
+ }
64
+ // Filter albums
65
+ getAlbums(_a) {
66
+ return __awaiter(this, arguments, void 0, function* ({ titleEn = "", keywordEn = "", published = "", recommended = "", downloadable = "", languageId = "", year = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
67
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
68
+ //Addon filters
69
+ params['title.en'] = titleEn;
70
+ params['keyword.en'] = keywordEn;
71
+ params['published'] = published;
72
+ params['recommended'] = recommended;
73
+ params['downloadable'] = downloadable;
74
+ params['language_id'] = languageId;
75
+ params['year'] = year;
76
+ return yield this.getRelative('/modules/music/albums', params);
77
+ });
78
+ }
79
+ paginateAlbums(_a) {
80
+ return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, downloadable = null, not_validated = null, languageId = "", released_year = null, note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
81
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
82
+ //Addon filters
83
+ params['title.en'] = titleEN;
84
+ params['title.mm'] = titleMM;
85
+ params['keywords.en'] = keywordsEN;
86
+ params['keywords.mm'] = keywordsMM;
87
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
88
+ params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
89
+ params['downloadable'] = downloadable === null ? '' : downloadable ? 'true' : 'false';
90
+ params['not_validated'] = not_validated === null ? '' : not_validated ? 'true' : 'false';
91
+ params['language_id'] = languageId;
92
+ params['note'] = note;
93
+ params['released_year'] = released_year === null ? '' : released_year;
94
+ // console.log('paginateSongs')
95
+ // console.log(params);
96
+ return yield this.getRelative('/modules/music/albums/paginate', params);
97
+ });
98
+ }
99
+ // Get all the songs for album
100
+ getSongs(albumId_1, _a) {
101
+ return __awaiter(this, arguments, void 0, function* (albumId, { orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
102
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
103
+ return yield this.getRelative(`/modules/music/albums/${albumId}/songs`, params);
104
+ });
105
+ }
106
+ findAlbums(_a) {
107
+ return __awaiter(this, arguments, void 0, function* ({ title = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
108
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
109
+ //Addon filters
110
+ params['title'] = title;
111
+ params['published'] = published;
112
+ return yield this.getRelative('/modules/music/albums/find', params);
113
+ });
114
+ }
115
+ getInfo(id) {
116
+ return __awaiter(this, void 0, void 0, function* () {
117
+ return yield this.getRelative(`/modules/music/albums/${id}`, {});
118
+ });
119
+ }
120
+ updateInfo(id, title, slug, expiryDate) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ return yield this.getRelative(`/modules/music/albums/${id}/update`, {});
123
+ });
124
+ }
125
+ updateSingleFields(id_1, _a) {
126
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, downloadable = null, note = null }) {
127
+ const body = { published, recommended, downloadable, note };
128
+ return yield this.postRelative(`/modules/music/albums/${id}/update/single_fields`, body);
129
+ });
130
+ }
131
+ }
@@ -0,0 +1,75 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JDArtist extends JDResource {
3
+ languageId: string;
4
+ note: string;
5
+ recommended: boolean;
6
+ promoted: boolean;
7
+ listenCount: number;
8
+ albumsCount: number;
9
+ songsCount: number;
10
+ language: Record<string, any>;
11
+ name: Record<string, any>;
12
+ bio: Record<string, any>;
13
+ gender: Record<string, any>;
14
+ keywords: Record<string, any>;
15
+ categoryMusics: any[];
16
+ categoryMusicIds: any[];
17
+ get localisedName(): string;
18
+ get nameEN(): string;
19
+ get nameMM(): string;
20
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
21
+ setData(data: Record<string, any>): void;
22
+ getArtists({ nameEn, keywordEn, published, recommended, downloadable, languageId, year, orderBy, order, pageIndex, countPerPage, fields }: {
23
+ nameEn?: string | undefined;
24
+ keywordEn?: string | undefined;
25
+ published?: string | undefined;
26
+ recommended?: string | undefined;
27
+ downloadable?: string | undefined;
28
+ languageId?: string | undefined;
29
+ year?: string | undefined;
30
+ orderBy?: string | undefined;
31
+ order?: string | undefined;
32
+ pageIndex?: number | undefined;
33
+ countPerPage?: number | undefined;
34
+ fields?: string | undefined;
35
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
36
+ paginateArtists({ nameEN, nameMM, keywordsEN, keywordsMM, published, recommended, languageId, note, orderBy, order, pageIndex, countPerPage, fields }: {
37
+ nameEN?: string | null;
38
+ nameMM?: string | null;
39
+ keywordsEN?: string | null;
40
+ keywordsMM?: string | null;
41
+ published?: boolean | null;
42
+ recommended?: boolean | null;
43
+ languageId?: string | null;
44
+ note?: string | null;
45
+ orderBy?: string | null;
46
+ order?: string | null;
47
+ pageIndex?: number | null;
48
+ countPerPage?: number | null;
49
+ fields?: string | null;
50
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
51
+ getSongs(artistId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
52
+ orderBy?: string | undefined;
53
+ order?: string | undefined;
54
+ pageIndex?: number | undefined;
55
+ countPerPage?: number | undefined;
56
+ fields?: string | undefined;
57
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
58
+ findArtists({ title, published, orderBy, order, pageIndex, countPerPage, fields }: {
59
+ title?: string | undefined;
60
+ published?: string | undefined;
61
+ orderBy?: string | undefined;
62
+ order?: string | undefined;
63
+ pageIndex?: number | undefined;
64
+ countPerPage?: number | undefined;
65
+ fields?: string | undefined;
66
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
67
+ getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
68
+ updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
69
+ updateSingleFields(id: string, { published, recommended, note }: {
70
+ published?: boolean | null;
71
+ recommended?: boolean | null;
72
+ note?: string | null;
73
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
74
+ }
75
+ //# sourceMappingURL=jdArtist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdArtist.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdArtist.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,QAAS,SAAQ,UAAU;IACvC,UAAU,EAAC,MAAM,CAAM;IACvB,IAAI,EAAC,MAAM,CAAM;IAEjB,WAAW,EAAC,OAAO,CAAS;IAC5B,QAAQ,EAAC,OAAO,CAAS;IAEzB,WAAW,EAAC,MAAM,CAAK;IACvB,WAAW,EAAC,MAAM,CAAK;IACvB,UAAU,EAAC,MAAM,CAAK;IAEtB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACnC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC9B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACjC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAEnC,cAAc,EAAE,GAAG,EAAE,CAAM;IAC3B,gBAAgB,EAAE,GAAG,EAAE,CAAM;IAE7B,IAA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,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAoBK,QAAQ,CAAC,QAAQ,EAAC,MAAM,EAAG,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;KAAA;IAMnH,WAAW,CAAC,EAAE,KAAU,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAShI,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,IAAI;IAIlF,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QACtF,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -0,0 +1,115 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ import { Utils } from "../../../utilities/utils";
12
+ export class JDArtist extends JDResource {
13
+ get localisedName() { return globalThis.language == 'mm' ? this.nameEN : this.nameMM; }
14
+ get nameEN() { return Utils.getString(this.title, 'en'); }
15
+ get nameMM() { return Utils.getString(this.title, 'mm'); }
16
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
17
+ super(connectorInfo);
18
+ this.languageId = "";
19
+ this.note = "";
20
+ this.recommended = false;
21
+ this.promoted = false;
22
+ this.listenCount = 0;
23
+ this.albumsCount = 0;
24
+ this.songsCount = 0;
25
+ this.language = {};
26
+ this.name = {};
27
+ this.bio = {};
28
+ this.gender = {};
29
+ this.keywords = {};
30
+ this.categoryMusics = [];
31
+ this.categoryMusicIds = [];
32
+ this.setData(data);
33
+ }
34
+ setData(data) {
35
+ super.setData(data);
36
+ this.languageId = Utils.getString(data, "language_id");
37
+ this.note = Utils.getString(data, "note");
38
+ this.recommended = Utils.getBoolean(data, "recommended");
39
+ this.promoted = Utils.getBoolean(data, "promoted");
40
+ this.listenCount = Utils.getInteger(data, "listen_Count");
41
+ this.albumsCount = Utils.getInteger(data, "albums_count");
42
+ this.songsCount = Utils.getInteger(data, "songs_count");
43
+ this.language = Utils.getObject(data, "language_info");
44
+ this.name = Utils.getObject(data, "name");
45
+ this.bio = Utils.getObject(data, "bio");
46
+ this.gender = Utils.getObject(data, "gender");
47
+ this.keywords = Utils.getObject(data, "keywords");
48
+ this.categoryMusics = Utils.getArray(data, "category_musics");
49
+ this.categoryMusicIds = Utils.getArray(data, "category_music_ids");
50
+ }
51
+ // Filter artists
52
+ getArtists(_a) {
53
+ return __awaiter(this, arguments, void 0, function* ({ nameEn = "", keywordEn = "", published = "", recommended = "", downloadable = "", languageId = "", year = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
54
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
55
+ //Addon filters
56
+ params['name.en'] = nameEn;
57
+ params['keyword.en'] = keywordEn;
58
+ params['published'] = published;
59
+ params['recommended'] = recommended;
60
+ params['downloadable'] = downloadable;
61
+ params['language_id'] = languageId;
62
+ params['year'] = year;
63
+ return yield this.getRelative('/modules/music/artists', params);
64
+ });
65
+ }
66
+ paginateArtists(_a) {
67
+ return __awaiter(this, arguments, void 0, function* ({ nameEN = "", nameMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, languageId = "", note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
68
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
69
+ //Addon filters
70
+ params['name.en'] = nameEN;
71
+ params['name.mm'] = nameMM;
72
+ params['keywords.en'] = keywordsEN;
73
+ params['keywords.mm'] = keywordsMM;
74
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
75
+ params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
76
+ params['language_id'] = languageId;
77
+ params['note'] = note;
78
+ // console.log('paginateSongs')
79
+ // console.log(params);
80
+ return yield this.getRelative('/modules/music/artists/paginate', params);
81
+ });
82
+ }
83
+ // Get all the songs for artist
84
+ getSongs(artistId_1, _a) {
85
+ return __awaiter(this, arguments, void 0, function* (artistId, { orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
86
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
87
+ return yield this.getRelative(`/modules/music/artists/${artistId}/songs`, params);
88
+ });
89
+ }
90
+ findArtists(_a) {
91
+ return __awaiter(this, arguments, void 0, function* ({ title = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
92
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
93
+ //Addon filters
94
+ params['title'] = title;
95
+ params['published'] = published;
96
+ return yield this.getRelative('/modules/music/artists/find', params);
97
+ });
98
+ }
99
+ getInfo(id) {
100
+ return __awaiter(this, void 0, void 0, function* () {
101
+ return yield this.getRelative(`/modules/music/artists/${id}`, {});
102
+ });
103
+ }
104
+ updateInfo(id, title, slug, expiryDate) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ return yield this.getRelative(`/modules/music/artists/${id}/update`, {});
107
+ });
108
+ }
109
+ updateSingleFields(id_1, _a) {
110
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
111
+ const body = { published, recommended, note };
112
+ return yield this.postRelative(`/modules/music/artists/${id}/update/single_fields`, body);
113
+ });
114
+ }
115
+ }