jd_platform_sdk 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/models/dashboard/geolocation/jdCity.js +6 -6
- package/dist/sdk/models/dashboard/geolocation/jdCountry.js +6 -6
- package/dist/sdk/models/dashboard/geolocation/jdDistrict.js +5 -5
- package/dist/sdk/models/dashboard/geolocation/jdGeolocationCombinations.js +1 -1
- package/dist/sdk/models/dashboard/geolocation/jdState.js +6 -6
- package/dist/sdk/models/dashboard/jdKtvShop.js +5 -5
- package/dist/sdk/models/dashboard/jdRadioStation.js +5 -5
- package/dist/sdk/models/dashboard/user/jdAccessToken.js +5 -5
- package/dist/sdk/models/dashboard/user/jdModerator.js +5 -5
- package/dist/sdk/models/dashboard/user/jdPermission.js +5 -5
- package/dist/sdk/models/dashboard/user/jdPermissionGroup.js +6 -6
- package/dist/sdk/models/dashboard/user/jdSessionAccessToken.js +5 -5
- package/dist/sdk/models/dashboard/user/jdUser.js +8 -8
- package/dist/sdk/models/dashboard/user/jdUserRole.js +7 -7
- package/package.json +1 -1
|
@@ -27,7 +27,7 @@ export class JDCity extends JDResource {
|
|
|
27
27
|
getContents() {
|
|
28
28
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
29
29
|
const queryParams = this.getSortParameters(params);
|
|
30
|
-
return yield this.getRelative('/
|
|
30
|
+
return yield this.getRelative('/dashboard/geolocation/cities', queryParams);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
paginateContents() {
|
|
@@ -35,30 +35,30 @@ export class JDCity extends JDResource {
|
|
|
35
35
|
const queryParams = this.getSortParameters(params);
|
|
36
36
|
if (params.name)
|
|
37
37
|
queryParams['name'] = params.name;
|
|
38
|
-
return yield this.getRelative('/
|
|
38
|
+
return yield this.getRelative('/dashboard/geolocation/cities/paginate', queryParams);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
findContents(title_1) {
|
|
42
42
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
43
43
|
const queryParams = this.getSortParameters(params);
|
|
44
44
|
queryParams['title'] = title;
|
|
45
|
-
return yield this.getRelative('/
|
|
45
|
+
return yield this.getRelative('/dashboard/geolocation/cities/find', queryParams);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
getDistricts(stateId_1) {
|
|
49
49
|
return __awaiter(this, arguments, void 0, function* (stateId, params = {}) {
|
|
50
50
|
const queryParams = this.getSortParameters(params);
|
|
51
|
-
return yield this.getRelative(`/
|
|
51
|
+
return yield this.getRelative(`/dashboard/geolocation/cities/${stateId}/districts`, queryParams);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
getInfo(id) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
return yield this.getRelative(`/
|
|
56
|
+
return yield this.getRelative(`/dashboard/geolocation/cities/${id}`, {});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
updateFields(id_1) {
|
|
60
60
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
61
|
-
return yield this.postRelative(`/
|
|
61
|
+
return yield this.postRelative(`/dashboard/geolocation/cities/${id}/update`, body);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -19,7 +19,7 @@ export class JDCountry extends JDResource {
|
|
|
19
19
|
getContents() {
|
|
20
20
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
21
21
|
const queryParams = this.getSortParameters(params);
|
|
22
|
-
return yield this.getRelative('/
|
|
22
|
+
return yield this.getRelative('/dashboard/geolocation/countries', queryParams);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
paginateContents() {
|
|
@@ -27,30 +27,30 @@ export class JDCountry extends JDResource {
|
|
|
27
27
|
const queryParams = this.getSortParameters(params);
|
|
28
28
|
if (params.name)
|
|
29
29
|
queryParams['name'] = params.name;
|
|
30
|
-
return yield this.getRelative('/
|
|
30
|
+
return yield this.getRelative('/dashboard/geolocation/countries/paginate', queryParams);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
findContents(title_1) {
|
|
34
34
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
35
35
|
const queryParams = this.getSortParameters(params);
|
|
36
36
|
queryParams['title'] = title;
|
|
37
|
-
return yield this.getRelative('/
|
|
37
|
+
return yield this.getRelative('/dashboard/geolocation/countries/find', queryParams);
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
getStates(countryId_1) {
|
|
41
41
|
return __awaiter(this, arguments, void 0, function* (countryId, params = {}) {
|
|
42
42
|
const queryParams = this.getSortParameters(params);
|
|
43
|
-
return yield this.getRelative(`/
|
|
43
|
+
return yield this.getRelative(`/dashboard/geolocation/countries/${countryId}/states`, queryParams);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
getInfo(id) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
return yield this.getRelative(`/
|
|
48
|
+
return yield this.getRelative(`/dashboard/geolocation/countries/${id}`, {});
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
updateFields(id_1) {
|
|
52
52
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
53
|
-
return yield this.postRelative(`/
|
|
53
|
+
return yield this.postRelative(`/dashboard/geolocation/countries/${id}/update`, body);
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -27,7 +27,7 @@ export class JDDistrict extends JDResource {
|
|
|
27
27
|
getContents() {
|
|
28
28
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
29
29
|
const queryParams = this.getSortParameters(params);
|
|
30
|
-
return yield this.getRelative('/
|
|
30
|
+
return yield this.getRelative('/dashboard/geolocation/districts', queryParams);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
paginateContents() {
|
|
@@ -35,24 +35,24 @@ export class JDDistrict extends JDResource {
|
|
|
35
35
|
const queryParams = this.getSortParameters(params);
|
|
36
36
|
if (params.name)
|
|
37
37
|
queryParams['name'] = params.name;
|
|
38
|
-
return yield this.getRelative('/
|
|
38
|
+
return yield this.getRelative('/dashboard/geolocation/districts/paginate', queryParams);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
findContents(title_1) {
|
|
42
42
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
43
43
|
const queryParams = this.getSortParameters(params);
|
|
44
44
|
queryParams['title'] = title;
|
|
45
|
-
return yield this.getRelative('/
|
|
45
|
+
return yield this.getRelative('/dashboard/geolocation/districts/find', queryParams);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
getInfo(id) {
|
|
49
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
-
return yield this.getRelative(`/
|
|
50
|
+
return yield this.getRelative(`/dashboard/geolocation/districts/${id}`, {});
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
updateFields(id_1) {
|
|
54
54
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
55
|
-
return yield this.postRelative(`/
|
|
55
|
+
return yield this.postRelative(`/dashboard/geolocation/districts/${id}/update`, body);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -15,7 +15,7 @@ export class JdGeolocationCombinations extends JDResource {
|
|
|
15
15
|
}
|
|
16
16
|
getOverview() {
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
return yield this.getRelative('/
|
|
18
|
+
return yield this.getRelative('/dashboard/geolocation/combinations/overview', {});
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -27,7 +27,7 @@ export class JDState extends JDResource {
|
|
|
27
27
|
getContents() {
|
|
28
28
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
29
29
|
const queryParams = this.getSortParameters(params);
|
|
30
|
-
return yield this.getRelative('/
|
|
30
|
+
return yield this.getRelative('/dashboard/geolocation/states', queryParams);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
paginateContents() {
|
|
@@ -35,30 +35,30 @@ export class JDState extends JDResource {
|
|
|
35
35
|
const queryParams = this.getSortParameters(params);
|
|
36
36
|
if (params.name)
|
|
37
37
|
queryParams['name'] = params.name;
|
|
38
|
-
return yield this.getRelative('/
|
|
38
|
+
return yield this.getRelative('/dashboard/geolocation/states/paginate', queryParams);
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
findContents(title_1) {
|
|
42
42
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
43
43
|
const queryParams = this.getSortParameters(params);
|
|
44
44
|
queryParams['title'] = title;
|
|
45
|
-
return yield this.getRelative('/
|
|
45
|
+
return yield this.getRelative('/dashboard/geolocation/states/find', queryParams);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
getCities(countryId_1) {
|
|
49
49
|
return __awaiter(this, arguments, void 0, function* (countryId, params = {}) {
|
|
50
50
|
const queryParams = this.getSortParameters(params);
|
|
51
|
-
return yield this.getRelative(`/
|
|
51
|
+
return yield this.getRelative(`/dashboard/geolocation/states/${countryId}/cities`, queryParams);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
getInfo(id) {
|
|
55
55
|
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
return yield this.getRelative(`/
|
|
56
|
+
return yield this.getRelative(`/dashboard/geolocation/states/${id}`, {});
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
updateFields(id_1) {
|
|
60
60
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
61
|
-
return yield this.postRelative(`/
|
|
61
|
+
return yield this.postRelative(`/dashboard/geolocation/states/${id}/update`, body);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
}
|
|
@@ -58,7 +58,7 @@ export class JDKtvShop extends JDResource {
|
|
|
58
58
|
getContents() {
|
|
59
59
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
60
60
|
const queryParams = this.getSortParameters(params);
|
|
61
|
-
return yield this.getRelative(`/
|
|
61
|
+
return yield this.getRelative(`/dashboard/ktv_shops`, queryParams);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
paginateContents() {
|
|
@@ -68,7 +68,7 @@ export class JDKtvShop extends JDResource {
|
|
|
68
68
|
queryParams['name'] = params.name;
|
|
69
69
|
if (params.guard_name)
|
|
70
70
|
queryParams['guard_name'] = params.guard_name;
|
|
71
|
-
return yield this.getRelative('/
|
|
71
|
+
return yield this.getRelative('/dashboard/ktv_shops/paginate', queryParams);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
findContents() {
|
|
@@ -76,17 +76,17 @@ export class JDKtvShop extends JDResource {
|
|
|
76
76
|
const queryParams = this.getSortParameters(params);
|
|
77
77
|
if (params.name)
|
|
78
78
|
queryParams['name'] = params.name;
|
|
79
|
-
return yield this.getRelative('/
|
|
79
|
+
return yield this.getRelative('/dashboard/ktv_shops/find', queryParams);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
getInfo(id) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
return yield this.getRelative(`/
|
|
84
|
+
return yield this.getRelative(`/dashboard/ktv_shops/${id}`, {});
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
updateFields(id_1) {
|
|
88
88
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
89
|
-
return yield this.postRelative(`/
|
|
89
|
+
return yield this.postRelative(`/dashboard/ktv_shops/${id}/update`, body);
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -58,7 +58,7 @@ export class JdRadioStation extends JDResource {
|
|
|
58
58
|
getContents() {
|
|
59
59
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
60
60
|
const queryParams = this.getSortParameters(params);
|
|
61
|
-
return yield this.getRelative(`/
|
|
61
|
+
return yield this.getRelative(`/dashboard/radio_stations`, queryParams);
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
paginateContents() {
|
|
@@ -68,7 +68,7 @@ export class JdRadioStation extends JDResource {
|
|
|
68
68
|
queryParams['name'] = params.name;
|
|
69
69
|
if (params.guard_name)
|
|
70
70
|
queryParams['guard_name'] = params.guard_name;
|
|
71
|
-
return yield this.getRelative('/
|
|
71
|
+
return yield this.getRelative('/dashboard/radio_stations/paginate', queryParams);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
findContents() {
|
|
@@ -76,17 +76,17 @@ export class JdRadioStation extends JDResource {
|
|
|
76
76
|
const queryParams = this.getSortParameters(params);
|
|
77
77
|
if (params.name)
|
|
78
78
|
queryParams['name'] = params.name;
|
|
79
|
-
return yield this.getRelative('/
|
|
79
|
+
return yield this.getRelative('/dashboard/radio_stations/find', queryParams);
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
getInfo(id) {
|
|
83
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
84
|
-
return yield this.getRelative(`/
|
|
84
|
+
return yield this.getRelative(`/dashboard/radio_stations/${id}`, {});
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
87
|
updateFields(id_1) {
|
|
88
88
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
89
|
-
return yield this.postRelative(`/
|
|
89
|
+
return yield this.postRelative(`/dashboard/radio_stations/${id}/update`, body);
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
92
|
}
|
|
@@ -28,7 +28,7 @@ export class JDAccessToken extends JDResource {
|
|
|
28
28
|
getContents() {
|
|
29
29
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
30
30
|
const queryParams = this.getSortParameters(params);
|
|
31
|
-
return yield this.getRelative('/
|
|
31
|
+
return yield this.getRelative('/dashboard/user/access_tokens', queryParams);
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
paginateContents() {
|
|
@@ -36,24 +36,24 @@ export class JDAccessToken extends JDResource {
|
|
|
36
36
|
const queryParams = this.getSortParameters(params);
|
|
37
37
|
if (params.name)
|
|
38
38
|
queryParams['name'] = params.name;
|
|
39
|
-
return yield this.getRelative('/
|
|
39
|
+
return yield this.getRelative('/dashboard/user/access_tokens/paginate', queryParams);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
findContents(title_1) {
|
|
43
43
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
44
44
|
const queryParams = this.getSortParameters(params);
|
|
45
45
|
queryParams['title'] = title;
|
|
46
|
-
return yield this.getRelative('/
|
|
46
|
+
return yield this.getRelative('/dashboard/user/access_tokens/find', queryParams);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
getInfo(id) {
|
|
50
50
|
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
return yield this.getRelative(`/
|
|
51
|
+
return yield this.getRelative(`/dashboard/user/access_tokens/${id}`, {});
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
updateFields(id_1) {
|
|
55
55
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
56
|
-
return yield this.postRelative(`/
|
|
56
|
+
return yield this.postRelative(`/dashboard/user/access_tokens/${id}/update`, body);
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -38,7 +38,7 @@ export class JdModerator extends JDResource {
|
|
|
38
38
|
getContents() {
|
|
39
39
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
40
40
|
const queryParams = this.getSortParameters(params);
|
|
41
|
-
return yield this.getRelative('/
|
|
41
|
+
return yield this.getRelative('/dashboard/user/moderators', queryParams);
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
paginateContents() {
|
|
@@ -48,24 +48,24 @@ export class JdModerator extends JDResource {
|
|
|
48
48
|
queryParams['name'] = params.name;
|
|
49
49
|
if (params.email)
|
|
50
50
|
queryParams['email'] = params.email;
|
|
51
|
-
return yield this.getRelative('/
|
|
51
|
+
return yield this.getRelative('/dashboard/user/moderators/paginate', params);
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
findContents(name_1) {
|
|
55
55
|
return __awaiter(this, arguments, void 0, function* (name, params = {}) {
|
|
56
56
|
const queryParams = this.getSortParameters(params);
|
|
57
57
|
queryParams['name'] = name;
|
|
58
|
-
return yield this.getRelative('/
|
|
58
|
+
return yield this.getRelative('/dashboard/user/moderators/find', queryParams);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
getInfo(id) {
|
|
62
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
63
|
-
return yield this.getRelative(`/
|
|
63
|
+
return yield this.getRelative(`/dashboard/user/moderators/${id}`, {});
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
updateFields(id_1) {
|
|
67
67
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
68
|
-
return yield this.postRelative(`/
|
|
68
|
+
return yield this.postRelative(`/dashboard/user/moderators/${id}/update`, body);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
}
|
|
@@ -32,7 +32,7 @@ export class JDPermission extends JDResource {
|
|
|
32
32
|
getContents() {
|
|
33
33
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
34
34
|
const queryParams = this.getSortParameters(params);
|
|
35
|
-
return yield this.getRelative(`/
|
|
35
|
+
return yield this.getRelative(`/dashboard/user/permissions`, queryParams);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
paginateContents() {
|
|
@@ -42,7 +42,7 @@ export class JDPermission extends JDResource {
|
|
|
42
42
|
queryParams['name'] = params.name;
|
|
43
43
|
if (params.guard_name)
|
|
44
44
|
queryParams['guard_name'] = params.guard_name;
|
|
45
|
-
return yield this.getRelative('/
|
|
45
|
+
return yield this.getRelative('/dashboard/user/permissions/paginate', queryParams);
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
// Find the permission with text search index which is a fast way to search the whole word
|
|
@@ -51,18 +51,18 @@ export class JDPermission extends JDResource {
|
|
|
51
51
|
const queryParams = this.getSortParameters(params);
|
|
52
52
|
if (params.name)
|
|
53
53
|
queryParams['name'] = params.name;
|
|
54
|
-
return yield this.getRelative('/
|
|
54
|
+
return yield this.getRelative('/dashboard/user/permissions/find', queryParams);
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
// Get the user information
|
|
58
58
|
getInfo(id) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
return yield this.getRelative(`/
|
|
60
|
+
return yield this.getRelative(`/dashboard/user/permissions/${id}`, {});
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
updateFields(id_1) {
|
|
64
64
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
65
|
-
return yield this.postRelative(`/
|
|
65
|
+
return yield this.postRelative(`/dashboard/user/permissions/${id}/update`, body);
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -19,7 +19,7 @@ export class JDPermissionGroup extends JDResource {
|
|
|
19
19
|
getContents() {
|
|
20
20
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
21
21
|
const queryParams = this.getSortParameters(params);
|
|
22
|
-
return yield this.getRelative(`/
|
|
22
|
+
return yield this.getRelative(`/dashboard/user/permission_groups`, queryParams);
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
paginateContents() {
|
|
@@ -29,7 +29,7 @@ export class JDPermissionGroup extends JDResource {
|
|
|
29
29
|
queryParams['name'] = params.name;
|
|
30
30
|
if (params.guard_name)
|
|
31
31
|
queryParams['guard_name'] = params.guard_name;
|
|
32
|
-
return yield this.getRelative('/
|
|
32
|
+
return yield this.getRelative('/dashboard/user/permission_groups/paginate', queryParams);
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
findContents() {
|
|
@@ -37,24 +37,24 @@ export class JDPermissionGroup extends JDResource {
|
|
|
37
37
|
const queryParams = this.getSortParameters(params);
|
|
38
38
|
if (params.name)
|
|
39
39
|
queryParams['name'] = params.name;
|
|
40
|
-
return yield this.getRelative('/
|
|
40
|
+
return yield this.getRelative('/dashboard/user/permission_groups/find', queryParams);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
getPermissions(permissionGroupId_1) {
|
|
44
44
|
return __awaiter(this, arguments, void 0, function* (permissionGroupId, params = {}) {
|
|
45
45
|
const queryParams = this.getSortParameters(params);
|
|
46
|
-
return yield this.getRelative(`/
|
|
46
|
+
return yield this.getRelative(`/dashboard/user/permission_groups/${permissionGroupId}/permissions`, queryParams);
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
// Get the user information
|
|
50
50
|
getInfo(id) {
|
|
51
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
-
return yield this.getRelative(`/
|
|
52
|
+
return yield this.getRelative(`/dashboard/user/permission_groups/${id}`, {});
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
updateFields(id_1) {
|
|
56
56
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
57
|
-
return yield this.postRelative(`/
|
|
57
|
+
return yield this.postRelative(`/dashboard/user/permission_groups/${id}/update`, body);
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -32,7 +32,7 @@ export class JDSessionAccessToken extends JDResource {
|
|
|
32
32
|
getContents() {
|
|
33
33
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
34
34
|
const queryParams = this.getSortParameters(params);
|
|
35
|
-
return yield this.getRelative('/
|
|
35
|
+
return yield this.getRelative('/dashboard/user/session_access_tokens', queryParams);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
paginateContents() {
|
|
@@ -40,24 +40,24 @@ export class JDSessionAccessToken extends JDResource {
|
|
|
40
40
|
const queryParams = this.getSortParameters(params);
|
|
41
41
|
if (params.name)
|
|
42
42
|
queryParams['name'] = params.name;
|
|
43
|
-
return yield this.getRelative('/
|
|
43
|
+
return yield this.getRelative('/dashboard/user/session_access_tokens/paginate', queryParams);
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
findContents(title_1) {
|
|
47
47
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
48
48
|
const queryParams = this.getSortParameters(params);
|
|
49
49
|
queryParams['title'] = title;
|
|
50
|
-
return yield this.getRelative('/
|
|
50
|
+
return yield this.getRelative('/dashboard/user/session_access_tokens/find', queryParams);
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
getInfo(id) {
|
|
54
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
-
return yield this.getRelative(`/
|
|
55
|
+
return yield this.getRelative(`/dashboard/user/session_access_tokens/${id}`, {});
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
updateFields(id_1) {
|
|
59
59
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
60
|
-
return yield this.postRelative(`/
|
|
60
|
+
return yield this.postRelative(`/dashboard/user/session_access_tokens/${id}/update`, body);
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -31,7 +31,7 @@ export class JDUser extends JDResource {
|
|
|
31
31
|
getContents() {
|
|
32
32
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
33
33
|
const queryParams = this.getSortParameters(params);
|
|
34
|
-
return yield this.getRelative('/
|
|
34
|
+
return yield this.getRelative('/dashboard/user/users', queryParams);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
paginateContents() {
|
|
@@ -45,26 +45,26 @@ export class JDUser extends JDResource {
|
|
|
45
45
|
queryParams['email'] = params.email;
|
|
46
46
|
if (params.phone)
|
|
47
47
|
queryParams['phone'] = params.phone;
|
|
48
|
-
return yield this.getRelative('/
|
|
48
|
+
return yield this.getRelative('/dashboard/user/users/paginate', params);
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
51
|
findContents(name_1) {
|
|
52
52
|
return __awaiter(this, arguments, void 0, function* (name, params = {}) {
|
|
53
53
|
const queryParams = this.getSortParameters(params);
|
|
54
54
|
queryParams['name'] = name;
|
|
55
|
-
return yield this.getRelative('/
|
|
55
|
+
return yield this.getRelative('/dashboard/user/users/find', queryParams);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
58
|
getInfo(id) {
|
|
59
59
|
return __awaiter(this, void 0, void 0, function* () {
|
|
60
|
-
return yield this.getRelative(`/
|
|
60
|
+
return yield this.getRelative(`/dashboard/user/users/${id}`, {});
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
// TODO: Sign the API calls to only be able to call from this client only
|
|
64
64
|
authenticate(username, password) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const body = { username, password };
|
|
67
|
-
const response = yield this.postRelative('/
|
|
67
|
+
const response = yield this.postRelative('/dashboard/user/users/authenticate', body);
|
|
68
68
|
yield this.checkUser(response);
|
|
69
69
|
return response;
|
|
70
70
|
});
|
|
@@ -72,19 +72,19 @@ export class JDUser extends JDResource {
|
|
|
72
72
|
register(name, username, email, phone, password) {
|
|
73
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
74
|
const body = { name, username, email, phone, password };
|
|
75
|
-
const response = yield this.postRelative('/
|
|
75
|
+
const response = yield this.postRelative('/dashboard/user/users/register', body);
|
|
76
76
|
yield this.checkUser(response);
|
|
77
77
|
return response;
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
logout() {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
return yield this.postRelative('/
|
|
82
|
+
return yield this.postRelative('/dashboard/user/users/logout', {});
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
updateFields(id_1) {
|
|
86
86
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
87
|
-
return yield this.postRelative(`/
|
|
87
|
+
return yield this.postRelative(`/dashboard/user/users/${id}/update`, body);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
90
|
}
|
|
@@ -22,7 +22,7 @@ export class JDUserRole extends JDResource {
|
|
|
22
22
|
getContents() {
|
|
23
23
|
return __awaiter(this, arguments, void 0, function* (params = {}) {
|
|
24
24
|
const queryParams = this.getSortParameters(params);
|
|
25
|
-
return yield this.getRelative('/
|
|
25
|
+
return yield this.getRelative('/dashboard/user/user_roles', queryParams);
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
paginateContents() {
|
|
@@ -30,37 +30,37 @@ export class JDUserRole extends JDResource {
|
|
|
30
30
|
const queryParams = this.getSortParameters(params);
|
|
31
31
|
if (params.name)
|
|
32
32
|
queryParams['name'] = params.name;
|
|
33
|
-
return yield this.getRelative('/
|
|
33
|
+
return yield this.getRelative('/dashboard/user/user_roles/paginate', queryParams);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
findContents(title_1) {
|
|
37
37
|
return __awaiter(this, arguments, void 0, function* (title, params = {}) {
|
|
38
38
|
const queryParams = this.getSortParameters(params);
|
|
39
39
|
queryParams['title'] = title;
|
|
40
|
-
return yield this.getRelative('/
|
|
40
|
+
return yield this.getRelative('/dashboard/user/user_roles/find', queryParams);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
// Return the user list with the provided row
|
|
44
44
|
getUsers(userRoleId_1) {
|
|
45
45
|
return __awaiter(this, arguments, void 0, function* (userRoleId, params = {}) {
|
|
46
46
|
const queryParams = this.getSortParameters(params);
|
|
47
|
-
return yield this.getRelative(`/
|
|
47
|
+
return yield this.getRelative(`/dashboard/user/user_roles/${userRoleId}/users`, queryParams);
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
getPermissions(userRoleId_1) {
|
|
51
51
|
return __awaiter(this, arguments, void 0, function* (userRoleId, params = {}) {
|
|
52
52
|
const queryParams = this.getSortParameters(params);
|
|
53
|
-
return yield this.getRelative(`/
|
|
53
|
+
return yield this.getRelative(`/dashboard/user/user_roles/${userRoleId}/permissions`, queryParams);
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
getInfo(id) {
|
|
57
57
|
return __awaiter(this, void 0, void 0, function* () {
|
|
58
|
-
return yield this.getRelative(`/
|
|
58
|
+
return yield this.getRelative(`/dashboard/user/user_roles/${id}`, {});
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
updateFields(id_1) {
|
|
62
62
|
return __awaiter(this, arguments, void 0, function* (id, body = {}) {
|
|
63
|
-
return yield this.postRelative(`/
|
|
63
|
+
return yield this.postRelative(`/dashboard/user/user_roles/${id}/update`, body);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
}
|