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

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

No files matched your search

+9
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.