Skip to main content

Namespace: resolver

Interop.modules.resolver

Type Aliases

DelayResetResults

Ƭ DelayResetResults: Object

Type declaration

NameType
newTimerIdReturnType<typeof setTimeout>
senderUuidstring

OpenAppResult

Ƭ OpenAppResult: Object

Type declaration

NameType
actionIdActionId
error?string | null
pendingMessage?InteropBroadcastInternal | null
windowName?string

UIResolutionResult

Ƭ UIResolutionResult: Object

Type declaration

NameType
actionIdActionId
pendingMessageInteropRaiseIntent | InteropBroadcast
resolverResolutionResolverResolution

Functions

filterAndResolveStaleMessages

filterAndResolveStaleMessages(__namedParameters, cmd): void

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.

Parameters

NameType
__namedParametersObject
__namedParameters.stateInteropStore
cmdCMD

Returns

void


filterAppHandlersFromIntents

filterAppHandlersFromIntents(__namedParameters): { info: IntentMetadata ; launchableHandlers: { [key: string]: ContextType[] | null; } }[]

Parameters

NameType
__namedParametersObject
__namedParameters.context?Context
__namedParameters.filterNotLaunchable?boolean
__namedParameters.filterOpenSingletons?boolean
__namedParameters.intents{ info: IntentMetadata ; launchableHandlers: { [key: string]: ContextType[] | null; } }[]
__namedParameters.resolverStateObject
__namedParameters.resolverState.addIntentListenerMaxInitializationTimeoutnumber
__namedParameters.resolverState.appsObject
__namedParameters.resolverState.apps.definitionsObject
__namedParameters.resolverState.apps.intentResolutionCurrentActionIdany
__namedParameters.resolverState.apps.intentResolutionInProgressboolean
__namedParameters.resolverState.channelMetaObject
__namedParameters.resolverState.clientsObject
__namedParameters.resolverState.configObject
__namedParameters.resolverState.config.registeredUIResolvernull | string
__namedParameters.resolverState.config.serverUUIDstring
__namedParameters.resolverState.contextTypesObject
__namedParameters.resolverState.intentsObject
__namedParameters.resolverState.lastChannelStateObject
__namedParameters.resolverState.lastChannelStateByTypeObject
__namedParameters.resolverState.loopDetectionMapObject
__namedParameters.resolverState.pendingInteropRegistrationDataWindowDescriptor[]
__namedParameters.resolverState.pendingOpenActionIdsObject
__namedParameters.resolverState.queueObject
__namedParameters.resolverState.selectConnectChannelsObject
__namedParameters.target?TargetApp

Returns

{ info: IntentMetadata ; launchableHandlers: { [key: string]: ContextType[] | null; } }[]


filterIntentsByContext

filterIntentsByContext(intentsData, context?): { info: IntentMetadata ; launchableHandlers: { [key: string]: ContextType[] | null; } }[]

Parameters

NameType
intentsDataObject
context?Context

Returns

{ info: IntentMetadata ; launchableHandlers: { [key: string]: ContextType[] | null; } }[]


findAndFilterAppIntents

findAndFilterAppIntents(__namedParameters): AppIntentWithAppId[]

Parameters

NameType
__namedParametersObject
__namedParameters.context?Context
__namedParameters.filterNotLaunchable?boolean
__namedParameters.filterOpenSingletons?boolean
__namedParameters.intentName?string
__namedParameters.originUuid?string
__namedParameters.resolverStateObject
__namedParameters.resolverState.addIntentListenerMaxInitializationTimeoutnumber
__namedParameters.resolverState.appsObject
__namedParameters.resolverState.apps.definitionsObject
__namedParameters.resolverState.apps.intentResolutionCurrentActionIdany
__namedParameters.resolverState.apps.intentResolutionInProgressboolean
__namedParameters.resolverState.channelMetaObject
__namedParameters.resolverState.clientsObject
__namedParameters.resolverState.configObject
__namedParameters.resolverState.config.registeredUIResolvernull | string
__namedParameters.resolverState.config.serverUUIDstring
__namedParameters.resolverState.contextTypesObject
__namedParameters.resolverState.intentsObject
__namedParameters.resolverState.lastChannelStateObject
__namedParameters.resolverState.lastChannelStateByTypeObject
__namedParameters.resolverState.loopDetectionMapObject
__namedParameters.resolverState.pendingInteropRegistrationDataWindowDescriptor[]
__namedParameters.resolverState.pendingOpenActionIdsObject
__namedParameters.resolverState.queueObject
__namedParameters.resolverState.selectConnectChannelsObject
__namedParameters.target?TargetApp

Returns

AppIntentWithAppId[]


getClientAppConfig

getClientAppConfig(appDConfig): AppConfig

Parameters

NameType
appDConfigAppDefinition

Returns

AppConfig


isDupBroadcast

isDupBroadcast(currentContext, broadcastedContext): boolean | 0

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).

Parameters

NameType
currentContextCurrentContext
broadcastedContextContextAny

Returns

boolean | 0


openApp

openApp(__namedParameters): Promise<OpenAppResult>

Parameters

NameType
__namedParametersObject
__namedParameters.actionIdActionId
__namedParameters.appDefinitionsAppDefinition[]
__namedParameters.appIdstring
__namedParameters.originatingAppIdstring
__namedParameters.originatingAppWindowstring
__namedParameters.pendingMessagenull | InteropBroadcastInternal

Returns

Promise<OpenAppResult>


releaseQueuedMessages

releaseQueuedMessages(__namedParameters): 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

Parameters

NameType
__namedParametersObject
__namedParameters.channel?string
__namedParameters.cmd?CMD
__namedParameters.contextType?string
__namedParameters.intent?string
__namedParameters.stateInteropStore
__namedParameters.type?string
__namedParameters.uuidstring

Returns

void


resolveIntentApps

resolveIntentApps(actionId, resolutionList, pendingMessage, originatingAppName, originatingAppId, originatingAppWindow): Promise<UIResolutionResult>

Parameters

NameType
actionIdActionId
resolutionListResolutionList[]
pendingMessageInteropRaiseIntent
originatingAppNamestring
originatingAppIdstring
originatingAppWindowstring

Returns

Promise<UIResolutionResult>


saveCurrentContext

saveCurrentContext(currentContexts, context): void

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.

Parameters

NameType
currentContextsRecord<string, CurrentContext>
contextContextAny

Returns

void


sendMessageOnRouter

sendMessageOnRouter(routerChannel, message): Promise<void>

Parameters

NameType
routerChannelstring
messageany

Returns

Promise<void>


validStaticAuthenticationToken

validStaticAuthenticationToken(config, authenticationToken): Promise<boolean>

Returns true if static authentication was successful

Parameters

NameType
configAppConfig
authenticationTokenAuthenticationToken

Returns

Promise<boolean>

true if authenticated and false otherwise