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.
- package/dist/src/sdk/modules/user.module.d.ts +3 -0
- package/dist/src/sdk/modules/user.module.js +6 -0
- package/dist/src/sdk/sdk.d.ts +4 -0
- package/dist/src/sdk/sdk.js +10 -0
- package/dist/src/sdk/types/user.types.d.ts +3 -0
- package/package.json +1 -1
- package/src/sdk/modules/user.module.ts +6 -1
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/types/user.types.ts +5 -0
|
@@ -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
|
}
|
package/dist/src/sdk/sdk.d.ts
CHANGED
|
@@ -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>;
|
package/dist/src/sdk/sdk.js
CHANGED
|
@@ -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* () {
|
package/package.json
CHANGED
|
@@ -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);
|