Freigeben über


NotificationTargetStorage interface

Warning

This API is now deprecated.

Use ConversationReferenceStore to customize the way to persist bot notification connections instead.

Interface for a storage provider that stores and retrieves notification target references.

Methods

delete(string)

Delete one notification target by its key.

list()

List all stored notification targets.

read(string)

Read one notification target by its key.

write(string, {[key: string]: unknown})

Write one notification target by its key.

Method Details

delete(string)

Delete one notification target by its key.

function delete(key: string): Promise<void>

Parameters

key

string

the key of a notification target.

Returns

Promise<void>

list()

List all stored notification targets.

function list(): Promise<{[key: string]: unknown}[]>

Returns

Promise<{[key: string]: unknown}[]>

  • an array of notification target. Or an empty array if nothing is stored.

read(string)

Read one notification target by its key.

function read(key: string): Promise<undefined | {[key: string]: unknown}>

Parameters

key

string

the key of a notification target.

Returns

Promise<undefined | {[key: string]: unknown}>

  • the notification target. Or undefined if not found.

write(string, {[key: string]: unknown})

Write one notification target by its key.

function write(key: string, object: {[key: string]: unknown}): Promise<void>

Parameters

key

string

the key of a notification target.

object

{[key: string]: unknown}

the notification target.

Returns

Promise<void>