import type { HeadlessEntryPointFactory, HeadlessEntryPointFactory2 } from './HeadlessEntryPointManagerTypes'; export interface HeadlessEntryPointRegistry { /** * This function is used to register headless entry point by end user. * * @param entryPointKey : string * @param provider : HeadlessEntryPointFactory */ registerHeadlessEntryPoint(entryPointKey: string, provider: HeadlessEntryPointFactory): void; /** * This function is used to register headless entry point by end user, * whose callback will be invoked with IComponentInstance as a parameter. * * @param entryPointKey : string * @param provider : HeadlessEntryPointFactory2 */ registerHeadlessEntryPoint2(entryPointKey: string, provider: HeadlessEntryPointFactory2): void; } /** * export singleton as HeadlessEntryPointRegistry, public API for JS developer. * * @example * ``` * // This is an example of how to use HeadlessEntryPointRegistry. * import { HeadlessEntryPointRegistry } from "@amazon-devices/headless-task-manager" * * // define entry point function * function entryPointFunction(): Promise { * // TODO: Add task logic * // if returns Promise.reject(), the task will be failed. * // if returns Promise.resolve(), the task will be succeeded. * return Promise.resolve(); * } * * // register task * HeadlessEntryPointRegistry.registerHeadlessEntryPoint("entryPointKey", () => entryPointFunction); * ``` */ export declare const HeadlessEntryPointRegistry: HeadlessEntryPointRegistry;