UNPKG

@starsched/sdk

Version:

ABA clinic control and management service API SDK

33 lines (32 loc) 880 B
export class Authentication { httpClient; constructor(httpClient) { this.httpClient = httpClient; } async signInWithEmailAndPassword(input, options) { const response = await this.httpClient.post('/v1/authentication/email', input, options); if (!response.ok) { return { data: null, error: response.body }; } return { data: response.body, error: null }; } async refreshAccessToken(input, options) { const response = await this.httpClient.post('/v1/authentication/refresh', input, options); if (!response.ok) { return { data: null, error: response.body }; } return { data: response.body, error: null }; } }