@trycourier/courier-js
Version:
A browser-safe API wrapper
22 lines (21 loc) • 698 B
TypeScript
import { CourierClientOptions } from '../client/courier-client';
export declare class CourierRequestError extends Error {
code: number;
type?: string | undefined;
constructor(code: number, message: string, type?: string | undefined);
}
export declare function http(props: {
url: string;
options: CourierClientOptions;
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
headers?: Record<string, string>;
body?: any;
validCodes?: number[];
}): Promise<any>;
export declare function graphql(props: {
url: string;
options: CourierClientOptions;
headers: Record<string, string>;
query: string;
variables?: Record<string, any>;
}): Promise<any>;