Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Type aliases

Action

Action: string | { hotkey?: string; name: string }

Each action is defined by its title and a hotkey

Fin

Fin<T>: BaseFin<T> & { Search: SearchAPI }

Extended Fin object with fin.Search namespace.

const searchTopic = fin.Search.create({ topic: "my search topic" });

Type parameters

  • T: EntityType

Identity

Identity: AdapterIdentity

An object that represents a unique OpenFin identity.

ListPairs

ListPairs: [string, string][]

ResultDispatchListener

ResultDispatchListener: (result: DispatchedSearchResult) => void

Type declaration

    • A listener called when a search result generated by this provider is dispatched.

      searchTopic.dispatch("My Provider Name", searchResult, "My Action");
      

      Parameters

      Returns void

ScoreOrder

ScoreOrder: "ascending" | "descending"

The order to sort scored search results in.

SearchAPI

SearchAPI: { create: typeof create; subscribe: typeof subscribe }

Search API object that is injected in the window.

Type declaration

SearchListener

SearchListener: (request: SearchListenerRequest, response: SearchListenerResponse) => Promise<SearchResult[]>

Type declaration

SearchProviderResponseGenerator

SearchProviderResponseGenerator: AsyncGenerator<SearchProviderResponse[], SearchProviderResponse[], SearchProviderResponse[]>

A generator that returns search responses from all providers that have currently responded.

More documentation on Javascript Generators can be found here.

SearchResult

A search result returned by a SearchProvider's onSearch listener function.

SubscriptionListener

SubscriptionListener: (identity: Identity) => Promise<boolean>

Type declaration

    • (identity: Identity): Promise<boolean>
    • Called when a remote OpenFin identity, such as a view, attempts to connect to the search topic.

      Returning false will reject said request.

       const allowedHosts = ["www.company.com"];
       searchTopic.onSubscription(identity => {
        const info = await fin.View.wrapSync(identity).getInfo();
        const url = new URL(info.url);
      
        return allowedHosts.includes(url.host);
      });
      

      Parameters

      Returns Promise<boolean>

Functions

Const create

  • Create a topic. If the OpenFin identity creating the topic is running in a platform, the search topic will be sandboxed to the platform. In order to subscribe to a sandboxed search topic, the UUID of the platform must be specified explicitly or the subscribing OpenFin identity must be running in the platform.

    Parameters

    Returns Promise<SearchTopic>

Const subscribe

Legend

  • Property
  • Method

Generated using TypeDoc