import type { TVDiskID, TVSlotId } from '../../types/api/vdisk'; import type { BytesSizes } from '../bytesParsers/formatBytes'; import type { FormatValuesPrecision } from './common'; import type { Digits } from './formatNumber'; export declare const formatBytes: (bytes?: string | number) => string; export declare const formatBps: (bytes?: string | number) => string; export declare const stringifyVdiskId: (id?: TVDiskID | TVSlotId) => string; export declare function parseVdiskId(id: string | null | undefined): TVDiskID | undefined; /** * It works well only with positive values, * if you want to get negative formatted duration, use some wrapper like getDowntimeFromDateFormatted */ export declare function formatDurationSeconds(seconds: number): string | undefined; export declare const formatDurationMs: (ms?: number, withMs?: boolean) => string | undefined; export declare function getUptimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string | undefined; export declare function getDowntimeFromDateFormatted(dateFrom?: number | string, dateTo?: number | string): string | undefined; export declare function formatStorageValues(value?: number, total?: number, size?: BytesSizes, delimiter?: string, withValueLabel?: boolean, precision?: FormatValuesPrecision): string[]; export declare function formatNumericValues(value?: number, total?: number, size?: Digits, delimiter?: string, withValueLabel?: boolean): string[]; export declare const formatStorageValuesToGb: (value?: number, total?: number) => string[]; export declare const formatStorageValuesToTb: (value?: number, total?: number) => string[]; export declare const formatNumber: (number?: unknown) => string; /** * Rounds a value to the specified number of decimal places while compensating for * floating-point precision errors. */ export declare const roundToDecimalPlaces: (value: number, precision?: number) => number; export declare const formatPercent: (number?: unknown, precision?: number, options?: { fixed?: boolean; }) => string; export declare const formatSecondsToHours: (seconds: number) => string; export declare const roundToPrecision: (value: number | string, precision?: number) => number; export declare const formatCPU: (value?: number | string) => string | undefined; export declare const formatCPUWithLabel: (value?: number) => string | undefined; export declare const formatDateTime: (value?: number | string, { withTimeZone, defaultValue }?: { withTimeZone?: boolean; defaultValue?: string; }) => string; export declare const formatTimestamp: (value?: string | number, defaultValue?: string) => string; export declare function getStringifiedData(value: unknown): string; export declare function trimOuterEmptyLines(str: string): string; export declare function stripIndentByFirstLine(str: string): string;