File

libs/ngx-pfe/models/ngx-pfe-module-configuration.model.ts

Description

This configuration needs to be set in the forRoot of the NGX-PFE module. It contains all the necessary library configurations.

Index

Properties

Properties

applicationId
applicationId: string
Type : string

The applicationId will be used to load the default page flow configuration. It can be overwritten by the applicationId URL parameter.

configApiEndpoint
configApiEndpoint: string
Type : string
Optional

The endpoint, that is used to retrieve the page flow configuration. Has to be page-flow-config compatible.

If the NGX_PFE_FLOW_CONFIGURATION injection token is provided, this will be ignored.

configApiFormat
configApiFormat: NGX_PFE_CONFIG_API_FORMAT
Type : NGX_PFE_CONFIG_API_FORMAT
Optional

By default NGX_PFE_CONFIG_API_FORMAT.CONFIG_SERVICE if provided will try to take the config from a different provider.

  • CONFIG_SERVICE: The current method
  • STATIC: Config created by the config aggregator
defaultRequestBody
defaultRequestBody: PFE_DEFAULT_REQUEST_BODY
Type : PFE_DEFAULT_REQUEST_BODY
Optional

Default body for a non-GET request. New default behavior is an EMPTY request. The legacy behavior of FULL_STATE can be activated with this setting.

disableStateDebuggingHotkey
disableStateDebuggingHotkey: boolean
Type : boolean
Optional

Set this value to true, to disable the state debugging hotkeys.

enableAutomaticStateStorage
enableAutomaticStateStorage: boolean
Type : boolean
Optional

Update the remote state on every navigation.

ignoreEmptyArraysInServiceActivatorPayloads
ignoreEmptyArraysInServiceActivatorPayloads: boolean
Default value : false
Type : boolean
Optional

Should empty arrays in service-activator request/response expressions be ignored? Set this to true if expressions evaluating to empty arrays should be omitted from the request or response payload of service activators.

pageMapping
pageMapping: Map<string | PageDefinition>
Type : Map<string | PageDefinition>

Maps the configuration attributes to a PageDefinition. This defines the available page types that can be used in the flow.

production
production: boolean
Type : boolean
serviceActivatorEndpoint
serviceActivatorEndpoint: string
Type : string

The base URL of service activator endpoint. It will be composed with the service activator path to form a complete URL. This complete URL is used when service activators make any HTTP calls.

stateServiceEndpoint
stateServiceEndpoint: string
Type : string
Optional

The state service endpoint that is used to store and restore the current app state.

tenant
tenant: string
Type : string
Optional

The tenant will be used to load the default page flow configuration. It can be overwritten by the tenant URL parameter.

tracking
tracking: TrackifyConfig
Type : TrackifyConfig
Optional

To enable the Tracking Library for Analytics purposes, you have to add the adobeUrl OR googleId properties. The tracking configuration itself is optional.

import { InjectionToken } from '@angular/core';
import { PageDefinition } from '../services/pfe-page-mapping-service/page-definition';

export const NGX_PFE_CONFIGURATION: InjectionToken<NgxPfeModuleConfiguration> = new InjectionToken<NgxPfeModuleConfiguration>(
  'NGX_PFE_CONFIGURATION'
);

/**
 * This configuration needs to be set in the forRoot of the NGX-PFE module.
 * It contains all the necessary library configurations.
 *
 * @export
 */
export interface NgxPfeModuleConfiguration {
  /**
   * Maps the configuration attributes to a PageDefinition. This defines the available page types that can be used in the flow.
   */
  pageMapping: Map<string, PageDefinition>;
  /**
   * The tenant will be used to load the default page flow configuration.
   * It can be overwritten by the tenant URL parameter.
   */
  tenant?: string;
  /**
   * The applicationId will be used to load the default page flow configuration.
   * It can be overwritten by the applicationId URL parameter.
   */
  applicationId: string;
  /**
   * By default `NGX_PFE_CONFIG_API_FORMAT.CONFIG_SERVICE` if provided will try to take
   * the config from a different provider.
   * - CONFIG_SERVICE: The current method
   * - STATIC: Config created by the config aggregator
   */
  configApiFormat?: NGX_PFE_CONFIG_API_FORMAT;
  /**
   * The endpoint, that is used to retrieve the page flow configuration.
   * Has to be page-flow-config compatible.
   *
   * If the NGX_PFE_FLOW_CONFIGURATION injection token is provided, this will be ignored.
   */
  configApiEndpoint?: string;
  /**
   * The state service endpoint that is used to store and restore the current app state.
   */
  stateServiceEndpoint?: string;
  // TODO: Activate state payload for service activator
  /**
   * The base URL of service activator endpoint.
   * It will be composed with the service activator `path` to form a complete URL.
   * This complete URL is used when service activators make any HTTP calls.
   */
  serviceActivatorEndpoint: string;
  production: boolean;

  /**
   * To enable the Tracking Library for Analytics purposes,
   * you have to add the adobeUrl OR googleId properties.
   * The tracking configuration itself is optional.
   */
  tracking?: TrackifyConfig;

  /**
   * Set this value to true, to disable the state debugging hotkeys.
   */
  disableStateDebuggingHotkey?: boolean;

  /**
   * Update the remote state on every navigation.
   */
  enableAutomaticStateStorage?: boolean;

  /**
   * Should empty arrays in service-activator request/response expressions be ignored?
   * Set this to true if expressions evaluating to empty arrays should be omitted
   * from the request or response payload of service activators.
   *
   * @default false
   */
  ignoreEmptyArraysInServiceActivatorPayloads?: boolean;

  /**
   * Default body for a non-GET request. New default behavior
   * is an EMPTY request. The legacy behavior of FULL_STATE can be activated with this setting.
   */
  defaultRequestBody?: PFE_DEFAULT_REQUEST_BODY;
}

export interface TrackifyConfig {
  /**
   * example: //assets.adobedtm.com/launch-ENbf3ffc46febf4e06ada3b07090757976.min.js
   */
  adobeUrl?: string;

  /**
   * example: GTM-PQTR458
   */
  googleId?: string;

  customScript?: string;

  /**
   * example: "mo" or "fnol". Do not use "mo-th" or "mo-at". Use the main application name without mentioning the OE.
   */
  appName?: string;
}

export enum PFE_DEFAULT_REQUEST_BODY {
  EMPTY = 'EMPTY',
  FULL_STATE = 'FULL_STATE',
}

export enum NGX_PFE_CONFIG_API_FORMAT {
  CONFIG_SERVICE,
  STATIC,
}

results matching ""

    No results matching ""