Options
All
  • Public
  • Public/Protected
  • All
Menu

Used for fetching and sending Items to and from the Vault.

Hierarchy

  • Service<ItemApi>
    • ItemService

Index

Constructors

constructor

Properties

Protected environment

environment: Environment

Protected keystoreAPIFactory

keystoreAPIFactory: KeystoreAPIFactory

Protected logger

logger: IFullLogger

Protected vaultAPIFactory

vaultAPIFactory: VaultAPIFactory

Methods

create

get

getAPI

getShareDEK

  • duplicating method from share-service to avoid circular dependencies A shared Item may be either encrypted with a shared data-encryption key (DEK) or with the user's personal DEK. This method inspects the share record and returns the appropriate key.

    Parameters

    Returns Promise<SymmetricKey>

list

listAll

listDecrypted

  • Behaves like list but chains DecryptedItem constructor and preserves response metadata. Item attachments, thumbnails and associations are added to the appropriate Item and so are not present in the result.

    If you want to pull all pages, use the following snippet

    const allItems: DecryptedItems =
      await getAllPaged(cursor => listDecrypted(credentials, filterOpts, { nextPageAfter: cursor })).then(reducePages);
    

    Parameters

    Returns Promise<DecryptedItems>

removeSlot

  • removeSlot(credentials: IVaultToken, slotId: string): Promise<void>

setLogger

  • setLogger(logger: Logger): void

update

Static itemIsFromShare

  • itemIsFromShare(item: Item): boolean
  • True if the Item was received via a Share from another user. In that case, it must be decrypted with the Share DEK, not the user's own DEK.

    Parameters

    • item: Item

    Returns boolean

Generated using TypeDoc