import { DTIAction, ActionParam, DTISignHeaderNames, TResponseType } from '@napp/dti-core'; import { z } from 'zod'; type TActionSchema = z.ZodType; type TAnyAction = DTIAction; type InferActionSchema = TSchema extends TActionSchema ? z.infer : void; type InferClientResult = ResponseType extends "text" ? string : ResponseType extends "file" ? Blob : InferActionSchema; type DTIClientParam = TAction extends DTIAction ? ActionParam, InferActionSchema, InferActionSchema> : never; type DTIClientResult = TAction extends DTIAction ? InferClientResult : never; type DTIClientAuthParam = { action: TAction; param: DTIClientParam; }; type DTIClientAuth = (param: DTIClientAuthParam) => HeadersInit | undefined | Promise; type DTIClientSignParam = { action: TAction; param: DTIClientParam; }; type DTIClientSignSecret = string | ((param: DTIClientSignParam) => string | Promise); type DTIClientSign = { keyId: string; secret: DTIClientSignSecret; timestamp?: () => string | Date | Promise; nonce?: () => string | Promise; headerNames?: Partial; }; type DTIClientOptions = RequestInit & { auth?: DTIClientAuth; fetcher?: typeof fetch; sign?: DTIClientSign; }; type DTIClientCallOptions = RequestInit & { auth?: DTIClientAuth; sign?: DTIClientSign | false; }; type DTIClientDetailedResult = { result: DTIClientResult; response: Response; }; declare class DTIClient { private readonly baseUrl; private readonly fetcher; private readonly options; private readonly globalSignHeaderNames; constructor(baseUrl: string, options?: DTIClientOptions | typeof fetch); call(action: TAction, param: DTIClientParam, options?: DTIClientCallOptions): Promise>; callDetailed(action: TAction, param: DTIClientParam, options?: DTIClientCallOptions): Promise>; private parseParam; private validateResult; private parseResult; private callApi; private createResponseError; private createApiError; private createUrl; private resolvePathParams; private appendFormValue; private createRequestInit; private createHeaders; private createSignHeaders; private resolveSignSecret; private normalizeTimestamp; private createNonce; private resolveAuthHeaders; private appendHeaders; private getContentType; private createBody; private createFormBody; private isFormData; } export { DTIClient, type DTIClientAuth, type DTIClientAuthParam, type DTIClientCallOptions, type DTIClientDetailedResult, type DTIClientOptions, type DTIClientParam, type DTIClientResult, type DTIClientSign, type DTIClientSignParam, type DTIClientSignSecret };