whio-api-sdk 1.0.228-beta-staging → 1.0.230-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/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export declare class ApiSDK extends BaseClient {
|
|
|
64
64
|
getUsersByOrganization(...args: Parameters<UserModule['getUsersByOrganization']>): Promise<User[]>;
|
|
65
65
|
updateUser(...args: Parameters<UserModule['updateUser']>): Promise<User>;
|
|
66
66
|
deleteUser(...args: Parameters<UserModule['deleteUser']>): Promise<void>;
|
|
67
|
+
removeRoleFromUser(...args: Parameters<UserModule['removeRoleFromUser']>): Promise<void>;
|
|
67
68
|
createOrganization(...args: Parameters<OrganizationModule['createOrganization']>): Promise<import("./types").Organization>;
|
|
68
69
|
getOrganizations(...args: Parameters<OrganizationModule['getOrganizations']>): Promise<import("./types").Organization[]>;
|
|
69
70
|
getOrganization(...args: Parameters<OrganizationModule['getOrganization']>): Promise<import("./types").Organization>;
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -210,6 +210,11 @@ export class ApiSDK extends BaseClient {
|
|
|
210
210
|
return this.users.deleteUser(...args);
|
|
211
211
|
});
|
|
212
212
|
}
|
|
213
|
+
removeRoleFromUser(...args) {
|
|
214
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
+
return this.users.removeRoleFromUser(...args);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
213
218
|
// Organization methods
|
|
214
219
|
createOrganization(...args) {
|
|
215
220
|
return __awaiter(this, void 0, void 0, function* () {
|
package/package.json
CHANGED
|
@@ -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);
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -215,6 +215,10 @@ export class ApiSDK extends BaseClient {
|
|
|
215
215
|
return this.users.deleteUser(...args);
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
+
public async removeRoleFromUser(...args: Parameters<UserModule['removeRoleFromUser']>) {
|
|
219
|
+
return this.users.removeRoleFromUser(...args);
|
|
220
|
+
}
|
|
221
|
+
|
|
218
222
|
// Organization methods
|
|
219
223
|
public async createOrganization(...args: Parameters<OrganizationModule['createOrganization']>) {
|
|
220
224
|
return this.organizations.createOrganization(...args);
|