import type { AdvertisementObservation } from '../backend-contract/advertisement.js'; import type { PeerReference } from './peer-reference.js'; import type { NormalizedScanObservation, NormalizedScanQuery } from '../backend-contract/scan-query.js'; export type { NormalizedManufacturerDataPattern, NormalizedScanClause, NormalizedScanObservation, NormalizedScanQuery, NormalizedServiceDataPattern } from '../backend-contract/scan-query.js'; export interface ManufacturerDataPattern { readonly companyId: number; readonly dataPrefix?: Readonly; readonly mask?: Readonly; } export interface ServiceDataPattern { readonly service: string | number; readonly dataPrefix?: Readonly; readonly mask?: Readonly; } export interface ScanQuery { readonly anyOf?: readonly ScanClause[]; readonly exclude?: readonly ScanClause[]; } export interface ScanClause { readonly peers?: readonly PeerReference[]; /** * Radio addresses known out of band (NFC, QR, persisted state). Address matching only works * for public/static addresses; devices using resolvable private addresses need the durable * `peers` reference form. Requires the `peer:address-targeting` capability. */ readonly addresses?: readonly string[]; readonly services?: { readonly any?: readonly (string | number)[]; readonly all?: readonly (string | number)[]; }; readonly names?: { readonly exact?: readonly string[]; readonly prefixes?: readonly string[]; }; readonly manufacturerData?: { readonly any?: readonly ManufacturerDataPattern[]; readonly all?: readonly ManufacturerDataPattern[]; }; readonly serviceData?: { readonly any?: readonly ServiceDataPattern[]; readonly all?: readonly ServiceDataPattern[]; }; readonly rssi?: { readonly minimum?: number; readonly maximum?: number; }; readonly connectable?: boolean; } interface CompactScanAdvertisement { readonly peerId: string; readonly peerReference?: PeerReference; readonly localName: string | null; readonly rssi: number | null; readonly txPowerLevel: number | null; readonly serviceUuids: readonly string[]; readonly manufacturerData: readonly { readonly companyId: number; readonly data: Uint8Array; }[]; readonly serviceData: readonly { readonly uuid: string; readonly data: Uint8Array; }[]; } export type ScanObservation = AdvertisementObservation | CompactScanAdvertisement | NormalizedScanObservation; export declare function normalizeScanQuery(query?: ScanQuery | undefined): NormalizedScanQuery; /** True when any anyOf/exclude clause targets radio addresses (peer:address-targeting). */ export declare function scanQueryTargetsAddresses(query: NormalizedScanQuery): boolean; export declare function normalizeScanObservation(observation: ScanObservation): NormalizedScanObservation; export declare function observationMatchesScanQuery(query: NormalizedScanQuery, observation: NormalizedScanObservation): boolean; //# sourceMappingURL=scan-query.d.ts.map