/** Configuration for automatic retry with exponential backoff. */ export interface RetryConfig { /** Maximum number of retry attempts (default 3). */ maxRetries?: number; /** Base delay in milliseconds before exponential increase (default 1000). */ baseDelayMs?: number; /** Maximum delay in milliseconds between retries (default 30000). */ maxDelayMs?: number; } /** Configuration for the ThermoWorks Cloud client. */ export interface ThermoworksConfig { /** ThermoWorks Cloud account email address. */ email: string; /** ThermoWorks Cloud account password. */ password: string; /** Override the default Firebase API key. */ apiKey?: string; /** Override the default Firebase app ID. */ appId?: string; /** Retry configuration for transient failures (429, 503, network errors). */ retry?: RetryConfig; /** * Path to the token cache file for persisting auth tokens across sessions. * Reduces authentication overhead by reusing valid tokens instead of * performing a full sign-in on every client instantiation. * * Defaults to `~/.thermoworks/.token-cache.json` if set to `true` or a string path. * Set to `false` or omit to disable token caching. */ tokenCachePath?: string | boolean; } /** A ThermoWorks device (Node, Smoke, Signals, RFX Gateway, etc). */ export interface Device { readonly serial: string; readonly deviceId: string | null; readonly label: string | null; readonly type: string | null; readonly device: string | null; readonly status: string | null; readonly battery: number | null; readonly batteryState: string | null; readonly wifiStrength: number | null; readonly firmware: string | null; readonly color: string | null; readonly thumbnail: string | null; readonly deviceDisplayUnits: string | null; readonly iotDeviceId: string | null; readonly iotCoreDeviceBlocked: boolean | null; readonly recordingIntervalInSeconds: number | null; readonly transmitIntervalInSeconds: number | null; readonly readInterval: number | null; readonly heartbeatInterval: number | null; readonly temperatureDeltaTrigger: number | null; readonly pendingLoad: boolean | null; readonly batteryAlertSent: boolean | null; readonly lastSeen: Date | null; readonly lastTelemetrySaved: Date | null; readonly latestReading: Date | null; readonly lastWifiConnection: Date | null; readonly lastBluetoothConnection: Date | null; readonly sessionStart: Date | null; readonly sessionLabel: string | null; readonly lastArchive: Date | null; readonly lastPurged: Date | null; readonly assignedToAccountOn: Date | null; readonly accountId: string | null; readonly notes: string | null; readonly public: boolean | null; readonly publicLink: string | null; readonly searModeEnabled: boolean | null; readonly showSensorChannels: boolean | null; readonly ringColors: string[] | null; readonly gateway: GatewayInfo | null; readonly fan: FanSettings | null; readonly bigQuery: BigQueryRef | null; } /** Gateway connection info for RFX wireless devices. */ export interface GatewayInfo { readonly gatewayId: string | null; readonly rssi: number | null; readonly lastSeen: Date | null; readonly switchedAt: Date | null; readonly lastPacketId: number | null; } /** BBQ fan/blower controller settings. */ export interface FanSettings { readonly connected: boolean; readonly connection: boolean; readonly setTemp: number | null; readonly fanChannel: string | null; readonly state: number | null; } /** Reference to historical data in BigQuery. */ export interface BigQueryRef { readonly datasetId: string; readonly tableId: string; } /** A channel reading from a device (temperature or humidity sensor). */ export interface DeviceChannel { readonly value: number | null; readonly units: string | null; readonly label: string | null; readonly status: string | null; readonly type: string | null; readonly number: string | null; readonly enabled: boolean | null; readonly color: string | null; readonly lastSeen: Date | null; readonly lastTelemetrySaved: Date | null; readonly lastEventId: string | null; readonly showAvgTemp: boolean | null; readonly estimatedAlarmStatus: string | null; readonly rateOfChange: number | null; readonly rateOfChangeUnit: string | null; readonly alarmHigh: Alarm | null; readonly alarmLow: Alarm | null; readonly minimum: MinMaxReading | null; readonly maximum: MinMaxReading | null; } /** An alarm threshold on a device channel. */ export interface Alarm { readonly enabled: boolean; readonly alarming: boolean; readonly muted: boolean | null; readonly value: number | null; readonly units: string | null; readonly lastNotified: Date | null; } /** A minimum or maximum reading record. */ export interface MinMaxReading { readonly value: number | null; readonly units: string | null; readonly date: Date | null; } /** User account information. */ export interface User { readonly userId: string; readonly accountId: string | null; readonly email: string | null; readonly displayName: string | null; readonly timeZone: string | null; readonly preferredUnits: string | null; readonly locale: string | null; readonly photoUrl: string | null; readonly use24Time: boolean | null; readonly lastLogin: Date | null; readonly appVersion: string | null; readonly accountRoles: Record | null; readonly roles: Record | null; readonly notificationSettings: NotificationSettings | null; } /** User notification preferences. */ export interface NotificationSettings { readonly enabled: boolean; readonly continuousAlerts: boolean; readonly emailNotification: boolean; readonly smsNotification: boolean; readonly deviceNotification: boolean; } /** Account metadata. */ export interface Account { readonly accountId: string; readonly name: string | null; readonly type: string | null; readonly createdOn: Date | null; readonly exportVersion: number | null; } /** A device event (alarm, status change, alert). */ export interface DeviceEvent { readonly id: string; readonly eventType: string; readonly severity: number; readonly eventTime: Date; readonly deviceId: string; readonly channelId: string | null; readonly accountId: string; readonly valueBefore: string | null; readonly valueAfter: string | null; readonly groups: string[] | null; } /** Options for filtering events. */ export interface EventFilter { /** Filter by device serial. */ deviceId?: string; /** Filter by event type (e.g., "Low Battery Alert"). */ eventType?: string; /** Include events at or after this time. */ startTime?: Date; /** Include events at or before this time. */ endTime?: Date; /** Maximum number of events to return (default 50). */ limit?: number; } /** A historical session archive. */ export interface Archive { readonly id: string; readonly start: Date | null; readonly end: Date | null; readonly count: number | null; readonly type: string | null; readonly label: string | null; readonly deviceLabel: string | null; readonly notes: string | null; readonly createdOn: Date | null; readonly public: boolean | null; readonly publicLink: string | null; readonly filename: string | null; readonly channels: ArchiveChannel[] | null; } /** A channel snapshot within an archive. */ export interface ArchiveChannel { readonly number: string | null; readonly label: string | null; readonly units: string | null; readonly value: number | null; readonly status: string | null; readonly enabled: boolean | null; readonly color: string | null; readonly type: string | null; readonly alarmHigh: Alarm | null; readonly alarmLow: Alarm | null; readonly minimum: MinMaxReading | null; readonly maximum: MinMaxReading | null; readonly recentReadings: TemperatureReading[]; } /** A single temperature reading from an archive. */ export interface TemperatureReading { readonly value: number; readonly timestamp: Date; readonly units: string; } /** Options for listing archives. */ export interface ArchiveListOptions { /** Maximum number of archives to return (default 20). */ limit?: number; /** Cursor for pagination (archive document ID to start after). */ startAfter?: string; } /** A factory calibration record. */ export interface CalibrationRecord { readonly calibrationId: string; readonly calibrationDate: Date | null; readonly deviceId: string; readonly sessionId: string | null; readonly performedBy: string | null; readonly manager: string | null; readonly referenceDetail: string | null; readonly statedAccuracy: string | null; readonly ambientTemperature: string | null; readonly ambientHumidity: string | null; readonly result: string | null; readonly lowPointAdjustments: CalibrationPoint[]; readonly highPointReference: CalibrationPoint[]; } /** A single calibration measurement point. */ export interface CalibrationPoint { readonly channel: number; readonly value: number; readonly units: string; readonly referenceValue: number; readonly deviation: number; readonly trimValue: number | null; readonly result: string; } /** Firmware information for a device type. */ export interface FirmwareInfo { readonly name: string; readonly version: string; readonly location: string; readonly md5: string; } /** Cooking temperature guide. */ export interface TemperatureGuide { readonly categories: TemperatureCategory[]; } /** A category in the temperature guide (e.g., Beef, Pork). */ export interface TemperatureCategory { readonly label: string; readonly icon: string; readonly pullWarning: string | null; readonly warning: string | null; } /** Search result from Typesense. */ export interface SearchResult { readonly hits: SearchHit[]; readonly totalHits: number; readonly page: number; } /** A single search hit. */ export interface SearchHit { readonly id: string; readonly score: number; readonly document: Record; } /** Options for search queries. */ export interface SearchOptions { /** Search collection: "device", "accounts", or "users". */ collection: "device" | "accounts" | "users"; /** Page number (1-indexed). */ page?: number; /** Results per page. */ pageSize?: number; } /** Result from a public sharing operation. */ export interface ShareResult { readonly success: boolean; readonly publicLink?: string; } /** Options for configuring a single alarm threshold. */ export interface AlarmThresholdOptions { /** Alarm trigger value (temperature or humidity). */ value: number; /** Units for the alarm value (e.g., "F", "C"). Defaults to the device's current units if omitted. */ units?: string; /** Whether this alarm threshold is enabled. */ enabled?: boolean; /** Whether this alarm is muted (suppresses notifications). */ muted?: boolean; } /** Options for setting alarm thresholds on a device channel. At least one of `high` or `low` must be provided. */ export interface AlarmSetOptions { /** High alarm threshold configuration. */ high?: AlarmThresholdOptions; /** Low alarm threshold configuration. */ low?: AlarmThresholdOptions; } /** Total data storage usage for an account. */ export interface DataUsage { readonly totalBytes: number; readonly formattedSize: string; } /** Data storage usage for a single device. */ export interface DeviceDataUsage { readonly deviceId: string; readonly bytes: number; readonly formattedSize: string; } /** Billing plan details. */ export interface BillingPlan { readonly id: string; readonly name: string; readonly description: string; readonly monthlyAmount: number; readonly deviceCount: number; readonly isDefault: boolean; } /** A pending invitation to join an account. */ export interface AccountInvite { readonly id: string; readonly accountId: string; readonly email?: string; readonly status?: string; readonly createdAt?: string; } /** Result from a callable function invocation. */ export interface ActionResult { readonly success: boolean; readonly data: T | null; readonly error: string | null; } /** A single historical temperature reading from BigQuery time-series data. */ export interface HistoricalReading { readonly value: number; readonly timestamp: string; readonly units: string; } /** Historical readings for a device retrieved from BigQuery. */ export interface DeviceHistory { readonly deviceId: string; readonly readings: HistoricalReading[]; } /** A device group organizing multiple devices together. */ export interface DeviceGroup { readonly id: string; readonly name: string; readonly devices: string[]; } /** Options for filtering devices. */ export interface DeviceFilter { /** Filter by device serial number(s). */ serial?: string | string[]; /** Filter by device type (e.g., "node", "smoke", "signals"). */ type?: string | string[]; /** Filter by device label (exact match). */ label?: string | string[]; /** Filter by device status (e.g., "online", "offline"). */ status?: string | string[]; /** Only include devices seen within this many minutes. */ activeWithinMinutes?: number; } /** Overall health assessment for a device. */ export interface DeviceHealth { readonly overall: "good" | "warning" | "critical"; readonly issues: DeviceHealthIssue[]; } /** A single health issue detected on a device. */ export interface DeviceHealthIssue { readonly code: "stale_reading" | "low_battery" | "weak_wifi_signal" | "offline" | "firmware_outdated"; readonly severity: "warning" | "critical"; readonly message: string; readonly detail?: string; } /** Error thrown when authentication fails. */ export declare class AuthError extends Error { readonly reason: string; constructor(message: string, reason: string); } /** Error thrown when a requested resource is not found. */ export declare class NotFoundError extends Error { constructor(message: string); } /** Error thrown on network/HTTP failures. */ export declare class NetworkError extends Error { readonly statusCode: number | null; constructor(message: string, statusCode?: number | null); } //# sourceMappingURL=types.d.ts.map