interface CertificateManagerOptions { adapter: ioBroker.Adapter; } export interface CertificateCollection { /** Creating adapter */ from: string; /** expiry date/time - mandatory */ /** So not everyone needs to decode cert to discover this */ tsExpires: number; /** private key - mandatory */ key: string | Buffer; /** public certificate - mandatory */ cert: string | Buffer; /** domains - mandatory */ domains: string[]; /** chain - optional */ chain?: string | Buffer | (Buffer | string)[]; /** Optional flag to indicate that the certificate is only for staging/testing purposes and should not be used in production */ staging?: boolean; } export type SubscribeCertificateCollectionsCallback = (err: Error | null, collections?: Record) => void; export declare class CertificateManager { private readonly adapter; constructor(options: CertificateManagerOptions); /** * Returns all collections of SSL keys, certificates, etc. */ getAllCollections(): Promise | null>; /** * Returns collection of SSL keys, certificates, etc. by ID * * @param collectionId id of the collection to filter for */ getCollection(collectionId: string): Promise | null>; /** * Saves a collection of SSL keys, certificates, etc. by ID * * @param collectionId collection ID * @param collection object holding all related keys, certificates, etc. */ setCollection(collectionId: string, collection: CertificateCollection): Promise; /** * Remove a collection of SSL keys, certificates, etc. by ID * * @param collectionId collection ID */ delCollection(collectionId: string): Promise; /** * Subscribes the certificate collections object and calls callback on every change * * @param collectionId if null, return all collections in callback * @param callback called on every change */ subscribeCollections(collectionId: string | null, callback: SubscribeCertificateCollectionsCallback): void; /** * Returns list of available certificate collection IDs */ getCollectionIds(): Promise; } export {};