UNPKG

@starsched/sdk

Version:

ABA clinic control and management service API SDK

29 lines 1.83 kB
import type { Authentication } from '../../services/authentication/protocols/authentication'; export declare namespace StarSchedAPIProtocols { export type RefreshAccessTokenOutput = Authentication; type AuthenticationStorage = { store: (authentication: Authentication) => Promise<void>; get: () => Promise<Authentication | null>; remove: () => Promise<void>; }; export type Options = { baseURL: string; onLogout?: () => void; authenticationStore?: AuthenticationStorage; logRequests?: boolean; }; export type ErrorCodes = 'validation' | 'application_error' | 'company.plan.not.exists' | 'company.not.exists' | 'company.invite.exists' | 'company.invite.expired' | 'company.invite.not.expired' | 'company.invite.not.exists' | 'company.invite.status.not.pending' | 'company.current-user.member.update.denied' | 'company.member.exists' | 'company.member.not.active' | 'company.member.permission.not.valid' | 'company.member.not.exists' | 'company.member.owner.denied' | 'company.member.owner.role.denied' | 'company.patient.limit.exceeded' | 'company.patient.not.exists' | 'user.email.exists' | 'user.not.active' | 'user.email.not.exists' | 'user.not.exists' | 'user.account.creation.request.token.expired' | 'user.account.creation.request.token.not.exists' | 'session.expired' | 'session.not.exists' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'access.denied' | 'internal'; export type FailureResponse<Code = ErrorCodes> = { code: Code; message: string; }; export type Response<Success = unknown, Failure extends FailureResponse = FailureResponse> = { data: Success; error: null; } | { data: null; error: Failure; }; export {}; } //# sourceMappingURL=common.d.ts.map