import type { RpcClineAccountActionRequest, RpcProviderActionRequest } from "@clinebot/shared";
import type { ClineAccountBalance, ClineAccountOrganization, ClineAccountOrganizationBalance, ClineAccountOrganizationUsageTransaction, ClineAccountPaymentTransaction, ClineAccountUsageTransaction, ClineAccountUser } from "./types";
export interface ClineAccountOperations {
    fetchMe(): Promise<ClineAccountUser>;
    fetchBalance(userId?: string): Promise<ClineAccountBalance>;
    fetchUsageTransactions(userId?: string): Promise<ClineAccountUsageTransaction[]>;
    fetchPaymentTransactions(userId?: string): Promise<ClineAccountPaymentTransaction[]>;
    fetchUserOrganizations(): Promise<ClineAccountOrganization[]>;
    fetchOrganizationBalance(organizationId: string): Promise<ClineAccountOrganizationBalance>;
    fetchOrganizationUsageTransactions(input: {
        organizationId: string;
        memberId?: string;
    }): Promise<ClineAccountOrganizationUsageTransaction[]>;
    switchAccount(organizationId?: string | null): Promise<void>;
}
export declare function isRpcClineAccountActionRequest(request: RpcProviderActionRequest): request is RpcClineAccountActionRequest;
export declare function executeRpcClineAccountAction(request: RpcClineAccountActionRequest, service: ClineAccountOperations): Promise<unknown>;
export interface RpcProviderActionExecutor {
    runProviderAction(request: RpcProviderActionRequest): Promise<{
        result: unknown;
    }>;
}
export declare class RpcClineAccountService implements ClineAccountOperations {
    private readonly executor;
    constructor(executor: RpcProviderActionExecutor);
    fetchMe(): Promise<ClineAccountUser>;
    fetchBalance(userId?: string): Promise<ClineAccountBalance>;
    fetchUsageTransactions(userId?: string): Promise<ClineAccountUsageTransaction[]>;
    fetchPaymentTransactions(userId?: string): Promise<ClineAccountPaymentTransaction[]>;
    fetchUserOrganizations(): Promise<ClineAccountOrganization[]>;
    fetchOrganizationBalance(organizationId: string): Promise<ClineAccountOrganizationBalance>;
    fetchOrganizationUsageTransactions(input: {
        organizationId: string;
        memberId?: string;
    }): Promise<ClineAccountOrganizationUsageTransaction[]>;
    switchAccount(organizationId?: string | null): Promise<void>;
    private request;
}
