lz-api-client
Advanced tools
Comparing version 0.8.1 to 0.9.0
@@ -42,6 +42,6 @@ import type { Authorization, InsertedId, SignUpBody, RequestPasswordResetBody, ResetPasswordBody, UploadProfileImageRes } from 'lz-schema'; | ||
* Sign out the current account. | ||
* This will remove the bearer token from the client. | ||
* This will remove the bearer token from the client and blacklist it on the server. | ||
* Redirection to the sign-in page is recommended after calling this method. | ||
*/ | ||
signOut(): void; | ||
signOut(): Promise<void>; | ||
/** | ||
@@ -78,3 +78,7 @@ * Get the account details of the currently authenticated user. | ||
resetPassword({ token, password }: ResetPasswordBody): Promise<null>; | ||
/** | ||
* Upload a profile image for the account. | ||
* The image will be compressed and resized on the server. | ||
*/ | ||
uploadProfileImage(file: File): Promise<UploadProfileImageRes>; | ||
} |
@@ -52,7 +52,10 @@ "use strict"; | ||
* Sign out the current account. | ||
* This will remove the bearer token from the client. | ||
* This will remove the bearer token from the client and blacklist it on the server. | ||
* Redirection to the sign-in page is recommended after calling this method. | ||
*/ | ||
signOut() { | ||
this.client.removeBearerToken(); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
yield this.client.post('/sign-out', {}); | ||
this.client.removeBearerToken(); | ||
}); | ||
} | ||
@@ -85,2 +88,6 @@ /** | ||
} | ||
/** | ||
* Upload a profile image for the account. | ||
* The image will be compressed and resized on the server. | ||
*/ | ||
uploadProfileImage(file) { | ||
@@ -87,0 +94,0 @@ return this.client.postFile('/upload-profile-image', file); |
{ | ||
"name": "lz-api-client", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"description": "client sdk for layerZ api", | ||
@@ -34,4 +34,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"lz-schema": "^0.10.5" | ||
"lz-schema": "^0.10.6" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
68317
1238
Updatedlz-schema@^0.10.6