UNPKG

@cafecafe/afip.ts

Version:
29 lines (28 loc) 984 B
import { Client } from "soap"; import { AccessTicket } from "../auth/access-ticket"; import { Context, AfipServiceSoapParam, WSAuthParam, ILoginCredentials } from "../types"; export declare class AfipService<T extends Client> { protected readonly context: Context; private _soapParams; private _soapCliente?; private _credentials?; private _serviceName; private _afipAuth; constructor(context: Context, _soapParams: AfipServiceSoapParam); setCredentials(credentials: ILoginCredentials): void; isCredentialStillValid(): boolean; getClient(): Promise<T>; private instanceSoapClient; private proxySoapClient; /** * Generate signatures through the WSAA. * **/ login(): Promise<AccessTicket>; /** * Generate signatures through the WSAA. If handleTicket is not defined, the function will save the tokens locally. * * @param params Parameters to send **/ getWsAuth(): Promise<WSAuthParam>; }