/* eslint-disable @typescript-eslint/no-namespace */
export namespace Results {
    export type PortfolioList = {
        portfolios: Portfolio[];
    };

    export type Portfolio = {
        id: string;
        name: string;
        entity_id: string;
        organization_id: string;
    };

    export type ListBalances = {
        balances: Balance[];
        type: "TRADING_BALANCES" | "VAULT_BALANCES" | "TOTAL_BALANCES";
        trading_balances: {
            total: string;
            holds: string;
        };
        vault_balances: {
            total: string;
            holds: string;
        };
    };

    export type Balance = {
        symbol: string;
        amount: string;
        holds: string;
        bonded_amount: string;
        reserved_amount: string;
        unbonding_amount: string;
        unvested_amount: string;
        pending_rewards_amount: string;
        past_rewards_amount: string;
        bondable_amount: string;
        withdrawable_amount: string;
        fiat_amount: string;
    };

    export type ListTransactions = {
        transactions: Transaction[];
        pagination: {
            next_cursor: string;
            sort_direction: string;
            has_next: boolean;
        };
    };

    export type Transaction = {
        id: string;
        wallet_id: string;
        portfolio_id: string;
        type: string;
        status: string;
        symbol: string;
        created_at: string;
        completed_at: string;
        amount: string;
        transfer_from: {
            type: string;
            value: string;
        };
        transfer_to: {
            type: string;
            value: string;
        };
        network_fees: string;
        fees: string;
        fee_symbol: string;
        blockchain_ids: string[];
        transaction_id: string;
        destination_symbol: string;
    };

    export type ListWallets = {
        wallets: Wallet[];
        pagination: {
            next_cursor: string;
            sort_direction: string;
            has_next: boolean;
        };
    };

    export type Wallet = {
        id: string;
        name: string;
        type: string;
        created_at: string;
    };

    export type ListOrders = {
        orders: Order[];
        next_cursor: string;
        sort_direction: string;
        has_next: boolean;
    };

    export type Order = {
        id: string;
        user_id: string;
        portfolio_id: string;
        product_id: string;
        side: string;
        client_order_id: string;
        type: string;
        base_quantity: string;
        quote_value: string;
        limit_price: string;
        start_time: string;
        expiry_time: string;
        status: string;
        time_in_force: string;
        created_at: string;
        filled_quantity: string;
        filed_value: string;
        average_filled_price: string;
        commission: string;
        exchange_fee: string;
    };

    export type PortfolioFills = {
        fills: PortfolioFill[];
        pagination: {
            next_cursor: string;
            sort_direction: string;
            has_next: boolean;
        };
    };

    export type PortfolioFill = {
        id: string;
        order_id: string;
        product_id: string;
        side: string;
        filled_quantity: string;
        filled_value: string;
        price: string;
        time: string;
        commission: string;
        venue: string;
    };
}
