jd_platform_sdk 0.0.8 → 0.1.1
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/sdk/models/jdApplication.d.ts +10 -4
- package/dist/sdk/models/jdApplication.d.ts.map +1 -1
- package/dist/sdk/models/jdApplication.js +30 -12
- package/dist/sdk/models/jdResource.d.ts +44 -1
- package/dist/sdk/models/jdResource.d.ts.map +1 -1
- package/dist/sdk/models/jdResource.js +60 -19
- package/dist/sdk/models/modules/geolocation/jdCity.d.ts +8 -4
- package/dist/sdk/models/modules/geolocation/jdCity.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCity.js +26 -12
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +7 -18
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCountry.js +20 -22
- package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts +7 -3
- package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdDistrict.js +22 -8
- package/dist/sdk/models/modules/geolocation/jdState.d.ts +8 -4
- package/dist/sdk/models/modules/geolocation/jdState.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdState.js +26 -12
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +10 -16
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
- package/dist/sdk/models/modules/karaoke/jdKtvShop.js +25 -20
- package/dist/sdk/models/modules/music/jdAlbum.d.ts +8 -50
- package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdAlbum.js +30 -51
- package/dist/sdk/models/modules/music/jdArtist.d.ts +9 -47
- package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdArtist.js +32 -43
- package/dist/sdk/models/modules/music/jdComposer.d.ts +9 -49
- package/dist/sdk/models/modules/music/jdComposer.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdComposer.js +32 -48
- package/dist/sdk/models/modules/music/jdSong.d.ts +11 -51
- package/dist/sdk/models/modules/music/jdSong.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdSong.js +31 -57
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +10 -16
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -1
- package/dist/sdk/models/modules/radio_station/jdRadioStation.js +25 -20
- package/dist/sdk/models/modules/user/jdPermission.d.ts +7 -33
- package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermission.js +22 -41
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +11 -39
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermissionGroup.js +30 -30
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts +15 -2
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdSessionUser.js +30 -4
- package/dist/sdk/models/modules/user/jdUser.d.ts +7 -17
- package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUser.js +28 -27
- package/dist/sdk/models/modules/user/jdUserRole.d.ts +7 -43
- package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUserRole.js +26 -32
- package/package.json +1 -1
|
@@ -24,22 +24,31 @@ export class JDState extends JDResource {
|
|
|
24
24
|
this.countryId = Utils.getString(data, "country_id");
|
|
25
25
|
this.country = Utils.getObject(data, "country");
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
29
|
-
const
|
|
30
|
-
return yield this.getRelative('/modules/geolocation/states',
|
|
27
|
+
getContents() {
|
|
28
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
29
|
+
const queryParams = this.getSortParameters(params);
|
|
30
|
+
return yield this.getRelative('/modules/geolocation/states', queryParams);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
35
|
-
const
|
|
36
|
-
|
|
33
|
+
paginateContents() {
|
|
34
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
35
|
+
const queryParams = this.getSortParameters(params);
|
|
36
|
+
if (params.name)
|
|
37
|
+
queryParams['name'] = params.name;
|
|
38
|
+
return yield this.getRelative('/modules/geolocation/states/paginate', queryParams);
|
|
37
39
|
});
|
|
38
40
|
}
|
|
39
|
-
|
|
40
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
41
|
-
const
|
|
42
|
-
|
|
41
|
+
findContents(title_1) {
|
|
42
|
+
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
43
|
+
const queryParams = this.getSortParameters(params);
|
|
44
|
+
queryParams['title'] = title;
|
|
45
|
+
return yield this.getRelative('/modules/geolocation/states/find', queryParams);
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
getCities(countryId_1) {
|
|
49
|
+
return __awaiter(this, arguments, void 0, function* (countryId, params = {}) {
|
|
50
|
+
const queryParams = this.getSortParameters(params);
|
|
51
|
+
return yield this.getRelative(`/modules/geolocation/states/${countryId}/cities`, queryParams);
|
|
43
52
|
});
|
|
44
53
|
}
|
|
45
54
|
getInfo(id) {
|
|
@@ -47,4 +56,9 @@ export class JDState extends JDResource {
|
|
|
47
56
|
return yield this.getRelative(`/modules/geolocation/states/${id}`, {});
|
|
48
57
|
});
|
|
49
58
|
}
|
|
59
|
+
updateFields(id_1) {
|
|
60
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
61
|
+
return yield this.postRelative(`/modules/geolocation/states/${id}/update/single_fields`, body);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
50
64
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
1
|
+
import JDResource, { ConnectorInfo, defaultSortParams, PaginateParams, UpdateFields } from "../../jdResource";
|
|
2
2
|
export declare class JDKtvShop extends JDResource {
|
|
3
3
|
licenseKey: string;
|
|
4
4
|
activationsCount: number;
|
|
@@ -24,25 +24,19 @@ export declare class JDKtvShop extends JDResource {
|
|
|
24
24
|
expiryDate: Date;
|
|
25
25
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
26
26
|
setData(data: Record<string, any>): void;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
published?:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
order?: string | null;
|
|
36
|
-
pageIndex?: number | null;
|
|
37
|
-
countPerPage?: number | null;
|
|
38
|
-
fields?: string | null;
|
|
27
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
28
|
+
paginateContents(params?: PaginateParams & {
|
|
29
|
+
name?: string;
|
|
30
|
+
guardName?: string;
|
|
31
|
+
published?: string;
|
|
32
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
33
|
+
findContents(params?: PaginateParams & {
|
|
34
|
+
name?: string;
|
|
39
35
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
40
36
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
41
37
|
updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
42
|
-
updateSingleFields(id: string,
|
|
43
|
-
published?: boolean | null;
|
|
38
|
+
updateSingleFields(id: string, body?: UpdateFields & {
|
|
44
39
|
recommended?: boolean | null;
|
|
45
|
-
note?: string | null;
|
|
46
40
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
47
41
|
}
|
|
48
42
|
//# 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;
|
|
1
|
+
{"version":3,"file":"jdKtvShop.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/karaoke/jdKtvShop.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAE5G,qBAAa,SAAU,SAAQ,UAAU;IACxC,UAAU,EAAC,MAAM,CAAM;IACvB,gBAAgB,EAAC,MAAM,CAAK;IAC5B,mBAAmB,EAAC,MAAM,CAAK;IAE/B,SAAS,EAAC,MAAM,CAAM;IACtB,OAAO,EAAC,MAAM,CAAM;IACpB,MAAM,EAAC,MAAM,CAAM;IACnB,UAAU,EAAC,MAAM,CAAM;IAEvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAEnC,IAAI,gBAAgB,IAAG,MAAM,CAG5B;IAED,IAAI,cAAc,IAAG,MAAM,CAAyE;IACpG,IAAI,cAAc,IAAG,MAAM,CAAyE;IAEpG,IAAI,YAAY,IAAG,MAAM,CAAuE;IAChG,IAAI,YAAY,IAAG,MAAM,CAAuE;IAEhG,IAAI,WAAW,IAAG,MAAM,CAAsE;IAC9F,IAAI,WAAW,IAAG,MAAM,CAAsE;IAE9F,IAAI,eAAe,IAAG,MAAM,CAA0E;IACtG,IAAI,eAAe,IAAG,MAAM,CAA0E;IAEtG,UAAU,EAAC,IAAI,CAAc;gBAEjB,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAqB1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;KAAO;IAWzG,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;KAAO;IAM7D,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,IAAI,GAAE,YAAY,GAAI;QAAE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;KAAM;CAG/F"}
|
|
@@ -55,25 +55,31 @@ export class JDKtvShop extends JDResource {
|
|
|
55
55
|
this.district = Utils.getObject(data, "district");
|
|
56
56
|
this.expiryDate = Utils.getDate(data, "expiry_date");
|
|
57
57
|
}
|
|
58
|
-
|
|
59
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
60
|
-
const
|
|
61
|
-
|
|
62
|
-
params['recommended'] = isRecommended ? 'true' : 'false';
|
|
63
|
-
}
|
|
64
|
-
return yield this.getRelative('/modules/karaoke/ktv_shops', params);
|
|
58
|
+
getContents() {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
60
|
+
const queryParams = this.getSortParameters(params);
|
|
61
|
+
return yield this.getRelative(`/modules/karaoke/ktv_shops`, queryParams);
|
|
65
62
|
});
|
|
66
63
|
}
|
|
67
|
-
|
|
68
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
69
|
-
const
|
|
70
|
-
//
|
|
71
|
-
params
|
|
72
|
-
|
|
73
|
-
params
|
|
74
|
-
|
|
75
|
-
params
|
|
76
|
-
|
|
64
|
+
paginateContents() {
|
|
65
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
66
|
+
const queryParams = this.getSortParameters(params);
|
|
67
|
+
// Add custom filters
|
|
68
|
+
if (params.name)
|
|
69
|
+
queryParams['name'] = params.name;
|
|
70
|
+
if (params.guardName)
|
|
71
|
+
queryParams['guard_name'] = params.guardName;
|
|
72
|
+
if (params.published)
|
|
73
|
+
queryParams['published'] = params.published;
|
|
74
|
+
return yield this.getRelative('/modules/karaoke/ktv_shops/paginate', queryParams);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
findContents() {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
79
|
+
const queryParams = this.getSortParameters(params);
|
|
80
|
+
if (params.name)
|
|
81
|
+
queryParams['name'] = params.name;
|
|
82
|
+
return yield this.getRelative('/modules/karaoke/ktv_shops/find', queryParams);
|
|
77
83
|
});
|
|
78
84
|
}
|
|
79
85
|
getInfo(id) {
|
|
@@ -86,9 +92,8 @@ export class JDKtvShop extends JDResource {
|
|
|
86
92
|
return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
|
|
87
93
|
});
|
|
88
94
|
}
|
|
89
|
-
updateSingleFields(id_1
|
|
90
|
-
return __awaiter(this, arguments, void 0, function* (id,
|
|
91
|
-
const body = { published, recommended, note };
|
|
95
|
+
updateSingleFields(id_1) {
|
|
96
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
92
97
|
return yield this.postRelative(`/modules/karaoke/ktv_shops/${id}/update/single_fields`, body);
|
|
93
98
|
});
|
|
94
99
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
1
|
+
import JDResource, { ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
2
|
export declare class JDAlbum extends JDResource {
|
|
3
3
|
albumTypeId: string;
|
|
4
4
|
languageId: string;
|
|
@@ -24,61 +24,19 @@ export declare class JDAlbum extends JDResource {
|
|
|
24
24
|
bandIds: any[];
|
|
25
25
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
26
26
|
setData(data: Record<string, any>): void;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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;
|
|
27
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
28
|
+
paginateContents(params?: PaginateParams & {
|
|
29
|
+
languageId?: string | null;
|
|
47
30
|
recommended?: boolean | null;
|
|
48
31
|
downloadable?: boolean | null;
|
|
49
32
|
not_validated?: boolean | null;
|
|
50
|
-
languageId?: string | null;
|
|
51
33
|
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
34
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
66
|
-
|
|
67
|
-
title?: string
|
|
68
|
-
published?: string | undefined;
|
|
69
|
-
orderBy?: string | undefined;
|
|
70
|
-
order?: string | undefined;
|
|
71
|
-
pageIndex?: number | undefined;
|
|
72
|
-
countPerPage?: number | undefined;
|
|
73
|
-
fields?: string | undefined;
|
|
35
|
+
findContents(params?: PaginateParams & {
|
|
36
|
+
title?: string;
|
|
74
37
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
38
|
+
getSongs(albumId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
75
39
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
76
|
-
|
|
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>;
|
|
40
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
83
41
|
}
|
|
84
42
|
//# sourceMappingURL=jdAlbum.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"jdAlbum.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdAlbum.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,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,GAAG,EAAE,CAAM;IACtB,KAAK,EAAE,GAAG,EAAE,CAAM;IAElB,gBAAgB,EAAE,GAAG,EAAE,CAAM;IAC7B,SAAS,EAAE,GAAG,EAAE,CAAM;IACtB,WAAW,EAAE,GAAG,EAAE,CAAM;IACxB,OAAO,EAAE,GAAG,EAAE,CAAM;gBAER,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAgC1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAAO;IAW1M,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;KAAO;IAM9D,QAAQ,CAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAKzE,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -61,55 +61,40 @@ export class JDAlbum extends JDResource {
|
|
|
61
61
|
this.composerIds = Utils.getArray(data, "composer_ids");
|
|
62
62
|
this.bandIds = Utils.getArray(data, "band_ids");
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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);
|
|
64
|
+
getContents() {
|
|
65
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
66
|
+
const queryParams = this.getSortParameters(params);
|
|
67
|
+
return yield this.getRelative('/modules/music/albums', queryParams);
|
|
77
68
|
});
|
|
78
69
|
}
|
|
79
|
-
|
|
80
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
params
|
|
85
|
-
|
|
86
|
-
params
|
|
87
|
-
|
|
88
|
-
params
|
|
89
|
-
|
|
90
|
-
params
|
|
91
|
-
|
|
92
|
-
|
|
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);
|
|
70
|
+
paginateContents() {
|
|
71
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
72
|
+
const queryParams = this.getSortParameters(params);
|
|
73
|
+
if (params.languageId)
|
|
74
|
+
queryParams['language_id'] = params.languageId;
|
|
75
|
+
if (params.recommended)
|
|
76
|
+
queryParams['recommended'] = params.recommended;
|
|
77
|
+
if (params.downloadable)
|
|
78
|
+
queryParams['downloadable'] = params.downloadable;
|
|
79
|
+
if (params.not_validated)
|
|
80
|
+
queryParams['not_validated'] = params.not_validated;
|
|
81
|
+
if (params.released_year)
|
|
82
|
+
queryParams['released_year'] = params.released_year;
|
|
83
|
+
return yield this.getRelative('/modules/music/albums/paginate', queryParams);
|
|
97
84
|
});
|
|
98
85
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
findContents() {
|
|
87
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
88
|
+
const queryParams = this.getSortParameters(params);
|
|
89
|
+
if (params.title)
|
|
90
|
+
queryParams['name'] = params.title;
|
|
91
|
+
return yield this.getRelative('/modules/music/albums/find', queryParams);
|
|
104
92
|
});
|
|
105
93
|
}
|
|
106
|
-
|
|
107
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
108
|
-
const
|
|
109
|
-
|
|
110
|
-
params['title'] = title;
|
|
111
|
-
params['published'] = published;
|
|
112
|
-
return yield this.getRelative('/modules/music/albums/find', params);
|
|
94
|
+
getSongs(albumId_1) {
|
|
95
|
+
return __awaiter(this, arguments, void 0, function* (albumId, params = {}) {
|
|
96
|
+
const queryParams = this.getSortParameters(params);
|
|
97
|
+
return yield this.getRelative(`/modules/music/albums/${albumId}/songs`, queryParams);
|
|
113
98
|
});
|
|
114
99
|
}
|
|
115
100
|
getInfo(id) {
|
|
@@ -117,14 +102,8 @@ export class JDAlbum extends JDResource {
|
|
|
117
102
|
return yield this.getRelative(`/modules/music/albums/${id}`, {});
|
|
118
103
|
});
|
|
119
104
|
}
|
|
120
|
-
|
|
121
|
-
return __awaiter(this,
|
|
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 };
|
|
105
|
+
updateFields(id_1) {
|
|
106
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
128
107
|
return yield this.postRelative(`/modules/music/albums/${id}/update/single_fields`, body);
|
|
129
108
|
});
|
|
130
109
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
1
|
+
import JDResource, { ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
2
|
export declare class JDArtist extends JDResource {
|
|
3
3
|
languageId: string;
|
|
4
4
|
note: string;
|
|
@@ -19,57 +19,19 @@ export declare class JDArtist extends JDResource {
|
|
|
19
19
|
get nameMM(): string;
|
|
20
20
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
21
21
|
setData(data: Record<string, any>): void;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 }: {
|
|
22
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
23
|
+
paginateContents(params?: PaginateParams & {
|
|
24
|
+
languageId?: string | null;
|
|
37
25
|
nameEN?: string | null;
|
|
38
26
|
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
27
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
51
|
-
|
|
52
|
-
|
|
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;
|
|
28
|
+
findContents(params?: PaginateParams & {
|
|
29
|
+
name?: string;
|
|
66
30
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
31
|
+
getSongs(artistId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
32
|
+
getAlbums(artistId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
67
33
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
68
34
|
updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
69
|
-
|
|
70
|
-
published?: boolean | null;
|
|
71
|
-
recommended?: boolean | null;
|
|
72
|
-
note?: string | null;
|
|
73
|
-
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
35
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
74
36
|
}
|
|
75
37
|
//# sourceMappingURL=jdArtist.d.ts.map
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"jdArtist.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdArtist.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,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,IAAI,aAAa,IAAG,MAAM,CAAoE;IAC9F,IAAI,MAAM,IAAG,MAAM,CAA8C;IACjE,IAAI,MAAM,IAAG,MAAM,CAA6C;gBAEpD,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAuB1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAAO;IAQ9H,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;KAAO;IAM7D,QAAQ,CAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1E,SAAS,CAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK3E,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,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -48,52 +48,42 @@ export class JDArtist extends JDResource {
|
|
|
48
48
|
this.categoryMusics = Utils.getArray(data, "category_musics");
|
|
49
49
|
this.categoryMusicIds = Utils.getArray(data, "category_music_ids");
|
|
50
50
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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);
|
|
51
|
+
getContents() {
|
|
52
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
53
|
+
const queryParams = this.getSortParameters(params);
|
|
54
|
+
return yield this.getRelative('/modules/music/artists', queryParams);
|
|
64
55
|
});
|
|
65
56
|
}
|
|
66
|
-
|
|
67
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
params
|
|
72
|
-
|
|
73
|
-
params
|
|
74
|
-
|
|
75
|
-
|
|
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);
|
|
57
|
+
paginateContents() {
|
|
58
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
59
|
+
const queryParams = this.getSortParameters(params);
|
|
60
|
+
if (params.languageId)
|
|
61
|
+
queryParams['language_id'] = params.languageId;
|
|
62
|
+
if (params.nameEN)
|
|
63
|
+
queryParams['name.en'] = params.nameEN;
|
|
64
|
+
if (params.nameMM)
|
|
65
|
+
queryParams['name.mm'] = params.nameMM;
|
|
66
|
+
return yield this.getRelative('/modules/music/artists/paginate', queryParams);
|
|
81
67
|
});
|
|
82
68
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
findContents() {
|
|
70
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
71
|
+
const queryParams = this.getSortParameters(params);
|
|
72
|
+
if (params.name)
|
|
73
|
+
queryParams['name'] = params.name;
|
|
74
|
+
return yield this.getRelative('/modules/music/artists/find', queryParams);
|
|
88
75
|
});
|
|
89
76
|
}
|
|
90
|
-
|
|
91
|
-
return __awaiter(this, arguments, void 0, function* (
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
getSongs(artistId_1) {
|
|
78
|
+
return __awaiter(this, arguments, void 0, function* (artistId, params = {}) {
|
|
79
|
+
const queryParams = this.getSortParameters(params);
|
|
80
|
+
return yield this.getRelative(`/modules/music/artists/${artistId}/songs`, queryParams);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
getAlbums(artistId_1) {
|
|
84
|
+
return __awaiter(this, arguments, void 0, function* (artistId, params = {}) {
|
|
85
|
+
const queryParams = this.getSortParameters(params);
|
|
86
|
+
return yield this.getRelative(`/modules/music/artists/${artistId}/albums`, queryParams);
|
|
97
87
|
});
|
|
98
88
|
}
|
|
99
89
|
getInfo(id) {
|
|
@@ -106,9 +96,8 @@ export class JDArtist extends JDResource {
|
|
|
106
96
|
return yield this.getRelative(`/modules/music/artists/${id}/update`, {});
|
|
107
97
|
});
|
|
108
98
|
}
|
|
109
|
-
|
|
110
|
-
return __awaiter(this, arguments, void 0, function* (id,
|
|
111
|
-
const body = { published, recommended, note };
|
|
99
|
+
updateFields(id_1) {
|
|
100
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
112
101
|
return yield this.postRelative(`/modules/music/artists/${id}/update/single_fields`, body);
|
|
113
102
|
});
|
|
114
103
|
}
|