import { DtoAdditionalProductConfiguration, DtoProductConf } from "../CatalogueAPI.js"; import { CfgProduct, CfgProductChangeNotification } from "../CfgProduct.js"; import { CfgProdConfParts } from "../utilitiesConfiguration.js"; import { CfgIOManager } from "./CfgIOManager.js"; import { CfgIOWarningSupplier } from "./CfgIOWarningSupplier.js"; export declare const isCfgProdConfMessage: (data: unknown) => data is CfgProdConfMessageV1 | CfgProdConfMessageV2; export declare type CfgProdConfMessageV1 = { version: "1.0"; conf: DtoAdditionalProductConfiguration; }; export declare const isCfgProdConfMessageV1: (data: unknown) => data is CfgProdConfMessageV1; export declare type CfgProdConfMessageV2 = { version: "2.0"; conf: DtoProductConf; }; export declare const isCfgProdConfMessageV2: (data: unknown) => data is CfgProdConfMessageV2; export declare type CfgProdConfMessage = { initial: boolean; subMessages: (CfgProdConfMessageV1 | CfgProdConfMessageV2)[]; }; export declare const getHighestVersionProdConfMessage: (subMessages: (CfgProdConfMessageV1 | CfgProdConfMessageV2)[]) => CfgProdConfMessageV1 | CfgProdConfMessageV2; export declare enum CfgProdConfMessageVersions { V1dot0 = 1, V2dot0 = 2 } export declare const STAGE_PROD_CONF_MESSAGE_KEY = "stageprodconf"; declare type ProdConfMessageCallback = (message: CfgProdConfMessage) => Promise; declare type ProdConfCallback = (conf: DtoProductConf) => Promise; /** * Base class for connecting the product configuration to an IO channel */ export declare abstract class CfgIOProdConfConnector implements CfgIOWarningSupplier { protected readonly _ioManager: CfgIOManager; private readonly _includeInSend; protected _product: CfgProduct | undefined; private _stopListenToMessage; private _stopListenToProdConf; constructor(_ioManager: CfgIOManager, _includeInSend: CfgProdConfParts); destroy(): void; getWarnings(): string[]; setProduct: (product: CfgProduct | undefined) => Promise; private _send; protected abstract makeSendData(conf: DtoProductConf, initial: boolean): S; static makeMessage: (conf: DtoProductConf, initial: boolean, sendVersions: CfgProdConfMessageVersions) => CfgProdConfMessage; static makeMessageListener: (callback: ProdConfMessageCallback) => (message: unknown) => Promise; /** * Register the callback to listen for Product Configuration messages * @returns A function which when called will cancel listening */ static listenForMessage(callback: ProdConfMessageCallback, ioManager: CfgIOManager): () => void; static makeProdConfListener: (callback: ProdConfCallback, includeInSend: CfgProdConfParts) => (n: CfgProductChangeNotification) => void; static listenForProdConf(product: CfgProduct, callback: ProdConfCallback, includeInSend: CfgProdConfParts): () => void; } export {}; //# sourceMappingURL=CfgIOProdConfConnector.d.ts.map