jd_platform_sdk 0.1.6 → 0.1.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 +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/sdk/configs/jdConfig.js +1 -0
- package/dist/sdk/jdConnector.js +47 -64
- package/dist/sdk/models/dashboard/geolocation/jdCity.js +21 -42
- package/dist/sdk/models/dashboard/geolocation/jdCountry.js +24 -45
- package/dist/sdk/models/dashboard/geolocation/jdDistrict.js +18 -37
- package/dist/sdk/models/dashboard/geolocation/jdGeolocationCombinations.js +2 -13
- package/dist/sdk/models/dashboard/geolocation/jdState.js +21 -42
- package/dist/sdk/models/dashboard/jdApplication.js +31 -50
- package/dist/sdk/models/dashboard/jdCallbackNotification.js +36 -55
- package/dist/sdk/models/dashboard/jdDashboardCombinations.js +2 -13
- package/dist/sdk/models/dashboard/jdKtvShop.js +32 -51
- package/dist/sdk/models/dashboard/jdModule.js +19 -38
- package/dist/sdk/models/dashboard/jdPlatform.js +19 -38
- package/dist/sdk/models/dashboard/jdRadioStation.js +32 -51
- package/dist/sdk/models/dashboard/jdSmsVerification.js +21 -40
- package/dist/sdk/models/dashboard/user/jdAccessToken.js +20 -39
- package/dist/sdk/models/dashboard/user/jdModerator.js +27 -46
- package/dist/sdk/models/dashboard/user/jdPermission.js +25 -44
- package/dist/sdk/models/dashboard/user/jdPermissionGroup.js +26 -47
- package/dist/sdk/models/dashboard/user/jdSessionAccessToken.js +22 -41
- package/dist/sdk/models/dashboard/user/jdSessionUser.js +38 -63
- package/dist/sdk/models/dashboard/user/jdUser.js +39 -64
- package/dist/sdk/models/dashboard/user/jdUserRole.js +23 -46
- package/dist/sdk/models/jdResource.js +56 -74
- package/dist/sdk/models/modules/music/jdAlbum.js +50 -71
- package/dist/sdk/models/modules/music/jdArtist.js +37 -60
- package/dist/sdk/models/modules/music/jdComposer.js +37 -60
- package/dist/sdk/models/modules/music/jdMusicCombinations.js +2 -13
- package/dist/sdk/models/modules/music/jdSong.js +56 -75
- package/dist/sdk/utilities/browserUtils.js +6 -17
- package/dist/sdk/utilities/globalEventHandler.js +1 -3
- package/dist/sdk/utilities/utils.js +13 -14
- package/package.json +1 -1
|
@@ -1,29 +1,20 @@
|
|
|
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
1
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
11
2
|
import { Utils } from "../../utilities/utils";
|
|
12
3
|
export class JdCallbackNotification extends JDResource {
|
|
4
|
+
subscriptionType = '';
|
|
5
|
+
productCode = '';
|
|
6
|
+
msisdn = '';
|
|
7
|
+
chargingType = '';
|
|
8
|
+
nextRenewDate = '';
|
|
9
|
+
processedTime = '';
|
|
10
|
+
fee = '';
|
|
11
|
+
lifecycle = '';
|
|
12
|
+
reason = '';
|
|
13
|
+
fbclid = '';
|
|
14
|
+
param01 = '';
|
|
15
|
+
param02 = '';
|
|
13
16
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
14
17
|
super(connectorInfo);
|
|
15
|
-
this.subscriptionType = '';
|
|
16
|
-
this.productCode = '';
|
|
17
|
-
this.msisdn = '';
|
|
18
|
-
this.chargingType = '';
|
|
19
|
-
this.nextRenewDate = '';
|
|
20
|
-
this.processedTime = '';
|
|
21
|
-
this.fee = '';
|
|
22
|
-
this.lifecycle = '';
|
|
23
|
-
this.reason = '';
|
|
24
|
-
this.fbclid = '';
|
|
25
|
-
this.param01 = '';
|
|
26
|
-
this.param02 = '';
|
|
27
18
|
this.setData(data);
|
|
28
19
|
}
|
|
29
20
|
setData(data) {
|
|
@@ -41,43 +32,33 @@ export class JdCallbackNotification extends JDResource {
|
|
|
41
32
|
this.param01 = Utils.getString(data, 'param01');
|
|
42
33
|
this.param02 = Utils.getString(data, 'param02');
|
|
43
34
|
}
|
|
44
|
-
getContents() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return yield this.getRelative('/dashboard/callback_notifications', queryParams);
|
|
48
|
-
});
|
|
35
|
+
async getContents(params = {}) {
|
|
36
|
+
const queryParams = this.getSortParameters(params);
|
|
37
|
+
return await this.getRelative('/dashboard/callback_notifications', queryParams);
|
|
49
38
|
}
|
|
50
|
-
paginateContents() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return yield this.getRelative('/dashboard/callback_notifications/paginate', queryParams);
|
|
64
|
-
});
|
|
39
|
+
async paginateContents(params = {}) {
|
|
40
|
+
const queryParams = this.getSortParameters(params);
|
|
41
|
+
if (params.msisdn)
|
|
42
|
+
queryParams['msisdn'] = params.msisdn;
|
|
43
|
+
if (params.productCode)
|
|
44
|
+
queryParams['productCode'] = params.productCode;
|
|
45
|
+
if (params.chargingType)
|
|
46
|
+
queryParams['chargingType'] = params.chargingType;
|
|
47
|
+
if (params.fee)
|
|
48
|
+
queryParams['fee'] = params.fee;
|
|
49
|
+
if (params.reason)
|
|
50
|
+
queryParams['reason'] = params.reason;
|
|
51
|
+
return await this.getRelative('/dashboard/callback_notifications/paginate', queryParams);
|
|
65
52
|
}
|
|
66
|
-
findContents(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return yield this.getRelative('/dashboard/callback_notifications/find', queryParams);
|
|
71
|
-
});
|
|
53
|
+
async findContents(title, params = {}) {
|
|
54
|
+
const queryParams = this.getSortParameters(params);
|
|
55
|
+
queryParams['title'] = title;
|
|
56
|
+
return await this.getRelative('/dashboard/callback_notifications/find', queryParams);
|
|
72
57
|
}
|
|
73
|
-
getInfo(id) {
|
|
74
|
-
return
|
|
75
|
-
return yield this.getRelative(`/dashboard/callback_notifications/${id}`, {});
|
|
76
|
-
});
|
|
58
|
+
async getInfo(id) {
|
|
59
|
+
return await this.getRelative(`/dashboard/callback_notifications/${id}`, {});
|
|
77
60
|
}
|
|
78
|
-
updateFields(
|
|
79
|
-
return
|
|
80
|
-
return yield this.postRelative(`/dashboard/callback_notifications/${id}/update`, body);
|
|
81
|
-
});
|
|
61
|
+
async updateFields(id, body = {}) {
|
|
62
|
+
return await this.postRelative(`/dashboard/callback_notifications/${id}/update`, body);
|
|
82
63
|
}
|
|
83
64
|
}
|
|
@@ -1,21 +1,10 @@
|
|
|
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
1
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
11
2
|
export class JdDashboardCombinations extends JDResource {
|
|
12
3
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
13
4
|
super(connectorInfo);
|
|
14
5
|
this.setData(data);
|
|
15
6
|
}
|
|
16
|
-
getOverview() {
|
|
17
|
-
return
|
|
18
|
-
return yield this.getRelative('/dashboard/combinations/overview', {});
|
|
19
|
-
});
|
|
7
|
+
async getOverview() {
|
|
8
|
+
return await this.getRelative('/dashboard/combinations/overview', {});
|
|
20
9
|
}
|
|
21
10
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
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
1
|
import { Utils } from "../../utilities/utils";
|
|
11
2
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
12
3
|
export class JDKtvShop extends JDResource {
|
|
4
|
+
licenseKey = "";
|
|
5
|
+
activationsCount = 0;
|
|
6
|
+
maxActivationsCount = 0;
|
|
7
|
+
countryId = "";
|
|
8
|
+
stateId = "";
|
|
9
|
+
cityId = "";
|
|
10
|
+
districtId = "";
|
|
11
|
+
address = {};
|
|
12
|
+
country = {};
|
|
13
|
+
state = {};
|
|
14
|
+
city = {};
|
|
15
|
+
district = {};
|
|
13
16
|
get localisedAddress() {
|
|
14
17
|
return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
|
|
15
18
|
`${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
|
|
@@ -22,21 +25,9 @@ export class JDKtvShop extends JDResource {
|
|
|
22
25
|
get cityTitleMM() { return Utils.getString(Utils.getObject(this.city, 'title'), 'mm'); }
|
|
23
26
|
get districtTitleEN() { return Utils.getString(Utils.getObject(this.district, 'title'), 'en'); }
|
|
24
27
|
get districtTitleMM() { return Utils.getString(Utils.getObject(this.district, 'title'), 'mm'); }
|
|
28
|
+
expiryDate = new Date();
|
|
25
29
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
26
30
|
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
31
|
this.setData(data);
|
|
41
32
|
}
|
|
42
33
|
setData(data) {
|
|
@@ -55,38 +46,28 @@ export class JDKtvShop extends JDResource {
|
|
|
55
46
|
this.district = Utils.getObject(data, "district");
|
|
56
47
|
this.expiryDate = Utils.getDate(data, "expiry_date");
|
|
57
48
|
}
|
|
58
|
-
getContents() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return yield this.getRelative(`/dashboard/ktv_shops`, queryParams);
|
|
62
|
-
});
|
|
49
|
+
async getContents(params = {}) {
|
|
50
|
+
const queryParams = this.getSortParameters(params);
|
|
51
|
+
return await this.getRelative(`/dashboard/ktv_shops`, queryParams);
|
|
63
52
|
}
|
|
64
|
-
paginateContents() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return yield this.getRelative('/dashboard/ktv_shops/paginate', queryParams);
|
|
72
|
-
});
|
|
53
|
+
async paginateContents(params = {}) {
|
|
54
|
+
const queryParams = this.getSortParameters(params);
|
|
55
|
+
if (params.name)
|
|
56
|
+
queryParams['name'] = params.name;
|
|
57
|
+
if (params.guard_name)
|
|
58
|
+
queryParams['guard_name'] = params.guard_name;
|
|
59
|
+
return await this.getRelative('/dashboard/ktv_shops/paginate', queryParams);
|
|
73
60
|
}
|
|
74
|
-
findContents() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return yield this.getRelative('/dashboard/ktv_shops/find', queryParams);
|
|
80
|
-
});
|
|
61
|
+
async findContents(params = {}) {
|
|
62
|
+
const queryParams = this.getSortParameters(params);
|
|
63
|
+
if (params.name)
|
|
64
|
+
queryParams['name'] = params.name;
|
|
65
|
+
return await this.getRelative('/dashboard/ktv_shops/find', queryParams);
|
|
81
66
|
}
|
|
82
|
-
getInfo(id) {
|
|
83
|
-
return
|
|
84
|
-
return yield this.getRelative(`/dashboard/ktv_shops/${id}`, {});
|
|
85
|
-
});
|
|
67
|
+
async getInfo(id) {
|
|
68
|
+
return await this.getRelative(`/dashboard/ktv_shops/${id}`, {});
|
|
86
69
|
}
|
|
87
|
-
updateFields(
|
|
88
|
-
return
|
|
89
|
-
return yield this.postRelative(`/dashboard/ktv_shops/${id}/update`, body);
|
|
90
|
-
});
|
|
70
|
+
async updateFields(id, body = {}) {
|
|
71
|
+
return await this.postRelative(`/dashboard/ktv_shops/${id}/update`, body);
|
|
91
72
|
}
|
|
92
73
|
}
|
|
@@ -1,20 +1,11 @@
|
|
|
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
1
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
11
2
|
import { Utils } from "../../utilities/utils";
|
|
12
3
|
export class JdModule extends JDResource {
|
|
4
|
+
applicationIds = [];
|
|
5
|
+
ktvShopIds = [];
|
|
6
|
+
radioStationIds = [];
|
|
13
7
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
14
8
|
super(connectorInfo);
|
|
15
|
-
this.applicationIds = [];
|
|
16
|
-
this.ktvShopIds = [];
|
|
17
|
-
this.radioStationIds = [];
|
|
18
9
|
this.setData(data);
|
|
19
10
|
}
|
|
20
11
|
setData(data) {
|
|
@@ -23,35 +14,25 @@ export class JdModule extends JDResource {
|
|
|
23
14
|
this.ktvShopIds = Utils.getArray(data, 'ktv_shop_ids');
|
|
24
15
|
this.radioStationIds = Utils.getArray(data, 'radio_station_ids');
|
|
25
16
|
}
|
|
26
|
-
getContents() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return yield this.getRelative('/dashboard/modules', queryParams);
|
|
30
|
-
});
|
|
17
|
+
async getContents(params = {}) {
|
|
18
|
+
const queryParams = this.getSortParameters(params);
|
|
19
|
+
return await this.getRelative('/dashboard/modules', queryParams);
|
|
31
20
|
}
|
|
32
|
-
paginateContents() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return yield this.getRelative('/dashboard/modules/paginate', queryParams);
|
|
38
|
-
});
|
|
21
|
+
async paginateContents(params = {}) {
|
|
22
|
+
const queryParams = this.getSortParameters(params);
|
|
23
|
+
if (params.name)
|
|
24
|
+
queryParams['name'] = params.name;
|
|
25
|
+
return await this.getRelative('/dashboard/modules/paginate', queryParams);
|
|
39
26
|
}
|
|
40
|
-
findContents(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return yield this.getRelative('/dashboard/modules/find', queryParams);
|
|
45
|
-
});
|
|
27
|
+
async findContents(title, params = {}) {
|
|
28
|
+
const queryParams = this.getSortParameters(params);
|
|
29
|
+
queryParams['title'] = title;
|
|
30
|
+
return await this.getRelative('/dashboard/modules/find', queryParams);
|
|
46
31
|
}
|
|
47
|
-
getInfo(id) {
|
|
48
|
-
return
|
|
49
|
-
return yield this.getRelative(`/dashboard/modules/${id}`, {});
|
|
50
|
-
});
|
|
32
|
+
async getInfo(id) {
|
|
33
|
+
return await this.getRelative(`/dashboard/modules/${id}`, {});
|
|
51
34
|
}
|
|
52
|
-
updateFields(
|
|
53
|
-
return
|
|
54
|
-
return yield this.postRelative(`/dashboard/modules/${id}/update`, body);
|
|
55
|
-
});
|
|
35
|
+
async updateFields(id, body = {}) {
|
|
36
|
+
return await this.postRelative(`/dashboard/modules/${id}/update`, body);
|
|
56
37
|
}
|
|
57
38
|
}
|
|
@@ -1,20 +1,11 @@
|
|
|
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
1
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
11
2
|
import { Utils } from "../../utilities/utils";
|
|
12
3
|
export class JdPlatform extends JDResource {
|
|
4
|
+
applicationIds = [];
|
|
5
|
+
ktvShopIds = [];
|
|
6
|
+
radioStationIds = [];
|
|
13
7
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
14
8
|
super(connectorInfo);
|
|
15
|
-
this.applicationIds = [];
|
|
16
|
-
this.ktvShopIds = [];
|
|
17
|
-
this.radioStationIds = [];
|
|
18
9
|
this.setData(data);
|
|
19
10
|
}
|
|
20
11
|
setData(data) {
|
|
@@ -23,35 +14,25 @@ export class JdPlatform extends JDResource {
|
|
|
23
14
|
this.ktvShopIds = Utils.getArray(data, 'ktv_shop_ids');
|
|
24
15
|
this.radioStationIds = Utils.getArray(data, 'radio_station_ids');
|
|
25
16
|
}
|
|
26
|
-
getContents() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return yield this.getRelative('/dashboard/platforms', queryParams);
|
|
30
|
-
});
|
|
17
|
+
async getContents(params = {}) {
|
|
18
|
+
const queryParams = this.getSortParameters(params);
|
|
19
|
+
return await this.getRelative('/dashboard/platforms', queryParams);
|
|
31
20
|
}
|
|
32
|
-
paginateContents() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return yield this.getRelative('/dashboard/platforms/paginate', queryParams);
|
|
38
|
-
});
|
|
21
|
+
async paginateContents(params = {}) {
|
|
22
|
+
const queryParams = this.getSortParameters(params);
|
|
23
|
+
if (params.title)
|
|
24
|
+
queryParams['title'] = params.title;
|
|
25
|
+
return await this.getRelative('/dashboard/platforms/paginate', queryParams);
|
|
39
26
|
}
|
|
40
|
-
findContents(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return yield this.getRelative('/dashboard/platforms/find', queryParams);
|
|
45
|
-
});
|
|
27
|
+
async findContents(title, params = {}) {
|
|
28
|
+
const queryParams = this.getSortParameters(params);
|
|
29
|
+
queryParams['title'] = title;
|
|
30
|
+
return await this.getRelative('/dashboard/platforms/find', queryParams);
|
|
46
31
|
}
|
|
47
|
-
getInfo(id) {
|
|
48
|
-
return
|
|
49
|
-
return yield this.getRelative(`/dashboard/platforms/${id}`, {});
|
|
50
|
-
});
|
|
32
|
+
async getInfo(id) {
|
|
33
|
+
return await this.getRelative(`/dashboard/platforms/${id}`, {});
|
|
51
34
|
}
|
|
52
|
-
updateFields(
|
|
53
|
-
return
|
|
54
|
-
return yield this.postRelative(`/dashboard/platforms/${id}/update`, body);
|
|
55
|
-
});
|
|
35
|
+
async updateFields(id, body = {}) {
|
|
36
|
+
return await this.postRelative(`/dashboard/platforms/${id}/update`, body);
|
|
56
37
|
}
|
|
57
38
|
}
|
|
@@ -1,15 +1,18 @@
|
|
|
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
1
|
import { Utils } from "../../utilities/utils";
|
|
11
2
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
12
3
|
export class JdRadioStation extends JDResource {
|
|
4
|
+
licenseKey = "";
|
|
5
|
+
activationsCount = 0;
|
|
6
|
+
maxActivationsCount = 0;
|
|
7
|
+
countryId = "";
|
|
8
|
+
stateId = "";
|
|
9
|
+
cityId = "";
|
|
10
|
+
districtId = "";
|
|
11
|
+
address = {};
|
|
12
|
+
country = {};
|
|
13
|
+
state = {};
|
|
14
|
+
city = {};
|
|
15
|
+
district = {};
|
|
13
16
|
get localisedAddress() {
|
|
14
17
|
return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
|
|
15
18
|
`${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
|
|
@@ -22,21 +25,9 @@ export class JdRadioStation extends JDResource {
|
|
|
22
25
|
get cityTitleMM() { return Utils.getString(Utils.getObject(this.city, 'title'), 'mm'); }
|
|
23
26
|
get districtTitleEN() { return Utils.getString(Utils.getObject(this.district, 'title'), 'en'); }
|
|
24
27
|
get districtTitleMM() { return Utils.getString(Utils.getObject(this.district, 'title'), 'mm'); }
|
|
28
|
+
expiryDate = new Date();
|
|
25
29
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
26
30
|
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
31
|
this.setData(data);
|
|
41
32
|
}
|
|
42
33
|
setData(data) {
|
|
@@ -55,38 +46,28 @@ export class JdRadioStation extends JDResource {
|
|
|
55
46
|
this.district = Utils.getObject(data, "district");
|
|
56
47
|
this.expiryDate = Utils.getDate(data, "expiry_date");
|
|
57
48
|
}
|
|
58
|
-
getContents() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return yield this.getRelative(`/dashboard/radio_stations`, queryParams);
|
|
62
|
-
});
|
|
49
|
+
async getContents(params = {}) {
|
|
50
|
+
const queryParams = this.getSortParameters(params);
|
|
51
|
+
return await this.getRelative(`/dashboard/radio_stations`, queryParams);
|
|
63
52
|
}
|
|
64
|
-
paginateContents() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return yield this.getRelative('/dashboard/radio_stations/paginate', queryParams);
|
|
72
|
-
});
|
|
53
|
+
async paginateContents(params = {}) {
|
|
54
|
+
const queryParams = this.getSortParameters(params);
|
|
55
|
+
if (params.name)
|
|
56
|
+
queryParams['name'] = params.name;
|
|
57
|
+
if (params.guard_name)
|
|
58
|
+
queryParams['guard_name'] = params.guard_name;
|
|
59
|
+
return await this.getRelative('/dashboard/radio_stations/paginate', queryParams);
|
|
73
60
|
}
|
|
74
|
-
findContents() {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return yield this.getRelative('/dashboard/radio_stations/find', queryParams);
|
|
80
|
-
});
|
|
61
|
+
async findContents(params = {}) {
|
|
62
|
+
const queryParams = this.getSortParameters(params);
|
|
63
|
+
if (params.name)
|
|
64
|
+
queryParams['name'] = params.name;
|
|
65
|
+
return await this.getRelative('/dashboard/radio_stations/find', queryParams);
|
|
81
66
|
}
|
|
82
|
-
getInfo(id) {
|
|
83
|
-
return
|
|
84
|
-
return yield this.getRelative(`/dashboard/radio_stations/${id}`, {});
|
|
85
|
-
});
|
|
67
|
+
async getInfo(id) {
|
|
68
|
+
return await this.getRelative(`/dashboard/radio_stations/${id}`, {});
|
|
86
69
|
}
|
|
87
|
-
updateFields(
|
|
88
|
-
return
|
|
89
|
-
return yield this.postRelative(`/dashboard/radio_stations/${id}/update`, body);
|
|
90
|
-
});
|
|
70
|
+
async updateFields(id, body = {}) {
|
|
71
|
+
return await this.postRelative(`/dashboard/radio_stations/${id}/update`, body);
|
|
91
72
|
}
|
|
92
73
|
}
|
|
@@ -1,22 +1,13 @@
|
|
|
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
1
|
import JDResource, { ConnectorInfo } from "../jdResource";
|
|
11
2
|
import { Utils } from "../../utilities/utils";
|
|
12
3
|
export class JdSmsVerification extends JDResource {
|
|
4
|
+
serviceName = '';
|
|
5
|
+
phone = '';
|
|
6
|
+
code = '';
|
|
7
|
+
verified = false;
|
|
8
|
+
expiryDate = new Date();
|
|
13
9
|
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
14
10
|
super(connectorInfo);
|
|
15
|
-
this.serviceName = '';
|
|
16
|
-
this.phone = '';
|
|
17
|
-
this.code = '';
|
|
18
|
-
this.verified = false;
|
|
19
|
-
this.expiryDate = new Date();
|
|
20
11
|
this.setData(data);
|
|
21
12
|
}
|
|
22
13
|
setData(data) {
|
|
@@ -27,35 +18,25 @@ export class JdSmsVerification extends JDResource {
|
|
|
27
18
|
this.verified = Utils.getBoolean(data, 'verified');
|
|
28
19
|
this.expiryDate = Utils.getDate(data, 'expiry_date');
|
|
29
20
|
}
|
|
30
|
-
getContents() {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return yield this.getRelative('/dashboard/sms_verifications', queryParams);
|
|
34
|
-
});
|
|
21
|
+
async getContents(params = {}) {
|
|
22
|
+
const queryParams = this.getSortParameters(params);
|
|
23
|
+
return await this.getRelative('/dashboard/sms_verifications', queryParams);
|
|
35
24
|
}
|
|
36
|
-
paginateContents() {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return yield this.getRelative('/dashboard/sms_verifications/paginate', queryParams);
|
|
42
|
-
});
|
|
25
|
+
async paginateContents(params = {}) {
|
|
26
|
+
const queryParams = this.getSortParameters(params);
|
|
27
|
+
if (params.name)
|
|
28
|
+
queryParams['name'] = params.name;
|
|
29
|
+
return await this.getRelative('/dashboard/sms_verifications/paginate', queryParams);
|
|
43
30
|
}
|
|
44
|
-
findContents(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
return yield this.getRelative('/dashboard/sms_verifications/find', queryParams);
|
|
49
|
-
});
|
|
31
|
+
async findContents(title, params = {}) {
|
|
32
|
+
const queryParams = this.getSortParameters(params);
|
|
33
|
+
queryParams['title'] = title;
|
|
34
|
+
return await this.getRelative('/dashboard/sms_verifications/find', queryParams);
|
|
50
35
|
}
|
|
51
|
-
getInfo(id) {
|
|
52
|
-
return
|
|
53
|
-
return yield this.getRelative(`/dashboard/sms_verifications/${id}`, {});
|
|
54
|
-
});
|
|
36
|
+
async getInfo(id) {
|
|
37
|
+
return await this.getRelative(`/dashboard/sms_verifications/${id}`, {});
|
|
55
38
|
}
|
|
56
|
-
updateFields(
|
|
57
|
-
return
|
|
58
|
-
return yield this.postRelative(`/dashboard/sms_verifications/${id}/update`, body);
|
|
59
|
-
});
|
|
39
|
+
async updateFields(id, body = {}) {
|
|
40
|
+
return await this.postRelative(`/dashboard/sms_verifications/${id}/update`, body);
|
|
60
41
|
}
|
|
61
42
|
}
|