whio-api-sdk 1.0.228-beta-staging → 1.0.229-beta-staging

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.
@@ -6,6 +6,7 @@ export declare class UserModule extends BaseClient {
6
6
  assignEditorToRoleToUser(userId: string, organizationId?: string): Promise<User>;
7
7
  assignAdminToRoleToUser(userId: string, organizationId?: string): Promise<User>;
8
8
  assignDisabledToRoleToUser(userId: string, organizationId?: string): Promise<User>;
9
+ removeRoleFromUser(userId: string, organizationRoleId: string): Promise<void>;
9
10
  createEditorUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
10
11
  createAdminUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
11
12
  createDisabledUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
@@ -58,6 +58,11 @@ export class UserModule extends BaseClient {
58
58
  return this.assignRoleToUser(userId, OrganizationRoleType.DISABLED, organizationId);
59
59
  });
60
60
  }
61
+ removeRoleFromUser(userId, organizationRoleId) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ yield this.request(`${urls.userOrganizationRoles}/${userId}/${organizationRoleId}`, 'DELETE');
64
+ });
65
+ }
61
66
  createEditorUser(firstName, lastName, email, password) {
62
67
  return __awaiter(this, void 0, void 0, function* () {
63
68
  const user = yield this.createUser(firstName, lastName, email, password);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.228-beta-staging",
3
+ "version": "1.0.229-beta-staging",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -52,6 +52,10 @@ export class UserModule extends BaseClient {
52
52
  return this.assignRoleToUser(userId, OrganizationRoleType.DISABLED, organizationId);
53
53
  }
54
54
 
55
+ public async removeRoleFromUser(userId: string, organizationRoleId: string): Promise<void> {
56
+ await this.request(`${urls.userOrganizationRoles}/${userId}/${organizationRoleId}`, 'DELETE');
57
+ }
58
+
55
59
  public async createEditorUser(firstName: string, lastName: string, email: string, password: string): Promise<User> {
56
60
  const user = await this.createUser(firstName, lastName, email, password);
57
61
  const userWithOrgRole = await this.assignEditorToRoleToUser(user.id);