Type Alias ObjectStore

ObjectStore: {
    delete(name: string): Promise<PurgeResponse>;
    destroy(): Promise<boolean>;
    get(name: string): Promise<ObjectResult>;
    getBlob(name: string): Promise<Uint8Array<ArrayBufferLike>>;
    info(name: string): Promise<ObjectInfo>;
    link(name: string, meta: ObjectInfo): Promise<ObjectInfo>;
    linkStore(name: string, bucket: ObjectStore): Promise<ObjectInfo>;
    list(): Promise<ObjectInfo[]>;
    put(
        meta: ObjectStoreMeta,
        rs: ReadableStream<Uint8Array<ArrayBufferLike>>,
        opts?: ObjectStorePutOpts,
    ): Promise<ObjectInfo>;
    putBlob(
        meta: ObjectStoreMeta,
        data: Uint8Array<ArrayBufferLike>,
        opts?: ObjectStorePutOpts,
    ): Promise<ObjectInfo>;
    seal(): Promise<ObjectStoreStatus>;
    status(
        opts?: Partial<StreamInfoRequestOptions>,
    ): Promise<ObjectStoreStatus>;
    update(name: string, meta: Partial<ObjectStoreMeta>): Promise<PubAck>;
    watch(
        opts?: Partial<{ ignoreDeletes?: boolean; includeHistory?: boolean }>,
    ): Promise<QueuedIterator<ObjectWatchInfo>>;
}

Type declaration

  • delete:function
    • Deletes the specified entry from the object store.

      Parameters

      • name: string

      Returns Promise<PurgeResponse>

  • destroy:function
    • Destroys the object store and all its entries.

      Returns Promise<boolean>

  • get:function
    • Returns an object you can use for reading the data from the named stored object or null if the entry doesn't exist.

      Parameters

      • name: string

      Returns Promise<ObjectResult>

  • getBlob:function
    • Returns the data stored for the named entry.

      Parameters

      • name: string

      Returns Promise<Uint8Array<ArrayBufferLike>>

  • info:function
    • Returns the ObjectInfo of the named entry. Or null if the entry doesn't exist.

      Parameters

      • name: string

      Returns Promise<ObjectInfo>

  • link:function
    • Adds a link to another object in the same store or a different one. Note that links of links are rejected. object.

      Parameters

      Returns Promise<ObjectInfo>

  • linkStore:function
  • list:function
    • Returns a list of the entries in the ObjectStore

      Returns Promise<ObjectInfo[]>

  • put:function
    • Adds an object to the store with the specified meta and using the specified ReadableStream to stream the data.

      Parameters

      Returns Promise<ObjectInfo>

  • putBlob:function
  • seal:function
  • status:function
    • Returns the runtime status of the object store.

      Parameters

      • Optionalopts: Partial<StreamInfoRequestOptions>

      Returns Promise<ObjectStoreStatus>

  • update:function
    • Update the metadata for an object. If the name is modified, the object is effectively renamed and will only be accessible by its new name.

      Parameters

      Returns Promise<PubAck>

  • watch:function
    • Watch an object store and receive updates of modifications via an iterator.

      Parameters

      • Optionalopts: Partial<{ ignoreDeletes?: boolean; includeHistory?: boolean }>

      Returns Promise<QueuedIterator<ObjectWatchInfo>>