Options
All
  • Public
  • Public/Protected
  • All
Menu

Singleton-class for managing global setup of subaio-views. Before creating views, manager.configure should be invoked.

The manager automatically maintains a valid token and requests new ones using the onTokenRequired callback whenever necessary.

Hierarchy

  • SubaioManager

Index

Properties

language

language: string | null

Language to be used by all Subaio views as a BCP-47 string. Assigning language automatically updates all views and triggers a token refetch if configure has already been called. If it is set to null or not set, views will never exit their loading-state.

Static shared

Shared instance of the Subaio Manager.

Methods

cleanup

  • cleanup(): void
  • Stop all token refresh logic in preparation for the manager being garbage collected. Only relevant if instances are created manually.

    Should never be called on the shared instance.

    Returns void

configure

  • configure(config: Config): void
  • Global configuration for all Subaio views. Must be called before any views are initiated.

    Parameters

    Returns void

refreshToken

  • refreshToken(): Promise<void> | Promise<__type> | null | undefined
  • Force a new fetch of authentication token. Useful when the user logs out to force current token to be removed from memory and any views to clear all user data.

    Returns Promise<void> | Promise<__type> | null | undefined

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc