/** * @license * Copyright 2022-2026 Matter.js Authors * SPDX-License-Identifier: Apache-2.0 */ import { Construction, Duration, Environment } from "@matter/general"; import { CommissioningFlowType, DeviceTypeId, DiscoveryCapabilitiesSchema, EnhancedSetupFlowOptionsSchema, TypeFromBitmapSchema } from "@matter/types"; import { PairingHintBitmapSchema } from "../advertisement/PairingHintBitmap.js"; import { DclClient } from "./DclClient.js"; import { DclConfig } from "./DclConfig.js"; import type { SeedSource, VendorEntry as VendorSeedEntry } from "./SeedTypes.js"; /** * Normalized vendor information with consistent naming conventions. */ export type VendorInfo = { vendorId: number; vendorName: string; companyLegalName: string; companyPreferredName: string; vendorLandingPageUrl: string; creator: string; }; /** * Normalized product information from DCL, with bitmaps decoded and wire-format * internals (vid, pid, schemaVersion, TC digest/size) stripped. */ export type ProductInfo = { /** Primary Device Type identifier for the device, e.g. 0x000A for Door Lock. */ deviceTypeID: DeviceTypeId; /** Human-readable product name. Matches the ProductName field in the Basic Information Cluster. */ productName: string; /** Human-readable product label. Matches the ProductLabel field in the Basic Information Cluster. */ productLabel: string; /** * Part number for this product. Matches the PartNumber field in the Basic Information Cluster. * Multiple products sharing the same ProductID (e.g. different regional packaging or colors) * may have different part numbers. */ partNumber: string; /** * Device discovery technologies supported by this device — whether it supports BLE, * IP network, or Wi-Fi Public Action Frame for discovery. */ discoveryCapabilities: TypeFromBitmapSchema; /** * Commissioning flow type: Standard (device enters commissioning on power-up), * UserIntent (user action required), or Custom (vendor-specified means needed). */ commissioningFlow: CommissioningFlowType; /** Vendor-specific URL to initiate commissioning when flow is Custom. */ commissioningCustomFlowUrl?: string; /** * Hints for how to put a not-yet-commissioned device into commissioning mode, * e.g. power cycle, press reset button, or use the device manual. */ commissioningModeInitialStepsHint: TypeFromBitmapSchema; /** Pairing instruction text for initial commissioning steps that require user guidance. */ commissioningModeInitialStepsInstruction?: string; /** * Hints for how to put an already-commissioned device back into commissioning mode, * e.g. via an existing Administrator or by pressing the setup button. */ commissioningModeSecondaryStepsHint: TypeFromBitmapSchema; /** Pairing instruction text for secondary commissioning steps that require user guidance. */ commissioningModeSecondaryStepsInstruction?: string; /** Vendor URL to help users resolve commissioning failures. */ commissioningFallbackUrl?: string; /** Link to the product's user manual. */ userManualUrl?: string; /** Link to the product's support page. */ supportUrl?: string; /** Link to the product's web page. Matches the ProductURL field in the Basic Information Cluster. */ productUrl?: string; /** Link to the Localized String File for this product. */ lsfUrl?: string; /** Version number of the Localized String File — increases with each published revision. */ lsfRevision?: number; /** * Configuration flags for the Enhanced Setup Flow, e.g. whether Terms and Conditions * must be shown during initial commissioning. */ enhancedSetupFlowOptions: TypeFromBitmapSchema; /** Link to the Enhanced Setup Flow Terms and Conditions file. */ enhancedSetupFlowTCUrl?: string; /** Version number of the Terms and Conditions file — increases with each published revision. */ enhancedSetupFlowTCRevision?: number; /** Vendor URL to resolve functionality limitations after Terms and Conditions change. */ enhancedSetupFlowMaintenanceUrl?: string; }; /** * Implements a service to manage DCL vendor information as a singleton in the environment and so will be shared by * multiple nodes if relevant. It is mainly relevant for controller use cases. * The service supports fetching vendor information from the CSA production DCL instance. */ export declare class DclVendorInfoService { #private; constructor(environment: Environment, options?: DclVendorInfoService.Options); get construction(): Construction; /** Whether the service runs {@link DclVendorInfoService.Options.offline}. */ get offline(): boolean; /** * Get vendor information by vendor ID. Returns undefined if not found. */ infoFor(vendorId: number): VendorInfo | undefined; /** * Get all vendor information as a map indexed by vendor ID. */ get vendors(): ReadonlyMap; /** * Update vendor information from DCL. Does nothing when the service is * {@link DclVendorInfoService.Options.offline}. */ update(): Promise; /** * Fetch product details for a given vendor ID and product ID from DCL. * Returns undefined if the product is not found or the service is closed or * {@link DclVendorInfoService.Options.offline}. */ productInfoFor(vendorId: number, productId: number): Promise; /** * Close the service and stop periodic updates. */ close(): Promise; } export declare namespace DclVendorInfoService { interface Options extends DclClient.Options { /** * Interval for periodic vendor information updates. * Default is 1 day. Set to null to disable periodic updates. */ updateInterval?: Duration | null; /** DCL config for production endpoint. Defaults to DclConfig.production. */ dclConfig?: DclConfig; /** * Pre-populate storage from snapshot when stored vendor count is less than seed.expectedCount. Network update * still runs after unless `offline`. */ seed?: { vendors?: SeedSource; }; /** * Reaches no network at all: no vendor update, neither at start nor periodically, and no product lookup. * Vendor information is whatever storage and `seed` carried plus the built-in test vendors, and a product * reads as absent. * * For a deployment with no route to the ledger, and for short-lived test processes that must not depend on * it. */ offline?: boolean; } } //# sourceMappingURL=DclVendorInfoService.d.ts.map