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.
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -0
- package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts +6 -0
- package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts.map +1 -0
- package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +21 -0
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +15 -0
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCountry.js +16 -0
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +17 -0
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
- package/dist/sdk/models/modules/karaoke/jdKtvShop.js +18 -0
- package/dist/sdk/models/modules/music/jdAlbum.d.ts +84 -0
- package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -0
- package/dist/sdk/models/modules/music/jdAlbum.js +131 -0
- package/dist/sdk/models/modules/music/jdArtist.d.ts +75 -0
- package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -0
- package/dist/sdk/models/modules/music/jdArtist.js +115 -0
- package/dist/sdk/models/modules/music/jdComposer.d.ts +76 -0
- package/dist/sdk/models/modules/music/jdComposer.d.ts.map +1 -0
- package/dist/sdk/models/modules/music/jdComposer.js +115 -0
- package/dist/sdk/models/modules/music/jdMusicCombinations.d.ts +6 -0
- package/dist/sdk/models/modules/music/jdMusicCombinations.d.ts.map +1 -0
- package/dist/sdk/models/modules/music/jdMusicCombinations.js +21 -0
- package/dist/sdk/models/modules/music/jdSong.d.ts +5 -2
- package/dist/sdk/models/modules/music/jdSong.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdSong.js +9 -5
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +48 -0
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -0
- package/dist/sdk/models/modules/radio_station/jdRadioStation.js +95 -0
- package/dist/sdk/models/modules/user/jdPermission.d.ts +14 -0
- package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermission.js +16 -0
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +47 -0
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -0
- package/dist/sdk/models/modules/user/jdPermissionGroup.js +66 -0
- package/dist/sdk/models/modules/user/jdUser.d.ts +22 -0
- package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUser.js +18 -0
- package/dist/sdk/models/modules/user/jdUserRole.d.ts +52 -0
- package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -0
- package/dist/sdk/models/modules/user/jdUserRole.js +72 -0
- package/package.json +3 -1
- package/readme.md +9 -0
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export declare class JDComposer extends JDResource {
|
|
3
|
+
languageId: string;
|
|
4
|
+
note: string;
|
|
5
|
+
recommended: boolean;
|
|
6
|
+
promoted: boolean;
|
|
7
|
+
listenCount: number;
|
|
8
|
+
albumsCount: number;
|
|
9
|
+
songsCount: number;
|
|
10
|
+
languageInfo: Record<string, any>;
|
|
11
|
+
name: Record<string, any>;
|
|
12
|
+
bio: Record<string, any>;
|
|
13
|
+
gender: Record<string, any>;
|
|
14
|
+
keywords: Record<string, any>;
|
|
15
|
+
albumIds: any[];
|
|
16
|
+
songIds: 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
|
+
getComposers({ 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
|
+
paginateComposers({ 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
|
+
findComposers({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
59
|
+
name?: 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, downloadable, note }: {
|
|
70
|
+
published?: boolean | null;
|
|
71
|
+
recommended?: boolean | null;
|
|
72
|
+
downloadable?: boolean | null;
|
|
73
|
+
note?: string | null;
|
|
74
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=jdComposer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdComposer.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdComposer.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,UAAW,SAAQ,UAAU;IACzC,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,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IACvC,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,Q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K,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;IAoBK,QAAQ,CAAC,QAAQ,EAAC,MAAM,EAAG,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;KAAA;IAMnH,aAAa,CAAC,EAAE,IAAS,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IASjI,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,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 JDComposer 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.languageInfo = {};
|
|
26
|
+
this.name = {};
|
|
27
|
+
this.bio = {};
|
|
28
|
+
this.gender = {};
|
|
29
|
+
this.keywords = {};
|
|
30
|
+
this.albumIds = [];
|
|
31
|
+
this.songIds = [];
|
|
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.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");
|
|
50
|
+
}
|
|
51
|
+
// Filter composers
|
|
52
|
+
getComposers(_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/composers', params);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
paginateComposers(_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/composers/paginate', params);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Get all the songs for composer
|
|
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/composers/${artistId}/songs`, params);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
findComposers(_a) {
|
|
91
|
+
return __awaiter(this, arguments, void 0, function* ({ name = "", 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['name'] = name;
|
|
95
|
+
params['published'] = published;
|
|
96
|
+
return yield this.getRelative('/modules/music/composers/find', params);
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
getInfo(id) {
|
|
100
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
return yield this.getRelative(`/modules/music/composers/${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/composers/${id}/update`, {});
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
updateSingleFields(id_1, _a) {
|
|
110
|
+
return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, downloadable = null, note = null }) {
|
|
111
|
+
const body = { published, recommended, downloadable, note };
|
|
112
|
+
return yield this.postRelative(`/modules/music/composers/${id}/update/single_fields`, body);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export declare class JdMusicCombinations extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
getOverview(): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
5
|
+
}
|
|
6
|
+
//# sourceMappingURL=jdMusicCombinations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdMusicCombinations.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdMusicCombinations.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,mBAAoB,SAAQ,UAAU;gBACtC,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 JdMusicCombinations 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/music/combinations/overview', {});
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -9,6 +9,7 @@ export declare class JDSong extends JDResource {
|
|
|
9
9
|
hasKaraoke: boolean;
|
|
10
10
|
recommended: boolean;
|
|
11
11
|
promoted: boolean;
|
|
12
|
+
downloadable: boolean;
|
|
12
13
|
durationSeconds: number;
|
|
13
14
|
channelsCount: number;
|
|
14
15
|
tracksCount: number;
|
|
@@ -28,11 +29,12 @@ export declare class JDSong extends JDResource {
|
|
|
28
29
|
bandIds: any[];
|
|
29
30
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
30
31
|
setData(data: Record<string, any>): void;
|
|
31
|
-
getSongs({ titleEn, keywordEn, published, recommended, hasLyrics, hasKaraoke, languageId, year, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
32
|
+
getSongs({ titleEn, keywordEn, published, recommended, downloadable, hasLyrics, hasKaraoke, languageId, year, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
32
33
|
titleEn?: string | undefined;
|
|
33
34
|
keywordEn?: string | undefined;
|
|
34
35
|
published?: string | undefined;
|
|
35
36
|
recommended?: string | undefined;
|
|
37
|
+
downloadable?: string | undefined;
|
|
36
38
|
hasLyrics?: string | undefined;
|
|
37
39
|
hasKaraoke?: string | undefined;
|
|
38
40
|
languageId?: string | undefined;
|
|
@@ -43,13 +45,14 @@ export declare class JDSong extends JDResource {
|
|
|
43
45
|
countPerPage?: number | undefined;
|
|
44
46
|
fields?: string | undefined;
|
|
45
47
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
46
|
-
paginateSongs({ titleEN, titleMM, keywordsEN, keywordsMM, published, recommended, hasLyrics, hasKaraoke, wrongTracks, languageId, year, note, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
48
|
+
paginateSongs({ titleEN, titleMM, keywordsEN, keywordsMM, published, recommended, downloadable, hasLyrics, hasKaraoke, wrongTracks, languageId, year, note, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
47
49
|
titleEN?: string | null;
|
|
48
50
|
titleMM?: string | null;
|
|
49
51
|
keywordsEN?: string | null;
|
|
50
52
|
keywordsMM?: string | null;
|
|
51
53
|
published?: boolean | null;
|
|
52
54
|
recommended?: boolean | null;
|
|
55
|
+
downloadable?: boolean | null;
|
|
53
56
|
hasLyrics?: boolean | null;
|
|
54
57
|
hasKaraoke?: boolean | null;
|
|
55
58
|
wrongTracks?: 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,EAAC,MAAM,kBAAkB,CAAC;AAE3D,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;
|
|
1
|
+
{"version":3,"file":"jdSong.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdSong.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,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,EA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,CAAC,EAAE,KAAU,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAS9H,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,OAAO,CAAC,EAAE,EAAC,MAAM,EAAE,GAAG,EAAC,OAAO;IAK9B,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,UAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QAC3H,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,UAAU,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
|
|
@@ -21,6 +21,7 @@ export class JDSong extends JDResource {
|
|
|
21
21
|
this.hasKaraoke = false;
|
|
22
22
|
this.recommended = false;
|
|
23
23
|
this.promoted = false;
|
|
24
|
+
this.downloadable = false;
|
|
24
25
|
this.durationSeconds = 0;
|
|
25
26
|
this.channelsCount = 0;
|
|
26
27
|
this.tracksCount = 0;
|
|
@@ -51,6 +52,7 @@ export class JDSong extends JDResource {
|
|
|
51
52
|
this.hasKaraoke = Utils.getBoolean(data, "has_karaoke");
|
|
52
53
|
this.recommended = Utils.getBoolean(data, "recommended");
|
|
53
54
|
this.promoted = Utils.getBoolean(data, "promoted");
|
|
55
|
+
this.downloadable = Utils.getBoolean(data, "downloadable");
|
|
54
56
|
this.durationSeconds = Utils.getInteger(data, "duration_seconds");
|
|
55
57
|
this.channelsCount = Utils.getInteger(data, "channels_count");
|
|
56
58
|
this.tracksCount = Utils.getInteger(data, "tracks_count");
|
|
@@ -71,13 +73,14 @@ export class JDSong extends JDResource {
|
|
|
71
73
|
}
|
|
72
74
|
// Filter songs
|
|
73
75
|
getSongs(_a) {
|
|
74
|
-
return __awaiter(this, arguments, void 0, function* ({ titleEn = "", keywordEn = "", published = "", recommended = "", hasLyrics = "", hasKaraoke = "", languageId = "", year = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
|
|
76
|
+
return __awaiter(this, arguments, void 0, function* ({ titleEn = "", keywordEn = "", published = "", recommended = "", downloadable = "", hasLyrics = "", hasKaraoke = "", languageId = "", year = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
|
|
75
77
|
const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
|
|
76
78
|
//Addon filters
|
|
77
79
|
params['title.en'] = titleEn;
|
|
78
80
|
params['keyword.en'] = keywordEn;
|
|
79
81
|
params['published'] = published;
|
|
80
82
|
params['recommended'] = recommended;
|
|
83
|
+
params['downloadable'] = downloadable;
|
|
81
84
|
params['has_lyrics'] = hasLyrics;
|
|
82
85
|
params['has_karaoke'] = hasKaraoke;
|
|
83
86
|
params['language_id'] = languageId;
|
|
@@ -86,15 +89,16 @@ export class JDSong extends JDResource {
|
|
|
86
89
|
});
|
|
87
90
|
}
|
|
88
91
|
paginateSongs(_a) {
|
|
89
|
-
return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, hasLyrics = null, hasKaraoke = null, wrongTracks = null, languageId = "", year = null, note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
|
|
92
|
+
return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, downloadable = null, hasLyrics = null, hasKaraoke = null, wrongTracks = null, languageId = "", year = null, note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
|
|
90
93
|
const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
|
|
91
94
|
//Addon filters
|
|
92
95
|
params['title.en'] = titleEN;
|
|
93
96
|
params['title.mm'] = titleMM;
|
|
94
|
-
params['
|
|
95
|
-
params['
|
|
97
|
+
params['keywords.en'] = keywordsEN;
|
|
98
|
+
params['keywords.mm'] = keywordsMM;
|
|
96
99
|
params['published'] = published === null ? '' : published ? 'true' : 'false';
|
|
97
100
|
params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
|
|
101
|
+
params['downloadable'] = downloadable === null ? '' : downloadable ? 'true' : 'false';
|
|
98
102
|
params['has_lyrics'] = hasLyrics === null ? '' : hasLyrics ? 'true' : 'false';
|
|
99
103
|
params['has_karaoke'] = hasKaraoke === null ? '' : hasKaraoke ? 'true' : 'false';
|
|
100
104
|
params['wrong_tracks'] = wrongTracks === null ? '' : wrongTracks ? 'true' : 'false';
|
|
@@ -132,7 +136,7 @@ export class JDSong extends JDResource {
|
|
|
132
136
|
});
|
|
133
137
|
}
|
|
134
138
|
updateSingleFields(id_1, _a) {
|
|
135
|
-
return __awaiter(this, arguments, void 0, function* (id, { published =
|
|
139
|
+
return __awaiter(this, arguments, void 0, function* (id, { published = null, has_karaoke = null, has_lyrics = null, recommended = null, note = null }) {
|
|
136
140
|
const body = { published, has_karaoke, has_lyrics, recommended, note };
|
|
137
141
|
return yield this.postRelative(`/modules/music/songs/${id}/update/single_fields`, body);
|
|
138
142
|
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export declare class JdRadioStation extends JDResource {
|
|
3
|
+
licenseKey: string;
|
|
4
|
+
activationsCount: number;
|
|
5
|
+
maxActivationsCount: number;
|
|
6
|
+
countryId: string;
|
|
7
|
+
stateId: string;
|
|
8
|
+
cityId: string;
|
|
9
|
+
districtId: string;
|
|
10
|
+
address: Record<string, any>;
|
|
11
|
+
country: Record<string, any>;
|
|
12
|
+
state: Record<string, any>;
|
|
13
|
+
city: Record<string, any>;
|
|
14
|
+
district: Record<string, any>;
|
|
15
|
+
get localisedAddress(): string;
|
|
16
|
+
get countryTitleEN(): string;
|
|
17
|
+
get countryTitleMM(): string;
|
|
18
|
+
get stateTitleEN(): string;
|
|
19
|
+
get stateTitleMM(): string;
|
|
20
|
+
get cityTitleEN(): string;
|
|
21
|
+
get cityTitleMM(): string;
|
|
22
|
+
get districtTitleEN(): string;
|
|
23
|
+
get districtTitleMM(): string;
|
|
24
|
+
expiryDate: Date;
|
|
25
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
26
|
+
setData(data: Record<string, any>): void;
|
|
27
|
+
getRadioStations(isRecommended?: boolean, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
28
|
+
paginateRadioStations({ 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>;
|
|
40
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
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>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=jdRadioStation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdRadioStation.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/radio_station/jdRadioStation.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,cAAe,SAAQ,UAAU;IAC7C,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;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AG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
|
|
@@ -0,0 +1,95 @@
|
|
|
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 JdRadioStation extends JDResource {
|
|
13
|
+
get localisedAddress() {
|
|
14
|
+
return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
|
|
15
|
+
`${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
|
|
16
|
+
}
|
|
17
|
+
get countryTitleEN() { return Utils.getString(Utils.getObject(this.country, 'title'), 'en'); }
|
|
18
|
+
get countryTitleMM() { return Utils.getString(Utils.getObject(this.country, 'title'), 'mm'); }
|
|
19
|
+
get stateTitleEN() { return Utils.getString(Utils.getObject(this.state, 'title'), 'en'); }
|
|
20
|
+
get stateTitleMM() { return Utils.getString(Utils.getObject(this.state, 'title'), 'mm'); }
|
|
21
|
+
get cityTitleEN() { return Utils.getString(Utils.getObject(this.city, 'title'), 'en'); }
|
|
22
|
+
get cityTitleMM() { return Utils.getString(Utils.getObject(this.city, 'title'), 'mm'); }
|
|
23
|
+
get districtTitleEN() { return Utils.getString(Utils.getObject(this.district, 'title'), 'en'); }
|
|
24
|
+
get districtTitleMM() { return Utils.getString(Utils.getObject(this.district, 'title'), 'mm'); }
|
|
25
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
26
|
+
super(connectorInfo);
|
|
27
|
+
this.licenseKey = "";
|
|
28
|
+
this.activationsCount = 0;
|
|
29
|
+
this.maxActivationsCount = 0;
|
|
30
|
+
this.countryId = "";
|
|
31
|
+
this.stateId = "";
|
|
32
|
+
this.cityId = "";
|
|
33
|
+
this.districtId = "";
|
|
34
|
+
this.address = {};
|
|
35
|
+
this.country = {};
|
|
36
|
+
this.state = {};
|
|
37
|
+
this.city = {};
|
|
38
|
+
this.district = {};
|
|
39
|
+
this.expiryDate = new Date();
|
|
40
|
+
this.setData(data);
|
|
41
|
+
}
|
|
42
|
+
setData(data) {
|
|
43
|
+
super.setData(data);
|
|
44
|
+
this.licenseKey = Utils.getString(data, "license_key");
|
|
45
|
+
this.activationsCount = Utils.getInteger(data, "activations_count");
|
|
46
|
+
this.maxActivationsCount = Utils.getInteger(data, "max_activations_count");
|
|
47
|
+
this.countryId = Utils.getString(data, "country_id");
|
|
48
|
+
this.stateId = Utils.getString(data, "state_id");
|
|
49
|
+
this.cityId = Utils.getString(data, "city_id");
|
|
50
|
+
this.districtId = Utils.getString(data, "district_id");
|
|
51
|
+
this.address = Utils.getObject(data, "address");
|
|
52
|
+
this.country = Utils.getObject(data, "country");
|
|
53
|
+
this.state = Utils.getObject(data, "state");
|
|
54
|
+
this.city = Utils.getObject(data, "city");
|
|
55
|
+
this.district = Utils.getObject(data, "district");
|
|
56
|
+
this.expiryDate = Utils.getDate(data, "expiry_date");
|
|
57
|
+
}
|
|
58
|
+
getRadioStations() {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* (isRecommended = false, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '') {
|
|
60
|
+
const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
|
|
61
|
+
if (Utils.isset(isRecommended)) {
|
|
62
|
+
params['recommended'] = isRecommended ? 'true' : 'false';
|
|
63
|
+
}
|
|
64
|
+
return yield this.getRelative('/modules/karaoke/ktv_shops', params);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
paginateRadioStations(_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/radio_station/radio_stations/paginate', params);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
getInfo(id) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
return yield this.getRelative(`/modules/radio_station/radio_stations/${id}`, {});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
updateInfo(id, title, slug, expiryDate) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
return yield this.getRelative(`/modules/radio_station/radio_stations/${id}`, {});
|
|
87
|
+
});
|
|
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/radio_station/radio_stations/${id}/update/single_fields`, body);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -20,6 +20,16 @@ export declare class JDPermission extends JDResource {
|
|
|
20
20
|
countPerPage?: number | undefined;
|
|
21
21
|
fields?: string | undefined;
|
|
22
22
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
23
|
+
paginatePermissions({ name, guard_name, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
24
|
+
name?: string | null;
|
|
25
|
+
guard_name?: string | null;
|
|
26
|
+
published?: boolean | null;
|
|
27
|
+
orderBy?: string | null;
|
|
28
|
+
order?: string | null;
|
|
29
|
+
pageIndex?: number | null;
|
|
30
|
+
countPerPage?: number | null;
|
|
31
|
+
fields?: string | null;
|
|
32
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
23
33
|
findPermissions({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
24
34
|
name?: string | undefined;
|
|
25
35
|
published?: string | undefined;
|
|
@@ -31,5 +41,9 @@ export declare class JDPermission extends JDResource {
|
|
|
31
41
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
32
42
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
33
43
|
publish(id: string, published: boolean): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
44
|
+
updateSingleFields(id: string, { published, note }: {
|
|
45
|
+
published?: boolean | null;
|
|
46
|
+
note?: string | null;
|
|
47
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
34
48
|
}
|
|
35
49
|
//# sourceMappingURL=jdPermission.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jdPermission.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermission.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,EAAC,MAAM,CAAM;IACjB,SAAS,EAAC,MAAM,CAAM;IACtB,gB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CAAC,EAAE,IAAQ,EAAE,UAAc,EAAE,SAAe,EAC5D,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC,EAAE;QAChG,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC3B,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,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;IAWK,eAAe,CAAC,EAAC,IAAS,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAQlI,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,OAAO,CAAC,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,OAAO;IAKpC,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,IAAU,EAAC,EAAE;QACnE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
|
|
@@ -49,6 +49,16 @@ export class JDPermission extends JDResource {
|
|
|
49
49
|
return yield this.getRelative('/modules/user/permissions', params);
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
+
paginatePermissions(_a) {
|
|
53
|
+
return __awaiter(this, arguments, void 0, function* ({ name = "", guard_name = "", published = null, 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'] = name;
|
|
57
|
+
params['guard_name'] = guard_name;
|
|
58
|
+
params['published'] = published === null ? '' : published ? 'true' : 'false';
|
|
59
|
+
return yield this.getRelative('/modules/user/permissions/paginate', params);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
52
62
|
// Find the permission with text search index which is a fast way to search the whole word
|
|
53
63
|
findPermissions(_a) {
|
|
54
64
|
return __awaiter(this, arguments, void 0, function* ({ name = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
|
|
@@ -70,4 +80,10 @@ export class JDPermission extends JDResource {
|
|
|
70
80
|
return yield this.postRelative(`/modules/user/permissions/${id}/publish`, body);
|
|
71
81
|
});
|
|
72
82
|
}
|
|
83
|
+
updateSingleFields(id_1, _a) {
|
|
84
|
+
return __awaiter(this, arguments, void 0, function* (id, { published = null, note = null }) {
|
|
85
|
+
const body = { published, note };
|
|
86
|
+
return yield this.postRelative(`/modules/user/permissions/${id}/update/single_fields`, body);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
73
89
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
2
|
+
export declare class JDPermissionGroup extends JDResource {
|
|
3
|
+
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
4
|
+
setData(data: Record<string, any>): void;
|
|
5
|
+
getPermissionGroups({ name, guardName, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
6
|
+
name?: string | undefined;
|
|
7
|
+
guardName?: string | undefined;
|
|
8
|
+
published?: string | undefined;
|
|
9
|
+
orderBy?: string | undefined;
|
|
10
|
+
order?: string | undefined;
|
|
11
|
+
pageIndex?: number | undefined;
|
|
12
|
+
countPerPage?: number | undefined;
|
|
13
|
+
fields?: string | undefined;
|
|
14
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
15
|
+
paginateContents({ name, guard_name, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
16
|
+
name?: string | null;
|
|
17
|
+
guard_name?: string | null;
|
|
18
|
+
published?: boolean | null;
|
|
19
|
+
orderBy?: string | null;
|
|
20
|
+
order?: string | null;
|
|
21
|
+
pageIndex?: number | null;
|
|
22
|
+
countPerPage?: number | null;
|
|
23
|
+
fields?: string | null;
|
|
24
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
25
|
+
getPermissions(permissionGroupId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
|
|
26
|
+
orderBy?: string | undefined;
|
|
27
|
+
order?: string | undefined;
|
|
28
|
+
pageIndex?: number | undefined;
|
|
29
|
+
countPerPage?: number | undefined;
|
|
30
|
+
fields?: string | undefined;
|
|
31
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
32
|
+
findPermissions({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
|
|
33
|
+
name?: string | undefined;
|
|
34
|
+
published?: 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
|
+
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
42
|
+
updateSingleFields(id: string, { published, note }: {
|
|
43
|
+
published?: boolean | null;
|
|
44
|
+
note?: string | null;
|
|
45
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=jdPermissionGroup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jdPermissionGroup.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermissionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC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