@sumup/sdk
Version:
The official TypeScript SDK for the SumUp API
22 lines • 1.26 kB
TypeScript
import * as Core from "./core";
export type APIConfig = {
apiKey?: string;
baseParams?: Core.FetchParams;
host?: string;
};
export declare class HTTPClient {
host: string;
apiKey?: string;
baseParams: Core.FetchParams;
constructor({ apiKey, host, baseParams, }?: APIConfig);
get<R, E = Core.APIError<unknown>>({ ...params }: Omit<Core.FullParams, "method">): Core.APIPromise<R>;
post<R, E = Core.APIError<unknown>>({ ...params }: Omit<Core.FullParams, "method">): Core.APIPromise<R>;
put<R, E = Core.APIError<unknown>>({ ...params }: Omit<Core.FullParams, "method">): Core.APIPromise<R>;
patch<R, E = Core.APIError<unknown>>({ ...params }: Omit<Core.FullParams, "method">): Core.APIPromise<R>;
delete<R, E = Core.APIError<unknown>>({ ...params }: Omit<Core.FullParams, "method">): Core.APIPromise<R>;
request<T, E = Core.APIError<unknown>>({ body, path, query, host: hostOverride, ...fetchParams }: Core.FullParams): Core.APIPromise<T>;
protected do<E>(input: URL, init: RequestInit): Promise<Response>;
protected stringifyQuery(query: Record<string, unknown>): string;
}
export declare function mergeParams(a: Core.FetchParams, b: Core.FetchParams): Core.FetchParams;
//# sourceMappingURL=client.d.ts.map