@starsched/sdk
Version:
ABA clinic control and management service API SDK
37 lines (36 loc) • 1.02 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Authentication = void 0;
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
};
}
}
exports.Authentication = Authentication;