export interface HelpCenterConfig { /** * Adds help links to the *featured* section of the help center. */ featured?: Array<{ /** * URL for the link to go to. */ href: string; /** * Title for the link. */ label: string; /** * Pattern to define path(s) the link can navigate to. The value is not regex but a Path-to-RegExp form. */ path: string | Array; }>; /** * Customizes *for you* section of the help center. */ recommendations?: { /** * Used to disable feature. It is enabled by default. */ enabled: boolean; /** * Help center populates "For You" content by conducting a search against Experience League based on a list of terms supplied. */ terms: Array<{ /** * Pattern to define path(s) the link can navigate to. Please note that the most general ones should come last. */ path: string; /** * Specific term used in searching. */ term: string; }>; }; /** * Overrides default links present in *resources* section. Product owners are advised to supply custom resources links to ensure greater relevance. */ resources?: Array<{ /** * URL of the link. */ href: string; /** * Title for the link. */ label: string; }>; } export declare enum HelpCenterTabs { DEBUG = "debug", FEEDBACK = "feedback", SUPPORT = "support" } export interface HelpCenterOpenConfig { /** * Configuration for Help Center fields when opened. */ config?: { /** * String that prepopulates the subject field in the Help center feedback section. */ subject: string; /** * Type of feedback. Only CONTEXTUAL_FEEDBACK_SUBMISSION is supported, meaning that the Help Center feedback tab will be opened. */ type: 'CONTEXTUAL_FEEDBACK_SUBMISSION'; }; /** * Selected Help Center Tab. */ selectedTab: 'feedback' | 'support'; /** * Help Center tabs to suppress in the UI. */ suppressedTabs?: HelpCenterTabs[]; } export interface HelpCenterButtonConfig { /** * Callback function to be automatically executed on click. */ callback?: (value?: any) => void; /** * ID of the string to use for handling callback. */ id?: string; /** * Text of the button. */ label: string; /** * Scope of the button. Options are: * 1. helpCenter: Shows as a button in the support section. * 2. helpCenterResource: Shows at the bottom of the resources section. */ scope?: string; } export interface HelpCenterApiProperties { /** * Gets or sets the configuration for Help Center. * * ```typescript * helpCenter.config = { * featured: [ * { * href: 'https://helpx.adobe.com/support/experience-cloud.html', * label: 'Adobe Experience Cloud Learn & Support', * path: '/:orgId?/home' * }, * { * href: 'https://helpx.adobe.com/support/target.html', * label: 'Adobe Target' * } * ], * recommendations: { * enabled: true, * terms: [ * { * path: '/:orgId?/analytics/home/(.*)?', * term: 'get started' * }, * { * path: '/:orgId?/analytics/create', * term: 'create new' * } * ] * }, * resources: [ * { * href: 'https://marketing.adobe.com/resources/help/en_US/home/index.html', * label: 'Help Home' * } * ] * }; * ``` */ config: HelpCenterConfig; } export declare enum ReleaseType { ALPHA = "alpha", BETA = "beta" } export interface FeedbackProgram { buttonVariant?: 'cta' | 'secondary'; custom?: { [key: string]: any; }; jiraConfigId?: string; name?: string; paths: string[]; releaseType?: ReleaseType; } export interface JiraFeedback { custom?: { [key: string]: any; }; description: string; jiraConfigId: string; labels?: string[]; name?: string; subject?: string; } /** * Defines helpCenter-level APIs available to solutions. */ export interface HelpCenterApi extends HelpCenterApiProperties { /** * Method to open the help center from within the iframe. * * ```typescript * helpCenter.open({ * config: { * subject: 'Analytics' * type: 'CONTEXTUAL_FEEDBACK_SUBMISSION' * }, * selectedTab: 'feedback' * }); * ``` */ open(config?: HelpCenterOpenConfig): void; /** * Method to close the help center from within the iframe. * * ```typescript * helpCenter.close(); * ``` */ close(): void; /** * Adds a custom button to the help center and enacts a callback onclick. * The button will be present under the support tab in help center. * The help center button may be reset by entering a null parameter. * * ```typescript * helpCenter.setButton({ * callback: () => {}, * label: 'Create Support Ticket' * }); * ``` */ setButton(config: HelpCenterButtonConfig | HelpCenterButtonConfig[] | null): void; /** * Adds 1-many custom buttons to the help center and enacts a callback onclick. * Depending on the scope (helpCenter or helpCenterResource), the buttons will * be present under the support tab (helpCenter) or at the button of the * resources section on the main tab (helpCenterResource) in help center. * The help center button may be reset by entering a null parameter. * * ```typescript * helpCenter.setButtons([{ * callback: () => {}, * id: 'support', * label: 'Create Support Ticket', * scope: 'helpCenter' * }]); * ``` */ setButtons(buttons: HelpCenterButtonConfig[] | null): void; /** * Sends the beta feedback configuration to the Unified Shell to manage the * enablement and disablement of the beta tag and feedback button based on the * provided paths. All beta feedback submissions will go to the JIRA project * defined by this jiraConfigId. * Leaving the releaseType blank will prevent the label and button * from displaying but still allow the Open Feedback panel to record to JIRA. * ```typescript * helpCenter.setFeedbackConfig([ * { * custom: { * schemaId: 'xyz' * }, * jiraConfigId: 'experience-platform', * name: 'beta program / project name', * paths: [ * '/platform/schemas' * ], * releaseType: ReleaseType.BETA * }, * { * buttonVariant: 'secondary', * paths: [ * '/platform/segments' * ] * } * ]) * ``` */ setFeedbackConfig(programs: FeedbackProgram | FeedbackProgram[]): void; /** * Create a new Jira ticket. All feedback submissions will go to the JIRA project * defined by this jiraConfigId. * ```typescript * helpCenter.submitJiraFeedback({ * custom: { * schemaId: 'xyz', * chatId: 'chatId' * }, * description: 'Here is the body of the ticket.', * jiraConfigId: 'experience-platform', * labels: ['ticket-label'], * name: 'beta program / project name', * subject: 'Here is the title of the ticket' * }) * ``` */ submitJiraFeedback(feedbackConfig: JiraFeedback): void; } declare const helpCenter: HelpCenterApi; export default helpCenter;