Class AppClient

Set of methods available for eitri-apps

Hierarchy

  • AppClient

Properties

Utility for navigation tracking in Clarity

Deprecated

prefer tracking.clarity

clipboard: ClipboardService

Methods for clipboard access

deeplink: DeeplinkService

Methods for deep link opening

Set of methods for handling HTTP requests

In an eitri-app, it's important to note that it's only possible to make HTTP requests through these commands. The format is similar to a well-known library called axios.

navigation: NavigationService

Set of methods for navigating between screens. Each set of files (jsx and js) in the view folder generates a screen. It's possible to navigate through these screens using the methods described here.

sharedStorage: SharedStorageService

Set of methods to operate data storage shared between eitri-apps.

To use SharedStorage and make data available between two or more Eitri-Apps, an AppGroup is required.

AppGroups are a concept that permits some resources to be shared, such as storage. When two or more Eitri-Apps are in the same AppGroup, they can write data in one Eitri-App and retrieve it in another Eitri-App.

To set up an AppGroup configuration, please contact Eitri support.

Set of methods for operating data storage in eitri-apps

Notes:

Storage data is not shared between different eitri-apps. Data is transported as a string and transformed with parsing. Pay attention to the size of the data passed to avoid affecting the experience.

Set of tools for tracking eitri-apps

Available tools:

  • Clarity
  • Google Analytics
  • Datadog
version: string

Current eitri-app-client version

Accessors

  • get exposedApis(): any
  • Returns the APIs exposed by the application for an eitri-app.

    Example:

    const result = await Eitri.exposedApis.math.sum(1,2);
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns any

Methods

  • Checks if the desired API level is compatible with the API_LEVEL used in the eitri-machine

    Check compatibility control concept

    • API LEVEL 1 - Functionality added

    Parameters

    • apiLevelCandidate: number

      apiLevel to validate

    Returns boolean

  • Closes the current eitri-app.

    Example:

    Eitri.close()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns Promise<void>

  • Returns the name of the environment in which the application is running.

    Example:

    const environment = await Eitri.getEnvironment()
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Returns Promise<string>

  • Opens an HTTP address using the system's default browser.

    Example:

    await Eitri.openBrowser({url: "https://calindra.tech"});
    

    Compatibility Control

    • API LEVEL 1 - Functionality added

    Parameters

    • message: {
          url: string;
      }
      • url: string

    Returns Promise<void>

Generated using TypeDoc