/** @class Auth */ import Auth from "./Auth"; export declare type GetTokenRes = { access_token: string; refresh_token: string; }; export declare type getTokens = () => Promise; export declare type setTokens = (access_token: string, refresh_token: string) => void; export declare type TDResponse = { error: boolean; errorMessage: false; response: ResponseType | null; }; /** * @class Timedoctor * @property Auth {Auth} * @property company_id {number} * */ export default class Timedoctor { company_id: string; Auth: Auth; constructor(getTokens: getTokens, setTokens: setTokens, company_id: any, client_key: string, client_secret: string); /** * handle Errors * * @param message {String?} * @return {Promise} */ handleError(message?: string): Promise; /** * Convert a Date instance to TD format * @param date {Date} * @return {String} */ toTDDate(date: Date): string | Date; /** * Execute api query * * @param options {Object} * @param company_id {number?} * @return {Promise} */ query(options?: { [k: string]: any; }, company_id?: string): Promise>; /** * Handle error thrown from invalid grant * @param options {Object} * @return {Promise.<*>} */ handleInvalidGrant(options: { [k: string]: any; }): Promise>; }