Purpose:

Allow integrations to discover the actions and features supported by the Host application

Sample Usage:

import host from '@elliemae/em-ssf-guest'

...

async function displayApplicationCapabilities() {
  try {
    const applicationObject = await host.getObject('application')
    const applicationCapabilities = applicationObject.getCapabilities()

    console.log(applicationCapabilities)
  } catch (error) {
    console.log({error})
  }
}

displayApplicationCapabilities()
import host from '@elliemae/em-ssf-guest'

...

host.getObject('application')
  .then(
    (applicationObject) => {
      const applicationCapabilities = applicationObject.getCapabilities()

      console.log(applicationCapabilities)
    }
  )
  .catch(
    (error) => {
      console.log({error})
    }
  )

Interface:

Input:

None

Returns:

Type: Object

An object containing supportedActions and supportedFeatures as array-valued attributes:

  1. supportedActions contains unique string-valued identifiers for each of the actions supported by the host application. The actions can be invoked via the performAction method exposed by the application object.
  2. supportedFeatures contains unique string-valued identifiers for the features exposed as functions on the application objects interface, such as open and openModal.
{
  supportedActions: ["getAvailableResources"],
  supportedFeatures: ["open", "openModal"]
}