Creates a StagingEnvironmentFactory instance.
Client configuration options
Build the URL to invoke using the supplied GenerateDomainOptions
GenerateDomainOptions
Create network client to make requests to the vse service
Generates a new staging environment domain name using the snapshotId and/or timestamp thats supplied in the options argument
Generated using TypeDoc
Amplience Virtual Staging Environment 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:
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.