Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StorefrontProvider

Describes a Storefront provided by a platform. A platform must provide an object that satisfies this interface in order to register with the Storefront.

Hierarchy

Index

Properties

icon

icon: string

Icon for storefront provider. Visible next to title in storefront provider selector UI

id

id: string

Unique identifier for the Storefront provider.

title

title: string

A UI friendly title for the platform Storefront. This will be used in the Storefront selection dropdown.

Methods

getApps

  • getApps(): Promise<App[]>
  • Get a list of apps to populate the platform's Storefront with.


    const app : App = {
    appId: 'uid'
    title: 'My App'
    manifest: `https://openfin-iex.experolabs.com/openfin/manifests/cash-flow.json`,
    icons: [
    {
    src: '/icon.png'
    }
    ],
    contactEmail: contact@email.com,
    supportEmail: support@email.com,
    publisher: 'My Publisher',
    tags: [],
    images: [],
    intents: []
    }

    const getApps = async (): Promise<App[]> => {
    return [app];
    }

    Returns Promise<App[]>

getFooter

  • Get the footer for the platform's Storefront.

    const footer: StorefrontFooter = {
    logo: { src: './images/image', size: '32' },
    text: 'footer text',
    links: [
    { title:'title', url: 'https://openfin.co' },
    { title: 'title', url: 'https://openfin.co'}
    ]
    }

    const getFooter = async (): Promise<StorefrontFooter> => {
    return footer;
    }

    Returns Promise<StorefrontFooter>

getLandingPage

  • Get the main landing page for the platform's Storefront.


    const landingPage : StorefrontLandingPage = {
    hero: {
    title: 'My Landing Page',
    description: 'description',
    cta: navigationItems[0],
    image: {
    src: './images/image.png'
    }
    },
    topRow: {
    title: 'Top Row Title',
    items: //array of StorefrontNavigationItem
    },
    middleRow: {
    title: 'Middle Row Title',
    apps: //array of apps
    },
    bottomRow: {
    title: 'Bottom Row Title',
    items: //array of StorefrontNavigationItem
    }
    }

    const getLandingPage = async (): Promise<StorefrontLandingPage> => {
    return landingPage;
    }

    Returns Promise<StorefrontLandingPage>

getNavigation

  • Get the Storefront navigation sections for the left nav bar.

    ```ts const navigationSections: [StorefrontNavigationSection, StorefrontNavigationSection] = [ { id: 'first id', title: 'title', items: //array of navigation items }, { id: 'second id' title: 'title', items: //array of navigation items } ]

    const getNavigation = async (): Promise<[StorefrontNavigationSection, StorefrontNavigationSection]> => { return navigationSections; }

    
    

    Returns Promise<[StorefrontNavigationSection?, StorefrontNavigationSection?, StorefrontNavigationSection?]>

launchApp

  • launchApp(app: App): Promise<void>
  • Launch an app provided by the platform's Storefront.

    import { getStorefrontProvider } from "./my-provider";

    //Grab your provider
    const myStoreFrontProvider: StorefrontProvider = getStorefrontProvider();

    const app : App = {
    appId: 'uid'
    title: 'My App'
    manifest: `https://openfin-iex.experolabs.com/openfin/manifests/cash-flow.json`,
    icons: [
    {
    src: './image.png'
    }
    ],
    contactEmail: contact@email.com,
    supportEmail: support@email.com,
    publisher: 'My Publisher',
    tags: [],
    images: [],
    intents: []
    }

    const launch = async () => {
    await myStorefrontProvider.launchApp(app);
    }

    Parameters

    • app: App

      the app to launch.

    Returns Promise<void>

Generated using TypeDoc