import { PluginDatabaseManager, UrlReader, CacheClient } from '@backstage/backend-common'; import express from 'express'; import { Logger } from 'winston'; import { ScmIntegrations } from '@backstage/integration'; import { JsonValue } from '@backstage/types'; import { Config } from '@backstage/config'; interface Certificate { id?: string; rootCert: CertFile; privateKey?: CertFile; certChain?: CertFile; sslTargetHost?: string; useServerCertificate?: boolean; } interface BaseFile { fileName: string; filePath: string; } declare type CertType = 'rootCert' | 'privateKey' | 'certChain'; interface CertFile extends BaseFile { type: CertType; content?: string; } interface CertStore { insertCertificateIfNeeded(entityName: string, rootCert: CertFile): Promise; updateCertificate(id: string, cert: CertFile): Promise; deleteCertificate(id: string): Promise; listCertificates(entityName: string): Promise; getCertificate(id: string): Promise; getCertFile(id: string, certType: CertType): Promise; } interface Encoder { encode(data: string): string; decode(encoded: string): string; } interface Options { logger: Logger; database: PluginDatabaseManager; } declare class CertStores { static fromConfig(config: Config, options: Options): Promise; } interface RouterOptions { logger: Logger; reader: UrlReader; config?: JsonValue; certStore?: CertStore; cacheClient?: CacheClient; database: PluginDatabaseManager; integrations: ScmIntegrations; } declare function createRouter(options: RouterOptions): Promise; export { CertStore, CertStores, Encoder, RouterOptions, createRouter };