import { AxiosInstance } from 'axios'; import { StagingEnvironmentFactoryConfig } from './StagingEnvironmentFactoryConfig'; import { GenerateDomainOptions } from './GenerateDomainOptions'; /** * Amplience [Virtual Staging Environment](https://docs.amplience.net/virtualstaging/virtualstagingintro.html?h=vse) factory. * * This factory is intended to be used by end user applications to preview content for a given snapshotID or at a given timestamp. * * It works by passing the virtual staging environment domain and the snapshotID or timestamp to the virtual-staging API, * which will return a new domain that can be used in the ContentClient. * * Example: * * ```typescript * const factory = new StagingEnvironmentFactory('11122222gggg232gg32g32g.staging.bigcontent.io'); * const stagingEnvironmentWithSnapshot = await factory.generateDomain({snapshotId: 'abcdef123456'}); * * const client = new ContentClient({ * account: 'test', * stagingEnvironment: stagingEnvironmentWithSnapshot * }); * * ``` * * You may override other settings when constructing the client but if no additional configuration is provided sensible defaults will be used. */ export declare class StagingEnvironmentFactory { private readonly stagingEnvironment; private readonly client; /** * Creates a StagingEnvironmentFactory instance. * @param string stagingEnvironment * @param config Client configuration options */ constructor(stagingEnvironment: string, config?: StagingEnvironmentFactoryConfig); /** * Generates a new staging environment domain name using the snapshotId and/or timestamp thats supplied in the options argument * @param options */ generateDomain(options: GenerateDomainOptions): Promise; /** * Build the URL to invoke using the supplied GenerateDomainOptions * @param options GenerateDomainOptions */ protected buildUrl(options: GenerateDomainOptions): string; /** * Create network client to make requests to the vse service * @param config */ protected createClient(config: StagingEnvironmentFactoryConfig): AxiosInstance; }