whio-api-sdk 1.0.230-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
  }
@@ -65,6 +65,9 @@ export declare class ApiSDK extends BaseClient {
65
65
  updateUser(...args: Parameters<UserModule['updateUser']>): Promise<User>;
66
66
  deleteUser(...args: Parameters<UserModule['deleteUser']>): Promise<void>;
67
67
  removeRoleFromUser(...args: Parameters<UserModule['removeRoleFromUser']>): Promise<void>;
68
+ addExpoPushToken(...args: Parameters<UserModule['addExpoPushToken']>): Promise<{
69
+ message: string;
70
+ }>;
68
71
  createOrganization(...args: Parameters<OrganizationModule['createOrganization']>): Promise<import("./types").Organization>;
69
72
  getOrganizations(...args: Parameters<OrganizationModule['getOrganizations']>): Promise<import("./types").Organization[]>;
70
73
  getOrganization(...args: Parameters<OrganizationModule['getOrganization']>): Promise<import("./types").Organization>;
@@ -215,6 +215,11 @@ export class ApiSDK extends BaseClient {
215
215
  return this.users.removeRoleFromUser(...args);
216
216
  });
217
217
  }
218
+ addExpoPushToken(...args) {
219
+ return __awaiter(this, void 0, void 0, function* () {
220
+ return this.users.addExpoPushToken(...args);
221
+ });
222
+ }
218
223
  // Organization methods
219
224
  createOrganization(...args) {
220
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.230-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
@@ -219,6 +219,10 @@ export class ApiSDK extends BaseClient {
219
219
  return this.users.removeRoleFromUser(...args);
220
220
  }
221
221
 
222
+ public async addExpoPushToken(...args: Parameters<UserModule['addExpoPushToken']>) {
223
+ return this.users.addExpoPushToken(...args);
224
+ }
225
+
222
226
  // Organization methods
223
227
  public async createOrganization(...args: Parameters<OrganizationModule['createOrganization']>) {
224
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;