import { AxiosError, AxiosInstance, AxiosRequestConfig, HttpStatusCode } from "axios";
interface BaseClientConfig<HandleError extends boolean = boolean> {
    debug?: boolean;
    baseUrl: string;
    handleError?: HandleError;
    storage?: Storage;
    defaultSecure?: boolean;
    authDataStorageKey?: string;
    axiosConfig?: AxiosRequestConfig;
    onAxiosError?: (error: AxiosError) => void;
    onError?: (error: unknown) => void;
}
enum ContentType {
    Json = "application/json",
    FormData = "multipart/form-data",
    UrlEncoded = "application/x-www-form-urlencoded",
    Text = "text/plain"
}
type RequestConfig<Body = unknown> = AxiosRequestConfig<Body> & {
    secure?: boolean;
    contentType?: ContentType;
    handleError?: boolean;
};
type ResponseStatus = {
    status: HttpStatusCode | -1;
    statusText: string;
};
type SuccessClientResponse<Data = unknown> = ResponseStatus & {
    success: true;
    data: Data;
};
type ErrorClientResponse = ResponseStatus & {
    success: false;
    data?: any;
    error: unknown;
};
type ClientResponse<Data = unknown, HandleError extends boolean = boolean> = HandleError extends true ? SuccessClientResponse<Data> | ErrorClientResponse : SuccessClientResponse<Data>;
declare abstract class BaseClient<HandleError extends boolean = boolean, AuthData = unknown> {
    protected readonly config: BaseClientConfig<HandleError>;
    protected readonly axiosInstance: AxiosInstance;
    protected readonly storage: Storage;
    constructor(config: BaseClientConfig<HandleError>);
    protected stringifyFormItem(formItem: unknown): string;
    protected createFormData(input: Record<string, unknown>): FormData;
    request<Data = unknown, Error = unknown, Body = unknown>(requestConfig: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    get<Data = unknown, Error = unknown, Body = unknown>(url: string, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    delete<Data = unknown, Error = unknown, Body = unknown>(url: string, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    head<Data = unknown, Error = unknown, Body = unknown>(url: string, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    options<Data = unknown, Error = unknown, Body = unknown>(url: string, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    post<Data = unknown, Error = unknown, Body = unknown>(url: string, data?: Body, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    put<Data = unknown, Error = unknown, Body = unknown>(url: string, data?: Body, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    patch<Data = unknown, Error = unknown, Body = unknown>(url: string, data?: Body, config?: RequestConfig<Body>): Promise<ClientResponse<Data, HandleError>>;
    getAxios(): AxiosInstance;
    setAuthData(data: AuthData | null): void;
    getAuthData(): AuthData | null;
    getConfig(): BaseClientConfig<HandleError>;
    protected abstract prepareAuthRequestConfig(): Promise<Pick<RequestConfig<any>, 'headers' | 'data' | 'params'>>;
}
declare class BaseApi<HandleError extends boolean = boolean, ApiClient extends BaseClient<HandleError> = BaseClient<HandleError>> {
    protected readonly apiClient: ApiClient;
    constructor(apiClient: ApiClient);
    getApiClient(): ApiClient;
}
interface JwtClientConfig<HandleError extends boolean = boolean, AuthData extends JwtAuthData = JwtAuthData> extends BaseClientConfig<HandleError> {
    authSchema?: string;
    autoRenewToken?: boolean;
    onRenewToken?: () => Promise<AuthData>;
}
interface JwtAuthData {
    accessToken: string;
    refreshToken?: string;
}
declare class JwtClient<HandleError extends boolean = boolean, AuthData extends JwtAuthData = JwtAuthData> extends BaseClient<HandleError, AuthData> {
    protected readonly config: JwtClientConfig<HandleError, AuthData>;
    constructor(config: JwtClientConfig<HandleError, AuthData>);
    getConfig(): JwtClientConfig<HandleError>;
    setRenewTokenCallback(renewTokenCallback: () => Promise<AuthData>): void;
    protected prepareAuthRequestConfig(): Promise<Pick<RequestConfig<any>, 'headers' | 'data' | 'params'>>;
}
export interface MiddlewareValidationError {
    message: string;
    meta?: Record<string, string | number>;
}
export interface MiddlewareValidationExceptionDto {
    /** @default [] */
    errors: MiddlewareValidationError[];
    id: string;
    message: string;
    /** @format date-time */
    timestamp: string;
}
export interface MiddlewareExceptionDto {
    id: string;
    message: string;
    /** @format date-time */
    timestamp: string;
}
export interface MiddlewareAvatarUploadDto {
    /** @format binary */
    image: File;
}
export interface MiddlewareUserTokensDto {
    /** Deprecated. Use `accessToken` instead */
    apiToken: string;
    accessToken: string;
    refreshToken: string;
    assetsToken: string;
}
export interface MiddlewareMessageDto {
    id: number;
    /** @maxLength 64 */
    title: string;
    /** @maxLength 512 */
    content: string;
    /** @default false */
    isRtl: boolean;
    /** @default false */
    isNew: boolean;
}
export interface MiddlewareChartLayoutDto {
    id: number;
    /** @maxLength 16 */
    symbol: string;
    /** @maxLength 8 */
    resolution: string;
    timestamp: object;
    name: string;
}
export interface MiddlewareChartLayoutDetailsDto {
    id: number;
    /** @maxLength 16 */
    symbol: string;
    /** @maxLength 8 */
    resolution: string;
    timestamp: object;
    name: string;
    content: string;
}
export interface MiddlewareChartDataDto {
    name: string;
}
export interface MiddlewareChartTemplateDto {
    name: string;
    content: string;
}
export interface MiddlewareWatchlistEntryDto {
    /**
     * Default to `equity` if not provided
     * @default "equity"
     */
    type?: MiddlewareWatchlistEntryDtoTypeEnum;
    symbol: string;
}
export interface MiddlewareWatchlistDto {
    id: number;
    /**
     * Setting this to `true` would automatically mark other watchlists of the same user to not default
     * @default false
     */
    isDefault: boolean;
    /** @maxLength 64 */
    name: string;
    /**
     * @maxLength 256
     * @default ""
     */
    description: string;
    /**
     * @maxLength 10
     * @default ""
     */
    color: string;
    /** @default null */
    order: number | null;
    /** @default [] */
    entries: MiddlewareWatchlistEntryDto[];
}
export interface MiddlewarePersistWatchlistDto {
    id: number;
    /**
     * Setting this to `true` would automatically mark other watchlists of the same user to not default
     * @default false
     */
    isDefault?: boolean;
    /** @maxLength 64 */
    name: string;
    /**
     * @maxLength 256
     * @default ""
     */
    description?: string;
    /**
     * @maxLength 10
     * @default ""
     */
    color?: string;
    /** @default null */
    order?: number | null;
    /** @default [] */
    entries?: MiddlewareWatchlistEntryDto[];
}
export interface MiddlewareWatchlistEntriesDto {
    entries: MiddlewareWatchlistEntryDto[];
}
export interface MiddlewareWatchlistOrderDto {
    watchlistId: number;
    order: number;
}
export interface MiddlewareWatchlistOrdersDto {
    orders: MiddlewareWatchlistOrderDto[];
}
export interface MiddlewareAppVersionDto {
    token: string;
    /**
     * @maxLength 32
     * @default ""
     */
    versionNumber: string;
}
/**
 * Default to `equity` if not provided
 * @default "equity"
 */
export enum MiddlewareWatchlistEntryDtoTypeEnum {
    Equity = "equity",
    Option = "option",
    Crypto = "crypto",
    Bond = "bond",
    MutualFund = "mutualFund"
}
export class AvatarApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags AvatarApi
     * @name GetUserAvatar
     * @request GET:/api/v1/avatars/users/{userId}
     * @secure
     */
    getUserAvatar(userId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<File, HandleError>>;
    /**
     * @tags AvatarApi
     * @name UploadUserAvatar
     * @request POST:/api/v1/avatars/users/{userId}
     * @secure
     */
    uploadUserAvatar(userId: number, data: MiddlewareAvatarUploadDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags AvatarApi
     * @name DeleteUserAvatar
     * @request DELETE:/api/v1/avatars/users/{userId}
     * @secure
     */
    deleteUserAvatar(userId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags AvatarApi
     * @name GetAccountAvatar
     * @request GET:/api/v1/avatars/accounts/{accountId}
     * @secure
     */
    getAccountAvatar(accountId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<File, HandleError>>;
    /**
     * @tags AvatarApi
     * @name UploadAccountAvatar
     * @request POST:/api/v1/avatars/accounts/{accountId}
     * @secure
     */
    uploadAccountAvatar(accountId: number, data: MiddlewareAvatarUploadDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags AvatarApi
     * @name DeleteAccountAvatar
     * @request DELETE:/api/v1/avatars/accounts/{accountId}
     * @secure
     */
    deleteAccountAvatar(accountId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class AuthenticationApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags AuthenticationApi
     * @name Authenticate
     * @request POST:/api/v1/authenticate
     */
    authenticate(headers: {
        /** Application environment (for different firms) */
        'Application-Env'?: string;
        /** Firm's id from UMA */
        'Firm-Id': string;
        /** Watchmen authorization token (it's `sessionId` from Watchmen's `login` endpoint) */
        'Watchmen-Token': string;
        /** Name of the application using middleware */
        'Application-Name': string;
    }, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareUserTokensDto, HandleError>>;
    /**
     * @description Must use `refreshToken` instead of `accessToken` in `Authorization` header
     * @tags AuthenticationApi
     * @name Refresh
     * @request POST:/api/v1/refresh
     * @secure
     */
    refresh(config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareUserTokensDto, HandleError>>;
    /**
     * @tags AuthenticationApi
     * @name Invalidate
     * @request POST:/api/v1/invalidate
     * @secure
     */
    invalidate(config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class AttributeApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags AttributeApi
     * @name GetAttributeValues
     * @request GET:/api/v1/attributes
     * @secure
     */
    getAttributeValues(config?: RequestConfig<HandleError>): Promise<ClientResponse<Record<string, string | number | boolean>, HandleError>>;
    /**
     * @tags AttributeApi
     * @name GetPublicAttributeValue
     * @request GET:/api/v1/attributes/{attributePublicId}
     * @secure
     */
    getPublicAttributeValue(attributePublicId: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<string | number | boolean, HandleError>>;
}
export class MessageApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags MessageApi
     * @name GetMessages
     * @request GET:/api/v1/messages
     * @secure
     */
    getMessages(query?: {
        /** Get messages in preferred language. If not provided or there is no translation for the chosen language, default one will be used. */
        languageCode?: string;
    }, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareMessageDto[], HandleError>>;
    /**
     * @tags MessageApi
     * @name MarkAsSeen
     * @request PATCH:/api/v1/messages/mark-as-seen
     * @secure
     */
    markAsSeen(config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class WatchlistApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags WatchlistApi
     * @name GetAllWatchlists
     * @request GET:/api/v1/watchlists
     * @secure
     */
    getAllWatchlists(config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto[], HandleError>>;
    /**
     * @tags WatchlistApi
     * @name CreateWatchlist
     * @request POST:/api/v1/watchlists
     * @secure
     */
    createWatchlist(data: MiddlewarePersistWatchlistDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name GetWatchlist
     * @request GET:/api/v1/watchlists/{watchlistId}
     * @secure
     */
    getWatchlist(watchlistId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name UpdateWatchlist
     * @request PUT:/api/v1/watchlists/{watchlistId}
     * @secure
     */
    updateWatchlist(watchlistId: number, data: MiddlewarePersistWatchlistDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name DeleteWatchlist
     * @request DELETE:/api/v1/watchlists/{watchlistId}
     * @secure
     */
    deleteWatchlist(watchlistId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name AddWatchlistEntries
     * @request POST:/api/v1/watchlists/{watchlistId}/entries
     * @secure
     */
    addWatchlistEntries(watchlistId: number, data: MiddlewareWatchlistEntriesDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name RemoveWatchlistEntries
     * @request DELETE:/api/v1/watchlists/{watchlistId}/entries
     * @secure
     */
    removeWatchlistEntries(watchlistId: number, data: MiddlewareWatchlistEntriesDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name UpdateWatchlistEntries
     * @request PUT:/api/v1/watchlists/{watchlistId}/entries
     * @secure
     */
    updateWatchlistEntries(watchlistId: number, data: MiddlewareWatchlistEntriesDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareWatchlistDto, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name UpdateWatchlistOrders
     * @request POST:/api/v1/watchlists/orders
     * @secure
     */
    updateWatchlistOrders(data: MiddlewareWatchlistOrdersDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags WatchlistApi
     * @name ImportWatchmenWatchlists
     * @request POST:/api/v1/watchlists/import
     * @secure
     */
    importWatchmenWatchlists(config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class ChartApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags ChartApi
     * @name GetChartLayouts
     * @request GET:/api/v1/charts/layouts
     * @secure
     */
    getChartLayouts(config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartLayoutDto[], HandleError>>;
    /**
     * @tags ChartApi
     * @name UpdateChartLayout
     * @request PUT:/api/v1/charts/layouts
     * @secure
     */
    updateChartLayout(data: MiddlewareChartLayoutDetailsDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartLayoutDetailsDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name GetChartLayoutDetails
     * @request GET:/api/v1/charts/layouts/{chartId}
     * @secure
     */
    getChartLayoutDetails(chartId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartLayoutDetailsDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name DeleteChartLayout
     * @request DELETE:/api/v1/charts/layouts/{chartId}
     * @secure
     */
    deleteChartLayout(chartId: number, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags ChartApi
     * @name GetIndicatorTemplates
     * @request GET:/api/v1/charts/indicator-templates
     * @secure
     */
    getIndicatorTemplates(config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartDataDto[], HandleError>>;
    /**
     * @tags ChartApi
     * @name UpdateIndicatorTemplate
     * @request PUT:/api/v1/charts/indicator-templates
     * @secure
     */
    updateIndicatorTemplate(data: MiddlewareChartTemplateDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartTemplateDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name GetIndicatorTemplateDetails
     * @request GET:/api/v1/charts/indicator-templates/{templateName}
     * @secure
     */
    getIndicatorTemplateDetails(templateName: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartTemplateDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name DeleteIndicatorTemplate
     * @request DELETE:/api/v1/charts/indicator-templates/{templateName}
     * @secure
     */
    deleteIndicatorTemplate(templateName: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
    /**
     * @tags ChartApi
     * @name GetChartTemplates
     * @request GET:/api/v1/charts/templates
     * @secure
     */
    getChartTemplates(config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartDataDto[], HandleError>>;
    /**
     * @tags ChartApi
     * @name UpdateChartTemplate
     * @request PUT:/api/v1/charts/templates
     * @secure
     */
    updateChartTemplate(data: MiddlewareChartTemplateDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartTemplateDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name GetChartTemplateDetails
     * @request GET:/api/v1/charts/templates/{templateName}
     * @secure
     */
    getChartTemplateDetails(templateName: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareChartTemplateDto, HandleError>>;
    /**
     * @tags ChartApi
     * @name DeleteChartTemplate
     * @request DELETE:/api/v1/charts/templates/{templateName}
     * @secure
     */
    deleteChartTemplate(templateName: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class PreferenceApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags PreferenceApi
     * @name GetPreferences
     * @request GET:/api/v1/preferences
     * @secure
     */
    getPreferences(config?: RequestConfig<HandleError>): Promise<ClientResponse<Record<string, string>, HandleError>>;
    /**
     * @tags PreferenceApi
     * @name SavePreferences
     * @request POST:/api/v1/preferences
     * @secure
     */
    savePreferences(config?: RequestConfig<HandleError>): Promise<ClientResponse<Record<string, string>, HandleError>>;
}
export class VersioningApi<HandleError extends boolean = boolean> {
    protected readonly apiClient: JwtClient<HandleError>;
    constructor(apiClient: JwtClient<HandleError>);
    /**
     * @tags VersioningApi
     * @name GetAppVersion
     * @request GET:/api/versioning/{appId}
     */
    getAppVersion(appId: string, config?: RequestConfig<HandleError>): Promise<ClientResponse<MiddlewareAppVersionDto, HandleError>>;
    /**
     * @tags VersioningApi
     * @name UpdateAppVersion
     * @request POST:/api/versioning/{appId}
     */
    updateAppVersion(appId: string, data: MiddlewareAppVersionDto, config?: RequestConfig<HandleError>): Promise<ClientResponse<void, HandleError>>;
}
export class MiddlewareApi<HandleError extends boolean = false> extends BaseApi<HandleError, JwtClient<HandleError>> {
    readonly config: JwtClientConfig<HandleError>;
    attribute: AttributeApi<HandleError>;
    authentication: AuthenticationApi<HandleError>;
    avatar: AvatarApi<HandleError>;
    chart: ChartApi<HandleError>;
    message: MessageApi<HandleError>;
    preference: PreferenceApi<HandleError>;
    versioning: VersioningApi<HandleError>;
    watchlist: WatchlistApi<HandleError>;
    constructor(config: JwtClientConfig<HandleError>);
}

//# sourceMappingURL=index.d.ts.map
