Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Item

Package version

Used to perform operations on a specific item.

see

Items for operations on all items; see container.items.

Hierarchy

  • Item

Index

Properties

Accessors

Methods

Properties

container

container: Container

The parent Container.

id

id: string

The id of the given Item.

Accessors

url

  • get url(): string

Methods

delete

read

  • Read the item's definition.

    Any provided type, T, is not necessarily enforced by the SDK. You may get more or less properties and it's up to your logic to enforce it. If the type, T, is a class, it won't pass typeof comparisons, because it won't have a match prototype. It's recommended to only use interfaces.

    There is no set schema for JSON items. They may contain any number of custom properties.

    example

    Using custom type for response

    interface TodoItem {
      title: string;
      done: bool;
      id: string;
    }
    
    let item: TodoItem;
    ({body: item} = await item.read<TodoItem>());

    Type parameters

    Parameters

    • Default value options: RequestOptions = {}

      Additional options for the request

    Returns Promise<ItemResponse<T>>

replace

Generated using TypeDoc