sitemap.xml llms.txt
Skip to main content

Vault Entities

These entities are used by the Vault adapter functions and encapsulate data objects used by the Epicenter Vault API.

Types​

VaultItems​

Represents the default shape of items stored inside a vault.

Note

This type serves as the base item structure for the Vault<I> and Items<I> interfaces. When no custom item type is provided, vaults and item‑mutation operations default to using VaultItems.

Definition​

export type VaultItems = Record<string, unknown>;

Description​

  • A flexible, untyped container for arbitrary data stored within a vault.
  • Keys are always strings.
  • Values may be of any type (unknown), allowing vaults to store heterogeneous data.

Interfaces​

Items​

The Items interface describes an object that contains modifications for vault data items. Extends VaultItems.

Interface definition
export interface Items<I extends object = VaultItems> {
set?: Partial<I>;
push?: Partial<I>;
pop?: Partial<I>;
}

Properties​

  • set (Partial<I>, optional): Key-value pairs.
    • Each key is a string, and values can can be null or any valid JSON data type.
    • Use this property to set or delete items in a vault. To delete an item, add the item's key with a null value.
  • push (Partial<I>, optional):: Key-value pairs.
    • Each key is a string, and values can can be null or any valid JSON data type.
    • Use this property to add data to an array in a vault.
  • pop (Partial<I>, optional): Key-value pairs. Use this property to delete data from an array in a vault.
tip

The key string can be dot-notated. In this case the value is a nested JSON object.


Vault​

The Vault<I extends object = VaultItems> interface defines the structure of a secure vault object.

Properties​

  • created (string): Timestamp indicating when the vault was created.
  • lastUpdated (string): Timestamp indicating the last time the vault was updated.
  • mutationKey (string): This value changes every time the vault is updated. Use it to ensure you are updating the latest copy of the vault's data. For details, read Updating the data.
  • address (Address): Generic address information associated with the vault.
  • scope ({ userKey?: string } & GenericScope): The scope of the vault, including an optional userKey and additional fields from the GenericScope interface.
  • name (string): Human-readable name of the vault. Must be unique for the scope.
  • permit (Permit): The permit of the vault.
  • vaultKey (string): Unique key identifying the vault.
  • expiration (string): Date and time string indicating when the vault will be deleted. Can be null.
  • items? (I, optional): Items to be manipulated in the vault as defined by the Items interface.
  • changed? (boolean, optional): Indicates whether the vault has been modified by the last update.