import type { Device, ImageInstall } from '../../balena-model.js'; import type { StatePatchV2Body } from './routes/state-patch-v2.js'; import type { sbvrUtils } from '@balena/pinejs'; export declare const v3ValidPatchFields: ("status" | "is_online" | "ip_address" | "mac_address" | "is_undervolted" | "cpu_id" | "os_version" | "os_variant" | "supervisor_version" | "provisioning_progress" | "provisioning_state" | "api_port" | "api_secret" | "update_status")[]; export declare const v2ValidPatchFields: Array, 'apps'>>; export type TextFieldsOf = { [K in Extract]: T[K] extends string | null ? K : never; }[Extract]; export declare function truncateConstrainedFieldsFactory(resource: string, constrainedTextFields: Array<[ validPatchField: TextFieldsOf, maxLength: number, delimiter: string | null ]>): >(object: O, recordId: number) => O; export declare const truncateConstrainedDeviceFields: >(object: O, recordId: number) => O; export declare function normalizeDeviceWriteBody(deviceBody: T, uuid: string): T & Partial>; declare const metricsPatchNumbers: readonly ["memory_usage", "memory_total", "storage_usage", "storage_total", "cpu_temp", "cpu_usage"]; export declare const metricsPatchFields: readonly ["memory_usage", "memory_total", "storage_usage", "storage_total", "cpu_temp", "cpu_usage", "storage_block_device"]; export declare function limitMetricNumbers(body: Partial>): void; export declare const shouldUpdateMetrics: (uuid: string) => Promise; export type ImageInstallUpdateBody = { status?: ImageInstall['Write']['status']; is_provided_by__release: number; download_progress?: number | null; }; export declare const upsertImageInstall: (resinApi: typeof sbvrUtils.api.resin, imgInstall: Pick, { imageId, releaseId, status: $status, downloadProgress, }: { imageId: number; releaseId: number; status?: string; downloadProgress?: number | null; }, deviceId: number) => Promise; export declare const deleteOldImageInstalls: (resinApi: typeof sbvrUtils.api.resin, deviceId: number, imageIds: number[]) => Promise; export {};