@parra/parra-js-sdk 0.3.375 → 0.3.377
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/ParraAPI.d.ts +4 -13
- package/dist/ParraAPI.js +2 -2
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
@@ -3627,18 +3627,9 @@ export interface UpdateRoleRequestBody {
|
|
3627
3627
|
key?: string;
|
3628
3628
|
description?: string | null;
|
3629
3629
|
}
|
3630
|
-
export interface
|
3631
|
-
role_id
|
3632
|
-
|
3633
|
-
export interface UserRole {
|
3634
|
-
id: string;
|
3635
|
-
created_at: string;
|
3636
|
-
updated_at: string;
|
3637
|
-
deleted_at?: string | null;
|
3638
|
-
name: string;
|
3639
|
-
key: string;
|
3640
|
-
user_id: string;
|
3641
|
-
role_id: string;
|
3630
|
+
export interface AddRolesToUserRequestBody {
|
3631
|
+
role_id?: string | null;
|
3632
|
+
role_ids?: Array<string> | null;
|
3642
3633
|
}
|
3643
3634
|
export interface UpdateTenantUserRequestBody {
|
3644
3635
|
identity?: string | null;
|
@@ -4564,7 +4555,7 @@ declare class ParraAPI {
|
|
4564
4555
|
getRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Role>;
|
4565
4556
|
updateRoleById: (tenant_id: string, role_id: string, body?: UpdateRoleRequestBody, options?: Options) => Promise<Role>;
|
4566
4557
|
deleteRoleById: (tenant_id: string, role_id: string, options?: Options) => Promise<Response>;
|
4567
|
-
|
4558
|
+
addRolesToUser: (tenant_id: string, user_id: string, body?: AddRolesToUserRequestBody, options?: Options) => Promise<Response>;
|
4568
4559
|
removeRoleFromUser: (tenant_id: string, user_id: string, user_role_id: string, options?: Options) => Promise<Response>;
|
4569
4560
|
getUserForTenantById: (tenant_id: string, user_id: string, query?: {
|
4570
4561
|
include?: string;
|
package/dist/ParraAPI.js
CHANGED
@@ -1729,11 +1729,11 @@ var ParraAPI = /** @class */ (function () {
|
|
1729
1729
|
if (options === void 0) { options = {}; }
|
1730
1730
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/roles/").concat(role_id), __assign({ method: "delete" }, options));
|
1731
1731
|
};
|
1732
|
-
this.
|
1732
|
+
this.addRolesToUser = function (tenant_id, user_id, body, options) {
|
1733
1733
|
if (options === void 0) { options = {}; }
|
1734
1734
|
return _this.http.execute("".concat(_this.options.baseUrl, "/v1/tenants/").concat(tenant_id, "/users/").concat(user_id, "/roles"), __assign({ method: "post", body: JSON.stringify(body), headers: {
|
1735
1735
|
"content-type": "application/json",
|
1736
|
-
} }, options));
|
1736
|
+
}, raw: true }, options));
|
1737
1737
|
};
|
1738
1738
|
this.removeRoleFromUser = function (tenant_id, user_id, user_role_id, options) {
|
1739
1739
|
if (options === void 0) { options = {}; }
|