postmark
Version:
Official Node.js client library for the Postmark HTTP API - https://www.postmarkapp.com
31 lines (30 loc) • 1.09 kB
TypeScript
export declare namespace ClientOptions {
/**
* Custom fetch implementation signature.
*
* Node's built-in fetch (undici) does not read HTTP_PROXY/HTTPS_PROXY/NO_PROXY. Supplying a
* custom fetch (for example one bound to an undici ProxyAgent dispatcher) is the supported way
* to route requests through a corporate egress proxy or otherwise customise transport.
*/
type FetchImplementation = (input: RequestInfo | URL, init?: RequestInit) => Promise<Response>;
class Configuration {
useHttps?: boolean;
requestHost?: string;
timeout?: number;
fetch?: FetchImplementation;
constructor(useHttps?: boolean, requestHost?: string, timeout?: number, fetch?: FetchImplementation);
}
enum HttpMethod {
GET = "GET",
POST = "POST",
DELETE = "DELETE",
PUT = "PUT",
OPTIONS = "OPTIONS",
HEAD = "HEAD",
PATCH = "PATCH"
}
enum AuthHeaderNames {
SERVER_TOKEN = "X-Postmark-Server-Token",
ACCOUNT_TOKEN = "X-Postmark-Account-Token"
}
}