import { Sequelize as SequelizeInstance } from 'sequelize-typescript';
import { Crypto, CronConfig } from 'src/models';
import { CoinMarketCapClient } from 'src/utils/coinmarketcap';
import { ListParams, UsersParams, EditParams, DeadActionParams, SearchParams, AddParams, StaleParams, SetThresholdParams } from './cryptos-manage.entity';
interface AddResult {
    agregados: Array<{
        id: number;
        symbol: string;
        name: string;
        price: number;
    }>;
    duplicados: Array<{
        id: number;
        soft_deleted: boolean;
    }>;
    agregados_sin_precio: Array<{
        id: number;
        symbol: string;
        name: string;
    }>;
    fallidos: Array<{
        id: number;
        error: string;
    }>;
}
export declare class AdminSystemCryptosManageService {
    private readonly cryptoModel;
    private readonly cronConfigModel;
    private readonly sequelize;
    private readonly cmc;
    constructor(cryptoModel: typeof Crypto, cronConfigModel: typeof CronConfig, sequelize: SequelizeInstance, cmc: CoinMarketCapClient);
    list(request: ListParams): Promise<{
        rows: {
            id: any;
            symbol: string;
            name: string;
            price: number;
            percent: number;
            priority: boolean;
            paid_updated_at: Date;
            color: string;
            usuarios_count: number;
        }[];
        count: number;
        total: number;
        page: number;
        per_page: number;
    }>;
    private usuariosCountByCryptoIds;
    users(request: UsersParams): Promise<{
        crypto_id: number;
        count: number;
        users: {
            id: number;
            name: string;
            lastname: string;
            email: string;
        }[];
    }>;
    edit(request: EditParams): Promise<{
        ok: boolean;
        crypto: {
            id: any;
            symbol: string;
            name: string;
            priority: boolean;
        };
    }>;
    deadAction(request: DeadActionParams): Promise<{
        ok: boolean;
        status: string;
        crypto_id: any;
        symbol: string;
        price?: undefined;
        percentChange24h?: undefined;
    } | {
        ok: boolean;
        status: string;
        crypto_id: any;
        symbol: string;
        price: any;
        percentChange24h: any;
    } | {
        ok: boolean;
        status: string;
        crypto_id: any;
        symbol: string;
        reason?: undefined;
        message?: undefined;
    } | {
        ok: boolean;
        reason: string;
        status: string;
        crypto_id: any;
        symbol: string;
        message: string;
    }>;
    private retryQuote;
    private deleteCrypto;
    search(request: SearchParams): Promise<{
        symbol: string;
        count: any;
        matches: any;
    }>;
    private existingCryptoIds;
    add(request: AddParams): Promise<AddResult & {
        counts: Record<string, number>;
    }>;
    private resolveMetaById;
    private softDeletedCryptoIds;
    private resolveIds;
    stale(_request: StaleParams): Promise<{
        threshold_hours: number;
        counts: {
            pendientes: number;
            muertas: number;
        };
        pendientes: object[];
        muertas: object[];
    }>;
    private toPositiveInt;
    private resolveOrderBy;
    private resolveOrderDir;
    private sanitizeName;
    private isForeignKeyError;
    private getStaleThresholdHours;
    setThreshold(request: SetThresholdParams): Promise<{
        ok: boolean;
        key: string;
        hours: number;
    }>;
    private validateThresholdHours;
}
export {};
