whio-api-sdk 1.0.229-beta-staging → 1.0.231-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.
@@ -16,4 +16,7 @@ export declare class UserModule extends BaseClient {
16
16
  updateUser(id: string, data: UpdateUserDto): Promise<User>;
17
17
  deleteUser(id: string): Promise<void>;
18
18
  updateNames(data: UpdateUserNamesDto): Promise<User>;
19
+ addExpoPushToken(token: string): Promise<{
20
+ message: string;
21
+ }>;
19
22
  }
@@ -114,4 +114,10 @@ export class UserModule extends BaseClient {
114
114
  return this.request(`${urls.users}/names`, 'PATCH', data);
115
115
  });
116
116
  }
117
+ addExpoPushToken(token) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const dto = { token };
120
+ return this.request(`${urls.users}/expo-push-token`, 'POST', dto);
121
+ });
122
+ }
117
123
  }
@@ -64,6 +64,10 @@ 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>;
68
+ addExpoPushToken(...args: Parameters<UserModule['addExpoPushToken']>): Promise<{
69
+ message: string;
70
+ }>;
67
71
  createOrganization(...args: Parameters<OrganizationModule['createOrganization']>): Promise<import("./types").Organization>;
68
72
  getOrganizations(...args: Parameters<OrganizationModule['getOrganizations']>): Promise<import("./types").Organization[]>;
69
73
  getOrganization(...args: Parameters<OrganizationModule['getOrganization']>): Promise<import("./types").Organization>;
@@ -210,6 +210,16 @@ 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
+ }
218
+ addExpoPushToken(...args) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ return this.users.addExpoPushToken(...args);
221
+ });
222
+ }
213
223
  // Organization methods
214
224
  createOrganization(...args) {
215
225
  return __awaiter(this, void 0, void 0, function* () {
@@ -36,6 +36,9 @@ export interface UpdateUserNamesDto {
36
36
  firstName?: string;
37
37
  lastName?: string;
38
38
  }
39
+ export interface AddExpoPushTokenDto {
40
+ token: string;
41
+ }
39
42
  export interface AdminUser {
40
43
  id: string;
41
44
  email: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whio-api-sdk",
3
- "version": "1.0.229-beta-staging",
3
+ "version": "1.0.231-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, UpdateUserNamesDto, Organization, AssignOrganizationRoleDto, OrganizationRoleType } from '../types';
2
+ import { User, CreateUserDto, UpdateUserDto, UpdateUserNamesDto, AddExpoPushTokenDto, Organization, AssignOrganizationRoleDto, OrganizationRoleType } from '../types';
3
3
  import urls from '../urls';
4
4
 
5
5
  export class UserModule extends BaseClient {
@@ -97,4 +97,9 @@ export class UserModule extends BaseClient {
97
97
  public async updateNames(data: UpdateUserNamesDto): Promise<User> {
98
98
  return this.request<User>(`${urls.users}/names`, 'PATCH', data);
99
99
  }
100
+
101
+ public async addExpoPushToken(token: string): Promise<{ message: string }> {
102
+ const dto: AddExpoPushTokenDto = { token };
103
+ return this.request<{ message: string }>(`${urls.users}/expo-push-token`, 'POST', dto);
104
+ }
100
105
  }
package/src/sdk/sdk.ts CHANGED
@@ -215,6 +215,14 @@ 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
+
222
+ public async addExpoPushToken(...args: Parameters<UserModule['addExpoPushToken']>) {
223
+ return this.users.addExpoPushToken(...args);
224
+ }
225
+
218
226
  // Organization methods
219
227
  public async createOrganization(...args: Parameters<OrganizationModule['createOrganization']>) {
220
228
  return this.organizations.createOrganization(...args);
@@ -47,6 +47,11 @@ export interface UpdateUserNamesDto {
47
47
  lastName?: string;
48
48
  }
49
49
 
50
+ // Add expo push token DTO
51
+ export interface AddExpoPushTokenDto {
52
+ token: string;
53
+ }
54
+
50
55
  export interface AdminUser {
51
56
  id: string;
52
57
  email: string;