Class ManagerApps

Hierarchy

  • ApiConnection
    • ManagerApps

Constructors

Properties

_jwt: string = ''
_onAuthFailed?: ((url: string) => void)

Type declaration

    • (url: string): void
    • Callback to run when a request returns status 401 (optional)

      Parameters

      • url: string

      Returns void

_requestFunc?: RequestFunction

Custom request function (optional)

Accessors

  • set jwt(jwt: string): void
  • Parameters

    • jwt: string

    Returns void

  • set onAuthFailed(callback: ((url: string) => void)): void
  • Parameters

    • callback: ((url: string) => void)
        • (url: string): void
        • Parameters

          • url: string

          Returns void

    Returns void

Methods

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • method: "GET" | "POST" | "PUT" | "DELETE" = 'GET'
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Install an app

    Parameters

    • id: string

      The id of the app

    Returns Promise<void>

  • List all apps

    Returns

    A list of apps with metadata

    Parameters

    • installed: boolean = false

      Set this to true if you only want a list of installed apps

    Returns Promise<{ apps: MetadataV4[]; jwt: string }>

  • Get a list of all apps which can be updates

    Returns Promise<Record<string, { updateFrom: string; updateTo: string }>>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Type Parameters

    • ResponseType = unknown

    Parameters

    • url: string
    • body: unknown = {}
    • auth: boolean = true
    • blob: boolean = false

    Returns Promise<ResponseType>

  • Uninstall an app

    Parameters

    • id: string

      The id of the app

    Returns Promise<void>

  • Update an app

    Parameters

    • id: string

      The id of the app

    Returns Promise<void>

  • Update all apps

    Returns Promise<void>

Generated using TypeDoc