/** * Notes. Because reducers use Immer, you can't just console.log pieces of your store. You'll get a bunch of proxy * stuff from the WritableDraft<> template. Wrap your data in unImmer() to print it out normally. */ import { ActionReducerMapBuilder, CMD } from "../../../common/redux/createReducer"; import { WindowDescriptor } from "../../window/types"; import { InteropStore, ResolverStore, AppDefinition, OutgoingMessage, RegistrationResult, ClientAdded, ClientRemoved, OutgoingSelectConnectChannelMessage, ResolverIntentsData, ResolverIntent, InteropMessageWithActonId, InteropBroadcastInternal, LoopDetectionEntry, AppConfig, CurrentContext, InteropClient } from "../types"; import { InteropBroadcast, InteropJoinChannels, InteropLeaveChannels, InteropRegister, InteropHeartbeat, InteropUnregister, InteropSubscribeContext, InteropUnsubscribeContext, InteropRaiseIntent, InteropSubscribeIntent, InteropUnsubscribeIntent, InteropAddAppDefinitions, InteropRemoveAppDefinitions, InteropOpenRequest, InteropRegisterUIResolver, InteropSetRegistrationData, ResolverResolution, ResolutionList, ContextAny, ContextMap, AuthenticationToken } from "../../../clients/Interop/types"; import { Context, AppIntent, AppMetadata, TargetApp } from "../../../typedefs/FDC3"; import { StoreType } from "../store"; import { ActionId } from "../../../common/redux/types"; export declare type OpenAppResult = { actionId: ActionId; error?: string | null; windowName?: string; pendingMessage?: InteropBroadcastInternal | null; }; export declare type UIResolutionResult = { actionId: ActionId; resolverResolution: ResolverResolution; pendingMessage: InteropRaiseIntent | InteropBroadcast; }; export declare type DelayResetResults = { senderUuid: string; newTimerId: ReturnType; }; export declare const filterIntentsByContext: (intentsData: ResolverIntentsData, context?: Context) => ResolverIntent[]; export declare const filterAppHandlersFromIntents: ({ resolverState, intents, context, target, filterNotLaunchable, filterOpenSingletons, }: { resolverState: ResolverStore; intents: ResolverIntent[]; context?: Context | undefined; target?: TargetApp | undefined; filterNotLaunchable?: boolean | undefined; filterOpenSingletons?: boolean | undefined; }) => ResolverIntent[]; declare type AppIntentWithAppId = { readonly intent: AppIntent["intent"]; readonly apps: Array; }; export declare const findAndFilterAppIntents: ({ resolverState, intentName, context, target, filterNotLaunchable, filterOpenSingletons, originUuid, }: { resolverState: ResolverStore; intentName?: string | undefined; context?: Context | undefined; target?: TargetApp | undefined; filterNotLaunchable?: boolean | undefined; filterOpenSingletons?: boolean | undefined; originUuid?: string | undefined; }) => AppIntentWithAppId[]; export declare const sendMessageOnRouter: (routerChannel: string, message: any) => Promise; /** * Performs a very simple check to see if a broadcasted context is a duplicate - the result of a potential infinite * broadcast loop. If the app's current context is the same as its broadcasted context then it's suspect. But it's still * possible for users or developers to intentionally resend an app's current context, so we only say it's a duplicate * if this occurs within 100 milliseconds (since FDC3 is supposed to operate at human speeds). */ export declare const isDupBroadcast: (currentContext: CurrentContext, broadcastedContext: ContextAny) => boolean | 0; /** * Associates the provided context with the app's set of current contexts. This saved context represents the currently * assigned context for that app. This is used to detect broadcast loops. */ export declare const saveCurrentContext: (currentContexts: Record, context: ContextAny) => void; export declare const openApp: ({ actionId, appId, pendingMessage, originatingAppId, originatingAppWindow, appDefinitions, }: { actionId: ActionId; appId: string; pendingMessage: InteropBroadcastInternal | null; originatingAppId: string; originatingAppWindow: string; appDefinitions: AppDefinition[]; }) => Promise; export declare const resolveIntentApps: (actionId: ActionId, resolutionList: ResolutionList[], pendingMessage: InteropRaiseIntent, originatingAppName: string, originatingAppId: string, originatingAppWindow: string) => Promise; /** * Filter any stale messages from queue and respond to any corresponding pending actions. * This is an indirect method to recognize an apps isn't following expected behavior as defined in appD. */ export declare const filterAndResolveStaleMessages: ({ state }: { state: InteropStore; }, cmd: CMD) => void; /** * Releases queued messages. This can be called from three possible places: * 1) subscribeContext - In order to release any pending broadcasts (such as from a prior `open` call, or from a #Workspace initializing broadcast) * 2) subscribeIntent - Similarly, in order to release any pending intents from a prior call to `raiseIntent` * 3) register - When an app client registers (and thus selectConnect rules can be processed correctly) * * This manages a race condition. subscribeContext/subscribeIntent can occur both before or after register completes. * (a) When they occur before, then the app won't yet be ready, so the items remain queued but the "subscriberIsReady" flag is flipped to true. * Then when register calls releaseQueuedMessages again, all of the items with subscriberIsReady will be released. * * (b) When they occur after, the app will already be ready, so the items will immediately be broadcast */ export declare const releaseQueuedMessages: ({ state, uuid, channel, cmd, type, intent, contextType, }: { state: InteropStore; uuid: string; cmd?: CMD | undefined; channel?: string | undefined; type?: string | undefined; intent?: string | undefined; contextType?: string | undefined; }) => void; /** * Returns true if static authentication was successful * @param config * @param authenticationToken * @returns true if authenticated and false otherwise */ export declare const validStaticAuthenticationToken: (config: AppConfig, authenticationToken: AuthenticationToken) => Promise; export declare const getClientAppConfig: (appDConfig: AppDefinition) => AppConfig; declare const _default: { getInitialState: () => { pendingInteropRegistrationData: WindowDescriptor[]; pendingOpenActionIds: { [windowName: string]: ActionId; }; config: { serverUUID: string; registeredUIResolver: string | null; }; clients: { [uuid: string]: InteropClient; }; selectConnectChannels: { [name: string]: { name: string; dispatchAction: string; } | { name: string; routerChannel: string; }; }; channelMeta: { [id: string]: { type: string; displayMetaData?: import("../../../typedefs/FDC3").DisplayMetadata | undefined; }; }; lastChannelState: { [channel: string]: { context: ContextAny; senderUuid: string; }; }; lastChannelStateByType: { [channel: string]: ContextMap; }; apps: { definitions: { [appName: string]: AppDefinition; }; intentResolutionInProgress: boolean; intentResolutionCurrentActionId: any; }; contextTypes: { [contextType: string]: { launchableHandlers: { [appId: string]: true; }; intents: { launchable: AppIntent[]; live: AppIntent[]; }; }; }; intents: { [intent: string]: { info: import("../../../typedefs/FDC3").IntentMetadata; launchableHandlers: { [key: string]: string[] | null; }; }; }; queue: { [uuidOrWindowName: string]: { pendingMessage: InteropBroadcastInternal; timestamp: number; subscriberIsReady?: boolean | undefined; }[]; }; loopDetectionMap: { [uuid: string]: LoopDetectionEntry; }; addIntentListenerMaxInitializationTimeout: number; }; addReducerCases: (builder: ActionReducerMapBuilder) => void; actions: { clientAdded: import("@reduxjs/toolkit").ActionCreatorWithPayload; clientRemoved: import("@reduxjs/toolkit").ActionCreatorWithPayload; register: import("@reduxjs/toolkit").ActionCreatorWithPayload, string>; completeRegistration: import("@reduxjs/toolkit").ActionCreatorWithPayload; heartbeat: import("@reduxjs/toolkit").ActionCreatorWithPayload; cleanupAndVerify: import("@reduxjs/toolkit").ActionCreatorWithoutPayload; unregister: import("@reduxjs/toolkit").ActionCreatorWithPayload; broadcast: import("@reduxjs/toolkit").ActionCreatorWithPayload; subscribeContext: import("@reduxjs/toolkit").ActionCreatorWithPayload; unsubscribeContext: import("@reduxjs/toolkit").ActionCreatorWithPayload; joinChannels: import("@reduxjs/toolkit").ActionCreatorWithPayload; leaveChannels: import("@reduxjs/toolkit").ActionCreatorWithPayload; sendMessageToDestinations: import("@reduxjs/toolkit").ActionCreatorWithPayload; sendSelectConnectMessagesToDestinations: import("@reduxjs/toolkit").ActionCreatorWithPayload; registerSelectConnectChannel: import("@reduxjs/toolkit").ActionCreatorWithPayload<{ name: string; dispatchAction: string; } | { name: string; routerChannel: string; }, string>; open: import("@reduxjs/toolkit").ActionCreatorWithPayload, string>; raiseIntent: import("@reduxjs/toolkit").ActionCreatorWithPayload, string>; subscribeIntent: import("@reduxjs/toolkit").ActionCreatorWithPayload; unsubscribeIntent: import("@reduxjs/toolkit").ActionCreatorWithPayload; addAppDefinitions: import("@reduxjs/toolkit").ActionCreatorWithPayload; removeAppDefinitions: import("@reduxjs/toolkit").ActionCreatorWithPayload; handleUIResolutionResponse: import("@reduxjs/toolkit").ActionCreatorWithPayload; openedApp: import("@reduxjs/toolkit").ActionCreatorWithPayload; registerUIResolver: import("@reduxjs/toolkit").ActionCreatorWithPayload; setInteropRegistrationData: import("@reduxjs/toolkit").ActionCreatorWithPayload; resetDetectedLoopState: import("@reduxjs/toolkit").ActionCreatorWithPayload; addIntentListenerMaxInitializationTimeout: import("@reduxjs/toolkit").ActionCreatorWithPayload; }; workspaceUuid: string; initialize: (store: StoreType) => void; }; export default _default; //# sourceMappingURL=resolver.d.ts.map