Options
All
  • Public
  • Public/Protected
  • All
Menu

Wraps Items returned from the API that have been decrypted, usually by ItemService. If classification_nodes, thumbnails and attachmentsare provided at construction, they are stored.

DecryptedItem is immutable, you should use toItemUpdate to stage modifications.

thumbnails and attachments are NOT filtered; they may contain extra attachments not used by the Item.

Hierarchy

Index

Constructors

constructor

  • new DecryptedItem(item: Item, slots?: SDKDecryptedSlot[], extra?: Partial<{ attachments: Attachment[]; classification_nodes: ClassificationNode[]; thumbnails: Thumbnail[] }>): DecryptedItem

Properties

Readonly attachments

attachments: Attachment[]

Readonly classification_nodes

classification_nodes: ClassificationNode[]

These are just the Item's classifications, not the same as ItemResponse.classification_nodes. To retrieve classification nodes for individual Slots, use getSlotClassifications

Readonly description

description: string

Readonly id

id: string

Readonly item

item: Item

The Item as it exists within the API

Readonly label

label: string

Readonly name

name: string

Readonly original_id

original_id: undefined | string

Readonly own

own: boolean

Readonly owner_id

owner_id: undefined | string

Readonly share_id

share_id: undefined | string

Readonly slots

Readonly thumbnails

thumbnails: Thumbnail[]

Static Readonly cryppo

cryppo: any = ...

Accessors

slotsByName

  • get slotsByName(): Record<string, SlotType>

values

  • get values(): Record<string, undefined | string>

Methods

getSlotAttachment

getSlotClassifications

isOwned

  • isOwned(): boolean

isReceived

  • isReceived(): boolean

toEncryptedSlotValues

  • toEncryptedSlotValues(credentials: IDEK): Promise<EncryptedSlotValue[]>

toItemUpdate

  • toItemUpdate(update: Partial<{ classificationNodes: ClassificationNode[]; label: string; slots: NewSlot[] }>): ItemUpdate

toShareSlots

  • toShareSlots(credentials: IDEK, shareId: string): Promise<ItemsIdSharesSlotValues[]>
  • For updating shared data (i.e. PUT items/id/shares). The Item's slots are encrypted with the given DEK and value verification hashes are appended. You must own the Item to update it like this.

    Parameters

    • credentials: IDEK
    • shareId: string

    Returns Promise<ItemsIdSharesSlotValues[]>

Static fromAPI

Generated using TypeDoc