Type Parameters

Hierarchy (view full)

Constructors

  • Constructs a new AsyncCreatable instance. For internal and subclass use only. New subclass instances must be created with the static create method.

    Type Parameters

    Parameters

    • Optional options: object

      An options object providing initialization params.

    Returns BaseOrgAccessor<T, P>

Methods

  • Returns true if there is an auth file for the given username. The read or readAll methods must be called first in order to populate the cache.

    Parameters

    • username: string

    Returns Promise<boolean>

  • Return the contents of the username's auth file from cache. The read or readAll methods must be called first in order to populate the cache. If throwOnNotFound is not true, an empty object {} is returned if the org is not found.

    Parameters

    • username: string

      username to get

    • Optional decrypt: boolean

      if true, decrypt encrypted values

    • Optional throwOnNotFound: true

      if true, throw if the auth file does not already exist in the cache

    Returns P

  • Return the contents of all the auth files from cache. The read or readAll methods must be called first in order to populate the cache.

    Parameters

    • decrypt: boolean = false

      if true, decrypt encrypted values

    Returns P[]

  • Read the auth file for the given username. Once the file has been read, it can be re-accessed with the get method.

    Parameters

    • username: string

      username to read

    • decrypt: boolean = false

      if true, decrypt encrypted values

    • throwOnNotFound: boolean = true

      throw if file is not found for username

    Returns Promise<Nullable<P>>