/************************************************************************* * Copyright 2020 Adobe * All Rights Reserved. * * NOTICE: Adobe permits you to use, modify, and distribute this file in * accordance with the terms of the Adobe license agreement accompanying * it. If you have received this file from a source other than Adobe, * then your use, modification, or distribution of it requires the prior * written permission of Adobe. **************************************************************************/ import type { ActiveProductContext, ImsProfile } from './ims/ImsProfile'; import type { AIApplicationId } from './ai'; import type { AppParent } from '@adobe/exc-app/appapi'; import type { Collaborator, Instance } from './user'; import type { ConsentPermissions } from './consent'; import type MetricsConfiguration from './metrics/Configuration'; import type { Sandbox, SubOrg } from './appcontext'; import type { ShellInfoObject } from './shell'; export type { SubOrg }; export declare enum RightPanelType { HELP_CENTER = "help-center", LEGACY_AIA = "legacy-aia", NEXT_GEN_AIA = "next-gen-aia" } export interface UserRoles { roleJobFunction: Record; rolePlatformObjective: Record; } export type APIMode = 'io' | 'afd'; export type AppParentConfig = AppParent | 'component' | undefined; /** * Gainsight Interface */ export interface Gainsight { /** * ID of the application. */ appId: string; /** * Composed application parent name. */ appParent: AppParentConfig; /** * If Gainsight is enabled for the user. */ enabled: boolean; /** * Unified Shell environment. */ environment: string; /** * List of fulfillable items from product context. */ fulfillableItems: string[]; /** * Is product key different from parent? This is used in Data Collection when Gainsight * is initialized. */ isKeyDifferentFromParent?: boolean; /** * OMEGA suite ID. */ omegaSuiteId: string; /** * Gainsight app-specific product key. */ productKey: string; /** * Path of the application within Shell. */ shellPath: string; /** * User-specific properties. */ user: { /** * Auth ID. */ authId: string; /** * Object containing consent permissions. */ permissions?: ConsentPermissions; /** * Object containing role information (AEP feature). */ roles?: UserRoles; /** * Unified Shell theme. */ theme: string; /** * List of triggers. */ triggers: string[]; }; /** * Gainsight configuration from application config. */ triggers?: { /** * List of fulfillable items from product context. */ fulfillableItems: string[]; /** * Service code from product context. */ serviceCode: string; }; } /** * ImsOrg Interface */ export interface ImsOrg { /** * ImsOrg Name - Label */ label: string; /** * ImsOrg ID - Value */ value: string; } /** * ImsOrg Interface */ export interface ImsInfo { /** * ImsOrg - ID */ imsOrg?: string; /** * ImsOrg Name - Label */ imsOrgName?: string; /** * ImsOrg Profile */ imsProfile?: ImsProfile; /** * ImsToken */ imsToken?: string; /** * locale */ locale?: string; /** * Unmodified user locale */ localeOriginal?: string; /** * tenant */ tenant?: string; } type FulfillableDataItem = Record; /** * Processed ImsOrg Data Interface */ export interface ProcessedImsOrg { /** * Map of service codes to fulfillable data for the current ImsOrg. */ fulfillableData: Record; /** * Map of service codes to fulfillable items for the current ImsOrg. */ fulfillableItems: Record; /** * Service codes attached to the current ImsOrg. */ serviceCodes: string[]; /** * Map of service codes to sub service codes for the current ImsOrg. */ subServiceCodes: Record; } export interface AnalyticsConfiguration { /** * OMEGA script for respective env */ script: string; /** * solution specific OMEGA code */ solution: string; } export interface NestedAppConfig extends AnalyticsConfiguration { appId: string; gainsight?: { productKey: string; triggers?: { fulfillableItems: string[]; serviceCode: string; }; }; } /** * External Runtime Configuration Interface */ export interface RuntimeConfiguration { /** * Active product context - Used by Adobe Analytics to determine login company */ activeProductContext?: ActiveProductContext; /** * Documentation sources that are available within the agent backend, filtered * by what the user has permissions to use. */ aiDocumentationSources: Record; /** * OMEGA Launch script properties */ analytics?: AnalyticsConfiguration; /** * Unified Shell API Gateway URL */ apiGatewayUrl: string; /** * API Key that will be added to x-api-key on requests */ apiKey: string; /** * Should API calls go directly to IO or accelerated via AFD/AWS (Default 'afd') */ apiMode?: APIMode; /** * App Container */ appContainer: string; /** * Solution appId */ appId: string; /** * Metadata for the application. */ appMetadata?: Record; /** * Composed application parent name. */ appParent: AppParentConfig; /** * User's avatar url */ avatar: string; /** * Solution iframe src url */ baseFrameUrl: string; /** * Base path of the baseUrl property, without tenant or URL context. */ basePath: string; /** * Base URL */ baseUrl: string; /** * List of search parameters to remove from the browser url */ browserParamFilterList?: string[]; /** * Environment specific CDN string. */ cdn: string; /** * List all properties changed in this configuration compared to the previous one sent */ changedProperties: (keyof RuntimeConfiguration)[]; /** * Current Agora Collaborator */ collaborator?: Collaborator; /** * Bootstrap data for the component modal. */ componentBootstrapData?: Record | undefined; /** * If discovery URL */ discovery: boolean; /** * Unified Shell's environment */ environment: string; /** * Query params */ externalQueryParams: string; /** * List of feature flags */ featureFlags?: Record; /** * Gainsight configuration. */ gainsight: Gainsight; /** * Denotes the global consent path or legacy consent path */ globalConsentEnabled: boolean; /** * Clients can pass in their local GQL endpoint */ gqlEndpoint?: string; /** * Solution History type */ historyType: 'HASH' | 'HISTORY' | 'SERVER'; /** * @deprecated Solution's list of multiple subdomains */ hosts?: string[]; /** * Fulfillable Items */ fulfillableItems?: string[]; /** * IMS Client ID */ imsClientId: string; /** * IMS env */ imsEnvironment: string; /** * IMS Information */ imsInfo: ImsInfo; /** * Current IMS Org ID */ imsOrg: string; /** * ImsOrg Interface */ imsOrgs: ImsOrg[]; /** * Current IMS Org Name */ imsOrgName: string; /** * User IMS Profile */ imsProfile?: ImsProfile; /** * IMS Token */ imsToken: string; /** * If the app/runtime are loaded in a modal. */ inModal?: boolean; /** * @ignore */ internal?: boolean; /** * Current commerce instance */ instance?: Instance; /** * Adobe IO gateway URL used as a fallback in GQL call */ ioGatewayUrl?: string; /** * Map of Adobe Io region specific endpoints. */ ioRegionSpecificMap?: Record; /** * Is the configuration for the AI Panel iframe */ isAIPanel: boolean; /** * Is the org an AWS org */ isAWSOrg?: boolean; /** * Is the next generation AI Assistant enabled */ isNextGenAIAEnabled: boolean; /** * Flag to know that the S2 design language is being used. */ isS2Enabled: boolean; /** * Last recorded recent timestamp */ lastRecentTs: number; /** * User Locale */ locale: string; /** * Unmodified user locale */ localeOriginal: string; /** * Solution metricsAppId */ metricsAppId?: string; /** * AdobeMetricsRuntime Configuration */ metricsConfig: MetricsConfiguration; /** * Metrics environment (may differ from environment) */ metricsEnv?: string; /** * Applications that can load under the current application */ nestedApps?: Record; /** * imsOrg - region */ orgRegion?: string; /** * The current page URL. This field represents the full URL of the page as seen by the user, * Developers should use this field when they need to access or record the exact location * within the application. Be aware that this value will be updated on every navigation * including any redirections before the page has fully loaded so it is best to wait until * the page loading is complete before using this value. */ pageUrl?: string; /** * In a nested application, the parent application ID. */ parentAppId?: string; /** * List of languages from user's preferences */ preferredLanguages?: string[]; /** * Is the app in preview mode? */ preview?: boolean; /** * Processed ImsOrg Data */ processedImsOrg?: ProcessedImsOrg; /** * S2 theme */ s2Theme: 'dark' | 'light'; /** * Current Sandbox */ sandbox?: Sandbox; /** * Shell Height */ shellHeight: number; /** * Shell Info */ shellInfo?: ShellInfoObject; /** * Is side panel open? */ shellRightPanelOpen?: boolean; /** * Type of right panel (help-center, next-gen-aia, or legacy-aia) */ shellRightPanelType?: RightPanelType; /** * Width of right panel */ shellRightPanelWidth?: number; /** * Is Side Nav collapsed? */ shellSideNavCollapsed?: boolean; /** * Is the Side Nav custom button in use? */ shellSideNavCustomButton?: boolean; /** * Is Side Nav enabled? */ shellSideNavPresent: boolean; /** * Side Nav width */ shellSideNavWidth: number; /** * Is the window small? (Are the sidenav/AI Assistant in overlay state?) */ smallWindow?: boolean; /** * Source environment */ sourceEnvironment: string; /** * SPA pipeline app id */ spaAppId?: string; /** * Is Spinner on Change enabled for app */ spinnerOnChange?: boolean; /** * Sub Org */ subOrg?: SubOrg; /** * Tenant ID */ tenant: string; /** * @deprecated Solution GraphQL tenantAppId */ tenantAppId?: string; theme: string; /** * If the toast quiet mode feature is enabled. */ toastQuietModeEnabled: boolean; /** * List of current user orgs collaborator instances */ userCollaborators?: Collaborator[]; /** * List of current user orgs instances */ userInstances?: Instance[]; /** * User's consent permissions */ userConsentPermissions?: ConsentPermissions; /** * XQL gateway used for AEP specific queries */ xqlGatewayUrl?: string; }