Skip Navigation

IModuleConfigurationService

Allows reading web module specific configuration.

Each web module can only access its configuration set by the Agency Admin, and it is not possible to access the configuration of other web modules.

Warning
Configuration storage is not PCI nor GDPR-compliant, it must not be used to store sensitive data.
Configuration storage does not comply with the PCI DSS (Payment Card Industry Data Security Standard) or the GDPR (General Data Protection Regulation). Data stored in this storage may not meet the security and privacy requirements mandated by these standards.

Usage

To be used, the IModuleConfigurationService has to be imported:

import {IModuleConfigurationService} from 'sabre-ngv-configuration/services/IModuleConfigurationService';

Once imported, it can be obtained in a standard way:

const configService: IModuleConfigurationService = getService(IModuleConfigurationService);

The service provides only one getConfiguration method:

getConfiguration(): Promise<ModuleConfiguration>

This method returns a promise that resolves to the ModuleConfiguration object. If there is no configuration set for the Red App, the service will return an object with no value.

ModuleConfiguration

Interface that represents the configuration of the web module.

/**
 * Describes web module configuration.
 */
interface ModuleConfiguration {
    /**
     * Configuration value.
     */
    value: object;
}
Note
More information about the service, model and theirs usage are available in TypeScript API Documentation of sabre-ngv-configuration module.

Example

You can see example usage in com.sabre.redapp.example3.web.configuration sample.