import { ComponentType } from "@angular/cdk/portal"; import { Observable, Subject } from "rxjs"; export interface WdkBaseConfig { /** * The name of the application, to be displayed in the header */ appName: string; /** * The abbreviation of the application, to be displayed in the header */ appAbbr?: string; /** * The ACL subscription key assigned to a product * The product will most likely store the key in * an environment file. */ aclSubscriptionKey?: string; /** * The route to the homepage/entry point of the application. * Will use "/" if none provided */ homeRoute?: string; /** * Optional field to turn CVS branding off in the shell/base of the application. */ unbranded?: boolean; /** * Brand to use (Supported values: "CVS", "Caremark, ZINC"). If this parameter is not provided, branding will default to */ brand?: string; /** * Ability to customize footer text */ footerText?: string; /** * Customizing withCredentials flag * ---- With CVS HTTP Client ---- * * disableHttpOptionsWithCredentials - this flag is optional, and true by default in CVS Http Client * * baseConfig.disableHttpOptionsWithCredentials = false, sets Http Options withCredentials = true; * * withCredentials = true; tells javascript to include cookie headers - applying to CORS requests only * withCredentials = false; tells javascript to not include cookie headers - applying to CORS requests only * * see MDN reference: https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials */ disableHttpOptionsWithCredentials?: boolean; /** * Ability to inject custom content into the footer */ footerPortal?: ComponentType; /** * Customizable portal component */ headerPortal?: ComponentType; /** * Customizable assets directory */ customizedAssetsDirectory?: string; /** * Optional callback method provided by product to be called prior to logout * */ logoutCallback?(): Subject; } export interface WdkAuthConfig { /** * The message to be displayed to the user in the event that they are not * authorized to use this application. */ accessDeniedMessage: string; /** * The base url at which your sso tile is pointing */ ssoBaseUrl: string; /** * Your unique clientId from the sso tile in PCF or Azure B2C */ clientId: string; /** * The time spent idle before the idle notification comes up to ask if they are still there. */ idle: number; /** * The time a user can be idle before getting logged out automatically. */ timeOut: number; /** * Used to turn auth off or on for convenience in local environment */ authenticationEnabled: boolean; /** * The back-end route for authorizing a user */ authorizationUrl?: string | undefined; /** * Fake token to be used for when authenticationEnabled is set to false (i.e. locally). */ localAuthToken?: string; /** * Only use for Auth Code and PKCE flow. * For Auth Code: It is the back-end /auth route used for getting and refreshing tokens * For PKCE: It is the external endpoint for getting tokens (e.g. the Azure B2C token endpoint if you're using that implementation) */ tokenUrl: string; /** * Only used for PKCE flow. * The scopes for which you want to request authorization.Values must be separated by a space. */ scope?: string; /** * Only used for PKCE flow. * The issuer URL. For Azure B2C it's the URL with your tenant ID and version. */ issuer?: string; /** * Only used for PKCE flow. * The login URL. For Azure B2C it's login endpoint for authenticating users. */ loginUrl?: string; /** * Only used for PKCE flow. * The logout URL. For Azure B2C it's logout endpoint for signing out users. */ logoutUrl?: string; /** * Optional cleanup functionality in the case that an app needs to wrap * anything up or do any housekeeping before the auth service kicks the * user out. This cleanup step can be either synchronous or asynchronous * depending on whether a callback or an observable is provided. * NOTE: This property will generally be added in from app.component.ts * as opposed to enviornment files due to it executing code defined * in your typescript. */ logoutCleanupStep?: Observable | (() => void); /** * If true, it uses accessToken from the JWT. * If false, it uses idToken from the JWT. * For backward compatibility, if "useAccessToken" is not specified, it uses accessToken from the JWT. */ useAccessToken?: boolean; /** * redirect url that needs to be used during authentication process */ actualBrowserUrl?: string; /** * if the application has a contextRoot which is being used in the route please assign it to this variable */ contextRoot?: string; } export declare enum BrandTypes { WDS = "WDS", CAREMARK = "Caremark", ZINC = "Zinc", AETNA = "Aetna", ETS = "ETS", INTERNALPULSE = "Internal Pulse" }