@parra/parra-js-sdk 0.3.375 → 0.3.377

Sign up to get free protection for your applications and to get access to all the features.
@@ -3627,18 +3627,9 @@ export interface UpdateRoleRequestBody {
3627
3627
  key?: string;
3628
3628
  description?: string | null;
3629
3629
  }
3630
- export interface AddRoleToUserRequestBody {
3631
- role_id: string;
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
- addRoleToUser: (tenant_id: string, user_id: string, body: AddRoleToUserRequestBody, options?: Options) => Promise<UserRole>;
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.addRoleToUser = function (tenant_id, user_id, body, options) {
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 = {}; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parra/parra-js-sdk",
3
- "version": "0.3.375",
3
+ "version": "0.3.377",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",