jd_platform_sdk 0.0.7 → 0.1.0
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 +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +46 -24
- package/dist/sdk/configs/jdConfig.js +5 -1
- package/dist/sdk/jdConnector.js +63 -72
- package/dist/sdk/jdSdk.js +5 -1
- 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 +76 -50
- 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 +131 -103
- 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 +37 -0
- 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 +61 -41
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +8 -4
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCountry.js +53 -33
- 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 +57 -35
- 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 +61 -41
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +13 -2
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
- package/dist/sdk/models/modules/karaoke/jdKtvShop.js +91 -62
- package/dist/sdk/models/modules/music/jdAlbum.d.ts +9 -51
- package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdAlbum.js +102 -117
- package/dist/sdk/models/modules/music/jdArtist.d.ts +10 -49
- package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdArtist.js +90 -99
- 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 +87 -99
- package/dist/sdk/models/modules/music/jdMusicCombinations.js +31 -15
- 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 +113 -131
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +42 -0
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -0
- package/dist/sdk/models/modules/radio_station/jdRadioStation.js +106 -0
- package/dist/sdk/models/modules/user/jdPermission.d.ts +9 -21
- package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermission.js +63 -58
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +19 -0
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -0
- package/dist/sdk/models/modules/user/jdPermissionGroup.js +72 -0
- 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 +78 -50
- package/dist/sdk/models/modules/user/jdUser.d.ts +16 -4
- package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUser.js +77 -56
- package/dist/sdk/models/modules/user/jdUserRole.d.ts +16 -0
- package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -0
- package/dist/sdk/models/modules/user/jdUserRole.js +70 -0
- package/dist/sdk/utilities/browserUtils.js +24 -31
- package/dist/sdk/utilities/cryptoUtils.js +13 -6
- package/dist/sdk/utilities/dateUtils.js +5 -1
- package/dist/sdk/utilities/globalEventHandler.js +5 -4
- package/dist/sdk/utilities/stringUtils.js +6 -2
- package/dist/sdk/utilities/utils.js +22 -19
- package/package.json +3 -1
- package/readme.md +9 -0
|
@@ -1,42 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
9
24
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JDCountry = void 0;
|
|
27
|
+
const jdResource_1 = __importStar(require("../../jdResource"));
|
|
28
|
+
class JDCountry extends jdResource_1.default {
|
|
29
|
+
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
13
30
|
super(connectorInfo);
|
|
14
31
|
this.setData(data);
|
|
15
32
|
}
|
|
16
33
|
setData(data) {
|
|
17
34
|
super.setData(data);
|
|
18
35
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
async getContents(params = {}) {
|
|
37
|
+
const queryParams = this.getSortParameters(params);
|
|
38
|
+
return await this.getRelative('/modules/geolocation/countries', queryParams);
|
|
39
|
+
}
|
|
40
|
+
async paginateContents(params = {}) {
|
|
41
|
+
const queryParams = this.getSortParameters(params);
|
|
42
|
+
if (params.name)
|
|
43
|
+
queryParams['name'] = params.name;
|
|
44
|
+
return await this.getRelative('/modules/geolocation/countries/paginate', queryParams);
|
|
45
|
+
}
|
|
46
|
+
async findContents(title, params = {}) {
|
|
47
|
+
const queryParams = this.getSortParameters(params);
|
|
48
|
+
queryParams['title'] = title;
|
|
49
|
+
return await this.getRelative('/modules/geolocation/countries/find', queryParams);
|
|
50
|
+
}
|
|
51
|
+
async getStates(countryId, params = {}) {
|
|
52
|
+
const queryParams = this.getSortParameters(params);
|
|
53
|
+
return await this.getRelative(`/modules/geolocation/countries/${countryId}/states`, queryParams);
|
|
54
|
+
}
|
|
55
|
+
async getInfo(id) {
|
|
56
|
+
return await this.getRelative(`/modules/geolocation/countries/${id}`, {});
|
|
57
|
+
}
|
|
58
|
+
async updateFields(id, body = {}) {
|
|
59
|
+
return await this.postRelative(`/modules/geolocation/countries/${id}/update/single_fields`, body);
|
|
41
60
|
}
|
|
42
61
|
}
|
|
62
|
+
exports.JDCountry = JDCountry;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
1
|
+
import JDResource, { ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
2
|
export declare class JDDistrict extends JDResource {
|
|
3
3
|
cityId: string;
|
|
4
4
|
city: Record<string, any>;
|
|
@@ -7,8 +7,12 @@ export declare class JDDistrict extends JDResource {
|
|
|
7
7
|
get cityTitleMM(): string;
|
|
8
8
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
9
9
|
setData(data: Record<string, any>): void;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
11
|
+
paginateContents(params?: PaginateParams & {
|
|
12
|
+
name?: string | null;
|
|
13
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
findContents(title: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
12
15
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
16
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
17
|
}
|
|
14
18
|
//# sourceMappingURL=jdDistrict.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jdDistrict.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdDistrict.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"jdDistrict.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdDistrict.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,UAAW,SAAQ,UAAU;IACzC,MAAM,EAAC,MAAM,CAAM;IACnB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAE/B,IAAI,kBAAkB,IAAG,MAAM,CAA8E;IAC7G,IAAI,WAAW,IAAG,MAAM,CAAsE;IAC9F,IAAI,WAAW,IAAG,MAAM,CAAsE;gBAElF,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAInG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAM3B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAAO;IAMxE,YAAY,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAM3E,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -1,44 +1,66 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
9
24
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JDDistrict = void 0;
|
|
27
|
+
const jdResource_1 = __importStar(require("../../jdResource"));
|
|
28
|
+
const utils_1 = require("../../../utilities/utils");
|
|
29
|
+
class JDDistrict extends jdResource_1.default {
|
|
30
|
+
cityId = "";
|
|
31
|
+
city = {};
|
|
13
32
|
get localisedCityTitle() { return globalThis.language == 'en' ? this.cityTitleEN : this.cityTitleMM; }
|
|
14
|
-
get cityTitleEN() { return Utils.getString(Utils.getObject(this.city, 'title'), 'en'); }
|
|
15
|
-
get cityTitleMM() { return Utils.getString(Utils.getObject(this.city, 'title'), 'mm'); }
|
|
16
|
-
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
33
|
+
get cityTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.city, 'title'), 'en'); }
|
|
34
|
+
get cityTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.city, 'title'), 'mm'); }
|
|
35
|
+
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
17
36
|
super(connectorInfo);
|
|
18
|
-
this.cityId = "";
|
|
19
|
-
this.city = {};
|
|
20
37
|
this.setData(data);
|
|
21
38
|
}
|
|
22
39
|
setData(data) {
|
|
23
40
|
super.setData(data);
|
|
24
|
-
this.cityId = Utils.getString(data, "city_id");
|
|
25
|
-
this.city = Utils.getObject(data, "city");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
this.cityId = utils_1.Utils.getString(data, "city_id");
|
|
42
|
+
this.city = utils_1.Utils.getObject(data, "city");
|
|
43
|
+
}
|
|
44
|
+
async getContents(params = {}) {
|
|
45
|
+
const queryParams = this.getSortParameters(params);
|
|
46
|
+
return await this.getRelative('/modules/geolocation/districts', queryParams);
|
|
47
|
+
}
|
|
48
|
+
async paginateContents(params = {}) {
|
|
49
|
+
const queryParams = this.getSortParameters(params);
|
|
50
|
+
if (params.name)
|
|
51
|
+
queryParams['name'] = params.name;
|
|
52
|
+
return await this.getRelative('/modules/geolocation/districts/paginate', queryParams);
|
|
53
|
+
}
|
|
54
|
+
async findContents(title, params = {}) {
|
|
55
|
+
const queryParams = this.getSortParameters(params);
|
|
56
|
+
queryParams['title'] = title;
|
|
57
|
+
return await this.getRelative('/modules/geolocation/districts/find', queryParams);
|
|
58
|
+
}
|
|
59
|
+
async getInfo(id) {
|
|
60
|
+
return await this.getRelative(`/modules/geolocation/districts/${id}`, {});
|
|
61
|
+
}
|
|
62
|
+
async updateFields(id, body = {}) {
|
|
63
|
+
return await this.postRelative(`/modules/geolocation/districts/${id}/update/single_fields`, body);
|
|
43
64
|
}
|
|
44
65
|
}
|
|
66
|
+
exports.JDDistrict = JDDistrict;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
1
|
+
import JDResource, { ConnectorInfo, defaultSortParams, defaultUpdateFields, PaginateParams } from "../../jdResource";
|
|
2
2
|
export declare class JDState extends JDResource {
|
|
3
3
|
countryId: string;
|
|
4
4
|
country: Record<string, any>;
|
|
@@ -7,9 +7,13 @@ export declare class JDState extends JDResource {
|
|
|
7
7
|
get countryTitleMM(): string;
|
|
8
8
|
constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
|
|
9
9
|
setData(data: Record<string, any>): void;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
11
|
+
paginateContents(params?: PaginateParams & {
|
|
12
|
+
name?: string | null;
|
|
13
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
|
+
findContents(title: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
15
|
+
getCities(countryId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
13
16
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
17
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
14
18
|
}
|
|
15
19
|
//# sourceMappingURL=jdState.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jdState.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdState.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"jdState.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdState.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,SAAS,EAAC,MAAM,CAAM;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAElC,IAAI,qBAAqB,IAAG,MAAM,CAAoF;IACtH,IAAI,cAAc,IAAG,MAAM,CAAyE;IACpG,IAAI,cAAc,IAAG,MAAM,CAAyE;gBAExF,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAM1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAAO;IAMxE,YAAY,CAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAM3E,SAAS,CAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK5E,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -1,50 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
9
24
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JDState = void 0;
|
|
27
|
+
const jdResource_1 = __importStar(require("../../jdResource"));
|
|
28
|
+
const utils_1 = require("../../../utilities/utils");
|
|
29
|
+
class JDState extends jdResource_1.default {
|
|
30
|
+
countryId = "";
|
|
31
|
+
country = {};
|
|
13
32
|
get localisedCountryTitle() { return globalThis.language == 'en' ? this.countryTitleEN : this.countryTitleMM; }
|
|
14
|
-
get countryTitleEN() { return Utils.getString(Utils.getObject(this.country, 'title'), 'en'); }
|
|
15
|
-
get countryTitleMM() { return Utils.getString(Utils.getObject(this.country, 'title'), 'mm'); }
|
|
16
|
-
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
33
|
+
get countryTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.country, 'title'), 'en'); }
|
|
34
|
+
get countryTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.country, 'title'), 'mm'); }
|
|
35
|
+
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
17
36
|
super(connectorInfo);
|
|
18
|
-
this.countryId = "";
|
|
19
|
-
this.country = {};
|
|
20
37
|
this.setData(data);
|
|
21
38
|
}
|
|
22
39
|
setData(data) {
|
|
23
40
|
super.setData(data);
|
|
24
|
-
this.countryId = Utils.getString(data, "country_id");
|
|
25
|
-
this.country = Utils.getObject(data, "country");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
this.countryId = utils_1.Utils.getString(data, "country_id");
|
|
42
|
+
this.country = utils_1.Utils.getObject(data, "country");
|
|
43
|
+
}
|
|
44
|
+
async getContents(params = {}) {
|
|
45
|
+
const queryParams = this.getSortParameters(params);
|
|
46
|
+
return await this.getRelative('/modules/geolocation/states', queryParams);
|
|
47
|
+
}
|
|
48
|
+
async paginateContents(params = {}) {
|
|
49
|
+
const queryParams = this.getSortParameters(params);
|
|
50
|
+
if (params.name)
|
|
51
|
+
queryParams['name'] = params.name;
|
|
52
|
+
return await this.getRelative('/modules/geolocation/states/paginate', queryParams);
|
|
53
|
+
}
|
|
54
|
+
async findContents(title, params = {}) {
|
|
55
|
+
const queryParams = this.getSortParameters(params);
|
|
56
|
+
queryParams['title'] = title;
|
|
57
|
+
return await this.getRelative('/modules/geolocation/states/find', queryParams);
|
|
58
|
+
}
|
|
59
|
+
async getCities(countryId, params = {}) {
|
|
60
|
+
const queryParams = this.getSortParameters(params);
|
|
61
|
+
return await this.getRelative(`/modules/geolocation/states/${countryId}/cities`, queryParams);
|
|
62
|
+
}
|
|
63
|
+
async getInfo(id) {
|
|
64
|
+
return await this.getRelative(`/modules/geolocation/states/${id}`, {});
|
|
65
|
+
}
|
|
66
|
+
async updateFields(id, body = {}) {
|
|
67
|
+
return await this.postRelative(`/modules/geolocation/states/${id}/update/single_fields`, body);
|
|
49
68
|
}
|
|
50
69
|
}
|
|
70
|
+
exports.JDState = JDState;
|
|
@@ -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,8 +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
|
-
|
|
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;
|
|
35
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
28
36
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
29
37
|
updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
38
|
+
updateSingleFields(id: string, body?: UpdateFields & {
|
|
39
|
+
recommended?: boolean | null;
|
|
40
|
+
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
30
41
|
}
|
|
31
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"}
|
|
@@ -1,77 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
9
24
|
};
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.JDKtvShop = void 0;
|
|
27
|
+
const jdResource_1 = __importStar(require("../../jdResource"));
|
|
28
|
+
const utils_1 = require("../../../utilities/utils");
|
|
29
|
+
class JDKtvShop extends jdResource_1.default {
|
|
30
|
+
licenseKey = "";
|
|
31
|
+
activationsCount = 0;
|
|
32
|
+
maxActivationsCount = 0;
|
|
33
|
+
countryId = "";
|
|
34
|
+
stateId = "";
|
|
35
|
+
cityId = "";
|
|
36
|
+
districtId = "";
|
|
37
|
+
address = {};
|
|
38
|
+
country = {};
|
|
39
|
+
state = {};
|
|
40
|
+
city = {};
|
|
41
|
+
district = {};
|
|
13
42
|
get localisedAddress() {
|
|
14
43
|
return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
|
|
15
44
|
`${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
|
|
16
45
|
}
|
|
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
|
-
|
|
46
|
+
get countryTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.country, 'title'), 'en'); }
|
|
47
|
+
get countryTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.country, 'title'), 'mm'); }
|
|
48
|
+
get stateTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.state, 'title'), 'en'); }
|
|
49
|
+
get stateTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.state, 'title'), 'mm'); }
|
|
50
|
+
get cityTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.city, 'title'), 'en'); }
|
|
51
|
+
get cityTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.city, 'title'), 'mm'); }
|
|
52
|
+
get districtTitleEN() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.district, 'title'), 'en'); }
|
|
53
|
+
get districtTitleMM() { return utils_1.Utils.getString(utils_1.Utils.getObject(this.district, 'title'), 'mm'); }
|
|
54
|
+
expiryDate = new Date();
|
|
55
|
+
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
26
56
|
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
57
|
this.setData(data);
|
|
41
58
|
}
|
|
42
59
|
setData(data) {
|
|
43
60
|
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");
|
|
61
|
+
this.licenseKey = utils_1.Utils.getString(data, "license_key");
|
|
62
|
+
this.activationsCount = utils_1.Utils.getInteger(data, "activations_count");
|
|
63
|
+
this.maxActivationsCount = utils_1.Utils.getInteger(data, "max_activations_count");
|
|
64
|
+
this.countryId = utils_1.Utils.getString(data, "country_id");
|
|
65
|
+
this.stateId = utils_1.Utils.getString(data, "state_id");
|
|
66
|
+
this.cityId = utils_1.Utils.getString(data, "city_id");
|
|
67
|
+
this.districtId = utils_1.Utils.getString(data, "district_id");
|
|
68
|
+
this.address = utils_1.Utils.getObject(data, "address");
|
|
69
|
+
this.country = utils_1.Utils.getObject(data, "country");
|
|
70
|
+
this.state = utils_1.Utils.getObject(data, "state");
|
|
71
|
+
this.city = utils_1.Utils.getObject(data, "city");
|
|
72
|
+
this.district = utils_1.Utils.getObject(data, "district");
|
|
73
|
+
this.expiryDate = utils_1.Utils.getDate(data, "expiry_date");
|
|
74
|
+
}
|
|
75
|
+
async getContents(params = {}) {
|
|
76
|
+
const queryParams = this.getSortParameters(params);
|
|
77
|
+
return await this.getRelative(`/modules/karaoke/ktv_shops`, queryParams);
|
|
78
|
+
}
|
|
79
|
+
async paginateContents(params = {}) {
|
|
80
|
+
const queryParams = this.getSortParameters(params);
|
|
81
|
+
// Add custom filters
|
|
82
|
+
if (params.name)
|
|
83
|
+
queryParams['name'] = params.name;
|
|
84
|
+
if (params.guardName)
|
|
85
|
+
queryParams['guard_name'] = params.guardName;
|
|
86
|
+
if (params.published)
|
|
87
|
+
queryParams['published'] = params.published;
|
|
88
|
+
return await this.getRelative('/modules/karaoke/ktv_shops/paginate', queryParams);
|
|
89
|
+
}
|
|
90
|
+
async findContents(params = {}) {
|
|
91
|
+
const queryParams = this.getSortParameters(params);
|
|
92
|
+
if (params.name)
|
|
93
|
+
queryParams['name'] = params.name;
|
|
94
|
+
return await this.getRelative('/modules/karaoke/ktv_shops/find', queryParams);
|
|
57
95
|
}
|
|
58
|
-
|
|
59
|
-
return
|
|
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
|
-
});
|
|
96
|
+
async getInfo(id) {
|
|
97
|
+
return await this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
|
|
66
98
|
}
|
|
67
|
-
|
|
68
|
-
return
|
|
69
|
-
return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
|
|
70
|
-
});
|
|
99
|
+
async updateInfo(id, title, slug, expiryDate) {
|
|
100
|
+
return await this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
|
|
71
101
|
}
|
|
72
|
-
|
|
73
|
-
return
|
|
74
|
-
return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
|
|
75
|
-
});
|
|
102
|
+
async updateSingleFields(id, body = {}) {
|
|
103
|
+
return await this.postRelative(`/modules/karaoke/ktv_shops/${id}/update/single_fields`, body);
|
|
76
104
|
}
|
|
77
105
|
}
|
|
106
|
+
exports.JDKtvShop = JDKtvShop;
|