jd_platform_sdk 0.1.0 → 0.1.2
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/index.js +28 -44
- package/dist/sdk/configs/jdConfig.js +1 -5
- package/dist/sdk/jdConnector.js +72 -63
- package/dist/sdk/jdSdk.js +1 -5
- package/dist/sdk/models/jdApplication.d.ts +1 -1
- package/dist/sdk/models/jdApplication.d.ts.map +1 -1
- package/dist/sdk/models/jdApplication.js +63 -71
- package/dist/sdk/models/jdResource.d.ts +2 -2
- package/dist/sdk/models/jdResource.d.ts.map +1 -1
- package/dist/sdk/models/jdResource.js +104 -91
- package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +15 -31
- package/dist/sdk/models/modules/geolocation/jdCity.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCity.js +49 -55
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCountry.js +47 -53
- package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdDistrict.js +49 -57
- package/dist/sdk/models/modules/geolocation/jdState.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdState.js +49 -55
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +5 -6
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
- package/dist/sdk/models/modules/karaoke/jdKtvShop.js +75 -89
- package/dist/sdk/models/modules/music/jdAlbum.d.ts +2 -2
- package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdAlbum.js +96 -102
- package/dist/sdk/models/modules/music/jdArtist.d.ts +2 -5
- package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdArtist.js +79 -90
- package/dist/sdk/models/modules/music/jdComposer.d.ts +2 -4
- package/dist/sdk/models/modules/music/jdComposer.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdComposer.js +79 -87
- package/dist/sdk/models/modules/music/jdMusicCombinations.js +15 -31
- package/dist/sdk/models/modules/music/jdSong.d.ts +1 -1
- package/dist/sdk/models/modules/music/jdSong.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdSong.js +105 -113
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +4 -5
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -1
- package/dist/sdk/models/modules/radio_station/jdRadioStation.js +75 -89
- package/dist/sdk/models/modules/user/jdPermission.d.ts +1 -2
- package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermission.js +53 -63
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +4 -6
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermissionGroup.js +48 -60
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdSessionUser.js +70 -72
- package/dist/sdk/models/modules/user/jdUser.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUser.js +73 -75
- package/dist/sdk/models/modules/user/jdUserRole.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUserRole.js +50 -54
- package/dist/sdk/utilities/browserUtils.d.ts.map +1 -1
- package/dist/sdk/utilities/browserUtils.js +31 -24
- package/dist/sdk/utilities/cryptoUtils.js +6 -13
- package/dist/sdk/utilities/dateUtils.js +1 -5
- package/dist/sdk/utilities/globalEventHandler.js +4 -5
- package/dist/sdk/utilities/stringUtils.js +2 -6
- package/dist/sdk/utilities/utils.d.ts.map +1 -1
- package/dist/sdk/utilities/utils.js +19 -22
- package/package.json +1 -1
|
@@ -1,103 +1,95 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
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
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const utils_1 = require("../../../utilities/utils");
|
|
29
|
-
class JDComposer extends jdResource_1.default {
|
|
30
|
-
languageId = "";
|
|
31
|
-
note = "";
|
|
32
|
-
recommended = false;
|
|
33
|
-
promoted = false;
|
|
34
|
-
listenCount = 0;
|
|
35
|
-
albumsCount = 0;
|
|
36
|
-
songsCount = 0;
|
|
37
|
-
languageInfo = {};
|
|
38
|
-
name = {};
|
|
39
|
-
bio = {};
|
|
40
|
-
gender = {};
|
|
41
|
-
keywords = {};
|
|
42
|
-
albumIds = [];
|
|
43
|
-
songIds = [];
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
import { Utils } from "../../../utilities/utils";
|
|
12
|
+
export class JDComposer extends JDResource {
|
|
44
13
|
get localisedName() { return globalThis.language == 'mm' ? this.nameEN : this.nameMM; }
|
|
45
|
-
get nameEN() { return
|
|
46
|
-
get nameMM() { return
|
|
47
|
-
constructor(data = {}, connectorInfo = new
|
|
14
|
+
get nameEN() { return Utils.getString(this.title, 'en'); }
|
|
15
|
+
get nameMM() { return Utils.getString(this.title, 'mm'); }
|
|
16
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
48
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.languageInfo = {};
|
|
26
|
+
this.name = {};
|
|
27
|
+
this.bio = {};
|
|
28
|
+
this.gender = {};
|
|
29
|
+
this.keywords = {};
|
|
30
|
+
this.albumIds = [];
|
|
31
|
+
this.songIds = [];
|
|
49
32
|
this.setData(data);
|
|
50
33
|
}
|
|
51
34
|
setData(data) {
|
|
52
35
|
super.setData(data);
|
|
53
|
-
this.languageId =
|
|
54
|
-
this.note =
|
|
55
|
-
this.recommended =
|
|
56
|
-
this.promoted =
|
|
57
|
-
this.listenCount =
|
|
58
|
-
this.albumsCount =
|
|
59
|
-
this.songsCount =
|
|
60
|
-
this.languageInfo =
|
|
61
|
-
this.name =
|
|
62
|
-
this.bio =
|
|
63
|
-
this.gender =
|
|
64
|
-
this.keywords =
|
|
65
|
-
this.albumIds =
|
|
66
|
-
this.songIds =
|
|
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.languageInfo = 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.albumIds = Utils.getArray(data, "category_musics");
|
|
49
|
+
this.songIds = Utils.getArray(data, "category_music_ids");
|
|
67
50
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
51
|
+
getContents() {
|
|
52
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
53
|
+
const queryParams = this.getSortParameters(params);
|
|
54
|
+
return yield this.getRelative('/modules/music/composers', queryParams);
|
|
55
|
+
});
|
|
71
56
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
queryParams['name.mm'] = params.nameMM;
|
|
80
|
-
return await this.getRelative('/modules/music/composers/paginate', queryParams);
|
|
57
|
+
paginateContents() {
|
|
58
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
59
|
+
const queryParams = this.getSortParameters(params);
|
|
60
|
+
if (params.language_id)
|
|
61
|
+
queryParams['language_id'] = params.language_id;
|
|
62
|
+
return yield this.getRelative('/modules/music/composers/paginate', queryParams);
|
|
63
|
+
});
|
|
81
64
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
65
|
+
findContents() {
|
|
66
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
67
|
+
const queryParams = this.getSortParameters(params);
|
|
68
|
+
if (params.name)
|
|
69
|
+
queryParams['name'] = params.name;
|
|
70
|
+
return yield this.getRelative('/modules/music/composers/find', queryParams);
|
|
71
|
+
});
|
|
87
72
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
73
|
+
getSongs(composerId_1) {
|
|
74
|
+
return __awaiter(this, arguments, void 0, function* (composerId, params = {}) {
|
|
75
|
+
const queryParams = this.getSortParameters(params);
|
|
76
|
+
return yield this.getRelative(`/modules/music/composers/${composerId}/songs`, queryParams);
|
|
77
|
+
});
|
|
91
78
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
getAlbums(composerId_1) {
|
|
80
|
+
return __awaiter(this, arguments, void 0, function* (composerId, params = {}) {
|
|
81
|
+
const queryParams = this.getSortParameters(params);
|
|
82
|
+
return yield this.getRelative(`/modules/music/composers/${composerId}/albums`, queryParams);
|
|
83
|
+
});
|
|
95
84
|
}
|
|
96
|
-
|
|
97
|
-
return
|
|
85
|
+
getInfo(id) {
|
|
86
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
87
|
+
return yield this.getRelative(`/modules/music/composers/${id}`, {});
|
|
88
|
+
});
|
|
98
89
|
}
|
|
99
|
-
|
|
100
|
-
return
|
|
90
|
+
updateFields(id_1) {
|
|
91
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
92
|
+
return yield this.postRelative(`/modules/music/composers/${id}/update/single_fields`, body);
|
|
93
|
+
});
|
|
101
94
|
}
|
|
102
95
|
}
|
|
103
|
-
exports.JDComposer = JDComposer;
|
|
@@ -1,37 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
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
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class JdMusicCombinations extends jdResource_1.default {
|
|
29
|
-
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
export class JdMusicCombinations extends JDResource {
|
|
12
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
30
13
|
super(connectorInfo);
|
|
31
14
|
this.setData(data);
|
|
32
15
|
}
|
|
33
|
-
|
|
34
|
-
return
|
|
16
|
+
getOverview() {
|
|
17
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
+
return yield this.getRelative('/modules/music/combinations/overview', {});
|
|
19
|
+
});
|
|
35
20
|
}
|
|
36
21
|
}
|
|
37
|
-
exports.JdMusicCombinations = JdMusicCombinations;
|
|
@@ -31,7 +31,7 @@ export declare class JDSong extends JDResource {
|
|
|
31
31
|
setData(data: Record<string, any>): void;
|
|
32
32
|
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
33
33
|
paginateContents(params?: PaginateParams & {
|
|
34
|
-
|
|
34
|
+
language_id?: string | null;
|
|
35
35
|
recommended?: boolean | null;
|
|
36
36
|
downloadable?: boolean | null;
|
|
37
37
|
has_lyrics?: boolean | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jdSong.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdSong.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,MAAO,SAAQ,UAAU;IACrC,OAAO,EAAC,MAAM,CAAM;IACpB,YAAY,EAAC,MAAM,CAAM;IACzB,UAAU,EAAC,MAAM,CAAM;IACvB,QAAQ,EAAC,MAAM,CAAM;IACrB,IAAI,EAAC,MAAM,CAAM;IAEjB,SAAS,EAAC,OAAO,CAAS;IAC1B,UAAU,EAAC,OAAO,CAAS;IAC3B,WAAW,EAAC,OAAO,CAAS;IAC5B,QAAQ,EAAC,OAAO,CAAS;IACzB,YAAY,EAAC,OAAO,CAAS;IAE7B,eAAe,EAAC,MAAM,CAAK;IAC3B,aAAa,EAAC,MAAM,CAAK;IACzB,WAAW,EAAC,MAAM,CAAK;IACvB,YAAY,EAAC,MAAM,CAAK;IAEx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G;QAAE,WAAW,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAavP,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;KAAO;IAM9D,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -1,126 +1,118 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
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
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class JDSong extends jdResource_1.default {
|
|
30
|
-
albumId = "";
|
|
31
|
-
mainArtistId = "";
|
|
32
|
-
languageId = "";
|
|
33
|
-
isrcCode = "";
|
|
34
|
-
note = "";
|
|
35
|
-
hasLyrics = false;
|
|
36
|
-
hasKaraoke = false;
|
|
37
|
-
recommended = false;
|
|
38
|
-
promoted = false;
|
|
39
|
-
downloadable = false;
|
|
40
|
-
durationSeconds = 0;
|
|
41
|
-
channelsCount = 0;
|
|
42
|
-
tracksCount = 0;
|
|
43
|
-
releasedYear = 0;
|
|
44
|
-
keywords = {};
|
|
45
|
-
cdnStorage = {};
|
|
46
|
-
songValidation = {};
|
|
47
|
-
album = {};
|
|
48
|
-
mainArtist = {};
|
|
49
|
-
language = {};
|
|
50
|
-
checksums = {};
|
|
51
|
-
artists = [];
|
|
52
|
-
composers = [];
|
|
53
|
-
bands = [];
|
|
54
|
-
artistIds = [];
|
|
55
|
-
composerIds = [];
|
|
56
|
-
bandIds = [];
|
|
57
|
-
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
import { Utils } from "../../../utilities/utils";
|
|
12
|
+
export class JDSong extends JDResource {
|
|
13
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
58
14
|
super(connectorInfo);
|
|
15
|
+
this.albumId = "";
|
|
16
|
+
this.mainArtistId = "";
|
|
17
|
+
this.languageId = "";
|
|
18
|
+
this.isrcCode = "";
|
|
19
|
+
this.note = "";
|
|
20
|
+
this.hasLyrics = false;
|
|
21
|
+
this.hasKaraoke = false;
|
|
22
|
+
this.recommended = false;
|
|
23
|
+
this.promoted = false;
|
|
24
|
+
this.downloadable = false;
|
|
25
|
+
this.durationSeconds = 0;
|
|
26
|
+
this.channelsCount = 0;
|
|
27
|
+
this.tracksCount = 0;
|
|
28
|
+
this.releasedYear = 0;
|
|
29
|
+
this.keywords = {};
|
|
30
|
+
this.cdnStorage = {};
|
|
31
|
+
this.songValidation = {};
|
|
32
|
+
this.album = {};
|
|
33
|
+
this.mainArtist = {};
|
|
34
|
+
this.language = {};
|
|
35
|
+
this.checksums = {};
|
|
36
|
+
this.artists = [];
|
|
37
|
+
this.composers = [];
|
|
38
|
+
this.bands = [];
|
|
39
|
+
this.artistIds = [];
|
|
40
|
+
this.composerIds = [];
|
|
41
|
+
this.bandIds = [];
|
|
59
42
|
this.setData(data);
|
|
60
43
|
}
|
|
61
44
|
setData(data) {
|
|
62
45
|
super.setData(data);
|
|
63
|
-
this.albumId =
|
|
64
|
-
this.mainArtistId =
|
|
65
|
-
this.languageId =
|
|
66
|
-
this.isrcCode =
|
|
67
|
-
this.note =
|
|
68
|
-
this.hasLyrics =
|
|
69
|
-
this.hasKaraoke =
|
|
70
|
-
this.recommended =
|
|
71
|
-
this.promoted =
|
|
72
|
-
this.downloadable =
|
|
73
|
-
this.durationSeconds =
|
|
74
|
-
this.channelsCount =
|
|
75
|
-
this.tracksCount =
|
|
76
|
-
this.releasedYear =
|
|
77
|
-
this.keywords =
|
|
78
|
-
this.cdnStorage =
|
|
79
|
-
this.songValidation =
|
|
80
|
-
this.album =
|
|
81
|
-
this.mainArtist =
|
|
82
|
-
this.language =
|
|
83
|
-
this.checksums =
|
|
84
|
-
this.artists =
|
|
85
|
-
this.composers =
|
|
86
|
-
this.bands =
|
|
87
|
-
this.artistIds =
|
|
88
|
-
this.composerIds =
|
|
89
|
-
this.bandIds =
|
|
46
|
+
this.albumId = Utils.getString(data, "album_id");
|
|
47
|
+
this.mainArtistId = Utils.getString(data, "main_artist_id");
|
|
48
|
+
this.languageId = Utils.getString(data, "language_id");
|
|
49
|
+
this.isrcCode = Utils.getString(data, "isrc_code");
|
|
50
|
+
this.note = Utils.getString(data, "note");
|
|
51
|
+
this.hasLyrics = Utils.getBoolean(data, "has_lyrics");
|
|
52
|
+
this.hasKaraoke = Utils.getBoolean(data, "has_karaoke");
|
|
53
|
+
this.recommended = Utils.getBoolean(data, "recommended");
|
|
54
|
+
this.promoted = Utils.getBoolean(data, "promoted");
|
|
55
|
+
this.downloadable = Utils.getBoolean(data, "downloadable");
|
|
56
|
+
this.durationSeconds = Utils.getInteger(data, "duration_seconds");
|
|
57
|
+
this.channelsCount = Utils.getInteger(data, "channels_count");
|
|
58
|
+
this.tracksCount = Utils.getInteger(data, "tracks_count");
|
|
59
|
+
this.releasedYear = Utils.getInteger(data, "released_year");
|
|
60
|
+
this.keywords = Utils.getObject(data, "keywords");
|
|
61
|
+
this.cdnStorage = Utils.getObject(data, "cdn_storage");
|
|
62
|
+
this.songValidation = Utils.getObject(data, "song_validation");
|
|
63
|
+
this.album = Utils.getObject(data, "album");
|
|
64
|
+
this.mainArtist = Utils.getObject(data, "main_artist");
|
|
65
|
+
this.language = Utils.getObject(data, "language");
|
|
66
|
+
this.checksums = Utils.getObject(data, "checksums");
|
|
67
|
+
this.artists = Utils.getArray(data, "artists");
|
|
68
|
+
this.composers = Utils.getArray(data, "composers");
|
|
69
|
+
this.bands = Utils.getArray(data, "bands");
|
|
70
|
+
this.artistIds = Utils.getArray(data, "artist_ids");
|
|
71
|
+
this.composerIds = Utils.getArray(data, "composer_ids");
|
|
72
|
+
this.bandIds = Utils.getArray(data, "band_ids");
|
|
90
73
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
74
|
+
getContents() {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
76
|
+
const queryParams = this.getSortParameters(params);
|
|
77
|
+
return yield this.getRelative('/modules/music/songs', queryParams);
|
|
78
|
+
});
|
|
94
79
|
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
80
|
+
paginateContents() {
|
|
81
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
82
|
+
const queryParams = this.getSortParameters(params);
|
|
83
|
+
if (params.language_id)
|
|
84
|
+
queryParams['language_id'] = params.language_id;
|
|
85
|
+
if (params.recommended)
|
|
86
|
+
queryParams['recommended'] = params.recommended;
|
|
87
|
+
if (params.downloadable)
|
|
88
|
+
queryParams['downloadable'] = params.downloadable;
|
|
89
|
+
if (params.has_lyrics)
|
|
90
|
+
queryParams['has_lyrics'] = params.has_lyrics;
|
|
91
|
+
if (params.has_karaoke)
|
|
92
|
+
queryParams['has_karaoke'] = params.has_karaoke;
|
|
93
|
+
if (params.wrong_tracks)
|
|
94
|
+
queryParams['wrong_tracks'] = params.wrong_tracks;
|
|
95
|
+
if (params.released_year)
|
|
96
|
+
queryParams['released_year'] = params.released_year;
|
|
97
|
+
return yield this.getRelative('/modules/music/songs/paginate', queryParams);
|
|
98
|
+
});
|
|
112
99
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
findContents() {
|
|
101
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
102
|
+
const queryParams = this.getSortParameters(params);
|
|
103
|
+
if (params.title)
|
|
104
|
+
queryParams['name'] = params.title;
|
|
105
|
+
return yield this.getRelative('/modules/music/songs/find', queryParams);
|
|
106
|
+
});
|
|
118
107
|
}
|
|
119
|
-
|
|
120
|
-
return
|
|
108
|
+
getInfo(id) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
return yield this.getRelative(`/modules/music/songs/${id}`, {});
|
|
111
|
+
});
|
|
121
112
|
}
|
|
122
|
-
|
|
123
|
-
return
|
|
113
|
+
updateFields(id_1) {
|
|
114
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
115
|
+
return yield this.postRelative(`/modules/music/composers/${id}/update/single_fields`, body);
|
|
116
|
+
});
|
|
124
117
|
}
|
|
125
118
|
}
|
|
126
|
-
exports.JDSong = JDSong;
|
|
@@ -26,17 +26,16 @@ export declare class JdRadioStation extends JDResource {
|
|
|
26
26
|
setData(data: Record<string, any>): void;
|
|
27
27
|
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
28
28
|
paginateContents(params?: PaginateParams & {
|
|
29
|
-
name?: string;
|
|
30
|
-
|
|
31
|
-
published?: string;
|
|
29
|
+
name?: string | null;
|
|
30
|
+
guard_name?: string | null;
|
|
32
31
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
33
32
|
findContents(params?: PaginateParams & {
|
|
34
|
-
name?: string;
|
|
33
|
+
name?: string | null;
|
|
35
34
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
36
35
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
37
|
-
updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
38
36
|
updateFields(id: string, body?: UpdateFields & {
|
|
39
37
|
recommended?: boolean | null;
|
|
38
|
+
expiry_date?: Date | null;
|
|
40
39
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
41
40
|
}
|
|
42
41
|
//# sourceMappingURL=jdRadioStation.d.ts.map
|
|
@@ -1 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