whio-api-sdk 1.0.205-beta-staging → 1.0.206-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.
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base-client';
2
- import { User, UpdateUserDto } from '../types';
2
+ import { User, UpdateUserDto, UpdateUserNamesDto } from '../types';
3
3
  export declare class UserModule extends BaseClient {
4
4
  createUser(firstName: string, lastName: string, email: string, password: string): Promise<User>;
5
5
  private assignRoleToUser;
@@ -14,4 +14,5 @@ export declare class UserModule extends BaseClient {
14
14
  getUsersByOrganization(organizationId: string): Promise<User[]>;
15
15
  updateUser(id: string, data: UpdateUserDto): Promise<User>;
16
16
  deleteUser(id: string): Promise<void>;
17
+ updateNames(data: UpdateUserNamesDto): Promise<User>;
17
18
  }
@@ -101,4 +101,9 @@ export class UserModule extends BaseClient {
101
101
  yield this.request(`${urls.users}/${id}`, 'DELETE');
102
102
  });
103
103
  }
104
+ updateNames(data) {
105
+ return __awaiter(this, void 0, void 0, function* () {
106
+ return this.request(`${urls.users}/names`, 'PATCH', data);
107
+ });
108
+ }
104
109
  }
@@ -32,6 +32,10 @@ export interface UpdateUserDto {
32
32
  lastName?: string;
33
33
  organizationId?: string;
34
34
  }
35
+ export interface UpdateUserNamesDto {
36
+ firstName?: string;
37
+ lastName?: string;
38
+ }
35
39
  export interface AdminUser {
36
40
  id: string;
37
41
  email: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.205-beta-staging",
3
+ "version": "1.0.206-beta-staging",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,5 +1,5 @@
1
1
  import { BaseClient } from './base-client';
2
- import { User, CreateUserDto, UpdateUserDto, Organization, AssignOrganizationRoleDto, OrganizationRoleType } from '../types';
2
+ import { User, CreateUserDto, UpdateUserDto, UpdateUserNamesDto, Organization, AssignOrganizationRoleDto, OrganizationRoleType } from '../types';
3
3
  import urls from '../urls';
4
4
 
5
5
  export class UserModule extends BaseClient {
@@ -86,4 +86,8 @@ export class UserModule extends BaseClient {
86
86
  public async deleteUser(id: string): Promise<void> {
87
87
  await this.request(`${urls.users}/${id}`, 'DELETE');
88
88
  }
89
+
90
+ public async updateNames(data: UpdateUserNamesDto): Promise<User> {
91
+ return this.request<User>(`${urls.users}/names`, 'PATCH', data);
92
+ }
89
93
  }
@@ -41,6 +41,12 @@ export interface UpdateUserDto {
41
41
  organizationId?: string;
42
42
  }
43
43
 
44
+ // User names update DTO
45
+ export interface UpdateUserNamesDto {
46
+ firstName?: string;
47
+ lastName?: string;
48
+ }
49
+
44
50
  export interface AdminUser {
45
51
  id: string;
46
52
  email: string;