Namespace: resolver
Type Aliases
DelayResetResults
Ƭ DelayResetResults: Object
Type declaration
Name | Type |
---|---|
newTimerId | ReturnType <typeof setTimeout > |
senderUuid | string |
OpenAppResult
Ƭ OpenAppResult: Object
Type declaration
Name | Type |
---|---|
actionId | ActionId |
error? | string | null |
pendingMessage? | InteropBroadcastInternal | null |
windowName? | string |
UIResolutionResult
Ƭ UIResolutionResult: Object
Type declaration
Name | Type |
---|---|
actionId | ActionId |
pendingMessage | InteropRaiseIntent | InteropBroadcast |
resolverResolution | ResolverResolution |
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
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.state | InteropStore |
cmd | CMD |
Returns
void
filterAppHandlersFromIntents
▸ filterAppHandlersFromIntents(__namedParameters
): { info
: IntentMetadata
; launchableHandlers
: { [key: string]
: ContextType
[] | null
; } }[]
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.context? | Context |
__namedParameters.filterNotLaunchable? | boolean |
__namedParameters.filterOpenSingletons? | boolean |
__namedParameters.intents | { info : IntentMetadata ; launchableHandlers : { [key: string] : ContextType [] | null ; } }[] |
__namedParameters.resolverState | Object |
__namedParameters.resolverState.addIntentListenerMaxInitializationTimeout | number |
__namedParameters.resolverState.apps | Object |
__namedParameters.resolverState.apps.definitions | Object |
__namedParameters.resolverState.apps.intentResolutionCurrentActionId | any |
__namedParameters.resolverState.apps.intentResolutionInProgress | boolean |
__namedParameters.resolverState.channelMeta | Object |
__namedParameters.resolverState.clients | Object |
__namedParameters.resolverState.config | Object |
__namedParameters.resolverState.config.registeredUIResolver | null | string |
__namedParameters.resolverState.config.serverUUID | string |
__namedParameters.resolverState.contextTypes | Object |
__namedParameters.resolverState.intents | Object |
__namedParameters.resolverState.lastChannelState | Object |
__namedParameters.resolverState.lastChannelStateByType | Object |
__namedParameters.resolverState.loopDetectionMap | Object |
__namedParameters.resolverState.pendingInteropRegistrationData | WindowDescriptor [] |
__namedParameters.resolverState.pendingOpenActionIds | Object |
__namedParameters.resolverState.queue | Object |
__namedParameters.resolverState.selectConnectChannels | Object |
__namedParameters.target? | TargetApp |
Returns
{ info
: IntentMetadata
; launchableHandlers
: { [key: string]
: ContextType
[] | null
; } }[]
filterIntentsByContext
▸ filterIntentsByContext(intentsData
, context?
): { info
: IntentMetadata
; launchableHandlers
: { [key: string]
: ContextType
[] | null
; } }[]
Parameters
Name | Type |
---|---|
intentsData | Object |
context? | Context |
Returns
{ info
: IntentMetadata
; launchableHandlers
: { [key: string]
: ContextType
[] | null
; } }[]
findAndFilterAppIntents
▸ findAndFilterAppIntents(__namedParameters
): AppIntentWithAppId
[]
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.context? | Context |
__namedParameters.filterNotLaunchable? | boolean |
__namedParameters.filterOpenSingletons? | boolean |
__namedParameters.intentName? | string |
__namedParameters.originUuid? | string |
__namedParameters.resolverState | Object |
__namedParameters.resolverState.addIntentListenerMaxInitializationTimeout | number |
__namedParameters.resolverState.apps | Object |
__namedParameters.resolverState.apps.definitions | Object |
__namedParameters.resolverState.apps.intentResolutionCurrentActionId | any |
__namedParameters.resolverState.apps.intentResolutionInProgress | boolean |
__namedParameters.resolverState.channelMeta | Object |
__namedParameters.resolverState.clients | Object |
__namedParameters.resolverState.config | Object |
__namedParameters.resolverState.config.registeredUIResolver | null | string |
__namedParameters.resolverState.config.serverUUID | string |
__namedParameters.resolverState.contextTypes | Object |
__namedParameters.resolverState.intents | Object |
__namedParameters.resolverState.lastChannelState | Object |
__namedParameters.resolverState.lastChannelStateByType | Object |
__namedParameters.resolverState.loopDetectionMap | Object |
__namedParameters.resolverState.pendingInteropRegistrationData | WindowDescriptor [] |
__namedParameters.resolverState.pendingOpenActionIds | Object |
__namedParameters.resolverState.queue | Object |
__namedParameters.resolverState.selectConnectChannels | Object |
__namedParameters.target? | TargetApp |
Returns
AppIntentWithAppId
[]
getClientAppConfig
▸ getClientAppConfig(appDConfig
): AppConfig
Parameters
Name | Type |
---|---|
appDConfig | AppDefinition |
Returns
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
Name | Type |
---|---|
currentContext | CurrentContext |
broadcastedContext | ContextAny |
Returns
boolean
| 0
openApp
▸ openApp(__namedParameters
): Promise
<OpenAppResult
>
Parameters
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.actionId | ActionId |
__namedParameters.appDefinitions | AppDefinition [] |
__namedParameters.appId | string |
__namedParameters.originatingAppId | string |
__namedParameters.originatingAppWindow | string |
__namedParameters.pendingMessage | null | 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
Name | Type |
---|---|
__namedParameters | Object |
__namedParameters.channel? | string |
__namedParameters.cmd? | CMD |
__namedParameters.contextType? | string |
__namedParameters.intent? | string |
__namedParameters.state | InteropStore |
__namedParameters.type? | string |
__namedParameters.uuid | string |
Returns
void
resolveIntentApps
▸ resolveIntentApps(actionId
, resolutionList
, pendingMessage
, originatingAppName
, originatingAppId
, originatingAppWindow
): Promise
<UIResolutionResult
>
Parameters
Name | Type |
---|---|
actionId | ActionId |
resolutionList | ResolutionList [] |
pendingMessage | InteropRaiseIntent |
originatingAppName | string |
originatingAppId | string |
originatingAppWindow | string |
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
Name | Type |
---|---|
currentContexts | Record <string , CurrentContext > |
context | ContextAny |
Returns
void
sendMessageOnRouter
▸ sendMessageOnRouter(routerChannel
, message
): Promise
<void
>
Parameters
Name | Type |
---|---|
routerChannel | string |
message | any |
Returns
Promise
<void
>
validStaticAuthenticationToken
▸ validStaticAuthenticationToken(config
, authenticationToken
): Promise
<boolean
>
Returns true if static authentication was successful
Parameters
Name | Type |
---|---|
config | AppConfig |
authenticationToken | AuthenticationToken |
Returns
Promise
<boolean
>
true if authenticated and false otherwise