IContainerConfiguration – GBG IDscan Documentation

IContainerConfiguration

ContainerConfiguration object interface for JourneyContainer.

Signature:

export interface IContainerConfiguration 

Properties

PropertyTypeDescription
additionalDataArray<IMetaData>Add in additional data to be passed through to the services
allowedInputProvidersArray<InputProvider>Control which input providers will be offered to the customer providing there is support and they are enabled in the back office configuration.
authboolean | IAuthSettingsAuthorisation settings for this instance of the SDK.
backendUrlstringThe URL which this instance of the SDK should use to communicate with the accompanying services.
cameraOptionsICameraOptionsOptions for the camera
containerHTMLElement | stringThe identifier for the container, or a reference to the container, which should be used to house this instance of the SDK UI. Once specified, the element which is referenced should not be tampered with outside of the SDK as it can cause inconsistencies in the journey.
defaultInputProviderInputProviderControl which input provider is default when changing between steps in the journey and when beginning a new journey.
dictionaryPartial<TranslationDictionary>The set of keys to use to generate the translations with.
endpointsIEndpointsThe endpoints to use for this instance of the SDK. In most cases, these can be left with the default settings.
journeyDefinitionIdstringThe journey definition id to use for this instance of the SDK
overlayIOverlayConfigurationOptions for the camera overlay
smartCapturePartial<ISmartCaptureConfiguration>Configuration for the Smart Capture component.
templatesTemplateDictionaryThe templates to use for this instance of the SDK. Any template values which are not overridden in this object will revert to the defaults.
tokenstringThe token which should be used to authenticate with the server for this instance of the SDK. Leave blank to show the login screen when initialising the UI.
translatorTranslatorThe translation function to use to acquire the strings to display to customers.

Methods

MethodDescription
onJourneyEvent(event, meta, state)The function to call when there is an event in a Journey. The function will be passed the name of the event which has occurred, the meta data for the event, and the current state of the Journey at the time the event occurred.

IContainerConfiguration.onJourneyEvent() method

The function to call when there is an event in a Journey. The function will be passed the name of the event which has occurred, the meta data for the event, and the current state of the Journey at the time the event occurred.

Signature:

onJourneyEvent?(event: JourneyEvent, meta: IJourneyEventMetaData, state: IJourneyState): void;

Parameters

ParameterTypeDescription
eventJourneyEventThe name of the event which occurred
metaIJourneyEventMetaDataThe meta data for the event
stateIJourneyStateThe current state of the Journey

Returns:

void

IContainerConfiguration.additionalData property

Add in additional data to be passed through to the services

Signature:

readonly additionalData?: Array<IMetaData>;

IContainerConfiguration.allowedInputProviders property

Control which input providers will be offered to the customer providing there is support and they are enabled in the back office configuration.

Signature:

readonly allowedInputProviders?: Array<InputProvider>;

Remarks

Any providers not in this list will never be presented to the customer. Leave this property undefined for the default values.

IContainerConfiguration.auth property

Authorisation settings for this instance of the SDK.

Signature:

readonly auth: boolean | IAuthSettings;

IContainerConfiguration.backendUrl property

The URL which this instance of the SDK should use to communicate with the accompanying services.

Signature:

readonly backendUrl: string;

IContainerConfiguration.cameraOptions property

Options for the camera

Signature:

readonly cameraOptions?: ICameraOptions;

IContainerConfiguration.container property

The identifier for the container, or a reference to the container, which should be used to house this instance of the SDK UI. Once specified, the element which is referenced should not be tampered with outside of the SDK as it can cause inconsistencies in the journey.

Signature:

readonly container: HTMLElement | string;

IContainerConfiguration.defaultInputProvider property

Control which input provider is default when changing between steps in the journey and when beginning a new journey.

Signature:

readonly defaultInputProvider?: InputProvider;

Remarks

Any provider specified here will be used as the default assuming it exists and is available for the device. If the specified provider isn’t available, the first available provider will be used instead.

IContainerConfiguration.dictionary property

The set of keys to use to generate the translations with.

Signature:

readonly dictionary?: Partial<TranslationDictionary>;

IContainerConfiguration.endpoints property

The endpoints to use for this instance of the SDK. In most cases, these can be left with the default settings.

Signature:

readonly endpoints?: IEndpoints;

IContainerConfiguration.journeyDefinitionId property

The journey definition id to use for this instance of the SDK

Signature:

readonly journeyDefinitionId?: string;

IContainerConfiguration.overlay property

Options for the camera overlay

Signature:

readonly overlay?: IOverlayConfiguration;

IContainerConfiguration.smartCapture property

Configuration for the Smart Capture component.

Signature:

readonly smartCapture?: Partial<ISmartCaptureConfiguration>;

IContainerConfiguration.templates property

The templates to use for this instance of the SDK. Any template values which are not overridden in this object will revert to the defaults.

Signature:

readonly templates?: TemplateDictionary;

IContainerConfiguration.token property

The token which should be used to authenticate with the server for this instance of the SDK. Leave blank to show the login screen when initialising the UI.

Signature:

readonly token?: string;

IContainerConfiguration.translator property

The translation function to use to acquire the strings to display to customers.

Signature:

readonly translator?: Translator;

Was this page helpful?