jd_platform_sdk 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +28 -44
- package/dist/sdk/configs/jdConfig.js +1 -5
- package/dist/sdk/jdConnector.js +72 -63
- package/dist/sdk/jdSdk.js +1 -5
- package/dist/sdk/models/jdApplication.d.ts +1 -1
- package/dist/sdk/models/jdApplication.d.ts.map +1 -1
- package/dist/sdk/models/jdApplication.js +63 -71
- package/dist/sdk/models/jdResource.d.ts +2 -2
- package/dist/sdk/models/jdResource.d.ts.map +1 -1
- package/dist/sdk/models/jdResource.js +104 -91
- package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +15 -31
- package/dist/sdk/models/modules/geolocation/jdCity.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCity.js +49 -55
- package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdCountry.js +47 -53
- package/dist/sdk/models/modules/geolocation/jdDistrict.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdDistrict.js +49 -57
- package/dist/sdk/models/modules/geolocation/jdState.d.ts.map +1 -1
- package/dist/sdk/models/modules/geolocation/jdState.js +49 -55
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +5 -6
- package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
- package/dist/sdk/models/modules/karaoke/jdKtvShop.js +75 -89
- package/dist/sdk/models/modules/music/jdAlbum.d.ts +2 -2
- package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdAlbum.js +96 -102
- package/dist/sdk/models/modules/music/jdArtist.d.ts +2 -5
- package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdArtist.js +79 -90
- package/dist/sdk/models/modules/music/jdComposer.d.ts +2 -4
- package/dist/sdk/models/modules/music/jdComposer.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdComposer.js +79 -87
- package/dist/sdk/models/modules/music/jdMusicCombinations.js +15 -31
- package/dist/sdk/models/modules/music/jdSong.d.ts +1 -1
- package/dist/sdk/models/modules/music/jdSong.d.ts.map +1 -1
- package/dist/sdk/models/modules/music/jdSong.js +105 -113
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +4 -5
- package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -1
- package/dist/sdk/models/modules/radio_station/jdRadioStation.js +75 -89
- package/dist/sdk/models/modules/user/jdPermission.d.ts +1 -2
- package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermission.js +53 -63
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +4 -6
- package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdPermissionGroup.js +48 -60
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdSessionUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdSessionUser.js +70 -72
- package/dist/sdk/models/modules/user/jdUser.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUser.js +73 -75
- package/dist/sdk/models/modules/user/jdUserRole.d.ts +1 -1
- package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -1
- package/dist/sdk/models/modules/user/jdUserRole.js +50 -54
- package/dist/sdk/utilities/browserUtils.d.ts.map +1 -1
- package/dist/sdk/utilities/browserUtils.js +31 -24
- package/dist/sdk/utilities/cryptoUtils.js +6 -13
- package/dist/sdk/utilities/dateUtils.js +1 -5
- package/dist/sdk/utilities/globalEventHandler.js +4 -5
- package/dist/sdk/utilities/stringUtils.js +2 -6
- package/dist/sdk/utilities/utils.d.ts.map +1 -1
- package/dist/sdk/utilities/utils.js +19 -22
- package/package.json +1 -1
|
@@ -1,106 +1,92 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const utils_1 = require("../../../utilities/utils");
|
|
29
|
-
class JdRadioStation 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 = {};
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
import { Utils } from "../../../utilities/utils";
|
|
12
|
+
export class JdRadioStation extends JDResource {
|
|
42
13
|
get localisedAddress() {
|
|
43
14
|
return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
|
|
44
15
|
`${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
|
|
45
16
|
}
|
|
46
|
-
get countryTitleEN() { return
|
|
47
|
-
get countryTitleMM() { return
|
|
48
|
-
get stateTitleEN() { return
|
|
49
|
-
get stateTitleMM() { return
|
|
50
|
-
get cityTitleEN() { return
|
|
51
|
-
get cityTitleMM() { return
|
|
52
|
-
get districtTitleEN() { return
|
|
53
|
-
get districtTitleMM() { return
|
|
54
|
-
|
|
55
|
-
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
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("", "")) {
|
|
56
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();
|
|
57
40
|
this.setData(data);
|
|
58
41
|
}
|
|
59
42
|
setData(data) {
|
|
60
43
|
super.setData(data);
|
|
61
|
-
this.licenseKey =
|
|
62
|
-
this.activationsCount =
|
|
63
|
-
this.maxActivationsCount =
|
|
64
|
-
this.countryId =
|
|
65
|
-
this.stateId =
|
|
66
|
-
this.cityId =
|
|
67
|
-
this.districtId =
|
|
68
|
-
this.address =
|
|
69
|
-
this.country =
|
|
70
|
-
this.state =
|
|
71
|
-
this.city =
|
|
72
|
-
this.district =
|
|
73
|
-
this.expiryDate =
|
|
74
|
-
}
|
|
75
|
-
async getContents(params = {}) {
|
|
76
|
-
const queryParams = this.getSortParameters(params);
|
|
77
|
-
return await this.getRelative(`/modules/radio_station/radio_stations`, queryParams);
|
|
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");
|
|
78
57
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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/radio_station/radio_stations/paginate', queryParams);
|
|
58
|
+
getContents() {
|
|
59
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
60
|
+
const queryParams = this.getSortParameters(params);
|
|
61
|
+
return yield this.getRelative(`/modules/radio_station/radio_stations`, queryParams);
|
|
62
|
+
});
|
|
89
63
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
64
|
+
paginateContents() {
|
|
65
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
66
|
+
const queryParams = this.getSortParameters(params);
|
|
67
|
+
if (params.name)
|
|
68
|
+
queryParams['name'] = params.name;
|
|
69
|
+
if (params.guard_name)
|
|
70
|
+
queryParams['guard_name'] = params.guard_name;
|
|
71
|
+
return yield this.getRelative('/modules/radio_station/radio_stations/paginate', queryParams);
|
|
72
|
+
});
|
|
95
73
|
}
|
|
96
|
-
|
|
97
|
-
return
|
|
74
|
+
findContents() {
|
|
75
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
76
|
+
const queryParams = this.getSortParameters(params);
|
|
77
|
+
if (params.name)
|
|
78
|
+
queryParams['name'] = params.name;
|
|
79
|
+
return yield this.getRelative('/modules/radio_station/radio_stations/find', queryParams);
|
|
80
|
+
});
|
|
98
81
|
}
|
|
99
|
-
|
|
100
|
-
return
|
|
82
|
+
getInfo(id) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
+
return yield this.getRelative(`/modules/radio_station/radio_stations/${id}`, {});
|
|
85
|
+
});
|
|
101
86
|
}
|
|
102
|
-
|
|
103
|
-
return
|
|
87
|
+
updateFields(id_1) {
|
|
88
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
89
|
+
return yield this.postRelative(`/modules/radio_station/radio_stations/${id}/update/single_fields`, body);
|
|
90
|
+
});
|
|
104
91
|
}
|
|
105
92
|
}
|
|
106
|
-
exports.JdRadioStation = JdRadioStation;
|
|
@@ -15,9 +15,8 @@ export declare class JDPermission extends JDResource {
|
|
|
15
15
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
16
16
|
findContents(params?: PaginateParams & {
|
|
17
17
|
name?: string;
|
|
18
|
-
published?: string;
|
|
19
18
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
20
19
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
21
|
-
|
|
20
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
22
21
|
}
|
|
23
22
|
//# 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,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAe,MAAM,kBAAkB,CAAC;AAEjI,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,EAAC,MAAM,CAAM;IACjB,SAAS,EAAC,MAAM,CAAM;IACtB,gBAAgB,EAAC,MAAM,CAAM;IAC7B,qBAAqB,EAAC,MAAM,CAAM;IAClC,mBAAmB,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC7C,OAAO,EAAE,GAAG,EAAE,CAA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|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class JDPermission extends jdResource_1.default {
|
|
30
|
-
name = "";
|
|
31
|
-
guardName = "";
|
|
32
|
-
descriptionPlain = "";
|
|
33
|
-
userPermissionGroupId = "";
|
|
34
|
-
userPermissionGroup = {};
|
|
35
|
-
roleIds = [];
|
|
36
|
-
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
import { Utils } from "../../../utilities/utils";
|
|
12
|
+
export class JDPermission extends JDResource {
|
|
13
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
37
14
|
super(connectorInfo);
|
|
15
|
+
this.name = "";
|
|
16
|
+
this.guardName = "";
|
|
17
|
+
this.descriptionPlain = "";
|
|
18
|
+
this.userPermissionGroupId = "";
|
|
19
|
+
this.userPermissionGroup = {};
|
|
20
|
+
this.roleIds = [];
|
|
38
21
|
this.setData(data);
|
|
39
22
|
}
|
|
40
23
|
setData(data) {
|
|
41
24
|
super.setData(data);
|
|
42
|
-
this.name =
|
|
43
|
-
this.guardName =
|
|
44
|
-
this.descriptionPlain =
|
|
45
|
-
this.userPermissionGroupId =
|
|
46
|
-
this.userPermissionGroup =
|
|
47
|
-
this.roleIds =
|
|
25
|
+
this.name = Utils.getString(data, "name");
|
|
26
|
+
this.guardName = Utils.getString(data, "guard_name");
|
|
27
|
+
this.descriptionPlain = Utils.getString(data, "description");
|
|
28
|
+
this.userPermissionGroupId = Utils.getString(data, "user_permission_group_id");
|
|
29
|
+
this.userPermissionGroup = Utils.getObject(data, "user_permission_group");
|
|
30
|
+
this.roleIds = Utils.getArray(data, "role_ids");
|
|
48
31
|
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
32
|
+
getContents() {
|
|
33
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
34
|
+
const queryParams = this.getSortParameters(params);
|
|
35
|
+
return yield this.getRelative(`/modules/user/permissions`, queryParams);
|
|
36
|
+
});
|
|
52
37
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
38
|
+
paginateContents() {
|
|
39
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
40
|
+
const queryParams = this.getSortParameters(params);
|
|
41
|
+
if (params.name)
|
|
42
|
+
queryParams['name'] = params.name;
|
|
43
|
+
if (params.guard_name)
|
|
44
|
+
queryParams['guard_name'] = params.guard_name;
|
|
45
|
+
return yield this.getRelative('/modules/user/permissions/paginate', queryParams);
|
|
46
|
+
});
|
|
60
47
|
}
|
|
61
48
|
// Find the permission with text search index which is a fast way to search the whole word
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
49
|
+
findContents() {
|
|
50
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
51
|
+
const queryParams = this.getSortParameters(params);
|
|
52
|
+
if (params.name)
|
|
53
|
+
queryParams['name'] = params.name;
|
|
54
|
+
return yield this.getRelative('/modules/user/permissions/find', queryParams);
|
|
55
|
+
});
|
|
69
56
|
}
|
|
70
57
|
// Get the user information
|
|
71
|
-
|
|
72
|
-
return
|
|
58
|
+
getInfo(id) {
|
|
59
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
+
return yield this.getRelative(`/modules/user/permissions/${id}`, {});
|
|
61
|
+
});
|
|
73
62
|
}
|
|
74
|
-
|
|
75
|
-
return
|
|
63
|
+
updateFields(id_1) {
|
|
64
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
65
|
+
return yield this.postRelative(`/modules/user/permissions/${id}/update/single_fields`, body);
|
|
66
|
+
});
|
|
76
67
|
}
|
|
77
68
|
}
|
|
78
|
-
exports.JDPermission = JDPermission;
|
|
@@ -4,16 +4,14 @@ export declare class JDPermissionGroup extends JDResource {
|
|
|
4
4
|
setData(data: Record<string, any>): void;
|
|
5
5
|
getContents(params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
6
6
|
paginateContents(params?: PaginateParams & {
|
|
7
|
-
name?: string;
|
|
8
|
-
|
|
9
|
-
published?: string;
|
|
7
|
+
name?: string | null;
|
|
8
|
+
guard_name?: string | null;
|
|
10
9
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
11
10
|
findContents(params?: PaginateParams & {
|
|
12
|
-
name?: string;
|
|
13
|
-
published?: string;
|
|
11
|
+
name?: string | null;
|
|
14
12
|
}): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
15
13
|
getPermissions(permissionGroupId: string, params?: Partial<typeof defaultSortParams>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
16
14
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
17
|
-
|
|
15
|
+
updateFields(id: string, body?: Partial<typeof defaultUpdateFields>): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
18
16
|
}
|
|
19
17
|
//# sourceMappingURL=jdPermissionGroup.d.ts.map
|
|
@@ -1 +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,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,iBAAkB,SAAQ,UAAU;gBACpC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,
|
|
1
|
+
{"version":3,"file":"jdPermissionGroup.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermissionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAEnH,qBAAa,iBAAkB,SAAQ,UAAU;gBACpC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,WAAW,CAAC,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAK1D,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAM;IAO/F,YAAY,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;KAAO;IAMlE,cAAc,CAAC,iBAAiB,EAAE,MAAM,EAAE,MAAM,GAAE,OAAO,CAAC,OAAO,iBAAiB,CAAM;IAMxF,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,YAAY,CAAC,EAAE,EAAC,MAAM,EAAE,IAAI,GAAE,OAAO,CAAC,OAAO,mBAAmB,CAAM;CAG5E"}
|
|
@@ -1,72 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
24
9
|
};
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class JDPermissionGroup extends jdResource_1.default {
|
|
29
|
-
constructor(data = {}, connectorInfo = new jdResource_1.ConnectorInfo("", "")) {
|
|
10
|
+
import JDResource, { ConnectorInfo } from "../../jdResource";
|
|
11
|
+
export class JDPermissionGroup extends JDResource {
|
|
12
|
+
constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
|
|
30
13
|
super(connectorInfo);
|
|
31
14
|
this.setData(data);
|
|
32
15
|
}
|
|
33
16
|
setData(data) {
|
|
34
17
|
super.setData(data);
|
|
35
18
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
queryParams
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
19
|
+
getContents() {
|
|
20
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
21
|
+
const queryParams = this.getSortParameters(params);
|
|
22
|
+
return yield this.getRelative(`/modules/user/permission_groups`, queryParams);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
paginateContents() {
|
|
26
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
27
|
+
const queryParams = this.getSortParameters(params);
|
|
28
|
+
if (params.name)
|
|
29
|
+
queryParams['name'] = params.name;
|
|
30
|
+
if (params.guard_name)
|
|
31
|
+
queryParams['guard_name'] = params.guard_name;
|
|
32
|
+
return yield this.getRelative('/modules/user/permission_groups/paginate', queryParams);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
findContents() {
|
|
36
|
+
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
37
|
+
const queryParams = this.getSortParameters(params);
|
|
38
|
+
if (params.name)
|
|
39
|
+
queryParams['name'] = params.name;
|
|
40
|
+
return yield this.getRelative('/modules/user/permission_groups/find', queryParams);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
getPermissions(permissionGroupId_1) {
|
|
44
|
+
return __awaiter(this, arguments, void 0, function* (permissionGroupId, params = {}) {
|
|
45
|
+
const queryParams = this.getSortParameters(params);
|
|
46
|
+
return yield this.getRelative(`/modules/user/permission_groups/${permissionGroupId}/permissions`, queryParams);
|
|
47
|
+
});
|
|
63
48
|
}
|
|
64
49
|
// Get the user information
|
|
65
|
-
|
|
66
|
-
return
|
|
50
|
+
getInfo(id) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
return yield this.getRelative(`/modules/user/permission_groups/${id}`, {});
|
|
53
|
+
});
|
|
67
54
|
}
|
|
68
|
-
|
|
69
|
-
return
|
|
55
|
+
updateFields(id_1) {
|
|
56
|
+
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
57
|
+
return yield this.postRelative(`/modules/user/permission_groups/${id}/update/single_fields`, body);
|
|
58
|
+
});
|
|
70
59
|
}
|
|
71
60
|
}
|
|
72
|
-
exports.JDPermissionGroup = JDPermissionGroup;
|
|
@@ -20,7 +20,7 @@ export declare class JDSessionUser extends JDResource {
|
|
|
20
20
|
register(name: string, username: string, email: string, phone: string, password: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
21
21
|
logout(name: string, username: string, email: string, phone: string, password: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
22
22
|
getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
|
|
23
|
-
|
|
23
|
+
updateFields(id: string, body?: UpdateFields & {
|
|
24
24
|
name?: string | null;
|
|
25
25
|
username?: string | null;
|
|
26
26
|
email?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jdSessionUser.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdSessionUser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAyB,iBAAiB,EAAuB,cAAc,EAAE,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAExJ,qBAAa,aAAc,SAAQ,UAAU;IAC5C,cAAc,EAAC,MAAM,CAAM;IAC3B,IAAI,EAAC,MAAM,CAAM;IACjB,QAAQ,EAAC,MAAM,CAAM;IACrB,KAAK,EAAC,MAAM,CAAM;IAClB,YAAY,EAAE,GAAG,EAAE,CAAM;IAEzB,IAAI,UAAU,IAAG,OAAO,CAA+C;gBAE3D,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAS1B,gBAAgB,CAAC,MAAM,GAAE,cAAc,GAAG;QAAE,IAAI,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"jdSessionUser.d.ts","sourceRoot":"","sources":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