interface MetorialRequest { path: string | string[]; host?: string; query?: Record; body?: Record | FormData; headers?: Record; } declare class MetorialEndpointManager { readonly config: Config; readonly apiHost: string; readonly getHeaders: (config: Config) => Record; readonly fetchImpl: typeof fetch | undefined | null; private readonly options; constructor(config: Config, apiHost: string, getHeaders: (config: Config) => Record, fetchImpl: typeof fetch | undefined | null, options: { enableDebugLogging: boolean; }); get fetch(): typeof fetch; private request; private requestAndTransform; _get(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; _post(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; _put(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; _patch(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; _delete(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; } declare abstract class BaseMetorialEndpoint { protected readonly manager: MetorialEndpointManager; constructor(manager: MetorialEndpointManager); protected _get(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; protected _post(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; protected _put(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; protected _patch(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; protected _delete(request: MetorialRequest): { transform: (mapper: { transformFrom: (input: any) => T; }) => Promise; }; } declare class MetorialSDKError extends Error { readonly response: { status: number; code: string; message: string; hint?: string; description?: string; entity?: string; reason?: string; errors?: { code: string; message: string; expected?: any; received?: any; path?: string[]; min?: number; max?: number; positive?: boolean; negative?: boolean; }[]; [key: string]: any; }; __typename: "metorial.sdk.error"; __isMetorialError: boolean; constructor(response: { status: number; code: string; message: string; hint?: string; description?: string; entity?: string; reason?: string; errors?: { code: string; message: string; expected?: any; received?: any; path?: string[]; min?: number; max?: number; positive?: boolean; negative?: boolean; }[]; [key: string]: any; }); get code(): string; get message(): string; get hint(): string | undefined; get description(): string | undefined; get reason(): string | undefined; get validationErrors(): { code: string; message: string; expected?: any; received?: any; path?: string[]; min?: number; max?: number; positive?: boolean; negative?: boolean; }[] | undefined; get entity(): string | undefined; } declare let isMetorialSDKError: (error: any) => error is MetorialSDKError; declare class MetorialSDKBuilder { #private; private apiName; private apiVersion; private constructor(); static create(apiName: string, apiVersion: ApiVersion): MetorialSDKBuilder; setGetApiHost(getApiHost: (config: Config) => string): this; setGetHeaders(getHeaders: (config: Config) => Record): this; build>(getConfig: (config: SoftConfig) => Config): (getEndpoints: (manager: MetorialEndpointManager) => E) => (config: SoftConfig & { enableDebugLogging?: boolean; }) => E & { _config: Config & { apiHost: string; }; }; } type GetMetorialSDKConfig> = Builder extends MetorialSDKBuilder ? Config : never; export { BaseMetorialEndpoint, type GetMetorialSDKConfig, MetorialEndpointManager, type MetorialRequest, MetorialSDKBuilder, MetorialSDKError, isMetorialSDKError };