/** * SPDX-License-Identifier: Apache-2.0 * Copyright FINOS FDC3 contributors - see NOTICE file */ import { AppIdentifier, AppIntent, Channel, Context, ContextHandler, IntentHandler, IntentResolution, Listener, ImplementationMetadata, AppMetadata, PrivateChannel, Intent, StandardContextType, StandardIntent, ContextType } from '..'; /** * Utility function that returns a promise that will resolve immeadiately * if the desktop agent API is found at `window.fdc3`. If the API is found, * the promise will resolve when the `fdc3Ready` event is received or if it * is found at the end of the specified timeout. If the API is not found, it * will reject with an error. * * ```javascript * await fdc3Ready(); * const intentListener = await addIntentListener("ViewChart", intentHandlerFn); * ``` * * @param waitForMs The number of milliseconds to wait for the FDC3 API to be * ready. Defaults to 5 seconds. */ export declare const fdc3Ready: (waitForMs?: number) => Promise; export declare function open(app: AppIdentifier | string, context?: Context): Promise; export declare function findIntent(intent: Intent, context?: Context, resultType?: string): Promise; export declare function findIntentsByContext(context: Context, resultType?: string): Promise; export declare function broadcast(context: Context): Promise; export declare function raiseIntent(intent: Intent, context: Context, app?: AppIdentifier | string): Promise; export declare function raiseIntentForContext(context: Context, app?: AppIdentifier | string): Promise; export declare function addIntentListener(intent: Intent, handler: IntentHandler): Promise; export declare function addContextListener(contextTypeOrHandler: ContextType | null | ContextHandler, handler?: ContextHandler): Promise; export declare function getUserChannels(): Promise; export declare function getSystemChannels(): Promise; export declare function joinUserChannel(channelId: string): Promise; export declare function joinChannel(channelId: string): Promise; export declare function getOrCreateChannel(channelId: string): Promise; export declare function getCurrentChannel(): Promise; export declare function leaveCurrentChannel(): Promise; export declare function createPrivateChannel(): Promise; export declare function getInfo(): Promise; export declare function getAppMetadata(app: AppIdentifier): Promise; export declare function findInstances(app: AppIdentifier): Promise; /** * Check if the given context is a standard context type. * @param contextType */ export declare function isStandardContextType(contextType: ContextType): contextType is StandardContextType; /** * Check if the given intent is a standard intent. * @param intent */ export declare function isStandardIntent(intent: Intent): intent is StandardIntent; /** * Compare numeric semver version number strings (in the form `1.2.3`). * * Returns `-1` if the first argument is a lower version number than the second, * `1` if the first argument is greater than the second, 0 if the arguments are * equal and `null` if an error occurred during the comparison. * * @param a * @param b */ export declare const compareVersionNumbers: (a: string, b: string) => number | null; /** * Check if the FDC3 version in an ImplementationMetadata object is greater than * or equal to the supplied numeric semver version number string (in the form `1.2.3`). * * Returns a boolean or null if an error occurred while comparing the version numbers. * * @param metadata * @param version */ export declare const versionIsAtLeast: (metadata: ImplementationMetadata, version: string) => boolean | null; //# sourceMappingURL=Methods.d.ts.map