feat(medusa-js): Add deleteSession endpoint (#1234)

This commit is contained in:
Kevin Antonio Rateni Iatauro
2022-08-21 14:08:51 +02:00
committed by GitHub
parent a54dc68db7
commit 8cbebef403
2 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/medusa-js": patch
---
Add deleteSession endpoint

View File

@@ -18,6 +18,15 @@ class AuthResource extends BaseResource {
return this.client.request("POST", path, payload, {}, customHeaders)
}
/**
* @description Removes authentication session
* @return {ResponsePromise<void>}
*/
deleteSession(customHeaders: Record<string, any> = {}): ResponsePromise<void> {
const path = `/store/auth`
return this.client.request("DELETE", path, {}, {}, customHeaders)
}
/**
* @description Retrieves an authenticated session
* Usually used to check if authenticated session is alive.