/**
 * Graph Data Transfer Objects (DTOs)
 * Strictly typed interfaces for GraphQL responses to replace any types
 */
export type BigIntString = string;
export type TimestampString = string;
export type AddressString = string;
export interface GraphPositionDTO {
    id: string;
    pkpId: string;
    borrower: string;
    createdAt: TimestampString;
    lastUpdated: TimestampString;
    vaultAddress: string;
    ucdMinted?: BigIntString;
    ucdPaid?: BigIntString;
    ucdDebt: BigIntString;
    selectedTerm: string;
    status: string;
    expiryAt: TimestampString;
    createdAtBlock?: string;
    lastUpdatedAt?: TimestampString;
    loanTerm?: {
        id: string;
        months: string;
        extensionFeeRate: string;
        extensionFeeUCD: string;
        totalExtensions: string;
        createdAt: string;
    };
    extensionFeesPaid?: string;
    totalExtensions?: string;
    payments?: Array<{
        id: string;
        amount: number;
        blockNumber: number;
        newCollateralRatio: number;
        newDebt: number;
        payer: {
            id: string;
        };
        createdAt: number;
        transactionHash: string;
        type: string;
    }>;
    totalPaid?: string;
    liquidation?: {
        id: string;
        liquidatedAt: string;
        liquidatedBy: string;
        reason: string;
        collateralRecovered: string;
        debtRecovered: string;
        liquidationFee: string;
        blockNumber: number;
        collateralSeized: string;
        commitHash: string;
        commitTimestamp: string;
        liquidatedAmount: string;
        liquidator: string;
        revealDelay: string;
        timestamp: string;
        transactionHash: string;
    };
}
export interface GraphBorrowerDTO {
    id: string;
    createdAt: TimestampString;
}
export interface GraphPositionWithBorrowerDTO extends Omit<GraphPositionDTO, 'borrower'> {
    borrower: GraphBorrowerDTO;
}
export interface GraphUserDataDTO {
    id: string;
    positions: GraphPositionDTO[];
    totalBorrowed: BigIntString;
    totalRepaid: BigIntString;
    activePositions: string;
    firstInteractionTimestamp: TimestampString;
    lastInteractionTimestamp: TimestampString;
}
export interface GraphLoanTermDTO {
    id: string;
    months: string;
    mintFeeBps?: string;
    extensionFeeBps?: string;
    isValid?: boolean;
    createdAt?: TimestampString;
    createdAtBlock?: string;
}
export interface GraphPSMConfigurationDTO {
    id: string;
    version: string;
    redeemEnabled: boolean;
    totalSwapVolume: BigIntString;
    totalRedeemVolume: BigIntString;
    supportedStablecoinsCount: string;
    lastUpdated: TimestampString;
}
export interface GraphSupportedStablecoinDTO {
    id: string;
    address: AddressString;
    isSupported: boolean;
    exchangeRate: BigIntString;
    entryFee: BigIntString;
    exitFee: BigIntString;
    reserves: BigIntString;
    totalSupply: BigIntString;
    lastUpdated: TimestampString;
}
export interface GraphPSMDailyMetricsDTO {
    id: string;
    date: string;
    totalSwapVolume: BigIntString;
    totalRedeemVolume: BigIntString;
    averageExchangeRate: BigIntString;
    uniqueUsers: string;
    transactionCount: string;
}
export interface GraphTokenDTO {
    id: string;
    address: AddressString;
    name: string;
    symbol: string;
    decimals: string;
    totalSupply: BigIntString;
    createdAtTimestamp: TimestampString;
    createdAtBlock: string;
}
export interface GraphAccountDTO {
    id: string;
    address: AddressString;
    balance: BigIntString;
    token: string;
    createdAtTimestamp: TimestampString;
    createdAtBlock: string;
}
export interface GraphMetaDTO {
    block: {
        number: string;
        hash: string;
        timestamp: string;
    };
    deployment: {
        network: string;
        chainId: string;
        subgraphName: string;
        version: string;
    };
}
export interface GraphPaginationDTO {
    first: number;
    skip: number;
    orderBy?: string;
    orderDirection?: 'asc' | 'desc';
}
export interface GraphPaginatedResponseDTO<T> {
    data: T[];
    total: number;
    page: number;
    hasMore: boolean;
}
export interface GraphPositionsResponseDTO {
    positions: GraphPositionWithBorrowerDTO[];
    _meta: GraphMetaDTO;
}
export interface GraphUserPositionsResponseDTO {
    positions: GraphPositionDTO[];
    total: number;
}
export interface GraphPositionsByStatusResponseDTO {
    positions: GraphPositionDTO[];
    total: number;
}
export interface GraphPSMDailyMetricsResponseDTO {
    psmDailyMetrics: GraphPSMDailyMetricsDTO[];
}
export interface GraphTokensResponseDTO {
    tokens: GraphTokenDTO[];
}
export interface GraphTokenResponseDTO {
    token: GraphTokenDTO;
}
export interface GraphAccountResponseDTO {
    account: GraphAccountDTO;
}
export interface GraphAccountsResponseDTO {
    accounts: GraphAccountDTO[];
}
export interface GraphPositionFilterDTO {
    borrower?: string;
    status?: string;
    pkpId?: string;
    createdAt_gte?: TimestampString;
    createdAt_lte?: TimestampString;
}
export interface GraphAccountFilterDTO {
    token?: string;
    minBalance?: BigIntString;
    address?: AddressString;
}
export interface GraphHealthCheckDTO {
    _meta: GraphMetaDTO;
    positionsCount: number;
    lastIndexedBlock: string;
    isHealthy: boolean;
}
export interface GraphErrorDTO {
    message: string;
    locations?: Array<{
        line: number;
        column: number;
    }>;
    path?: string[];
    extensions?: {
        code: string;
        exception?: {
            stacktrace: string[];
        };
    };
}
export interface GraphResponseDTO<T> {
    data?: T;
    errors?: GraphErrorDTO[];
    extensions?: {
        [key: string]: any;
    };
}
