@ringmybelle/taxjar
Version:
TaxJar Sales Tax API for Node
28 lines (27 loc) • 742 B
TypeScript
export * from '../types/returnTypes';
export * from '../types/paramTypes';
export interface Config {
apiKey: string;
apiUrl?: string;
headers?: object;
}
interface QueryRequestOptions {
url: string;
params?: Record<string, string>;
}
interface BodyRequestOptions {
url: string;
params?: object;
}
export interface Request {
get(options: QueryRequestOptions): Promise<any>;
post(options: BodyRequestOptions): Promise<any>;
put(options: BodyRequestOptions): Promise<any>;
delete(options: QueryRequestOptions): Promise<any>;
}
export declare class TaxjarError extends Error {
error: string;
detail: string;
status: number;
constructor(error: string, detail: string, status: number);
}