import { z } from 'zod/v4';
import { AxiosRequestConfig, AxiosResponse } from 'axios';

declare const configSchema: z.ZodObject<{
    baseUrl: z.ZodURL;
    username: z.ZodString;
    password: z.ZodString;
    timeout: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
    retries: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
    token: z.ZodOptional<z.ZodString>;
    authenticateOnInit: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
    logger: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodObject<{
        level: z.ZodOptional<z.ZodEnum<{
            debug: "debug";
            info: "info";
            warn: "warn";
            error: "error";
        }>>;
        timestamp: z.ZodOptional<z.ZodBoolean>;
    }, z.core.$strip>, z.ZodObject<{
        debug: z.ZodCustom<(message: string, context?: string) => void, (message: string, context?: string) => void>;
        info: z.ZodCustom<(message: string, context?: string) => void, (message: string, context?: string) => void>;
        warn: z.ZodCustom<(message: string, context?: string) => void, (message: string, context?: string) => void>;
        error: z.ZodCustom<(message: string, trace?: unknown, context?: string) => void, (message: string, trace?: unknown, context?: string) => void>;
    }, z.core.$strip>]>>;
    webhook: z.ZodOptional<z.ZodObject<{
        secret: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Configuration options for initializing the MarzbanSDK client.
 *
 * @property {string} baseUrl - Base URL of the Marzban API instance. Example: 'https://api.example.com'.
 * @property {string} username - Username for authentication.
 * @property {string} password - Password for authentication.
 * @property {string} [token] - Optional JWT token for authorization. If provided, SDK will use it instead of logging in.
 * @property {number} [retries=3] - Number of automatic retries for failed HTTP requests.
 * @property {boolean} [authenticateOnInit=true] - If false, SDK will not authenticate on instantiation (call `authorize()` manually).
 */
type Config = z.infer<typeof configSchema>;

interface FormatCode {
    code: string;
    message: string;
}
declare const ERROR_CODES: {
    readonly CONFIG_INVALID: {
        readonly code: "CONFIG_INVALID";
        readonly message: "Invalid SDK configuration";
    };
    readonly NETWORK_HTTP_ERROR: {
        readonly code: "NETWORK_HTTP_ERROR";
        readonly message: "HTTP request failed";
    };
    readonly AUTH_TOKEN_FAILED: {
        readonly code: "AUTH_TOKEN_FAILED";
        readonly message: "Failed to retrieve access token";
    };
    readonly AUTH_FAILED: {
        readonly code: "AUTH_FAILED";
        readonly message: "Authentication failed";
    };
    readonly LOGGER_INVALID: {
        readonly code: "LOGGER_INVALID";
        readonly message: "Invalid logger option: must be false, LoggerOptions, or Logger instance";
    };
    readonly WEBHOOK_SIGNATURE_ERROR: {
        readonly code: "WEBHOOK_SIGNATURE_ERROR";
        readonly message: "Invalid webhook signature";
    };
    readonly WEBHOOK_VALIDATION_ERROR: {
        readonly code: "WEBHOOK_VALIDATION_ERROR";
        readonly message: "Invalid webhook payload";
    };
};
type ErrorCode = (typeof ERROR_CODES)[keyof typeof ERROR_CODES]['code'];

declare class SdkError<T = unknown> extends Error {
    readonly code: ErrorCode;
    readonly details?: T;
    constructor(options: FormatCode, details?: T);
    static fromCode<T = unknown>(code: ErrorCode, details?: T): SdkError<T>;
    toJSON(): {
        name: string;
        code: "CONFIG_INVALID" | "NETWORK_HTTP_ERROR" | "AUTH_TOKEN_FAILED" | "AUTH_FAILED" | "LOGGER_INVALID" | "WEBHOOK_SIGNATURE_ERROR" | "WEBHOOK_VALIDATION_ERROR";
        message: string;
        details: T | undefined;
    };
}

declare class AuthError extends SdkError {
    constructor(details?: unknown);
}
declare class AuthTokenError extends SdkError {
    constructor(details?: unknown);
}

declare class ConfigurationError extends SdkError {
    constructor(details?: unknown);
}

declare class HttpError extends SdkError {
    constructor(details?: unknown);
}

declare class WebhookSignatureError extends SdkError {
    constructor(details?: unknown);
}
declare class WebhookValidationError extends SdkError {
    constructor(details?: unknown);
}

declare const isAuthError: (error: unknown) => error is AuthError;

declare const isConfigurationError: (error: unknown) => error is ConfigurationError;

declare const isSdkError: (error: unknown) => error is SdkError;

type Admin = {
    /**
     * @type string
     */
    username: string;
    /**
     * @type boolean
     */
    is_sudo: boolean;
    telegram_id?: number | null;
    discord_webhook?: string | null;
    users_usage?: number | null;
};

type AdminCreate = {
    /**
     * @type string
     */
    username: string;
    /**
     * @type boolean
     */
    is_sudo: boolean;
    telegram_id?: number | null;
    discord_webhook?: string | null;
    users_usage?: number | null;
    /**
     * @type string
     */
    password: string;
};

type Forbidden = {
    /**
     * @default "You are not allowed to ..."
     * @type string | undefined
     */
    detail?: string;
};

type ValidationError = {
    /**
     * @type array
     */
    loc: (string | number)[];
    /**
     * @type string
     */
    msg: string;
    /**
     * @type string
     */
    type: string;
};

type HTTPValidationError = {
    /**
     * @type array | undefined
     */
    detail?: ValidationError[];
};

type NotFound = {
    /**
     * @default "Entity {} not found"
     * @type string | undefined
     */
    detail?: string;
};

type Unauthorized = {
    /**
     * @default "Not authenticated"
     * @type string | undefined
     */
    detail?: string;
};

type ActivateAllDisabledUsersPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ActivateAllDisabledUsers200 = any;
/**
 * @description Unauthorized
 */
type ActivateAllDisabledUsers401 = Unauthorized;
/**
 * @description Forbidden
 */
type ActivateAllDisabledUsers403 = Forbidden;
/**
 * @description Not found
 */
type ActivateAllDisabledUsers404 = NotFound;
/**
 * @description Validation Error
 */
type ActivateAllDisabledUsers422 = HTTPValidationError;
type ActivateAllDisabledUsersMutationResponse = ActivateAllDisabledUsers200;
type ActivateAllDisabledUsersMutation = {
    Response: ActivateAllDisabledUsers200;
    PathParams: ActivateAllDisabledUsersPathParams;
    Errors: ActivateAllDisabledUsers401 | ActivateAllDisabledUsers403 | ActivateAllDisabledUsers404 | ActivateAllDisabledUsers422;
};

type BodyAdminTokenApiAdminTokenPost = {
    grant_type?: string | null;
    /**
     * @type string
     */
    username: string;
    /**
     * @type string
     */
    password: string;
    /**
     * @default ""
     * @type string | undefined
     */
    scope?: string;
    client_id?: string | null;
    client_secret?: string | null;
};

type Token = {
    /**
     * @type string
     */
    access_token: string;
    /**
     * @default "bearer"
     * @type string | undefined
     */
    token_type?: string;
};

/**
 * @description Successful Response
 */
type AdminToken200 = Token;
/**
 * @description Unauthorized
 */
type AdminToken401 = Unauthorized;
/**
 * @description Validation Error
 */
type AdminToken422 = HTTPValidationError;
type AdminTokenMutationRequest = BodyAdminTokenApiAdminTokenPost;
type AdminTokenMutationResponse = AdminToken200;
type AdminTokenMutation = {
    Response: AdminToken200;
    Request: AdminTokenMutationRequest;
    Errors: AdminToken401 | AdminToken422;
};

type Conflict = {
    /**
     * @default "Entity already exists"
     * @type string | undefined
     */
    detail?: string;
};

/**
 * @description Successful Response
 */
type CreateAdmin200 = Admin;
/**
 * @description Unauthorized
 */
type CreateAdmin401 = Unauthorized;
/**
 * @description Forbidden
 */
type CreateAdmin403 = Forbidden;
/**
 * @description Conflict
 */
type CreateAdmin409 = Conflict;
/**
 * @description Validation Error
 */
type CreateAdmin422 = HTTPValidationError;
type CreateAdminMutationRequest = AdminCreate;
type CreateAdminMutationResponse = CreateAdmin200;
type CreateAdminMutation = {
    Response: CreateAdmin200;
    Request: CreateAdminMutationRequest;
    Errors: CreateAdmin401 | CreateAdmin403 | CreateAdmin409 | CreateAdmin422;
};

type DisableAllActiveUsersPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type DisableAllActiveUsers200 = any;
/**
 * @description Unauthorized
 */
type DisableAllActiveUsers401 = Unauthorized;
/**
 * @description Forbidden
 */
type DisableAllActiveUsers403 = Forbidden;
/**
 * @description Not found
 */
type DisableAllActiveUsers404 = NotFound;
/**
 * @description Validation Error
 */
type DisableAllActiveUsers422 = HTTPValidationError;
type DisableAllActiveUsersMutationResponse = DisableAllActiveUsers200;
type DisableAllActiveUsersMutation = {
    Response: DisableAllActiveUsers200;
    PathParams: DisableAllActiveUsersPathParams;
    Errors: DisableAllActiveUsers401 | DisableAllActiveUsers403 | DisableAllActiveUsers404 | DisableAllActiveUsers422;
};

type GetAdminsQueryParams = {
    offset?: number | null;
    limit?: number | null;
    username?: string | null;
};
/**
 * @description Successful Response
 */
type GetAdmins200 = Admin[];
/**
 * @description Unauthorized
 */
type GetAdmins401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetAdmins403 = Forbidden;
/**
 * @description Validation Error
 */
type GetAdmins422 = HTTPValidationError;
type GetAdminsQueryResponse = GetAdmins200;
type GetAdminsQuery = {
    Response: GetAdmins200;
    QueryParams: GetAdminsQueryParams;
    Errors: GetAdmins401 | GetAdmins403 | GetAdmins422;
};

type GetAdminUsagePathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type GetAdminUsage200 = number;
/**
 * @description Unauthorized
 */
type GetAdminUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetAdminUsage403 = Forbidden;
/**
 * @description Validation Error
 */
type GetAdminUsage422 = HTTPValidationError;
type GetAdminUsageQueryResponse = GetAdminUsage200;
type GetAdminUsageQuery = {
    Response: GetAdminUsage200;
    PathParams: GetAdminUsagePathParams;
    Errors: GetAdminUsage401 | GetAdminUsage403 | GetAdminUsage422;
};

/**
 * @description Successful Response
 */
type GetCurrentAdmin200 = Admin;
/**
 * @description Unauthorized
 */
type GetCurrentAdmin401 = Unauthorized;
type GetCurrentAdminQueryResponse = GetCurrentAdmin200;
type GetCurrentAdminQuery = {
    Response: GetCurrentAdmin200;
    Errors: GetCurrentAdmin401;
};

type AdminModify = {
    password?: string | null;
    /**
     * @type boolean
     */
    is_sudo: boolean;
    telegram_id?: number | null;
    discord_webhook?: string | null;
};

type ModifyAdminPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ModifyAdmin200 = Admin;
/**
 * @description Unauthorized
 */
type ModifyAdmin401 = Unauthorized;
/**
 * @description Forbidden
 */
type ModifyAdmin403 = Forbidden;
/**
 * @description Validation Error
 */
type ModifyAdmin422 = HTTPValidationError;
type ModifyAdminMutationRequest = AdminModify;
type ModifyAdminMutationResponse = ModifyAdmin200;
type ModifyAdminMutation = {
    Response: ModifyAdmin200;
    Request: ModifyAdminMutationRequest;
    PathParams: ModifyAdminPathParams;
    Errors: ModifyAdmin401 | ModifyAdmin403 | ModifyAdmin422;
};

type RemoveAdminPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type RemoveAdmin200 = any;
/**
 * @description Unauthorized
 */
type RemoveAdmin401 = Unauthorized;
/**
 * @description Forbidden
 */
type RemoveAdmin403 = Forbidden;
/**
 * @description Validation Error
 */
type RemoveAdmin422 = HTTPValidationError;
type RemoveAdminMutationResponse = RemoveAdmin200;
type RemoveAdminMutation = {
    Response: RemoveAdmin200;
    PathParams: RemoveAdminPathParams;
    Errors: RemoveAdmin401 | RemoveAdmin403 | RemoveAdmin422;
};

type ResetAdminUsagePathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ResetAdminUsage200 = Admin;
/**
 * @description Unauthorized
 */
type ResetAdminUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type ResetAdminUsage403 = Forbidden;
/**
 * @description Validation Error
 */
type ResetAdminUsage422 = HTTPValidationError;
type ResetAdminUsageMutationResponse = ResetAdminUsage200;
type ResetAdminUsageMutation = {
    Response: ResetAdminUsage200;
    PathParams: ResetAdminUsagePathParams;
    Errors: ResetAdminUsage401 | ResetAdminUsage403 | ResetAdminUsage422;
};

/**
 * @description Successful Response
 */
type GetCoreConfig200 = object;
/**
 * @description Unauthorized
 */
type GetCoreConfig401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetCoreConfig403 = Forbidden;
type GetCoreConfigQueryResponse = GetCoreConfig200;
type GetCoreConfigQuery = {
    Response: GetCoreConfig200;
    Errors: GetCoreConfig401 | GetCoreConfig403;
};

type CoreStats = {
    /**
     * @type string
     */
    version: string;
    /**
     * @type boolean
     */
    started: boolean;
    /**
     * @type string
     */
    logs_websocket: string;
};

/**
 * @description Successful Response
 */
type GetCoreStats200 = CoreStats;
/**
 * @description Unauthorized
 */
type GetCoreStats401 = Unauthorized;
type GetCoreStatsQueryResponse = GetCoreStats200;
type GetCoreStatsQuery = {
    Response: GetCoreStats200;
    Errors: GetCoreStats401;
};

/**
 * @description Successful Response
 */
type ModifyCoreConfig200 = object;
/**
 * @description Unauthorized
 */
type ModifyCoreConfig401 = Unauthorized;
/**
 * @description Forbidden
 */
type ModifyCoreConfig403 = Forbidden;
/**
 * @description Validation Error
 */
type ModifyCoreConfig422 = HTTPValidationError;
type ModifyCoreConfigMutationRequest = object;
type ModifyCoreConfigMutationResponse = ModifyCoreConfig200;
type ModifyCoreConfigMutation = {
    Response: ModifyCoreConfig200;
    Request: ModifyCoreConfigMutationRequest;
    Errors: ModifyCoreConfig401 | ModifyCoreConfig403 | ModifyCoreConfig422;
};

/**
 * @description Successful Response
 */
type RestartCore200 = any;
/**
 * @description Unauthorized
 */
type RestartCore401 = Unauthorized;
/**
 * @description Forbidden
 */
type RestartCore403 = Forbidden;
type RestartCoreMutationResponse = RestartCore200;
type RestartCoreMutation = {
    Response: RestartCore200;
    Errors: RestartCore401 | RestartCore403;
};

/**
 * @description Successful Response
 */
type Base200 = string;
type BaseQueryResponse = Base200;
type BaseQuery = {
    Response: Base200;
    Errors: any;
};

type HTTPException = {
    /**
     * @type string
     */
    detail: string;
};

type NextPlanModel = {
    data_limit?: number | null;
    expire?: number | null;
    /**
     * @default false
     * @type boolean | undefined
     */
    add_remaining_traffic?: boolean;
    /**
     * @default true
     * @type boolean | undefined
     */
    fire_on_either?: boolean;
};

/**
 * @example [object Object]
 */
type NodeCreate = {
    /**
     * @type string
     */
    name: string;
    /**
     * @type string
     */
    address: string;
    /**
     * @default 62050
     * @type integer | undefined
     */
    port?: number;
    /**
     * @default 62051
     * @type integer | undefined
     */
    api_port?: number;
    /**
     * @default 1
     * @type number | undefined
     */
    usage_coefficient?: number;
    /**
     * @default true
     * @type boolean | undefined
     */
    add_as_new_host?: boolean;
};

declare const nodeStatusEnum: {
    readonly connected: "connected";
    readonly connecting: "connecting";
    readonly error: "error";
    readonly disabled: "disabled";
};
type NodeStatusEnumKey = (typeof nodeStatusEnum)[keyof typeof nodeStatusEnum];
type NodeStatus = NodeStatusEnumKey;

type NodeResponse = {
    /**
     * @type string
     */
    name: string;
    /**
     * @type string
     */
    address: string;
    /**
     * @default 62050
     * @type integer | undefined
     */
    port?: number;
    /**
     * @default 62051
     * @type integer | undefined
     */
    api_port?: number;
    /**
     * @default 1
     * @type number | undefined
     */
    usage_coefficient?: number;
    /**
     * @type integer
     */
    id: number;
    xray_version?: string | null;
    /**
     * @type string
     */
    status: NodeStatus;
    message?: string | null;
};

/**
 * @description Successful Response
 */
type AddNode200 = NodeResponse;
/**
 * @description Unauthorized
 */
type AddNode401 = Unauthorized;
/**
 * @description Forbidden
 */
type AddNode403 = Forbidden;
/**
 * @description Conflict
 */
type AddNode409 = Conflict;
/**
 * @description Validation Error
 */
type AddNode422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type AddNodeMutationRequest = NodeCreate;
type AddNodeMutationResponse = AddNode200;
type AddNodeMutation = {
    Response: AddNode200;
    Request: AddNodeMutationRequest;
    Errors: AddNode401 | AddNode403 | AddNode409 | AddNode422;
};

type GetNodePathParams = {
    /**
     * @type integer
     */
    node_id: number;
};
/**
 * @description Successful Response
 */
type GetNode200 = NodeResponse;
/**
 * @description Unauthorized
 */
type GetNode401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetNode403 = Forbidden;
/**
 * @description Validation Error
 */
type GetNode422 = HTTPValidationError;
type GetNodeQueryResponse = GetNode200;
type GetNodeQuery = {
    Response: GetNode200;
    PathParams: GetNodePathParams;
    Errors: GetNode401 | GetNode403 | GetNode422;
};

/**
 * @description Successful Response
 */
type GetNodes200 = NodeResponse[];
/**
 * @description Unauthorized
 */
type GetNodes401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetNodes403 = Forbidden;
type GetNodesQueryResponse = GetNodes200;
type GetNodesQuery = {
    Response: GetNodes200;
    Errors: GetNodes401 | GetNodes403;
};

type NodeSettings = {
    /**
     * @default "v0.2.0"
     * @type string | undefined
     */
    min_node_version?: string;
    /**
     * @type string
     */
    certificate: string;
};

/**
 * @description Successful Response
 */
type GetNodeSettings200 = NodeSettings;
/**
 * @description Unauthorized
 */
type GetNodeSettings401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetNodeSettings403 = Forbidden;
type GetNodeSettingsQueryResponse = GetNodeSettings200;
type GetNodeSettingsQuery = {
    Response: GetNodeSettings200;
    Errors: GetNodeSettings401 | GetNodeSettings403;
};

type NodeUsageResponse = {
    node_id?: number | null;
    /**
     * @type string
     */
    node_name: string;
    /**
     * @type integer
     */
    uplink: number;
    /**
     * @type integer
     */
    downlink: number;
};

type NodesUsageResponse = {
    /**
     * @type array
     */
    usages: NodeUsageResponse[];
};

type GetUsageQueryParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    start?: string;
    /**
     * @default ""
     * @type string | undefined
     */
    end?: string;
};
/**
 * @description Successful Response
 */
type GetUsage200 = NodesUsageResponse;
/**
 * @description Unauthorized
 */
type GetUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetUsage403 = Forbidden;
/**
 * @description Validation Error
 */
type GetUsage422 = HTTPValidationError;
type GetUsageQueryResponse = GetUsage200;
type GetUsageQuery = {
    Response: GetUsage200;
    QueryParams: GetUsageQueryParams;
    Errors: GetUsage401 | GetUsage403 | GetUsage422;
};

/**
 * @example [object Object]
 */
type NodeModify = {
    name?: (string | null) | null;
    address?: (string | null) | null;
    port?: (number | null) | null;
    api_port?: (number | null) | null;
    usage_coefficient?: (number | null) | null;
    status?: (NodeStatus | null) | null;
};

type ModifyNodePathParams = {
    /**
     * @type integer
     */
    node_id: number;
};
/**
 * @description Successful Response
 */
type ModifyNode200 = NodeResponse;
/**
 * @description Unauthorized
 */
type ModifyNode401 = Unauthorized;
/**
 * @description Forbidden
 */
type ModifyNode403 = Forbidden;
/**
 * @description Validation Error
 */
type ModifyNode422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type ModifyNodeMutationRequest = NodeModify;
type ModifyNodeMutationResponse = ModifyNode200;
type ModifyNodeMutation = {
    Response: ModifyNode200;
    Request: ModifyNodeMutationRequest;
    PathParams: ModifyNodePathParams;
    Errors: ModifyNode401 | ModifyNode403 | ModifyNode422;
};

type ReconnectNodePathParams = {
    /**
     * @type integer
     */
    node_id: number;
};
/**
 * @description Successful Response
 */
type ReconnectNode200 = any;
/**
 * @description Unauthorized
 */
type ReconnectNode401 = Unauthorized;
/**
 * @description Forbidden
 */
type ReconnectNode403 = Forbidden;
/**
 * @description Validation Error
 */
type ReconnectNode422 = HTTPValidationError;
type ReconnectNodeMutationResponse = ReconnectNode200;
type ReconnectNodeMutation = {
    Response: ReconnectNode200;
    PathParams: ReconnectNodePathParams;
    Errors: ReconnectNode401 | ReconnectNode403 | ReconnectNode422;
};

type RemoveNodePathParams = {
    /**
     * @type integer
     */
    node_id: number;
};
/**
 * @description Successful Response
 */
type RemoveNode200 = any;
/**
 * @description Unauthorized
 */
type RemoveNode401 = Unauthorized;
/**
 * @description Forbidden
 */
type RemoveNode403 = Forbidden;
/**
 * @description Validation Error
 */
type RemoveNode422 = HTTPValidationError;
type RemoveNodeMutationResponse = RemoveNode200;
type RemoveNodeMutation = {
    Response: RemoveNode200;
    PathParams: RemoveNodePathParams;
    Errors: RemoveNode401 | RemoveNode403 | RemoveNode422;
};

declare const proxyHostALPNEnum: {
    readonly h3: "h3";
    readonly h2: "h2";
    readonly 'http/1.1': "http/1.1";
    readonly 'h3,h2,http/1.1': "h3,h2,http/1.1";
    readonly 'h3,h2': "h3,h2";
    readonly 'h2,http/1.1': "h2,http/1.1";
};
type ProxyHostALPNEnumKey = (typeof proxyHostALPNEnum)[keyof typeof proxyHostALPNEnum];
type ProxyHostALPN = ProxyHostALPNEnumKey;

declare const proxyHostFingerprintEnum: {
    readonly chrome: "chrome";
    readonly firefox: "firefox";
    readonly safari: "safari";
    readonly ios: "ios";
    readonly android: "android";
    readonly edge: "edge";
    readonly '360': "360";
    readonly qq: "qq";
    readonly random: "random";
    readonly randomized: "randomized";
};
type ProxyHostFingerprintEnumKey = (typeof proxyHostFingerprintEnum)[keyof typeof proxyHostFingerprintEnum];
type ProxyHostFingerprint = ProxyHostFingerprintEnumKey;

declare const proxyHostSecurityEnum: {
    readonly inbound_default: "inbound_default";
    readonly none: "none";
    readonly tls: "tls";
};
type ProxyHostSecurityEnumKey = (typeof proxyHostSecurityEnum)[keyof typeof proxyHostSecurityEnum];
type ProxyHostSecurity = ProxyHostSecurityEnumKey;

type ProxyHost = {
    /**
     * @type string
     */
    remark: string;
    /**
     * @type string
     */
    address: string;
    port?: (number | null) | null;
    sni?: (string | null) | null;
    host?: (string | null) | null;
    path?: (string | null) | null;
    /**
     * @type string | undefined
     */
    security?: ProxyHostSecurity;
    /**
     * @type string | undefined
     */
    alpn?: ProxyHostALPN;
    /**
     * @type string | undefined
     */
    fingerprint?: ProxyHostFingerprint;
    allowinsecure?: boolean | null;
    is_disabled?: boolean | null;
    mux_enable?: boolean | null;
    fragment_setting?: (string | null) | null;
    noise_setting?: (string | null) | null;
    random_user_agent?: boolean | null;
    use_sni_as_host?: boolean | null;
};

declare const proxyTypesEnum: {
    readonly vmess: "vmess";
    readonly vless: "vless";
    readonly trojan: "trojan";
    readonly shadowsocks: "shadowsocks";
};
type ProxyTypesEnumKey = (typeof proxyTypesEnum)[keyof typeof proxyTypesEnum];
type ProxyTypes = ProxyTypesEnumKey;

type ProxyInbound = {
    /**
     * @type string
     */
    tag: string;
    /**
     * @type string
     */
    protocol: ProxyTypes;
    /**
     * @type string
     */
    network: string;
    /**
     * @type string
     */
    tls: string;
    port: number | string;
};

type ProxySettings = object;

type UserGetUsagePathParams = {
    /**
     * @type string
     */
    token: string;
};
type UserGetUsageQueryParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    start?: string;
    /**
     * @default ""
     * @type string | undefined
     */
    end?: string;
};
/**
 * @description Successful Response
 */
type UserGetUsage200 = any;
/**
 * @description Validation Error
 */
type UserGetUsage422 = HTTPValidationError;
type UserGetUsageQueryResponse = UserGetUsage200;
type UserGetUsageQuery = {
    Response: UserGetUsage200;
    PathParams: UserGetUsagePathParams;
    QueryParams: UserGetUsageQueryParams;
    Errors: UserGetUsage422;
};

type UserSubscriptionPathParams = {
    /**
     * @type string
     */
    token: string;
};
type UserSubscriptionHeaderParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    'user-agent'?: string;
};
/**
 * @description Successful Response
 */
type UserSubscription200 = any;
/**
 * @description Validation Error
 */
type UserSubscription422 = HTTPValidationError;
type UserSubscriptionQueryResponse = UserSubscription200;
type UserSubscriptionQuery = {
    Response: UserSubscription200;
    PathParams: UserSubscriptionPathParams;
    HeaderParams: UserSubscriptionHeaderParams;
    Errors: UserSubscription422;
};

declare const userDataLimitResetStrategyEnum: {
    readonly no_reset: "no_reset";
    readonly day: "day";
    readonly week: "week";
    readonly month: "month";
    readonly year: "year";
};
type UserDataLimitResetStrategyEnumKey = (typeof userDataLimitResetStrategyEnum)[keyof typeof userDataLimitResetStrategyEnum];
type UserDataLimitResetStrategy = UserDataLimitResetStrategyEnumKey;

declare const userStatusEnum: {
    readonly active: "active";
    readonly disabled: "disabled";
    readonly limited: "limited";
    readonly expired: "expired";
    readonly on_hold: "on_hold";
};
type UserStatusEnumKey = (typeof userStatusEnum)[keyof typeof userStatusEnum];
type UserStatus = UserStatusEnumKey;

type SubscriptionUserResponse = {
    /**
     * @type object
     */
    proxies: object;
    expire?: (number | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @type string | undefined
     */
    data_limit_reset_strategy?: UserDataLimitResetStrategy;
    sub_updated_at?: (string | null) | null;
    sub_last_user_agent?: (string | null) | null;
    online_at?: (string | null) | null;
    on_hold_expire_duration?: (number | null) | null;
    on_hold_timeout?: (string | null) | null;
    next_plan?: (NextPlanModel | null) | null;
    /**
     * @type string
     */
    username: string;
    /**
     * @type string
     */
    status: UserStatus;
    /**
     * @type integer
     */
    used_traffic: number;
    /**
     * @default 0
     * @type integer | undefined
     */
    lifetime_used_traffic?: number;
    /**
     * @type string, date-time
     */
    created_at: string;
    /**
     * @type array | undefined
     */
    links?: string[];
    /**
     * @default ""
     * @type string | undefined
     */
    subscription_url?: string;
};

type UserSubscriptionInfoPathParams = {
    /**
     * @type string
     */
    token: string;
};
/**
 * @description Successful Response
 */
type UserSubscriptionInfo200 = SubscriptionUserResponse;
/**
 * @description Validation Error
 */
type UserSubscriptionInfo422 = HTTPValidationError;
type UserSubscriptionInfoQueryResponse = UserSubscriptionInfo200;
type UserSubscriptionInfoQuery = {
    Response: UserSubscriptionInfo200;
    PathParams: UserSubscriptionInfoPathParams;
    Errors: UserSubscriptionInfo422;
};

type UserSubscriptionWithClientTypePathParams = {
    /**
     * @pattern sing-box|clash-meta|clash|outline|v2ray|v2ray-json
     * @type string
     */
    client_type: string;
    /**
     * @type string
     */
    token: string;
};
type UserSubscriptionWithClientTypeHeaderParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    'user-agent'?: string;
};
/**
 * @description Successful Response
 */
type UserSubscriptionWithClientType200 = any;
/**
 * @description Validation Error
 */
type UserSubscriptionWithClientType422 = HTTPValidationError;
type UserSubscriptionWithClientTypeQueryResponse = UserSubscriptionWithClientType200;
type UserSubscriptionWithClientTypeQuery = {
    Response: UserSubscriptionWithClientType200;
    PathParams: UserSubscriptionWithClientTypePathParams;
    HeaderParams: UserSubscriptionWithClientTypeHeaderParams;
    Errors: UserSubscriptionWithClientType422;
};

/**
 * @description Successful Response
 */
type GetHosts200 = {
    [key: string]: ProxyHost[];
};
/**
 * @description Unauthorized
 */
type GetHosts401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetHosts403 = Forbidden;
type GetHostsQueryResponse = GetHosts200;
type GetHostsQuery = {
    Response: GetHosts200;
    Errors: GetHosts401 | GetHosts403;
};

/**
 * @description Successful Response
 */
type GetInbounds200 = {
    [key: string]: ProxyInbound[];
};
/**
 * @description Unauthorized
 */
type GetInbounds401 = Unauthorized;
type GetInboundsQueryResponse = GetInbounds200;
type GetInboundsQuery = {
    Response: GetInbounds200;
    Errors: GetInbounds401;
};

type SystemStats = {
    /**
     * @type string
     */
    version: string;
    /**
     * @type integer
     */
    mem_total: number;
    /**
     * @type integer
     */
    mem_used: number;
    /**
     * @type integer
     */
    cpu_cores: number;
    /**
     * @type number
     */
    cpu_usage: number;
    /**
     * @type integer
     */
    total_user: number;
    /**
     * @type integer
     */
    online_users: number;
    /**
     * @type integer
     */
    users_active: number;
    /**
     * @type integer
     */
    users_on_hold: number;
    /**
     * @type integer
     */
    users_disabled: number;
    /**
     * @type integer
     */
    users_expired: number;
    /**
     * @type integer
     */
    users_limited: number;
    /**
     * @type integer
     */
    incoming_bandwidth: number;
    /**
     * @type integer
     */
    outgoing_bandwidth: number;
    /**
     * @type integer
     */
    incoming_bandwidth_speed: number;
    /**
     * @type integer
     */
    outgoing_bandwidth_speed: number;
};

/**
 * @description Successful Response
 */
type GetSystemStats200 = SystemStats;
/**
 * @description Unauthorized
 */
type GetSystemStats401 = Unauthorized;
type GetSystemStatsQueryResponse = GetSystemStats200;
type GetSystemStatsQuery = {
    Response: GetSystemStats200;
    Errors: GetSystemStats401;
};

/**
 * @description Successful Response
 */
type ModifyHosts200 = {
    [key: string]: ProxyHost[];
};
/**
 * @description Unauthorized
 */
type ModifyHosts401 = Unauthorized;
/**
 * @description Forbidden
 */
type ModifyHosts403 = Forbidden;
/**
 * @description Validation Error
 */
type ModifyHosts422 = HTTPValidationError;
type ModifyHostsMutationRequest = {
    [key: string]: ProxyHost[];
};
type ModifyHostsMutationResponse = ModifyHosts200;
type ModifyHostsMutation = {
    Response: ModifyHosts200;
    Request: ModifyHostsMutationRequest;
    Errors: ModifyHosts401 | ModifyHosts403 | ModifyHosts422;
};

declare const userStatusCreateEnum: {
    readonly active: "active";
    readonly on_hold: "on_hold";
};
type UserStatusCreateEnumKey = (typeof userStatusCreateEnum)[keyof typeof userStatusCreateEnum];
type UserStatusCreate = UserStatusCreateEnumKey;

/**
 * @example [object Object]
 */
type UserCreate = {
    /**
     * @default [object Object]
     * @type object | undefined
     */
    proxies?: {
        [key: string]: ProxySettings;
    };
    expire?: (number | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @type string | undefined
     */
    data_limit_reset_strategy?: UserDataLimitResetStrategy;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
    note?: (string | null) | null;
    sub_updated_at?: (string | null) | null;
    sub_last_user_agent?: (string | null) | null;
    online_at?: (string | null) | null;
    on_hold_expire_duration?: (number | null) | null;
    on_hold_timeout?: (string | null) | null;
    auto_delete_in_days?: (number | null) | null;
    next_plan?: (NextPlanModel | null) | null;
    /**
     * @type string
     */
    username: string;
    /**
     * @type string | undefined
     */
    status?: UserStatusCreate;
};

type UserResponse = {
    /**
     * @type object
     */
    proxies: object;
    expire?: (number | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @type string | undefined
     */
    data_limit_reset_strategy?: UserDataLimitResetStrategy;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
    note?: (string | null) | null;
    sub_updated_at?: (string | null) | null;
    sub_last_user_agent?: (string | null) | null;
    online_at?: (string | null) | null;
    on_hold_expire_duration?: (number | null) | null;
    on_hold_timeout?: (string | null) | null;
    auto_delete_in_days?: (number | null) | null;
    next_plan?: (NextPlanModel | null) | null;
    /**
     * @type string
     */
    username: string;
    /**
     * @type string
     */
    status: UserStatus;
    /**
     * @type integer
     */
    used_traffic: number;
    /**
     * @default 0
     * @type integer | undefined
     */
    lifetime_used_traffic?: number;
    /**
     * @type string, date-time
     */
    created_at: string;
    /**
     * @type array | undefined
     */
    links?: string[];
    /**
     * @default ""
     * @type string | undefined
     */
    subscription_url?: string;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    excluded_inbounds?: {
        [key: string]: string[];
    };
    admin?: Admin | null;
};

type ActiveNextPlanPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ActiveNextPlan200 = UserResponse;
/**
 * @description Unauthorized
 */
type ActiveNextPlan401 = Unauthorized;
/**
 * @description Forbidden
 */
type ActiveNextPlan403 = Forbidden;
/**
 * @description Not found
 */
type ActiveNextPlan404 = NotFound;
/**
 * @description Validation Error
 */
type ActiveNextPlan422 = HTTPValidationError;
type ActiveNextPlanMutationResponse = ActiveNextPlan200;
type ActiveNextPlanMutation = {
    Response: ActiveNextPlan200;
    PathParams: ActiveNextPlanPathParams;
    Errors: ActiveNextPlan401 | ActiveNextPlan403 | ActiveNextPlan404 | ActiveNextPlan422;
};

/**
 * @description Successful Response
 */
type AddUser200 = UserResponse;
/**
 * @description Bad request
 */
type AddUser400 = HTTPException;
/**
 * @description Unauthorized
 */
type AddUser401 = Unauthorized;
/**
 * @description Conflict
 */
type AddUser409 = Conflict;
/**
 * @description Validation Error
 */
type AddUser422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type AddUserMutationRequest = UserCreate;
type AddUserMutationResponse = AddUser200;
type AddUserMutation = {
    Response: AddUser200;
    Request: AddUserMutationRequest;
    Errors: AddUser400 | AddUser401 | AddUser409 | AddUser422;
};

type DeleteExpiredUsersQueryParams = {
    expired_after?: string | null;
    expired_before?: string | null;
};
/**
 * @description Successful Response
 */
type DeleteExpiredUsers200 = string[];
/**
 * @description Unauthorized
 */
type DeleteExpiredUsers401 = Unauthorized;
/**
 * @description Validation Error
 */
type DeleteExpiredUsers422 = HTTPValidationError;
type DeleteExpiredUsersMutationResponse = DeleteExpiredUsers200;
type DeleteExpiredUsersMutation = {
    Response: DeleteExpiredUsers200;
    QueryParams: DeleteExpiredUsersQueryParams;
    Errors: DeleteExpiredUsers401 | DeleteExpiredUsers422;
};

type GetExpiredUsersQueryParams = {
    expired_after?: string | null;
    expired_before?: string | null;
};
/**
 * @description Successful Response
 */
type GetExpiredUsers200 = string[];
/**
 * @description Unauthorized
 */
type GetExpiredUsers401 = Unauthorized;
/**
 * @description Validation Error
 */
type GetExpiredUsers422 = HTTPValidationError;
type GetExpiredUsersQueryResponse = GetExpiredUsers200;
type GetExpiredUsersQuery = {
    Response: GetExpiredUsers200;
    QueryParams: GetExpiredUsersQueryParams;
    Errors: GetExpiredUsers401 | GetExpiredUsers422;
};

type GetUserPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type GetUser200 = UserResponse;
/**
 * @description Unauthorized
 */
type GetUser401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetUser403 = Forbidden;
/**
 * @description Not found
 */
type GetUser404 = NotFound;
/**
 * @description Validation Error
 */
type GetUser422 = HTTPValidationError;
type GetUserQueryResponse = GetUser200;
type GetUserQuery = {
    Response: GetUser200;
    PathParams: GetUserPathParams;
    Errors: GetUser401 | GetUser403 | GetUser404 | GetUser422;
};

type UsersResponse = {
    /**
     * @type array
     */
    users: UserResponse[];
    /**
     * @type integer
     */
    total: number;
};

type GetUsersQueryParams = {
    /**
     * @type integer | undefined
     */
    offset?: number;
    /**
     * @type integer | undefined
     */
    limit?: number;
    /**
     * @type array | undefined
     */
    username?: string[];
    search?: string | null;
    admin?: string[] | null;
    /**
     * @type string | undefined
     */
    status?: UserStatus;
    /**
     * @type string | undefined
     */
    sort?: string;
};
/**
 * @description Successful Response
 */
type GetUsers200 = UsersResponse;
/**
 * @description Bad request
 */
type GetUsers400 = HTTPException;
/**
 * @description Unauthorized
 */
type GetUsers401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetUsers403 = Forbidden;
/**
 * @description Not found
 */
type GetUsers404 = NotFound;
/**
 * @description Validation Error
 */
type GetUsers422 = HTTPValidationError;
type GetUsersQueryResponse = GetUsers200;
type GetUsersQuery = {
    Response: GetUsers200;
    QueryParams: GetUsersQueryParams;
    Errors: GetUsers400 | GetUsers401 | GetUsers403 | GetUsers404 | GetUsers422;
};

type UserUsageResponse = {
    node_id?: number | null;
    /**
     * @type string
     */
    node_name: string;
    /**
     * @type integer
     */
    used_traffic: number;
};

type UsersUsagesResponse = {
    /**
     * @type array
     */
    usages: UserUsageResponse[];
};

type GetUsersUsageQueryParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    start?: string;
    /**
     * @default ""
     * @type string | undefined
     */
    end?: string;
    admin?: string[] | null;
};
/**
 * @description Successful Response
 */
type GetUsersUsage200 = UsersUsagesResponse;
/**
 * @description Unauthorized
 */
type GetUsersUsage401 = Unauthorized;
/**
 * @description Validation Error
 */
type GetUsersUsage422 = HTTPValidationError;
type GetUsersUsageQueryResponse = GetUsersUsage200;
type GetUsersUsageQuery = {
    Response: GetUsersUsage200;
    QueryParams: GetUsersUsageQueryParams;
    Errors: GetUsersUsage401 | GetUsersUsage422;
};

type UserUsagesResponse = {
    /**
     * @type string
     */
    username: string;
    /**
     * @type array
     */
    usages: UserUsageResponse[];
};

type GetUserUsagePathParams = {
    /**
     * @type string
     */
    username: string;
};
type GetUserUsageQueryParams = {
    /**
     * @default ""
     * @type string | undefined
     */
    start?: string;
    /**
     * @default ""
     * @type string | undefined
     */
    end?: string;
};
/**
 * @description Successful Response
 */
type GetUserUsage200 = UserUsagesResponse;
/**
 * @description Unauthorized
 */
type GetUserUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type GetUserUsage403 = Forbidden;
/**
 * @description Not found
 */
type GetUserUsage404 = NotFound;
/**
 * @description Validation Error
 */
type GetUserUsage422 = HTTPValidationError;
type GetUserUsageQueryResponse = GetUserUsage200;
type GetUserUsageQuery = {
    Response: GetUserUsage200;
    PathParams: GetUserUsagePathParams;
    QueryParams: GetUserUsageQueryParams;
    Errors: GetUserUsage401 | GetUserUsage403 | GetUserUsage404 | GetUserUsage422;
};

declare const userStatusModifyEnum: {
    readonly active: "active";
    readonly disabled: "disabled";
    readonly on_hold: "on_hold";
};
type UserStatusModifyEnumKey = (typeof userStatusModifyEnum)[keyof typeof userStatusModifyEnum];
type UserStatusModify = UserStatusModifyEnumKey;

/**
 * @example [object Object]
 */
type UserModify = {
    /**
     * @default [object Object]
     * @type object | undefined
     */
    proxies?: {
        [key: string]: ProxySettings;
    };
    expire?: (number | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @type string | undefined
     */
    data_limit_reset_strategy?: UserDataLimitResetStrategy;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
    note?: (string | null) | null;
    sub_updated_at?: (string | null) | null;
    sub_last_user_agent?: (string | null) | null;
    online_at?: (string | null) | null;
    on_hold_expire_duration?: (number | null) | null;
    on_hold_timeout?: (string | null) | null;
    auto_delete_in_days?: (number | null) | null;
    next_plan?: (NextPlanModel | null) | null;
    /**
     * @type string | undefined
     */
    status?: UserStatusModify;
};

type ModifyUserPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ModifyUser200 = UserResponse;
/**
 * @description Bad request
 */
type ModifyUser400 = HTTPException;
/**
 * @description Unauthorized
 */
type ModifyUser401 = Unauthorized;
/**
 * @description Forbidden
 */
type ModifyUser403 = Forbidden;
/**
 * @description Not found
 */
type ModifyUser404 = NotFound;
/**
 * @description Validation Error
 */
type ModifyUser422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type ModifyUserMutationRequest = UserModify;
type ModifyUserMutationResponse = ModifyUser200;
type ModifyUserMutation = {
    Response: ModifyUser200;
    Request: ModifyUserMutationRequest;
    PathParams: ModifyUserPathParams;
    Errors: ModifyUser400 | ModifyUser401 | ModifyUser403 | ModifyUser404 | ModifyUser422;
};

type RemoveUserPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type RemoveUser200 = any;
/**
 * @description Unauthorized
 */
type RemoveUser401 = Unauthorized;
/**
 * @description Forbidden
 */
type RemoveUser403 = Forbidden;
/**
 * @description Not found
 */
type RemoveUser404 = NotFound;
/**
 * @description Validation Error
 */
type RemoveUser422 = HTTPValidationError;
type RemoveUserMutationResponse = RemoveUser200;
type RemoveUserMutation = {
    Response: RemoveUser200;
    PathParams: RemoveUserPathParams;
    Errors: RemoveUser401 | RemoveUser403 | RemoveUser404 | RemoveUser422;
};

type ResetUserDataUsagePathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type ResetUserDataUsage200 = UserResponse;
/**
 * @description Unauthorized
 */
type ResetUserDataUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type ResetUserDataUsage403 = Forbidden;
/**
 * @description Not found
 */
type ResetUserDataUsage404 = NotFound;
/**
 * @description Validation Error
 */
type ResetUserDataUsage422 = HTTPValidationError;
type ResetUserDataUsageMutationResponse = ResetUserDataUsage200;
type ResetUserDataUsageMutation = {
    Response: ResetUserDataUsage200;
    PathParams: ResetUserDataUsagePathParams;
    Errors: ResetUserDataUsage401 | ResetUserDataUsage403 | ResetUserDataUsage404 | ResetUserDataUsage422;
};

/**
 * @description Successful Response
 */
type ResetUsersDataUsage200 = any;
/**
 * @description Unauthorized
 */
type ResetUsersDataUsage401 = Unauthorized;
/**
 * @description Forbidden
 */
type ResetUsersDataUsage403 = Forbidden;
/**
 * @description Not found
 */
type ResetUsersDataUsage404 = NotFound;
type ResetUsersDataUsageMutationResponse = ResetUsersDataUsage200;
type ResetUsersDataUsageMutation = {
    Response: ResetUsersDataUsage200;
    Errors: ResetUsersDataUsage401 | ResetUsersDataUsage403 | ResetUsersDataUsage404;
};

type RevokeUserSubscriptionPathParams = {
    /**
     * @type string
     */
    username: string;
};
/**
 * @description Successful Response
 */
type RevokeUserSubscription200 = UserResponse;
/**
 * @description Unauthorized
 */
type RevokeUserSubscription401 = Unauthorized;
/**
 * @description Forbidden
 */
type RevokeUserSubscription403 = Forbidden;
/**
 * @description Not found
 */
type RevokeUserSubscription404 = NotFound;
/**
 * @description Validation Error
 */
type RevokeUserSubscription422 = HTTPValidationError;
type RevokeUserSubscriptionMutationResponse = RevokeUserSubscription200;
type RevokeUserSubscriptionMutation = {
    Response: RevokeUserSubscription200;
    PathParams: RevokeUserSubscriptionPathParams;
    Errors: RevokeUserSubscription401 | RevokeUserSubscription403 | RevokeUserSubscription404 | RevokeUserSubscription422;
};

type SetOwnerPathParams = {
    /**
     * @type string
     */
    username: string;
};
type SetOwnerQueryParams = {
    /**
     * @type string
     */
    admin_username: string;
};
/**
 * @description Successful Response
 */
type SetOwner200 = UserResponse;
/**
 * @description Unauthorized
 */
type SetOwner401 = Unauthorized;
/**
 * @description Validation Error
 */
type SetOwner422 = HTTPValidationError;
type SetOwnerMutationResponse = SetOwner200;
type SetOwnerMutation = {
    Response: SetOwner200;
    PathParams: SetOwnerPathParams;
    QueryParams: SetOwnerQueryParams;
    Errors: SetOwner401 | SetOwner422;
};

/**
 * @example [object Object]
 */
type UserTemplateCreate = {
    name?: (string | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @description expire_duration can be 0 or greater in seconds
     */
    expire_duration?: number | null;
    username_prefix?: string | null;
    username_suffix?: string | null;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
};

type UserTemplateResponse = {
    name?: (string | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @description expire_duration can be 0 or greater in seconds
     */
    expire_duration?: number | null;
    username_prefix?: string | null;
    username_suffix?: string | null;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
    /**
     * @type integer
     */
    id: number;
};

/**
 * @description Successful Response
 */
type AddUserTemplate200 = UserTemplateResponse;
/**
 * @description Validation Error
 */
type AddUserTemplate422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type AddUserTemplateMutationRequest = UserTemplateCreate;
type AddUserTemplateMutationResponse = AddUserTemplate200;
type AddUserTemplateMutation = {
    Response: AddUserTemplate200;
    Request: AddUserTemplateMutationRequest;
    Errors: AddUserTemplate422;
};

type GetUserTemplateEndpointPathParams = {
    /**
     * @type integer
     */
    template_id: number;
};
/**
 * @description Successful Response
 */
type GetUserTemplateEndpoint200 = UserTemplateResponse;
/**
 * @description Validation Error
 */
type GetUserTemplateEndpoint422 = HTTPValidationError;
type GetUserTemplateEndpointQueryResponse = GetUserTemplateEndpoint200;
type GetUserTemplateEndpointQuery = {
    Response: GetUserTemplateEndpoint200;
    PathParams: GetUserTemplateEndpointPathParams;
    Errors: GetUserTemplateEndpoint422;
};

type GetUserTemplatesQueryParams = {
    /**
     * @type integer | undefined
     */
    offset?: number;
    /**
     * @type integer | undefined
     */
    limit?: number;
};
/**
 * @description Successful Response
 */
type GetUserTemplates200 = UserTemplateResponse[];
/**
 * @description Validation Error
 */
type GetUserTemplates422 = HTTPValidationError;
type GetUserTemplatesQueryResponse = GetUserTemplates200;
type GetUserTemplatesQuery = {
    Response: GetUserTemplates200;
    QueryParams: GetUserTemplatesQueryParams;
    Errors: GetUserTemplates422;
};

/**
 * @example [object Object]
 */
type UserTemplateModify = {
    name?: (string | null) | null;
    /**
     * @description data_limit can be 0 or greater
     */
    data_limit?: number | null;
    /**
     * @description expire_duration can be 0 or greater in seconds
     */
    expire_duration?: number | null;
    username_prefix?: string | null;
    username_suffix?: string | null;
    /**
     * @default [object Object]
     * @type object | undefined
     */
    inbounds?: {
        [key: string]: string[];
    };
};

type ModifyUserTemplatePathParams = {
    /**
     * @type integer
     */
    template_id: number;
};
/**
 * @description Successful Response
 */
type ModifyUserTemplate200 = UserTemplateResponse;
/**
 * @description Validation Error
 */
type ModifyUserTemplate422 = HTTPValidationError;
/**
 * @example [object Object]
 */
type ModifyUserTemplateMutationRequest = UserTemplateModify;
type ModifyUserTemplateMutationResponse = ModifyUserTemplate200;
type ModifyUserTemplateMutation = {
    Response: ModifyUserTemplate200;
    Request: ModifyUserTemplateMutationRequest;
    PathParams: ModifyUserTemplatePathParams;
    Errors: ModifyUserTemplate422;
};

type RemoveUserTemplatePathParams = {
    /**
     * @type integer
     */
    template_id: number;
};
/**
 * @description Successful Response
 */
type RemoveUserTemplate200 = any;
/**
 * @description Validation Error
 */
type RemoveUserTemplate422 = HTTPValidationError;
type RemoveUserTemplateMutationResponse = RemoveUserTemplate200;
type RemoveUserTemplateMutation = {
    Response: RemoveUserTemplate200;
    PathParams: RemoveUserTemplatePathParams;
    Errors: RemoveUserTemplate422;
};

interface Logger {
    debug(message: string, context?: string): void;
    info(message: string, context?: string): void;
    warn(message: string, context?: string): void;
    error(message: string, trace?: unknown, context?: string): void;
}

interface Storage {
    accessToken?: string;
    username: string;
    password: string;
}

declare class AuthManager {
    private readonly storage;
    private readonly logger;
    /** When set, used for login (adminToken) instead of global client. */
    private httpClient;
    authPromise: Promise<void> | null;
    constructor(storage: Storage, logger: Logger);
    /** Set instance-bound public HTTP client for authentication (used when multiple SDK instances exist). */
    setPublicClient(client: ClientFn): this;
    authenticate(username: string, password: string): Promise<void>;
    waitForCurrentAuth(): Promise<void>;
    retryAuth(): Promise<void>;
    get isAuthenticating(): boolean;
    get accessToken(): string;
    set accessToken(token: string);
    private authenticateInternal;
}

/**
 * Subset of AxiosRequestConfig
 */
type RequestConfig<TData = unknown> = {
    baseURL?: string;
    url?: string;
    method: 'GET' | 'PUT' | 'PATCH' | 'POST' | 'DELETE';
    params?: unknown;
    data?: TData | FormData;
    responseType?: 'arraybuffer' | 'blob' | 'document' | 'json' | 'text' | 'stream';
    signal?: AbortSignal;
    headers?: AxiosRequestConfig['headers'];
};
/**
 * Subset of AxiosResponse
 */
type ResponseConfig<TData = unknown> = {
    data: TData;
    status: number;
    statusText: string;
    headers?: AxiosResponse['headers'];
};
/** Client function type used by generated API (kubb) - accepts RequestConfig and returns ResponseConfig */
type ClientFn = <TData, _TError = unknown, TVariables = unknown>(config: RequestConfig<TVariables>) => Promise<ResponseConfig<TData>>;
declare const client: ClientFn;

declare class adminApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Authenticate an admin and issue a token.
     * @summary Admin Token
     * {@link /api/admin/token}
     */
    adminToken(data: AdminTokenMutationRequest, config?: Partial<RequestConfig<AdminTokenMutationRequest>> & {
        client?: typeof client;
    }): Promise<Token>;
    /**
     * @description Retrieve the current authenticated admin.
     * @summary Get Current Admin
     * {@link /api/admin}
     */
    getCurrentAdmin(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<Admin>;
    /**
     * @description Create a new admin if the current admin has sudo privileges.
     * @summary Create Admin
     * {@link /api/admin}
     */
    createAdmin(data: CreateAdminMutationRequest, config?: Partial<RequestConfig<CreateAdminMutationRequest>> & {
        client?: typeof client;
    }): Promise<Admin>;
    /**
     * @description Modify an existing admin's details.
     * @summary Modify Admin
     * {@link /api/admin/:username}
     */
    modifyAdmin(username: ModifyAdminPathParams['username'], data: ModifyAdminMutationRequest, config?: Partial<RequestConfig<ModifyAdminMutationRequest>> & {
        client?: typeof client;
    }): Promise<Admin>;
    /**
     * @description Remove an admin from the database.
     * @summary Remove Admin
     * {@link /api/admin/:username}
     */
    removeAdmin(username: RemoveAdminPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Fetch a list of admins with optional filters for pagination and username.
     * @summary Get Admins
     * {@link /api/admins}
     */
    getAdmins(params?: GetAdminsQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetAdmins200>;
    /**
     * @description Disable all active users under a specific admin
     * @summary Disable All Active Users
     * {@link /api/admin/:username/users/disable}
     */
    disableAllActiveUsers(username: DisableAllActiveUsersPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Activate all disabled users under a specific admin
     * @summary Activate All Disabled Users
     * {@link /api/admin/:username/users/activate}
     */
    activateAllDisabledUsers(username: ActivateAllDisabledUsersPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Resets usage of admin.
     * @summary Reset Admin Usage
     * {@link /api/admin/usage/reset/:username}
     */
    resetAdminUsage(username: ResetAdminUsagePathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<Admin>;
    /**
     * @description Retrieve the usage of given admin.
     * @summary Get Admin Usage
     * {@link /api/admin/usage/:username}
     */
    getAdminUsage(username: GetAdminUsagePathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<number>;
}

declare class coreApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Retrieve core statistics such as version and uptime.
     * @summary Get Core Stats
     * {@link /api/core}
     */
    getCoreStats(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<CoreStats>;
    /**
     * @description Restart the core and all connected nodes.
     * @summary Restart Core
     * {@link /api/core/restart}
     */
    restartCore(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Get the current core configuration.
     * @summary Get Core Config
     * {@link /api/core/config}
     */
    getCoreConfig(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<object>;
    /**
     * @description Modify the core configuration and restart the core.
     * @summary Modify Core Config
     * {@link /api/core/config}
     */
    modifyCoreConfig(data?: ModifyCoreConfigMutationRequest, config?: Partial<RequestConfig<ModifyCoreConfigMutationRequest>> & {
        client?: typeof client;
    }): Promise<object>;
}

declare class nodeApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Retrieve the current node settings, including TLS certificate.
     * @summary Get Node Settings
     * {@link /api/node/settings}
     */
    getNodeSettings(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<NodeSettings>;
    /**
     * @description Add a new node to the database and optionally add it as a host.
     * @summary Add Node
     * {@link /api/node}
     */
    addNode(data: AddNodeMutationRequest, config?: Partial<RequestConfig<AddNodeMutationRequest>> & {
        client?: typeof client;
    }): Promise<NodeResponse>;
    /**
     * @description Retrieve details of a specific node by its ID.
     * @summary Get Node
     * {@link /api/node/:node_id}
     */
    getNode(nodeId: GetNodePathParams['node_id'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<NodeResponse>;
    /**
     * @description Update a node's details. Only accessible to sudo admins.
     * @summary Modify Node
     * {@link /api/node/:node_id}
     */
    modifyNode(nodeId: ModifyNodePathParams['node_id'], data?: ModifyNodeMutationRequest, config?: Partial<RequestConfig<ModifyNodeMutationRequest>> & {
        client?: typeof client;
    }): Promise<NodeResponse>;
    /**
     * @description Delete a node and remove it from xray in the background.
     * @summary Remove Node
     * {@link /api/node/:node_id}
     */
    removeNode(nodeId: RemoveNodePathParams['node_id'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Retrieve a list of all nodes. Accessible only to sudo admins.
     * @summary Get Nodes
     * {@link /api/nodes}
     */
    getNodes(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetNodes200>;
    /**
     * @description Trigger a reconnection for the specified node. Only accessible to sudo admins.
     * @summary Reconnect Node
     * {@link /api/node/:node_id/reconnect}
     */
    reconnectNode(nodeId: ReconnectNodePathParams['node_id'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Retrieve usage statistics for nodes within a specified date range.
     * @summary Get Usage
     * {@link /api/nodes/usage}
     */
    getUsage(params?: GetUsageQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<NodesUsageResponse>;
}

declare class subscriptionApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Provides a subscription link based on the user agent (Clash, V2Ray, etc.).
     * @summary User Subscription
     * {@link /sub/:token/}
     */
    userSubscription(token: UserSubscriptionPathParams['token'], headers?: UserSubscriptionHeaderParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Retrieves detailed information about the user's subscription.
     * @summary User Subscription Info
     * {@link /sub/:token/info}
     */
    userSubscriptionInfo(token: UserSubscriptionInfoPathParams['token'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<SubscriptionUserResponse>;
    /**
     * @description Fetches the usage statistics for the user within a specified date range.
     * @summary User Get Usage
     * {@link /sub/:token/usage}
     */
    userGetUsage(token: UserGetUsagePathParams['token'], params?: UserGetUsageQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Provides a subscription link based on the specified client type (e.g., Clash, V2Ray).
     * @summary User Subscription With Client Type
     * {@link /sub/:token/:client_type}
     */
    userSubscriptionWithClientType(clientType: UserSubscriptionWithClientTypePathParams['client_type'], token: UserSubscriptionWithClientTypePathParams['token'], headers?: UserSubscriptionWithClientTypeHeaderParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
}

declare class systemApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Fetch system stats including memory, CPU, and user metrics.
     * @summary Get System Stats
     * {@link /api/system}
     */
    getSystemStats(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<SystemStats>;
    /**
     * @description Retrieve inbound configurations grouped by protocol.
     * @summary Get Inbounds
     * {@link /api/inbounds}
     */
    getInbounds(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetInbounds200>;
    /**
     * @description Get a list of proxy hosts grouped by inbound tag.
     * @summary Get Hosts
     * {@link /api/hosts}
     */
    getHosts(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetHosts200>;
    /**
     * @description Modify proxy hosts and update the configuration.
     * @summary Modify Hosts
     * {@link /api/hosts}
     */
    modifyHosts(data?: ModifyHostsMutationRequest, config?: Partial<RequestConfig<ModifyHostsMutationRequest>> & {
        client?: typeof client;
    }): Promise<ModifyHosts200>;
}

declare class userApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Add a new user- **username**: 3 to 32 characters, can include a-z, 0-9, and underscores.- **status**: User's status, defaults to `active`. Special rules if `on_hold`.- **expire**: UTC timestamp for account expiration. Use `0` for unlimited.- **data_limit**: Max data usage in bytes (e.g., `1073741824` for 1GB). `0` means unlimited.- **data_limit_reset_strategy**: Defines how/if data limit resets. `no_reset` means it never resets.- **proxies**: Dictionary of protocol settings (e.g., `vmess`, `vless`).- **inbounds**: Dictionary of protocol tags to specify inbound connections.- **note**: Optional text field for additional user information or notes.- **on_hold_timeout**: UTC timestamp when `on_hold` status should start or end.- **on_hold_expire_duration**: Duration (in seconds) for how long the user should stay in `on_hold` status.- **next_plan**: Next user plan (resets after use).
     * @summary Add User
     * {@link /api/user}
     */
    addUser(data: AddUserMutationRequest, config?: Partial<RequestConfig<AddUserMutationRequest>> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Get user information
     * @summary Get User
     * {@link /api/user/:username}
     */
    getUser(username: GetUserPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Modify an existing user- **username**: Cannot be changed. Used to identify the user.- **status**: User's new status. Can be 'active', 'disabled', 'on_hold', 'limited', or 'expired'.- **expire**: UTC timestamp for new account expiration. Set to `0` for unlimited, `null` for no change.- **data_limit**: New max data usage in bytes (e.g., `1073741824` for 1GB). Set to `0` for unlimited, `null` for no change.- **data_limit_reset_strategy**: New strategy for data limit reset. Options include 'daily', 'weekly', 'monthly', or 'no_reset'.- **proxies**: Dictionary of new protocol settings (e.g., `vmess`, `vless`). Empty dictionary means no change.- **inbounds**: Dictionary of new protocol tags to specify inbound connections. Empty dictionary means no change.- **note**: New optional text for additional user information or notes. `null` means no change.- **on_hold_timeout**: New UTC timestamp for when `on_hold` status should start or end. Only applicable if status is changed to 'on_hold'.- **on_hold_expire_duration**: New duration (in seconds) for how long the user should stay in `on_hold` status. Only applicable if status is changed to 'on_hold'.- **next_plan**: Next user plan (resets after use).Note: Fields set to `null` or omitted will not be modified.
     * @summary Modify User
     * {@link /api/user/:username}
     */
    modifyUser(username: ModifyUserPathParams['username'], data?: ModifyUserMutationRequest, config?: Partial<RequestConfig<ModifyUserMutationRequest>> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Remove a user
     * @summary Remove User
     * {@link /api/user/:username}
     */
    removeUser(username: RemoveUserPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Reset user data usage
     * @summary Reset User Data Usage
     * {@link /api/user/:username/reset}
     */
    resetUserDataUsage(username: ResetUserDataUsagePathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Revoke users subscription (Subscription link and proxies)
     * @summary Revoke User Subscription
     * {@link /api/user/:username/revoke_sub}
     */
    revokeUserSubscription(username: RevokeUserSubscriptionPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Get all users
     * @summary Get Users
     * {@link /api/users}
     */
    getUsers(params?: GetUsersQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UsersResponse>;
    /**
     * @description Reset all users data usage
     * @summary Reset Users Data Usage
     * {@link /api/users/reset}
     */
    resetUsersDataUsage(config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
    /**
     * @description Get users usage
     * @summary Get User Usage
     * {@link /api/user/:username/usage}
     */
    getUserUsage(username: GetUserUsagePathParams['username'], params?: GetUserUsageQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserUsagesResponse>;
    /**
     * @description Reset user by next plan
     * @summary Active Next Plan
     * {@link /api/user/:username/active-next}
     */
    activeNextPlan(username: ActiveNextPlanPathParams['username'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Get all users usage
     * @summary Get Users Usage
     * {@link /api/users/usage}
     */
    getUsersUsage(params?: GetUsersUsageQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UsersUsagesResponse>;
    /**
     * @description Set a new owner (admin) for a user.
     * @summary Set Owner
     * {@link /api/user/:username/set-owner}
     */
    setOwner(username: SetOwnerPathParams['username'], params: SetOwnerQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserResponse>;
    /**
     * @description Get users who have expired within the specified date range.- **expired_after** UTC datetime (optional)- **expired_before** UTC datetime (optional)- At least one of expired_after or expired_before must be provided for filtering- If both are omitted, returns all expired users
     * @summary Get Expired Users
     * {@link /api/users/expired}
     */
    getExpiredUsers(params?: GetExpiredUsersQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetExpiredUsers200>;
    /**
     * @description Delete users who have expired within the specified date range.- **expired_after** UTC datetime (optional)- **expired_before** UTC datetime (optional)- At least one of expired_after or expired_before must be provided
     * @summary Delete Expired Users
     * {@link /api/users/expired}
     */
    deleteExpiredUsers(params?: DeleteExpiredUsersQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<DeleteExpiredUsers200>;
}

declare class userTemplateApi {
    #private;
    constructor(config?: Partial<RequestConfig> & {
        client?: typeof client;
    });
    /**
     * @description Add a new user template- **name** can be up to 64 characters- **data_limit** must be in bytes and larger or equal to 0- **expire_duration** must be in seconds and larger or equat to 0- **inbounds** dictionary of protocol:inbound_tags, empty means all inbounds
     * @summary Add User Template
     * {@link /api/user_template}
     */
    addUserTemplate(data?: AddUserTemplateMutationRequest, config?: Partial<RequestConfig<AddUserTemplateMutationRequest>> & {
        client?: typeof client;
    }): Promise<UserTemplateResponse>;
    /**
     * @description Get a list of User Templates with optional pagination
     * @summary Get User Templates
     * {@link /api/user_template}
     */
    getUserTemplates(params?: GetUserTemplatesQueryParams, config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<GetUserTemplates200>;
    /**
     * @description Get User Template information with id
     * @summary Get User Template Endpoint
     * {@link /api/user_template/:template_id}
     */
    getUserTemplateEndpoint(templateId: GetUserTemplateEndpointPathParams['template_id'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<UserTemplateResponse>;
    /**
     * @description Modify User Template- **name** can be up to 64 characters- **data_limit** must be in bytes and larger or equal to 0- **expire_duration** must be in seconds and larger or equat to 0- **inbounds** dictionary of protocol:inbound_tags, empty means all inbounds
     * @summary Modify User Template
     * {@link /api/user_template/:template_id}
     */
    modifyUserTemplate(templateId: ModifyUserTemplatePathParams['template_id'], data?: ModifyUserTemplateMutationRequest, config?: Partial<RequestConfig<ModifyUserTemplateMutationRequest>> & {
        client?: typeof client;
    }): Promise<UserTemplateResponse>;
    /**
     * @description Remove a User Template by its ID
     * @summary Remove User Template
     * {@link /api/user_template/:template_id}
     */
    removeUserTemplate(templateId: RemoveUserTemplatePathParams['template_id'], config?: Partial<RequestConfig> & {
        client?: typeof client;
    }): Promise<any>;
}

declare const ACTIONS: {
    readonly user_created: "user_created";
    readonly user_updated: "user_updated";
    readonly user_deleted: "user_deleted";
    readonly user_limited: "user_limited";
    readonly user_expired: "user_expired";
    readonly user_enabled: "user_enabled";
    readonly user_disabled: "user_disabled";
    readonly data_usage_reset: "data_usage_reset";
    readonly data_reset_by_next: "data_reset_by_next";
    readonly subscription_revoked: "subscription_revoked";
    readonly reached_usage_percent: "reached_usage_percent";
    readonly reached_days_left: "reached_days_left";
};
type WebhookAction = keyof typeof ACTIONS;
declare const WebhookActionSchema: z.ZodEnum<{
    readonly user_created: "user_created";
    readonly user_updated: "user_updated";
    readonly user_deleted: "user_deleted";
    readonly user_limited: "user_limited";
    readonly user_expired: "user_expired";
    readonly user_enabled: "user_enabled";
    readonly user_disabled: "user_disabled";
    readonly data_usage_reset: "data_usage_reset";
    readonly data_reset_by_next: "data_reset_by_next";
    readonly subscription_revoked: "subscription_revoked";
    readonly reached_usage_percent: "reached_usage_percent";
    readonly reached_days_left: "reached_days_left";
}>;
declare const BaseWebhookSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
declare const UserWebhookSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
}, z.core.$strip>;
declare const ReachedUsagePercentSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_usage_percent">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    used_percent: z.ZodNumber;
}, z.core.$strip>;
declare const ReachedDaysLeftSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_days_left">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    days_left: z.ZodNumber;
}, z.core.$strip>;
declare const UserCreatedSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_created">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserUpdatedSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_updated">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserDeletedSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_deleted">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
}, z.core.$strip>;
declare const UserLimitedSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_limited">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserExpiredSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_expired">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserEnabledSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_enabled">;
    by: z.ZodOptional<z.ZodNullable<z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserDisabledSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_disabled">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
declare const UserDataUsageResetSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_usage_reset">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserDataResetByNextSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_reset_by_next">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const UserSubscriptionRevokedSchema: z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"subscription_revoked">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>;
declare const WebhookSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_created">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_updated">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_deleted">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_limited">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_expired">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_enabled">;
    by: z.ZodOptional<z.ZodNullable<z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_disabled">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_usage_reset">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_reset_by_next">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"subscription_revoked">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_usage_percent">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    used_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_days_left">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    days_left: z.ZodNumber;
}, z.core.$strip>], "action">;
type WebhookType = z.infer<typeof WebhookSchema>;
declare const WebhookArraySchema: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_created">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_updated">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_deleted">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_limited">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_expired">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_enabled">;
    by: z.ZodOptional<z.ZodNullable<z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"user_disabled">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_usage_reset">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"data_reset_by_next">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"subscription_revoked">;
    by: z.ZodType<Admin, unknown, z.core.$ZodTypeInternals<Admin, unknown>>;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_usage_percent">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    used_percent: z.ZodNumber;
}, z.core.$strip>, z.ZodObject<{
    enqueued_at: z.ZodDefault<z.ZodNumber>;
    send_at: z.ZodDefault<z.ZodNumber>;
    tries: z.ZodDefault<z.ZodNumber>;
    username: z.ZodString;
    action: z.ZodLiteral<"reached_days_left">;
    user: z.ZodType<UserResponse, unknown, z.core.$ZodTypeInternals<UserResponse, unknown>>;
    days_left: z.ZodNumber;
}, z.core.$strip>], "action">>;
type WebhookArrayType = z.infer<typeof WebhookArraySchema>;

/**
 * WebhookActionMap
 * - Map of action name => payload. Using Record<string, WebhookPayload> keeps
 *   the typings flexible for providers that supply arbitrary action strings.
 */
type WebhookActionMap = {
    [A in WebhookType['action']]: Extract<WebhookType, {
        action: A;
    }>;
};
/**
 * WebhookEventMap
 * - Includes specific action keys (via WebhookActionMap), wildcard '*' and 'batch'.
 */
type WebhookEventMap = WebhookActionMap & {
    '*': WebhookType;
    batch: WebhookType[];
};
interface WebhookManagerOptions {
    /**
     * Secret used for webhook signature verification.
     *
     * If provided, all incoming webhooks must include
     * a valid signature.
     */
    secret?: string;
    /**
     * Logger instance used for internal webhook logging.
     */
    logger: Logger;
}
/**
 * Handles incoming webhook events from Marzban.
 *
 * Features:
 * - Signature verification
 * - Payload validation
 * - Typed event subscriptions
 * - Wildcard event listeners
 * - Batch webhook processing
 * - Manual event dispatching
 *
 * Supports subscribing to:
 * - Specific webhook actions
 * - All events via '*'
 * - Batch events via 'batch'
 *
 * @example
 * webhook.on('user.created', payload => {
 *   console.log(payload.username)
 * })
 *
 * @example
 * webhook.on('*', payload => {
 *   console.log(payload.action)
 * })
 */
declare class WebhookManager {
    private readonly _secret?;
    private readonly _emitter;
    private readonly _logger;
    /**
     * Constructor
     * @param secret Optional webhook secret for verifying signatures
     * @param logger Logger instance for logging events
     */
    constructor({ secret, logger }: WebhookManagerOptions);
    /**
     * Subscribe to an event
     * @param event Event name (specific action, '*', or 'batch')
     * @param listener Function to handle the payload
     */
    on<E extends keyof WebhookEventMap>(event: E, listener: (payload: WebhookEventMap[E]) => void): this;
    /**
     * Subscribe to an event once (one-time listener)
     */
    once<E extends keyof WebhookEventMap>(event: E, listener: (payload: WebhookEventMap[E]) => void): this;
    /**
     * Unsubscribe a listener from an event
     */
    off<E extends keyof WebhookEventMap>(event: E, listener: (payload: WebhookEventMap[E]) => void): this;
    /**
     * Validate incoming webhook payloads and verify signature when secret configured.
     *
     * Important:
     * - If a secret is configured for the manager, the caller MUST pass the raw request body
     *   (Buffer or string) so signature verification is performed against the original bytes.
     *
     * @param rawBody Incoming webhook raw body (Buffer|string) OR already-parsed object.
     * @param signature Optional webhook signature to verify (hex string)
     * @returns Array of validated webhook payloads
     */
    parseWebhook(rawBody: unknown, signature?: string): WebhookType[];
    /**
     * Handle an incoming webhook:
     * - Verifies signature (if secret configured)
     * - Validates the payload
     * - Emits 'batch' event if multiple payloads
     * - Emits individual events for each payload
     * - Emits wildcard '*' event for each payload
     * @param rawBody Incoming webhook raw body (Buffer|string) or already-parsed object
     * @param signature Optional signature for verification
     * @returns true if at least one event was emitted
     */
    handleWebhook(rawBody: unknown, signature?: string): Promise<boolean>;
    /**
     * Manually dispatch an event
     * @param event Event name (specific action, '*', or 'batch')
     * @param payload Payload to emit
     * @returns true if event had listeners
     */
    dispatch<E extends keyof Omit<WebhookEventMap, '*' | 'batch'>>(event: E, payload: WebhookEventMap[E]): Promise<boolean>;
}

declare function validateWebhookPayload(input: unknown): WebhookArrayType;
/**
 * Verify the x-webhook-secret header against HMAC-SHA256 signature.
 * - If secret is not configured → always returns true (no verification).
 * - If secret is configured → require `x-webhook-secret` with valid HMAC-SHA256.
 */
declare function verifyWebhookSignature(signature: string | undefined, secret: string | undefined, data: Buffer | string): boolean;

type AnyType = any;

type WebSocketEventMap$1 = {
    open: Event;
    message: MessageEvent;
    close: CloseEvent;
    error: Event;
};
declare abstract class BaseWebSocketClient {
    protected socket: WebSocket | AnyType;
    protected url: string;
    protected protocols?: string | string[];
    constructor(url: string, protocols?: string | string[]);
    protected abstract createWebSocket(): Promise<WebSocket | AnyType>;
    init(): Promise<void>;
    on<K extends keyof WebSocketEventMap$1>(event: K, listener: (event: WebSocketEventMap$1[K]) => void): void;
    send(data: string | ArrayBuffer | Blob | ArrayBufferView): void;
    close(code?: number, reason?: string): void;
    get readyState(): number;
}

declare class BrowserWebSocketClient extends BaseWebSocketClient {
    protected createWebSocket(): Promise<WebSocket>;
}

declare class WebSocketClient {
    static create(url: string, protocols?: string | string[]): Promise<BaseWebSocketClient>;
}

type HandleCloseConnection = () => void;
/**
 * Options for configuring a WebSocket log stream.
 */
interface LogOptions {
    /** Interval for sending messages (in seconds) */
    interval?: number;
    /** Callback triggered when a message is received */
    onMessage: (data: WebSocketEventMap['message']['data']) => void;
    /** Callback triggered when a connection error occurs */
    onError?: (data: WebSocketEventMap['error']) => void;
}
/**
 * Handles streaming logs from the Marzban API via WebSocket.
 * Supports both core logs and node-specific logs.
 */
declare class LogsStream {
    private basePath;
    private authService;
    private logger;
    private activeConnections;
    private maxRetries;
    /**
     * Creates an API instance for handling logs via WebSocket.
     * @param basePath The base URL for WebSocket connections.
     * @param authService Authentication service for managing tokens.
     * @param logger Logger instance for logging WebSocket events.
     */
    constructor(basePath: string, authService: AuthManager, logger: Logger);
    /**
     * Ensures that an access token is available and refreshes it if necessary.
     * @private
     */
    private ensureAuthenticated;
    /**
     * Establishes a WebSocket connection to a specified endpoint.
     * @private
     * @param endpoint The API endpoint for the WebSocket connection.
     * @param options Connection options (callbacks, interval).
     * @param retryCount The number of retry attempts in case of failure (default is 0).
     * @returns A function to close the WebSocket connection.
     */
    private connect;
    /**
     * Connects to the core logs (`/api/core/logs`).
     * @param options Connection options (callbacks, interval).
     * @returns A function to close the WebSocket connection.
     */
    connectByCore(options: LogOptions): Promise<HandleCloseConnection>;
    /**
     * Connects to logs of a specific node (`/api/node/{nodeId}/logs`).
     * @param nodeId The ID of the node whose logs should be accessed.
     * @param options Connection options (callbacks, interval).
     * @returns A function to close the WebSocket connection.
     */
    connectByNode(nodeId: number | string, options: LogOptions): Promise<HandleCloseConnection>;
    /**
     * Closes all active WebSocket connections.
     */
    closeAllConnections(): void;
}

interface Options {
    basePath: string;
    endpoint: string;
    token: string;
    interval: string | number;
}
declare const configurationUrlWs: ({ basePath, endpoint, interval, token }: Options) => string;

/**
 * Main SDK class for interacting with the Marzban API.
 *
 * Provides access to API modules (AdminApi, CoreApi, etc.) and handles authentication, retries, and interceptors.
 */
declare class MarzbanSDK {
    private readonly _config;
    private readonly _authService;
    private readonly _logger;
    /**
     * Administrative API endpoints.
     */
    readonly admin: adminApi;
    /**
     * Core API endpoints.
     */
    readonly core: coreApi;
    /**
     * Node management API endpoints.
     */
    readonly node: nodeApi;
    /**
     * User management API endpoints.
     */
    readonly user: userApi;
    /**
     * System API endpoints.
     */
    readonly system: systemApi;
    /**
     * Subscription management API endpoints.
     */
    readonly subscription: subscriptionApi;
    /**
     * User template API endpoints.
     */
    readonly userTemplate: userTemplateApi;
    /**
     * Real-time logs streaming.
     */
    readonly logs: LogsStream;
    /**
     * Webhook manager for validating, parsing, and handling incoming webhooks.
     *
     * Provides:
     * - Webhook signature verification
     * - Payload validation
     * - Typed event subscriptions
     * - Wildcard and batch event handling
     * - Manual event dispatching
     *
     * The webhook manager can be used to:
     * - Handle incoming HTTP webhook requests
     * - Subscribe to specific webhook events
     * - Verify webhook authenticity using a secret
     * - Process webhook batches
     *
     * @example
     * sdk.webhook.on('user.created', payload => {
     *   console.log(payload.username)
     * })
     *
     * @example
     * // Express.js integration
     * app.post('/webhook', async (req, res) => {
     *   await sdk.webhook.handleWebhook(
     *     req.body,
     *     req.headers['x-signature']
     *   )
     *
     *   res.sendStatus(200)
     * })
     */
    readonly webhook: WebhookManager;
    /**
     * Creates an instance of MarzbanSDK.
     *
     * @param {Config} config - Configuration object for the SDK.
     * @throws {Error} If required credentials (`username` or `password`) are missing.
     *
     * @example
     * // Automatic authentication (default)
     * const sdk = await createMarzbanSDK({
     *   baseUrl: 'https://api.example.com',
     *   username: 'admin',
     *   password: 'secret',
     * });
     *
     * @example
     * // Manual authentication mode
     * const sdk = await createMarzbanSDK({
     *   baseUrl: 'https://api.example.com',
     *   username: 'admin',
     *   password: 'secret',
     *   authenticateOnInit: false,
     * });
     * await sdk.authorize();
     */
    constructor(config: Config);
    /**
     * Returns the current authentication token.
     *
     * Waits for any in-progress authentication, then returns the JWT token in use (or empty string if none).
     *
     * @returns {Promise<string>} The current JWT token.
     *
     * @example
     * const token = await sdk.getAuthToken();
     * console.log(`Token: ${token}`);
     */
    getAuthToken(): Promise<string>;
    /**
     * Performs user authentication with stored credentials.
     *
     * If a login is already in progress and `force` is false, returns the existing promise.
     * If `force` is true or no login is in progress, starts a new authentication request.
     *
     * @param {boolean} [force=false] - If true, forces a new authentication request even if one is in progress.
     * @returns {Promise<void>} Resolves on successful authentication; rejects with {@link AuthenticationError} on failure.
     *
     * @example
     * try {
     *   await sdk.authorize();
     *   // Auth successful
     * } catch (e) {
     *   if (e instanceof AuthenticationError) {
     *     // Handle auth error
     *   }
     * }
     *
     * @example
     * // Force re-authentication (e.g., token refresh)
     * await sdk.authorize(true);
     */
    authorize(force?: boolean): Promise<void>;
    destroy(): Promise<void>;
}
declare const createMarzbanSDK: (config: Config) => Promise<MarzbanSDK>;

declare const adminCreateSchema: z.ZodType<AdminCreate>;

declare const adminModifySchema: z.ZodType<AdminModify>;

declare const adminSchema: z.ZodType<Admin>;

declare const activateAllDisabledUsersPathParamsSchema: z.ZodType<ActivateAllDisabledUsersPathParams>;
/**
 * @description Successful Response
 */
declare const activateAllDisabledUsers200Schema: z.ZodType<ActivateAllDisabledUsers200>;
/**
 * @description Unauthorized
 */
declare const activateAllDisabledUsers401Schema: z.ZodType<ActivateAllDisabledUsers401>;
/**
 * @description Forbidden
 */
declare const activateAllDisabledUsers403Schema: z.ZodType<ActivateAllDisabledUsers403>;
/**
 * @description Not found
 */
declare const activateAllDisabledUsers404Schema: z.ZodType<ActivateAllDisabledUsers404>;
/**
 * @description Validation Error
 */
declare const activateAllDisabledUsers422Schema: z.ZodType<ActivateAllDisabledUsers422>;
declare const activateAllDisabledUsersMutationResponseSchema: z.ZodType<ActivateAllDisabledUsersMutationResponse>;

/**
 * @description Successful Response
 */
declare const adminToken200Schema: z.ZodType<AdminToken200>;
/**
 * @description Unauthorized
 */
declare const adminToken401Schema: z.ZodType<AdminToken401>;
/**
 * @description Validation Error
 */
declare const adminToken422Schema: z.ZodType<AdminToken422>;
declare const adminTokenMutationRequestSchema: z.ZodType<AdminTokenMutationRequest>;
declare const adminTokenMutationResponseSchema: z.ZodType<AdminTokenMutationResponse>;

/**
 * @description Successful Response
 */
declare const createAdmin200Schema: z.ZodType<CreateAdmin200>;
/**
 * @description Unauthorized
 */
declare const createAdmin401Schema: z.ZodType<CreateAdmin401>;
/**
 * @description Forbidden
 */
declare const createAdmin403Schema: z.ZodType<CreateAdmin403>;
/**
 * @description Conflict
 */
declare const createAdmin409Schema: z.ZodType<CreateAdmin409>;
/**
 * @description Validation Error
 */
declare const createAdmin422Schema: z.ZodType<CreateAdmin422>;
declare const createAdminMutationRequestSchema: z.ZodType<CreateAdminMutationRequest>;
declare const createAdminMutationResponseSchema: z.ZodType<CreateAdminMutationResponse>;

declare const disableAllActiveUsersPathParamsSchema: z.ZodType<DisableAllActiveUsersPathParams>;
/**
 * @description Successful Response
 */
declare const disableAllActiveUsers200Schema: z.ZodType<DisableAllActiveUsers200>;
/**
 * @description Unauthorized
 */
declare const disableAllActiveUsers401Schema: z.ZodType<DisableAllActiveUsers401>;
/**
 * @description Forbidden
 */
declare const disableAllActiveUsers403Schema: z.ZodType<DisableAllActiveUsers403>;
/**
 * @description Not found
 */
declare const disableAllActiveUsers404Schema: z.ZodType<DisableAllActiveUsers404>;
/**
 * @description Validation Error
 */
declare const disableAllActiveUsers422Schema: z.ZodType<DisableAllActiveUsers422>;
declare const disableAllActiveUsersMutationResponseSchema: z.ZodType<DisableAllActiveUsersMutationResponse>;

declare const getAdminsQueryParamsSchema: z.ZodType<GetAdminsQueryParams>;
/**
 * @description Successful Response
 */
declare const getAdmins200Schema: z.ZodType<GetAdmins200>;
/**
 * @description Unauthorized
 */
declare const getAdmins401Schema: z.ZodType<GetAdmins401>;
/**
 * @description Forbidden
 */
declare const getAdmins403Schema: z.ZodType<GetAdmins403>;
/**
 * @description Validation Error
 */
declare const getAdmins422Schema: z.ZodType<GetAdmins422>;
declare const getAdminsQueryResponseSchema: z.ZodType<GetAdminsQueryResponse>;

declare const getAdminUsagePathParamsSchema: z.ZodType<GetAdminUsagePathParams>;
/**
 * @description Successful Response
 */
declare const getAdminUsage200Schema: z.ZodType<GetAdminUsage200>;
/**
 * @description Unauthorized
 */
declare const getAdminUsage401Schema: z.ZodType<GetAdminUsage401>;
/**
 * @description Forbidden
 */
declare const getAdminUsage403Schema: z.ZodType<GetAdminUsage403>;
/**
 * @description Validation Error
 */
declare const getAdminUsage422Schema: z.ZodType<GetAdminUsage422>;
declare const getAdminUsageQueryResponseSchema: z.ZodType<GetAdminUsageQueryResponse>;

/**
 * @description Successful Response
 */
declare const getCurrentAdmin200Schema: z.ZodType<GetCurrentAdmin200>;
/**
 * @description Unauthorized
 */
declare const getCurrentAdmin401Schema: z.ZodType<GetCurrentAdmin401>;
declare const getCurrentAdminQueryResponseSchema: z.ZodType<GetCurrentAdminQueryResponse>;

declare const modifyAdminPathParamsSchema: z.ZodType<ModifyAdminPathParams>;
/**
 * @description Successful Response
 */
declare const modifyAdmin200Schema: z.ZodType<ModifyAdmin200>;
/**
 * @description Unauthorized
 */
declare const modifyAdmin401Schema: z.ZodType<ModifyAdmin401>;
/**
 * @description Forbidden
 */
declare const modifyAdmin403Schema: z.ZodType<ModifyAdmin403>;
/**
 * @description Validation Error
 */
declare const modifyAdmin422Schema: z.ZodType<ModifyAdmin422>;
declare const modifyAdminMutationRequestSchema: z.ZodType<ModifyAdminMutationRequest>;
declare const modifyAdminMutationResponseSchema: z.ZodType<ModifyAdminMutationResponse>;

declare const removeAdminPathParamsSchema: z.ZodType<RemoveAdminPathParams>;
/**
 * @description Successful Response
 */
declare const removeAdmin200Schema: z.ZodType<RemoveAdmin200>;
/**
 * @description Unauthorized
 */
declare const removeAdmin401Schema: z.ZodType<RemoveAdmin401>;
/**
 * @description Forbidden
 */
declare const removeAdmin403Schema: z.ZodType<RemoveAdmin403>;
/**
 * @description Validation Error
 */
declare const removeAdmin422Schema: z.ZodType<RemoveAdmin422>;
declare const removeAdminMutationResponseSchema: z.ZodType<RemoveAdminMutationResponse>;

declare const resetAdminUsagePathParamsSchema: z.ZodType<ResetAdminUsagePathParams>;
/**
 * @description Successful Response
 */
declare const resetAdminUsage200Schema: z.ZodType<ResetAdminUsage200>;
/**
 * @description Unauthorized
 */
declare const resetAdminUsage401Schema: z.ZodType<ResetAdminUsage401>;
/**
 * @description Forbidden
 */
declare const resetAdminUsage403Schema: z.ZodType<ResetAdminUsage403>;
/**
 * @description Validation Error
 */
declare const resetAdminUsage422Schema: z.ZodType<ResetAdminUsage422>;
declare const resetAdminUsageMutationResponseSchema: z.ZodType<ResetAdminUsageMutationResponse>;

declare const bodyAdminTokenApiAdminTokenPostSchema: z.ZodType<BodyAdminTokenApiAdminTokenPost>;

declare const conflictSchema: z.ZodType<Conflict>;

/**
 * @description Successful Response
 */
declare const getCoreConfig200Schema: z.ZodType<GetCoreConfig200>;
/**
 * @description Unauthorized
 */
declare const getCoreConfig401Schema: z.ZodType<GetCoreConfig401>;
/**
 * @description Forbidden
 */
declare const getCoreConfig403Schema: z.ZodType<GetCoreConfig403>;
declare const getCoreConfigQueryResponseSchema: z.ZodType<GetCoreConfigQueryResponse>;

/**
 * @description Successful Response
 */
declare const getCoreStats200Schema: z.ZodType<GetCoreStats200>;
/**
 * @description Unauthorized
 */
declare const getCoreStats401Schema: z.ZodType<GetCoreStats401>;
declare const getCoreStatsQueryResponseSchema: z.ZodType<GetCoreStatsQueryResponse>;

/**
 * @description Successful Response
 */
declare const modifyCoreConfig200Schema: z.ZodType<ModifyCoreConfig200>;
/**
 * @description Unauthorized
 */
declare const modifyCoreConfig401Schema: z.ZodType<ModifyCoreConfig401>;
/**
 * @description Forbidden
 */
declare const modifyCoreConfig403Schema: z.ZodType<ModifyCoreConfig403>;
/**
 * @description Validation Error
 */
declare const modifyCoreConfig422Schema: z.ZodType<ModifyCoreConfig422>;
declare const modifyCoreConfigMutationRequestSchema: z.ZodType<ModifyCoreConfigMutationRequest>;
declare const modifyCoreConfigMutationResponseSchema: z.ZodType<ModifyCoreConfigMutationResponse>;

/**
 * @description Successful Response
 */
declare const restartCore200Schema: z.ZodType<RestartCore200>;
/**
 * @description Unauthorized
 */
declare const restartCore401Schema: z.ZodType<RestartCore401>;
/**
 * @description Forbidden
 */
declare const restartCore403Schema: z.ZodType<RestartCore403>;
declare const restartCoreMutationResponseSchema: z.ZodType<RestartCoreMutationResponse>;

declare const coreStatsSchema: z.ZodType<CoreStats>;

/**
 * @description Successful Response
 */
declare const base200Schema: z.ZodType<Base200>;
declare const baseQueryResponseSchema: z.ZodType<BaseQueryResponse>;

declare const forbiddenSchema: z.ZodType<Forbidden>;

declare const HTTPExceptionSchema: z.ZodType<HTTPException>;

declare const HTTPValidationErrorSchema: z.ZodType<HTTPValidationError>;

declare const nextPlanModelSchema: z.ZodType<NextPlanModel>;

declare const nodeCreateSchema: z.ZodType<NodeCreate>;

declare const nodeModifySchema: z.ZodType<NodeModify>;

declare const nodeResponseSchema: z.ZodType<NodeResponse>;

/**
 * @description Successful Response
 */
declare const addNode200Schema: z.ZodType<AddNode200>;
/**
 * @description Unauthorized
 */
declare const addNode401Schema: z.ZodType<AddNode401>;
/**
 * @description Forbidden
 */
declare const addNode403Schema: z.ZodType<AddNode403>;
/**
 * @description Conflict
 */
declare const addNode409Schema: z.ZodType<AddNode409>;
/**
 * @description Validation Error
 */
declare const addNode422Schema: z.ZodType<AddNode422>;
declare const addNodeMutationRequestSchema: z.ZodType<AddNodeMutationRequest>;
declare const addNodeMutationResponseSchema: z.ZodType<AddNodeMutationResponse>;

declare const getNodePathParamsSchema: z.ZodType<GetNodePathParams>;
/**
 * @description Successful Response
 */
declare const getNode200Schema: z.ZodType<GetNode200>;
/**
 * @description Unauthorized
 */
declare const getNode401Schema: z.ZodType<GetNode401>;
/**
 * @description Forbidden
 */
declare const getNode403Schema: z.ZodType<GetNode403>;
/**
 * @description Validation Error
 */
declare const getNode422Schema: z.ZodType<GetNode422>;
declare const getNodeQueryResponseSchema: z.ZodType<GetNodeQueryResponse>;

/**
 * @description Successful Response
 */
declare const getNodeSettings200Schema: z.ZodType<GetNodeSettings200>;
/**
 * @description Unauthorized
 */
declare const getNodeSettings401Schema: z.ZodType<GetNodeSettings401>;
/**
 * @description Forbidden
 */
declare const getNodeSettings403Schema: z.ZodType<GetNodeSettings403>;
declare const getNodeSettingsQueryResponseSchema: z.ZodType<GetNodeSettingsQueryResponse>;

/**
 * @description Successful Response
 */
declare const getNodes200Schema: z.ZodType<GetNodes200>;
/**
 * @description Unauthorized
 */
declare const getNodes401Schema: z.ZodType<GetNodes401>;
/**
 * @description Forbidden
 */
declare const getNodes403Schema: z.ZodType<GetNodes403>;
declare const getNodesQueryResponseSchema: z.ZodType<GetNodesQueryResponse>;

declare const getUsageQueryParamsSchema: z.ZodType<GetUsageQueryParams>;
/**
 * @description Successful Response
 */
declare const getUsage200Schema: z.ZodType<GetUsage200>;
/**
 * @description Unauthorized
 */
declare const getUsage401Schema: z.ZodType<GetUsage401>;
/**
 * @description Forbidden
 */
declare const getUsage403Schema: z.ZodType<GetUsage403>;
/**
 * @description Validation Error
 */
declare const getUsage422Schema: z.ZodType<GetUsage422>;
declare const getUsageQueryResponseSchema: z.ZodType<GetUsageQueryResponse>;

declare const modifyNodePathParamsSchema: z.ZodType<ModifyNodePathParams>;
/**
 * @description Successful Response
 */
declare const modifyNode200Schema: z.ZodType<ModifyNode200>;
/**
 * @description Unauthorized
 */
declare const modifyNode401Schema: z.ZodType<ModifyNode401>;
/**
 * @description Forbidden
 */
declare const modifyNode403Schema: z.ZodType<ModifyNode403>;
/**
 * @description Validation Error
 */
declare const modifyNode422Schema: z.ZodType<ModifyNode422>;
declare const modifyNodeMutationRequestSchema: z.ZodType<ModifyNodeMutationRequest>;
declare const modifyNodeMutationResponseSchema: z.ZodType<ModifyNodeMutationResponse>;

declare const reconnectNodePathParamsSchema: z.ZodType<ReconnectNodePathParams>;
/**
 * @description Successful Response
 */
declare const reconnectNode200Schema: z.ZodType<ReconnectNode200>;
/**
 * @description Unauthorized
 */
declare const reconnectNode401Schema: z.ZodType<ReconnectNode401>;
/**
 * @description Forbidden
 */
declare const reconnectNode403Schema: z.ZodType<ReconnectNode403>;
/**
 * @description Validation Error
 */
declare const reconnectNode422Schema: z.ZodType<ReconnectNode422>;
declare const reconnectNodeMutationResponseSchema: z.ZodType<ReconnectNodeMutationResponse>;

declare const removeNodePathParamsSchema: z.ZodType<RemoveNodePathParams>;
/**
 * @description Successful Response
 */
declare const removeNode200Schema: z.ZodType<RemoveNode200>;
/**
 * @description Unauthorized
 */
declare const removeNode401Schema: z.ZodType<RemoveNode401>;
/**
 * @description Forbidden
 */
declare const removeNode403Schema: z.ZodType<RemoveNode403>;
/**
 * @description Validation Error
 */
declare const removeNode422Schema: z.ZodType<RemoveNode422>;
declare const removeNodeMutationResponseSchema: z.ZodType<RemoveNodeMutationResponse>;

declare const nodeSettingsSchema: z.ZodType<NodeSettings>;

declare const nodeStatusSchema: z.ZodType<NodeStatus>;

declare const nodesUsageResponseSchema: z.ZodType<NodesUsageResponse>;

declare const nodeUsageResponseSchema: z.ZodType<NodeUsageResponse>;

declare const notFoundSchema: z.ZodType<NotFound>;

declare const proxyHostALPNSchema: z.ZodType<ProxyHostALPN>;

declare const proxyHostFingerprintSchema: z.ZodType<ProxyHostFingerprint>;

declare const proxyHostSchema: z.ZodType<ProxyHost>;

declare const proxyHostSecuritySchema: z.ZodType<ProxyHostSecurity>;

declare const proxyInboundSchema: z.ZodType<ProxyInbound>;

declare const proxySettingsSchema: z.ZodType<ProxySettings>;

declare const proxyTypesSchema: z.ZodType<ProxyTypes>;

declare const userGetUsagePathParamsSchema: z.ZodType<UserGetUsagePathParams>;
declare const userGetUsageQueryParamsSchema: z.ZodType<UserGetUsageQueryParams>;
/**
 * @description Successful Response
 */
declare const userGetUsage200Schema: z.ZodType<UserGetUsage200>;
/**
 * @description Validation Error
 */
declare const userGetUsage422Schema: z.ZodType<UserGetUsage422>;
declare const userGetUsageQueryResponseSchema: z.ZodType<UserGetUsageQueryResponse>;

declare const userSubscriptionInfoPathParamsSchema: z.ZodType<UserSubscriptionInfoPathParams>;
/**
 * @description Successful Response
 */
declare const userSubscriptionInfo200Schema: z.ZodType<UserSubscriptionInfo200>;
/**
 * @description Validation Error
 */
declare const userSubscriptionInfo422Schema: z.ZodType<UserSubscriptionInfo422>;
declare const userSubscriptionInfoQueryResponseSchema: z.ZodType<UserSubscriptionInfoQueryResponse>;

declare const userSubscriptionPathParamsSchema: z.ZodType<UserSubscriptionPathParams>;
declare const userSubscriptionHeaderParamsSchema: z.ZodType<UserSubscriptionHeaderParams>;
/**
 * @description Successful Response
 */
declare const userSubscription200Schema: z.ZodType<UserSubscription200>;
/**
 * @description Validation Error
 */
declare const userSubscription422Schema: z.ZodType<UserSubscription422>;
declare const userSubscriptionQueryResponseSchema: z.ZodType<UserSubscriptionQueryResponse>;

declare const userSubscriptionWithClientTypePathParamsSchema: z.ZodType<UserSubscriptionWithClientTypePathParams>;
declare const userSubscriptionWithClientTypeHeaderParamsSchema: z.ZodType<UserSubscriptionWithClientTypeHeaderParams>;
/**
 * @description Successful Response
 */
declare const userSubscriptionWithClientType200Schema: z.ZodType<UserSubscriptionWithClientType200>;
/**
 * @description Validation Error
 */
declare const userSubscriptionWithClientType422Schema: z.ZodType<UserSubscriptionWithClientType422>;
declare const userSubscriptionWithClientTypeQueryResponseSchema: z.ZodType<UserSubscriptionWithClientTypeQueryResponse>;

declare const subscriptionUserResponseSchema: z.ZodType<SubscriptionUserResponse>;

/**
 * @description Successful Response
 */
declare const getHosts200Schema: z.ZodType<GetHosts200>;
/**
 * @description Unauthorized
 */
declare const getHosts401Schema: z.ZodType<GetHosts401>;
/**
 * @description Forbidden
 */
declare const getHosts403Schema: z.ZodType<GetHosts403>;
declare const getHostsQueryResponseSchema: z.ZodType<GetHostsQueryResponse>;

/**
 * @description Successful Response
 */
declare const getInbounds200Schema: z.ZodType<GetInbounds200>;
/**
 * @description Unauthorized
 */
declare const getInbounds401Schema: z.ZodType<GetInbounds401>;
declare const getInboundsQueryResponseSchema: z.ZodType<GetInboundsQueryResponse>;

/**
 * @description Successful Response
 */
declare const getSystemStats200Schema: z.ZodType<GetSystemStats200>;
/**
 * @description Unauthorized
 */
declare const getSystemStats401Schema: z.ZodType<GetSystemStats401>;
declare const getSystemStatsQueryResponseSchema: z.ZodType<GetSystemStatsQueryResponse>;

/**
 * @description Successful Response
 */
declare const modifyHosts200Schema: z.ZodType<ModifyHosts200>;
/**
 * @description Unauthorized
 */
declare const modifyHosts401Schema: z.ZodType<ModifyHosts401>;
/**
 * @description Forbidden
 */
declare const modifyHosts403Schema: z.ZodType<ModifyHosts403>;
/**
 * @description Validation Error
 */
declare const modifyHosts422Schema: z.ZodType<ModifyHosts422>;
declare const modifyHostsMutationRequestSchema: z.ZodType<ModifyHostsMutationRequest>;
declare const modifyHostsMutationResponseSchema: z.ZodType<ModifyHostsMutationResponse>;

declare const systemStatsSchema: z.ZodType<SystemStats>;

declare const tokenSchema: z.ZodType<Token>;

declare const unauthorizedSchema: z.ZodType<Unauthorized>;

declare const userCreateSchema: z.ZodType<UserCreate>;

declare const userDataLimitResetStrategySchema: z.ZodType<UserDataLimitResetStrategy>;

declare const userModifySchema: z.ZodType<UserModify>;

declare const userResponseSchema: z.ZodType<UserResponse>;

declare const activeNextPlanPathParamsSchema: z.ZodType<ActiveNextPlanPathParams>;
/**
 * @description Successful Response
 */
declare const activeNextPlan200Schema: z.ZodType<ActiveNextPlan200>;
/**
 * @description Unauthorized
 */
declare const activeNextPlan401Schema: z.ZodType<ActiveNextPlan401>;
/**
 * @description Forbidden
 */
declare const activeNextPlan403Schema: z.ZodType<ActiveNextPlan403>;
/**
 * @description Not found
 */
declare const activeNextPlan404Schema: z.ZodType<ActiveNextPlan404>;
/**
 * @description Validation Error
 */
declare const activeNextPlan422Schema: z.ZodType<ActiveNextPlan422>;
declare const activeNextPlanMutationResponseSchema: z.ZodType<ActiveNextPlanMutationResponse>;

/**
 * @description Successful Response
 */
declare const addUser200Schema: z.ZodType<AddUser200>;
/**
 * @description Bad request
 */
declare const addUser400Schema: z.ZodType<AddUser400>;
/**
 * @description Unauthorized
 */
declare const addUser401Schema: z.ZodType<AddUser401>;
/**
 * @description Conflict
 */
declare const addUser409Schema: z.ZodType<AddUser409>;
/**
 * @description Validation Error
 */
declare const addUser422Schema: z.ZodType<AddUser422>;
declare const addUserMutationRequestSchema: z.ZodType<AddUserMutationRequest>;
declare const addUserMutationResponseSchema: z.ZodType<AddUserMutationResponse>;

declare const deleteExpiredUsersQueryParamsSchema: z.ZodType<DeleteExpiredUsersQueryParams>;
/**
 * @description Successful Response
 */
declare const deleteExpiredUsers200Schema: z.ZodType<DeleteExpiredUsers200>;
/**
 * @description Unauthorized
 */
declare const deleteExpiredUsers401Schema: z.ZodType<DeleteExpiredUsers401>;
/**
 * @description Validation Error
 */
declare const deleteExpiredUsers422Schema: z.ZodType<DeleteExpiredUsers422>;
declare const deleteExpiredUsersMutationResponseSchema: z.ZodType<DeleteExpiredUsersMutationResponse>;

declare const getExpiredUsersQueryParamsSchema: z.ZodType<GetExpiredUsersQueryParams>;
/**
 * @description Successful Response
 */
declare const getExpiredUsers200Schema: z.ZodType<GetExpiredUsers200>;
/**
 * @description Unauthorized
 */
declare const getExpiredUsers401Schema: z.ZodType<GetExpiredUsers401>;
/**
 * @description Validation Error
 */
declare const getExpiredUsers422Schema: z.ZodType<GetExpiredUsers422>;
declare const getExpiredUsersQueryResponseSchema: z.ZodType<GetExpiredUsersQueryResponse>;

declare const getUserPathParamsSchema: z.ZodType<GetUserPathParams>;
/**
 * @description Successful Response
 */
declare const getUser200Schema: z.ZodType<GetUser200>;
/**
 * @description Unauthorized
 */
declare const getUser401Schema: z.ZodType<GetUser401>;
/**
 * @description Forbidden
 */
declare const getUser403Schema: z.ZodType<GetUser403>;
/**
 * @description Not found
 */
declare const getUser404Schema: z.ZodType<GetUser404>;
/**
 * @description Validation Error
 */
declare const getUser422Schema: z.ZodType<GetUser422>;
declare const getUserQueryResponseSchema: z.ZodType<GetUserQueryResponse>;

declare const getUsersQueryParamsSchema: z.ZodType<GetUsersQueryParams>;
/**
 * @description Successful Response
 */
declare const getUsers200Schema: z.ZodType<GetUsers200>;
/**
 * @description Bad request
 */
declare const getUsers400Schema: z.ZodType<GetUsers400>;
/**
 * @description Unauthorized
 */
declare const getUsers401Schema: z.ZodType<GetUsers401>;
/**
 * @description Forbidden
 */
declare const getUsers403Schema: z.ZodType<GetUsers403>;
/**
 * @description Not found
 */
declare const getUsers404Schema: z.ZodType<GetUsers404>;
/**
 * @description Validation Error
 */
declare const getUsers422Schema: z.ZodType<GetUsers422>;
declare const getUsersQueryResponseSchema: z.ZodType<GetUsersQueryResponse>;

declare const getUsersUsageQueryParamsSchema: z.ZodType<GetUsersUsageQueryParams>;
/**
 * @description Successful Response
 */
declare const getUsersUsage200Schema: z.ZodType<GetUsersUsage200>;
/**
 * @description Unauthorized
 */
declare const getUsersUsage401Schema: z.ZodType<GetUsersUsage401>;
/**
 * @description Validation Error
 */
declare const getUsersUsage422Schema: z.ZodType<GetUsersUsage422>;
declare const getUsersUsageQueryResponseSchema: z.ZodType<GetUsersUsageQueryResponse>;

declare const getUserUsagePathParamsSchema: z.ZodType<GetUserUsagePathParams>;
declare const getUserUsageQueryParamsSchema: z.ZodType<GetUserUsageQueryParams>;
/**
 * @description Successful Response
 */
declare const getUserUsage200Schema: z.ZodType<GetUserUsage200>;
/**
 * @description Unauthorized
 */
declare const getUserUsage401Schema: z.ZodType<GetUserUsage401>;
/**
 * @description Forbidden
 */
declare const getUserUsage403Schema: z.ZodType<GetUserUsage403>;
/**
 * @description Not found
 */
declare const getUserUsage404Schema: z.ZodType<GetUserUsage404>;
/**
 * @description Validation Error
 */
declare const getUserUsage422Schema: z.ZodType<GetUserUsage422>;
declare const getUserUsageQueryResponseSchema: z.ZodType<GetUserUsageQueryResponse>;

declare const modifyUserPathParamsSchema: z.ZodType<ModifyUserPathParams>;
/**
 * @description Successful Response
 */
declare const modifyUser200Schema: z.ZodType<ModifyUser200>;
/**
 * @description Bad request
 */
declare const modifyUser400Schema: z.ZodType<ModifyUser400>;
/**
 * @description Unauthorized
 */
declare const modifyUser401Schema: z.ZodType<ModifyUser401>;
/**
 * @description Forbidden
 */
declare const modifyUser403Schema: z.ZodType<ModifyUser403>;
/**
 * @description Not found
 */
declare const modifyUser404Schema: z.ZodType<ModifyUser404>;
/**
 * @description Validation Error
 */
declare const modifyUser422Schema: z.ZodType<ModifyUser422>;
declare const modifyUserMutationRequestSchema: z.ZodType<ModifyUserMutationRequest>;
declare const modifyUserMutationResponseSchema: z.ZodType<ModifyUserMutationResponse>;

declare const removeUserPathParamsSchema: z.ZodType<RemoveUserPathParams>;
/**
 * @description Successful Response
 */
declare const removeUser200Schema: z.ZodType<RemoveUser200>;
/**
 * @description Unauthorized
 */
declare const removeUser401Schema: z.ZodType<RemoveUser401>;
/**
 * @description Forbidden
 */
declare const removeUser403Schema: z.ZodType<RemoveUser403>;
/**
 * @description Not found
 */
declare const removeUser404Schema: z.ZodType<RemoveUser404>;
/**
 * @description Validation Error
 */
declare const removeUser422Schema: z.ZodType<RemoveUser422>;
declare const removeUserMutationResponseSchema: z.ZodType<RemoveUserMutationResponse>;

declare const resetUserDataUsagePathParamsSchema: z.ZodType<ResetUserDataUsagePathParams>;
/**
 * @description Successful Response
 */
declare const resetUserDataUsage200Schema: z.ZodType<ResetUserDataUsage200>;
/**
 * @description Unauthorized
 */
declare const resetUserDataUsage401Schema: z.ZodType<ResetUserDataUsage401>;
/**
 * @description Forbidden
 */
declare const resetUserDataUsage403Schema: z.ZodType<ResetUserDataUsage403>;
/**
 * @description Not found
 */
declare const resetUserDataUsage404Schema: z.ZodType<ResetUserDataUsage404>;
/**
 * @description Validation Error
 */
declare const resetUserDataUsage422Schema: z.ZodType<ResetUserDataUsage422>;
declare const resetUserDataUsageMutationResponseSchema: z.ZodType<ResetUserDataUsageMutationResponse>;

/**
 * @description Successful Response
 */
declare const resetUsersDataUsage200Schema: z.ZodType<ResetUsersDataUsage200>;
/**
 * @description Unauthorized
 */
declare const resetUsersDataUsage401Schema: z.ZodType<ResetUsersDataUsage401>;
/**
 * @description Forbidden
 */
declare const resetUsersDataUsage403Schema: z.ZodType<ResetUsersDataUsage403>;
/**
 * @description Not found
 */
declare const resetUsersDataUsage404Schema: z.ZodType<ResetUsersDataUsage404>;
declare const resetUsersDataUsageMutationResponseSchema: z.ZodType<ResetUsersDataUsageMutationResponse>;

declare const revokeUserSubscriptionPathParamsSchema: z.ZodType<RevokeUserSubscriptionPathParams>;
/**
 * @description Successful Response
 */
declare const revokeUserSubscription200Schema: z.ZodType<RevokeUserSubscription200>;
/**
 * @description Unauthorized
 */
declare const revokeUserSubscription401Schema: z.ZodType<RevokeUserSubscription401>;
/**
 * @description Forbidden
 */
declare const revokeUserSubscription403Schema: z.ZodType<RevokeUserSubscription403>;
/**
 * @description Not found
 */
declare const revokeUserSubscription404Schema: z.ZodType<RevokeUserSubscription404>;
/**
 * @description Validation Error
 */
declare const revokeUserSubscription422Schema: z.ZodType<RevokeUserSubscription422>;
declare const revokeUserSubscriptionMutationResponseSchema: z.ZodType<RevokeUserSubscriptionMutationResponse>;

declare const setOwnerPathParamsSchema: z.ZodType<SetOwnerPathParams>;
declare const setOwnerQueryParamsSchema: z.ZodType<SetOwnerQueryParams>;
/**
 * @description Successful Response
 */
declare const setOwner200Schema: z.ZodType<SetOwner200>;
/**
 * @description Unauthorized
 */
declare const setOwner401Schema: z.ZodType<SetOwner401>;
/**
 * @description Validation Error
 */
declare const setOwner422Schema: z.ZodType<SetOwner422>;
declare const setOwnerMutationResponseSchema: z.ZodType<SetOwnerMutationResponse>;

declare const usersResponseSchema: z.ZodType<UsersResponse>;

declare const userStatusCreateSchema: z.ZodType<UserStatusCreate>;

declare const userStatusModifySchema: z.ZodType<UserStatusModify>;

declare const userStatusSchema: z.ZodType<UserStatus>;

declare const usersUsagesResponseSchema: z.ZodType<UsersUsagesResponse>;

declare const userTemplateCreateSchema: z.ZodType<UserTemplateCreate>;

declare const userTemplateModifySchema: z.ZodType<UserTemplateModify>;

declare const userTemplateResponseSchema: z.ZodType<UserTemplateResponse>;

/**
 * @description Successful Response
 */
declare const addUserTemplate200Schema: z.ZodType<AddUserTemplate200>;
/**
 * @description Validation Error
 */
declare const addUserTemplate422Schema: z.ZodType<AddUserTemplate422>;
declare const addUserTemplateMutationRequestSchema: z.ZodType<AddUserTemplateMutationRequest>;
declare const addUserTemplateMutationResponseSchema: z.ZodType<AddUserTemplateMutationResponse>;

declare const getUserTemplateEndpointPathParamsSchema: z.ZodType<GetUserTemplateEndpointPathParams>;
/**
 * @description Successful Response
 */
declare const getUserTemplateEndpoint200Schema: z.ZodType<GetUserTemplateEndpoint200>;
/**
 * @description Validation Error
 */
declare const getUserTemplateEndpoint422Schema: z.ZodType<GetUserTemplateEndpoint422>;
declare const getUserTemplateEndpointQueryResponseSchema: z.ZodType<GetUserTemplateEndpointQueryResponse>;

declare const getUserTemplatesQueryParamsSchema: z.ZodType<GetUserTemplatesQueryParams>;
/**
 * @description Successful Response
 */
declare const getUserTemplates200Schema: z.ZodType<GetUserTemplates200>;
/**
 * @description Validation Error
 */
declare const getUserTemplates422Schema: z.ZodType<GetUserTemplates422>;
declare const getUserTemplatesQueryResponseSchema: z.ZodType<GetUserTemplatesQueryResponse>;

declare const modifyUserTemplatePathParamsSchema: z.ZodType<ModifyUserTemplatePathParams>;
/**
 * @description Successful Response
 */
declare const modifyUserTemplate200Schema: z.ZodType<ModifyUserTemplate200>;
/**
 * @description Validation Error
 */
declare const modifyUserTemplate422Schema: z.ZodType<ModifyUserTemplate422>;
declare const modifyUserTemplateMutationRequestSchema: z.ZodType<ModifyUserTemplateMutationRequest>;
declare const modifyUserTemplateMutationResponseSchema: z.ZodType<ModifyUserTemplateMutationResponse>;

declare const removeUserTemplatePathParamsSchema: z.ZodType<RemoveUserTemplatePathParams>;
/**
 * @description Successful Response
 */
declare const removeUserTemplate200Schema: z.ZodType<RemoveUserTemplate200>;
/**
 * @description Validation Error
 */
declare const removeUserTemplate422Schema: z.ZodType<RemoveUserTemplate422>;
declare const removeUserTemplateMutationResponseSchema: z.ZodType<RemoveUserTemplateMutationResponse>;

declare const userUsageResponseSchema: z.ZodType<UserUsageResponse>;

declare const userUsagesResponseSchema: z.ZodType<UserUsagesResponse>;

declare const validationErrorSchema: z.ZodType<ValidationError>;

type SizeUnit = 'B' | 'KB' | 'MB' | 'GB' | 'TB' | 'PB';
/**
 * Parse human size like "1.5GB", "1024", "2 mb" into bytes (number).
 * Default uses binary units (KB = 1024). Pass { decimal: true } to use 1000.
 */
declare function parseSize(size: string | number, opts?: {
    decimal?: boolean;
}): number;
/**
 * Format bytes to human string like "1.50 GB".
 * - decimal=true uses 1000, otherwise 1024.
 */
declare function formatBytes(bytes: number, opts?: {
    decimals?: number;
    decimal?: boolean;
}): string;
/** Convert GB -> bytes */
declare function gbToBytes(gb: number, decimal?: boolean): number;
/** Convert bytes -> GB (float) */
declare function bytesToGb(bytes: number, decimal?: boolean): number;

interface Remaining {
    days: number;
    hours: number;
    minutes: number;
    seconds: number;
    totalMs: number;
}
/** Add duration components to a Date (immutable) */
declare function addToDate(date: Date | string | number, opts: {
    days?: number;
    hours?: number;
    minutes?: number;
    seconds?: number;
    ms?: number;
}): Date;
/** Add days */
declare function addDays(date: Date | string | number, days: number): Date;
/** Add hours */
declare function addHours(date: Date | string | number, hours: number): Date;
/** Get remaining time from `from` (default now) to `to` */
declare function remainingTime(to: Date | string | number, from?: Date | string | number): Remaining;
/** Human readable remaining: "2d 5h 3m 10s" */
declare function humanRemaining(to: Date | string | number, from?: Date | string | number): string;
/** Format ISO without milliseconds */
declare function toIso(date: Date | string | number): string;

/**
 * Helper utilities for working with Marzban host-settings template variables.
 *
 * Official reference (Host Settings -> Variables):
 * https://gozargah.github.io/marzban/en/docs/host-settings
 *
 * This module exports:
 * - Variable: enum of supported variable names (without braces)
 * - varAs: format a Variable as a template token ("{NAME}")
 * - VariableBraced: a frozen map of pre-wrapped tokens for quick use
 * - varExtract: extract variable names from a template
 * - varValidate: validate a template against known variables
 * - interpolateTemplateVariables: substitute values into a template
 *
 * Note: API is intentionally simple and does not preserve legacy/compatibility shims.
 */
/**
 * Enumeration of supported Marzban template variables.
 *
 * Each entry is the variable name (without braces) used in templates like "{USERNAME}".
 *
 * @see https://gozargah.github.io/marzban/en/docs/host-settings
 */
declare enum Variable {
    /** Master server IPv4 address, use as "{SERVER_IP}". */
    SERVER_IP = "SERVER_IP",
    /** User username/login, use as "{USERNAME}". */
    USERNAME = "USERNAME",
    /** Amount of data consumed by the user, use as "{DATA_USAGE}". */
    DATA_USAGE = "DATA_USAGE",
    /** Remaining data for the user, use as "{DATA_LEFT}". */
    DATA_LEFT = "DATA_LEFT",
    /** Total data limit for the user, use as "{DATA_LIMIT}". */
    DATA_LIMIT = "DATA_LIMIT",
    /** Remaining days of subscription (integer), use as "{DAYS_LEFT}". */
    DAYS_LEFT = "DAYS_LEFT",
    /** Human-friendly remaining time (days/hours/mins/secs), use as "{TIME_LEFT}". */
    TIME_LEFT = "TIME_LEFT",
    /** Expiration date in Gregorian calendar, use as "{EXPIRE_DATE}". */
    EXPIRE_DATE = "EXPIRE_DATE",
    /** Expiration date in Jalali calendar, use as "{JALALI_EXPIRE_DATE}". */
    JALALI_EXPIRE_DATE = "JALALI_EXPIRE_DATE",
    /** User status as an emoji (✅, ⌛️, 🪫, ❌, 🔌), use as "{STATUS_EMOJI}". */
    STATUS_EMOJI = "STATUS_EMOJI",
    /** Configuration protocol (vless, vmess, trojan, shadowsocks, ...), use as "{PROTOCOL}". */
    PROTOCOL = "PROTOCOL",
    /** Transport type (tcp, ws, grpc, ...), use as "{TRANSPORT}". */
    TRANSPORT = "TRANSPORT"
}
/**
 * A variable name wrapped in braces, e.g. "{USERNAME}".
 * Used as the literal token type for template strings.
 */
type BracedVariable<K extends Variable = Variable> = `{${K}}`;
/**
 * Result of validating template variables.
 *
 * - isValid: true when no unknown variables were found.
 * - unknownVariables: list of variable names (without braces) that are not in {@link Variable}.
 */
interface TemplateVariablesValidationResult {
    /** True when template contains only known variables. */
    isValid: boolean;
    /** Unknown variable names found in the template (without braces). */
    unknownVariables: string[];
}
/**
 * Return a variable formatted as a template token, e.g. "{USERNAME}".
 *
 * @param v Variable enum member.
 * @returns String token ready for insertion into templates.
 *
 * @example
 * varAs(Variable.USERNAME) // "{USERNAME}"
 */
declare function varAs<K extends Variable>(v: K): BracedVariable<K>;
/**
 * Frozen map of pre-braced tokens for quick insertion.
 *
 * Each value has a precise literal type — e.g. VariableBraced.USERNAME has
 * type "{USERNAME}" rather than plain string, which enables exhaustive checks
 * and accurate autocomplete when building template strings.
 *
 * @example
 * VariableBraced.USERNAME // "{USERNAME}" (type: "{USERNAME}")
 */
declare const VariableBraced: Readonly<{
    SERVER_IP: "{SERVER_IP}";
    USERNAME: "{USERNAME}";
    DATA_USAGE: "{DATA_USAGE}";
    DATA_LEFT: "{DATA_LEFT}";
    DATA_LIMIT: "{DATA_LIMIT}";
    DAYS_LEFT: "{DAYS_LEFT}";
    TIME_LEFT: "{TIME_LEFT}";
    EXPIRE_DATE: "{EXPIRE_DATE}";
    JALALI_EXPIRE_DATE: "{JALALI_EXPIRE_DATE}";
    STATUS_EMOJI: "{STATUS_EMOJI}";
    PROTOCOL: "{PROTOCOL}";
    TRANSPORT: "{TRANSPORT}";
}>;
/**
 * Extract variable names from a template string.
 *
 * Matches tokens in the form "{NAME}" where NAME matches \w+ (letters, digits, underscore).
 * Returned names do not include braces and preserve the order of appearance.
 * Duplicates are preserved — one entry per occurrence, not per unique variable.
 *
 * @param template Template string to scan.
 * @returns Array of variable names (without braces). Empty array when none found or template falsy.
 *
 * @example
 * varExtract("hello {USERNAME}, ip: {SERVER_IP}") // ["USERNAME", "SERVER_IP"]
 */
declare function varExtract(template: string): string[];
/**
 * Validate that a template string contains only known Marzban variables.
 *
 * Unknown variables (not present in {@link Variable}) are returned in unknownVariables.
 * Duplicates in the template are reflected as duplicates in unknownVariables.
 *
 * @param template Template string to validate.
 * @returns {@link TemplateVariablesValidationResult}
 *
 * @example
 * varValidate("hi {USERNAME} and {FOO}")
 * // { isValid: false, unknownVariables: ["FOO"] }
 */
declare function varValidate(template: string): TemplateVariablesValidationResult;
/**
 * Interpolate known Marzban template variables inside a template string.
 *
 * Replaces tokens like "{USERNAME}" with provided values. Only keys present
 * in the `values` map (keys are {@link Variable}) are substituted. Unknown or
 * missing values are left intact.
 *
 * @param template Template containing tokens such as "{USERNAME}".
 * @param values Partial mapping from {@link Variable} to replacement strings.
 * @returns New string with substitutions applied.
 *
 * @example
 * interpolateTemplateVariables("hi {USERNAME}, left: {DATA_LEFT}", {
 *   [Variable.USERNAME]: "alice",
 *   [Variable.DATA_LEFT]: "10GB"
 * })
 * // "hi alice, left: 10GB"
 */
declare function interpolateTemplateVariables(template: string, values: Partial<Record<Variable, string>>): string;

export { ACTIONS, type ActivateAllDisabledUsers200, type ActivateAllDisabledUsers401, type ActivateAllDisabledUsers403, type ActivateAllDisabledUsers404, type ActivateAllDisabledUsers422, type ActivateAllDisabledUsersMutation, type ActivateAllDisabledUsersMutationResponse, type ActivateAllDisabledUsersPathParams, type ActiveNextPlan200, type ActiveNextPlan401, type ActiveNextPlan403, type ActiveNextPlan404, type ActiveNextPlan422, type ActiveNextPlanMutation, type ActiveNextPlanMutationResponse, type ActiveNextPlanPathParams, type AddNode200, type AddNode401, type AddNode403, type AddNode409, type AddNode422, type AddNodeMutation, type AddNodeMutationRequest, type AddNodeMutationResponse, type AddUser200, type AddUser400, type AddUser401, type AddUser409, type AddUser422, type AddUserMutation, type AddUserMutationRequest, type AddUserMutationResponse, type AddUserTemplate200, type AddUserTemplate422, type AddUserTemplateMutation, type AddUserTemplateMutationRequest, type AddUserTemplateMutationResponse, type Admin, type AdminCreate, type AdminModify, type AdminToken200, type AdminToken401, type AdminToken422, type AdminTokenMutation, type AdminTokenMutationRequest, type AdminTokenMutationResponse, AuthError, AuthTokenError, type Base200, type BaseQuery, type BaseQueryResponse, BaseWebSocketClient, BaseWebhookSchema, type BodyAdminTokenApiAdminTokenPost, type BracedVariable, BrowserWebSocketClient, type Config, ConfigurationError, type Conflict, type CoreStats, type CreateAdmin200, type CreateAdmin401, type CreateAdmin403, type CreateAdmin409, type CreateAdmin422, type CreateAdminMutation, type CreateAdminMutationRequest, type CreateAdminMutationResponse, type DeleteExpiredUsers200, type DeleteExpiredUsers401, type DeleteExpiredUsers422, type DeleteExpiredUsersMutation, type DeleteExpiredUsersMutationResponse, type DeleteExpiredUsersQueryParams, type DisableAllActiveUsers200, type DisableAllActiveUsers401, type DisableAllActiveUsers403, type DisableAllActiveUsers404, type DisableAllActiveUsers422, type DisableAllActiveUsersMutation, type DisableAllActiveUsersMutationResponse, type DisableAllActiveUsersPathParams, type Forbidden, type GetAdminUsage200, type GetAdminUsage401, type GetAdminUsage403, type GetAdminUsage422, type GetAdminUsagePathParams, type GetAdminUsageQuery, type GetAdminUsageQueryResponse, type GetAdmins200, type GetAdmins401, type GetAdmins403, type GetAdmins422, type GetAdminsQuery, type GetAdminsQueryParams, type GetAdminsQueryResponse, type GetCoreConfig200, type GetCoreConfig401, type GetCoreConfig403, type GetCoreConfigQuery, type GetCoreConfigQueryResponse, type GetCoreStats200, type GetCoreStats401, type GetCoreStatsQuery, type GetCoreStatsQueryResponse, type GetCurrentAdmin200, type GetCurrentAdmin401, type GetCurrentAdminQuery, type GetCurrentAdminQueryResponse, type GetExpiredUsers200, type GetExpiredUsers401, type GetExpiredUsers422, type GetExpiredUsersQuery, type GetExpiredUsersQueryParams, type GetExpiredUsersQueryResponse, type GetHosts200, type GetHosts401, type GetHosts403, type GetHostsQuery, type GetHostsQueryResponse, type GetInbounds200, type GetInbounds401, type GetInboundsQuery, type GetInboundsQueryResponse, type GetNode200, type GetNode401, type GetNode403, type GetNode422, type GetNodePathParams, type GetNodeQuery, type GetNodeQueryResponse, type GetNodeSettings200, type GetNodeSettings401, type GetNodeSettings403, type GetNodeSettingsQuery, type GetNodeSettingsQueryResponse, type GetNodes200, type GetNodes401, type GetNodes403, type GetNodesQuery, type GetNodesQueryResponse, type GetSystemStats200, type GetSystemStats401, type GetSystemStatsQuery, type GetSystemStatsQueryResponse, type GetUsage200, type GetUsage401, type GetUsage403, type GetUsage422, type GetUsageQuery, type GetUsageQueryParams, type GetUsageQueryResponse, type GetUser200, type GetUser401, type GetUser403, type GetUser404, type GetUser422, type GetUserPathParams, type GetUserQuery, type GetUserQueryResponse, type GetUserTemplateEndpoint200, type GetUserTemplateEndpoint422, type GetUserTemplateEndpointPathParams, type GetUserTemplateEndpointQuery, type GetUserTemplateEndpointQueryResponse, type GetUserTemplates200, type GetUserTemplates422, type GetUserTemplatesQuery, type GetUserTemplatesQueryParams, type GetUserTemplatesQueryResponse, type GetUserUsage200, type GetUserUsage401, type GetUserUsage403, type GetUserUsage404, type GetUserUsage422, type GetUserUsagePathParams, type GetUserUsageQuery, type GetUserUsageQueryParams, type GetUserUsageQueryResponse, type GetUsers200, type GetUsers400, type GetUsers401, type GetUsers403, type GetUsers404, type GetUsers422, type GetUsersQuery, type GetUsersQueryParams, type GetUsersQueryResponse, type GetUsersUsage200, type GetUsersUsage401, type GetUsersUsage422, type GetUsersUsageQuery, type GetUsersUsageQueryParams, type GetUsersUsageQueryResponse, type HTTPException, HTTPExceptionSchema, type HTTPValidationError, HTTPValidationErrorSchema, HttpError, type LogOptions, LogsStream, MarzbanSDK, type ModifyAdmin200, type ModifyAdmin401, type ModifyAdmin403, type ModifyAdmin422, type ModifyAdminMutation, type ModifyAdminMutationRequest, type ModifyAdminMutationResponse, type ModifyAdminPathParams, type ModifyCoreConfig200, type ModifyCoreConfig401, type ModifyCoreConfig403, type ModifyCoreConfig422, type ModifyCoreConfigMutation, type ModifyCoreConfigMutationRequest, type ModifyCoreConfigMutationResponse, type ModifyHosts200, type ModifyHosts401, type ModifyHosts403, type ModifyHosts422, type ModifyHostsMutation, type ModifyHostsMutationRequest, type ModifyHostsMutationResponse, type ModifyNode200, type ModifyNode401, type ModifyNode403, type ModifyNode422, type ModifyNodeMutation, type ModifyNodeMutationRequest, type ModifyNodeMutationResponse, type ModifyNodePathParams, type ModifyUser200, type ModifyUser400, type ModifyUser401, type ModifyUser403, type ModifyUser404, type ModifyUser422, type ModifyUserMutation, type ModifyUserMutationRequest, type ModifyUserMutationResponse, type ModifyUserPathParams, type ModifyUserTemplate200, type ModifyUserTemplate422, type ModifyUserTemplateMutation, type ModifyUserTemplateMutationRequest, type ModifyUserTemplateMutationResponse, type ModifyUserTemplatePathParams, type NextPlanModel, type NodeCreate, type NodeModify, type NodeResponse, type NodeSettings, type NodeStatus, type NodeStatusEnumKey, type NodeUsageResponse, type NodesUsageResponse, type NotFound, type ProxyHost, type ProxyHostALPN, type ProxyHostALPNEnumKey, type ProxyHostFingerprint, type ProxyHostFingerprintEnumKey, type ProxyHostSecurity, type ProxyHostSecurityEnumKey, type ProxyInbound, type ProxySettings, type ProxyTypes, type ProxyTypesEnumKey, ReachedDaysLeftSchema, ReachedUsagePercentSchema, type ReconnectNode200, type ReconnectNode401, type ReconnectNode403, type ReconnectNode422, type ReconnectNodeMutation, type ReconnectNodeMutationResponse, type ReconnectNodePathParams, type Remaining, type RemoveAdmin200, type RemoveAdmin401, type RemoveAdmin403, type RemoveAdmin422, type RemoveAdminMutation, type RemoveAdminMutationResponse, type RemoveAdminPathParams, type RemoveNode200, type RemoveNode401, type RemoveNode403, type RemoveNode422, type RemoveNodeMutation, type RemoveNodeMutationResponse, type RemoveNodePathParams, type RemoveUser200, type RemoveUser401, type RemoveUser403, type RemoveUser404, type RemoveUser422, type RemoveUserMutation, type RemoveUserMutationResponse, type RemoveUserPathParams, type RemoveUserTemplate200, type RemoveUserTemplate422, type RemoveUserTemplateMutation, type RemoveUserTemplateMutationResponse, type RemoveUserTemplatePathParams, type ResetAdminUsage200, type ResetAdminUsage401, type ResetAdminUsage403, type ResetAdminUsage422, type ResetAdminUsageMutation, type ResetAdminUsageMutationResponse, type ResetAdminUsagePathParams, type ResetUserDataUsage200, type ResetUserDataUsage401, type ResetUserDataUsage403, type ResetUserDataUsage404, type ResetUserDataUsage422, type ResetUserDataUsageMutation, type ResetUserDataUsageMutationResponse, type ResetUserDataUsagePathParams, type ResetUsersDataUsage200, type ResetUsersDataUsage401, type ResetUsersDataUsage403, type ResetUsersDataUsage404, type ResetUsersDataUsageMutation, type ResetUsersDataUsageMutationResponse, type RestartCore200, type RestartCore401, type RestartCore403, type RestartCoreMutation, type RestartCoreMutationResponse, type RevokeUserSubscription200, type RevokeUserSubscription401, type RevokeUserSubscription403, type RevokeUserSubscription404, type RevokeUserSubscription422, type RevokeUserSubscriptionMutation, type RevokeUserSubscriptionMutationResponse, type RevokeUserSubscriptionPathParams, SdkError, type SetOwner200, type SetOwner401, type SetOwner422, type SetOwnerMutation, type SetOwnerMutationResponse, type SetOwnerPathParams, type SetOwnerQueryParams, type SizeUnit, type SubscriptionUserResponse, type SystemStats, type TemplateVariablesValidationResult, type Token, type Unauthorized, type UserCreate, UserCreatedSchema, type UserDataLimitResetStrategy, type UserDataLimitResetStrategyEnumKey, UserDataResetByNextSchema, UserDataUsageResetSchema, UserDeletedSchema, UserDisabledSchema, UserEnabledSchema, UserExpiredSchema, type UserGetUsage200, type UserGetUsage422, type UserGetUsagePathParams, type UserGetUsageQuery, type UserGetUsageQueryParams, type UserGetUsageQueryResponse, UserLimitedSchema, type UserModify, type UserResponse, type UserStatus, type UserStatusCreate, type UserStatusCreateEnumKey, type UserStatusEnumKey, type UserStatusModify, type UserStatusModifyEnumKey, type UserSubscription200, type UserSubscription422, type UserSubscriptionHeaderParams, type UserSubscriptionInfo200, type UserSubscriptionInfo422, type UserSubscriptionInfoPathParams, type UserSubscriptionInfoQuery, type UserSubscriptionInfoQueryResponse, type UserSubscriptionPathParams, type UserSubscriptionQuery, type UserSubscriptionQueryResponse, UserSubscriptionRevokedSchema, type UserSubscriptionWithClientType200, type UserSubscriptionWithClientType422, type UserSubscriptionWithClientTypeHeaderParams, type UserSubscriptionWithClientTypePathParams, type UserSubscriptionWithClientTypeQuery, type UserSubscriptionWithClientTypeQueryResponse, type UserTemplateCreate, type UserTemplateModify, type UserTemplateResponse, UserUpdatedSchema, type UserUsageResponse, type UserUsagesResponse, UserWebhookSchema, type UsersResponse, type UsersUsagesResponse, type ValidationError, Variable, VariableBraced, WebSocketClient, type WebSocketEventMap$1 as WebSocketEventMap, type WebhookAction, type WebhookActionMap, WebhookActionSchema, WebhookArraySchema, type WebhookArrayType, type WebhookEventMap, WebhookManager, type WebhookManagerOptions, WebhookSchema, WebhookSignatureError, type WebhookType, WebhookValidationError, activateAllDisabledUsers200Schema, activateAllDisabledUsers401Schema, activateAllDisabledUsers403Schema, activateAllDisabledUsers404Schema, activateAllDisabledUsers422Schema, activateAllDisabledUsersMutationResponseSchema, activateAllDisabledUsersPathParamsSchema, activeNextPlan200Schema, activeNextPlan401Schema, activeNextPlan403Schema, activeNextPlan404Schema, activeNextPlan422Schema, activeNextPlanMutationResponseSchema, activeNextPlanPathParamsSchema, addDays, addHours, addNode200Schema, addNode401Schema, addNode403Schema, addNode409Schema, addNode422Schema, addNodeMutationRequestSchema, addNodeMutationResponseSchema, addToDate, addUser200Schema, addUser400Schema, addUser401Schema, addUser409Schema, addUser422Schema, addUserMutationRequestSchema, addUserMutationResponseSchema, addUserTemplate200Schema, addUserTemplate422Schema, addUserTemplateMutationRequestSchema, addUserTemplateMutationResponseSchema, adminApi, adminCreateSchema, adminModifySchema, adminSchema, adminToken200Schema, adminToken401Schema, adminToken422Schema, adminTokenMutationRequestSchema, adminTokenMutationResponseSchema, base200Schema, baseQueryResponseSchema, bodyAdminTokenApiAdminTokenPostSchema, bytesToGb, configurationUrlWs, conflictSchema, coreApi, coreStatsSchema, createAdmin200Schema, createAdmin401Schema, createAdmin403Schema, createAdmin409Schema, createAdmin422Schema, createAdminMutationRequestSchema, createAdminMutationResponseSchema, createMarzbanSDK, deleteExpiredUsers200Schema, deleteExpiredUsers401Schema, deleteExpiredUsers422Schema, deleteExpiredUsersMutationResponseSchema, deleteExpiredUsersQueryParamsSchema, disableAllActiveUsers200Schema, disableAllActiveUsers401Schema, disableAllActiveUsers403Schema, disableAllActiveUsers404Schema, disableAllActiveUsers422Schema, disableAllActiveUsersMutationResponseSchema, disableAllActiveUsersPathParamsSchema, forbiddenSchema, formatBytes, gbToBytes, getAdminUsage200Schema, getAdminUsage401Schema, getAdminUsage403Schema, getAdminUsage422Schema, getAdminUsagePathParamsSchema, getAdminUsageQueryResponseSchema, getAdmins200Schema, getAdmins401Schema, getAdmins403Schema, getAdmins422Schema, getAdminsQueryParamsSchema, getAdminsQueryResponseSchema, getCoreConfig200Schema, getCoreConfig401Schema, getCoreConfig403Schema, getCoreConfigQueryResponseSchema, getCoreStats200Schema, getCoreStats401Schema, getCoreStatsQueryResponseSchema, getCurrentAdmin200Schema, getCurrentAdmin401Schema, getCurrentAdminQueryResponseSchema, getExpiredUsers200Schema, getExpiredUsers401Schema, getExpiredUsers422Schema, getExpiredUsersQueryParamsSchema, getExpiredUsersQueryResponseSchema, getHosts200Schema, getHosts401Schema, getHosts403Schema, getHostsQueryResponseSchema, getInbounds200Schema, getInbounds401Schema, getInboundsQueryResponseSchema, getNode200Schema, getNode401Schema, getNode403Schema, getNode422Schema, getNodePathParamsSchema, getNodeQueryResponseSchema, getNodeSettings200Schema, getNodeSettings401Schema, getNodeSettings403Schema, getNodeSettingsQueryResponseSchema, getNodes200Schema, getNodes401Schema, getNodes403Schema, getNodesQueryResponseSchema, getSystemStats200Schema, getSystemStats401Schema, getSystemStatsQueryResponseSchema, getUsage200Schema, getUsage401Schema, getUsage403Schema, getUsage422Schema, getUsageQueryParamsSchema, getUsageQueryResponseSchema, getUser200Schema, getUser401Schema, getUser403Schema, getUser404Schema, getUser422Schema, getUserPathParamsSchema, getUserQueryResponseSchema, getUserTemplateEndpoint200Schema, getUserTemplateEndpoint422Schema, getUserTemplateEndpointPathParamsSchema, getUserTemplateEndpointQueryResponseSchema, getUserTemplates200Schema, getUserTemplates422Schema, getUserTemplatesQueryParamsSchema, getUserTemplatesQueryResponseSchema, getUserUsage200Schema, getUserUsage401Schema, getUserUsage403Schema, getUserUsage404Schema, getUserUsage422Schema, getUserUsagePathParamsSchema, getUserUsageQueryParamsSchema, getUserUsageQueryResponseSchema, getUsers200Schema, getUsers400Schema, getUsers401Schema, getUsers403Schema, getUsers404Schema, getUsers422Schema, getUsersQueryParamsSchema, getUsersQueryResponseSchema, getUsersUsage200Schema, getUsersUsage401Schema, getUsersUsage422Schema, getUsersUsageQueryParamsSchema, getUsersUsageQueryResponseSchema, humanRemaining, interpolateTemplateVariables, isAuthError, isConfigurationError, isSdkError, modifyAdmin200Schema, modifyAdmin401Schema, modifyAdmin403Schema, modifyAdmin422Schema, modifyAdminMutationRequestSchema, modifyAdminMutationResponseSchema, modifyAdminPathParamsSchema, modifyCoreConfig200Schema, modifyCoreConfig401Schema, modifyCoreConfig403Schema, modifyCoreConfig422Schema, modifyCoreConfigMutationRequestSchema, modifyCoreConfigMutationResponseSchema, modifyHosts200Schema, modifyHosts401Schema, modifyHosts403Schema, modifyHosts422Schema, modifyHostsMutationRequestSchema, modifyHostsMutationResponseSchema, modifyNode200Schema, modifyNode401Schema, modifyNode403Schema, modifyNode422Schema, modifyNodeMutationRequestSchema, modifyNodeMutationResponseSchema, modifyNodePathParamsSchema, modifyUser200Schema, modifyUser400Schema, modifyUser401Schema, modifyUser403Schema, modifyUser404Schema, modifyUser422Schema, modifyUserMutationRequestSchema, modifyUserMutationResponseSchema, modifyUserPathParamsSchema, modifyUserTemplate200Schema, modifyUserTemplate422Schema, modifyUserTemplateMutationRequestSchema, modifyUserTemplateMutationResponseSchema, modifyUserTemplatePathParamsSchema, nextPlanModelSchema, nodeApi, nodeCreateSchema, nodeModifySchema, nodeResponseSchema, nodeSettingsSchema, nodeStatusEnum, nodeStatusSchema, nodeUsageResponseSchema, nodesUsageResponseSchema, notFoundSchema, parseSize, proxyHostALPNEnum, proxyHostALPNSchema, proxyHostFingerprintEnum, proxyHostFingerprintSchema, proxyHostSchema, proxyHostSecurityEnum, proxyHostSecuritySchema, proxyInboundSchema, proxySettingsSchema, proxyTypesEnum, proxyTypesSchema, reconnectNode200Schema, reconnectNode401Schema, reconnectNode403Schema, reconnectNode422Schema, reconnectNodeMutationResponseSchema, reconnectNodePathParamsSchema, remainingTime, removeAdmin200Schema, removeAdmin401Schema, removeAdmin403Schema, removeAdmin422Schema, removeAdminMutationResponseSchema, removeAdminPathParamsSchema, removeNode200Schema, removeNode401Schema, removeNode403Schema, removeNode422Schema, removeNodeMutationResponseSchema, removeNodePathParamsSchema, removeUser200Schema, removeUser401Schema, removeUser403Schema, removeUser404Schema, removeUser422Schema, removeUserMutationResponseSchema, removeUserPathParamsSchema, removeUserTemplate200Schema, removeUserTemplate422Schema, removeUserTemplateMutationResponseSchema, removeUserTemplatePathParamsSchema, resetAdminUsage200Schema, resetAdminUsage401Schema, resetAdminUsage403Schema, resetAdminUsage422Schema, resetAdminUsageMutationResponseSchema, resetAdminUsagePathParamsSchema, resetUserDataUsage200Schema, resetUserDataUsage401Schema, resetUserDataUsage403Schema, resetUserDataUsage404Schema, resetUserDataUsage422Schema, resetUserDataUsageMutationResponseSchema, resetUserDataUsagePathParamsSchema, resetUsersDataUsage200Schema, resetUsersDataUsage401Schema, resetUsersDataUsage403Schema, resetUsersDataUsage404Schema, resetUsersDataUsageMutationResponseSchema, restartCore200Schema, restartCore401Schema, restartCore403Schema, restartCoreMutationResponseSchema, revokeUserSubscription200Schema, revokeUserSubscription401Schema, revokeUserSubscription403Schema, revokeUserSubscription404Schema, revokeUserSubscription422Schema, revokeUserSubscriptionMutationResponseSchema, revokeUserSubscriptionPathParamsSchema, setOwner200Schema, setOwner401Schema, setOwner422Schema, setOwnerMutationResponseSchema, setOwnerPathParamsSchema, setOwnerQueryParamsSchema, subscriptionApi, subscriptionUserResponseSchema, systemApi, systemStatsSchema, toIso, tokenSchema, unauthorizedSchema, userApi, userCreateSchema, userDataLimitResetStrategyEnum, userDataLimitResetStrategySchema, userGetUsage200Schema, userGetUsage422Schema, userGetUsagePathParamsSchema, userGetUsageQueryParamsSchema, userGetUsageQueryResponseSchema, userModifySchema, userResponseSchema, userStatusCreateEnum, userStatusCreateSchema, userStatusEnum, userStatusModifyEnum, userStatusModifySchema, userStatusSchema, userSubscription200Schema, userSubscription422Schema, userSubscriptionHeaderParamsSchema, userSubscriptionInfo200Schema, userSubscriptionInfo422Schema, userSubscriptionInfoPathParamsSchema, userSubscriptionInfoQueryResponseSchema, userSubscriptionPathParamsSchema, userSubscriptionQueryResponseSchema, userSubscriptionWithClientType200Schema, userSubscriptionWithClientType422Schema, userSubscriptionWithClientTypeHeaderParamsSchema, userSubscriptionWithClientTypePathParamsSchema, userSubscriptionWithClientTypeQueryResponseSchema, userTemplateApi, userTemplateCreateSchema, userTemplateModifySchema, userTemplateResponseSchema, userUsageResponseSchema, userUsagesResponseSchema, usersResponseSchema, usersUsagesResponseSchema, validateWebhookPayload, validationErrorSchema, varAs, varExtract, varValidate, verifyWebhookSignature };
