Interface NotificationChannelStorage

Stores all the information necessary to keep track of notification channels. Besides the standard channel info it also stores features specific to a certain channel type.

This storage assumes that a channel can only have a single identifier as its topic.

Hierarchy

  • NotificationChannelStorage

Implemented by

Properties

Properties

add: ((channel) => Promise<void>)

Type declaration

    • (channel): Promise<void>
    • Adds the given channel to the storage.

      Parameters

      Returns Promise<void>

delete: ((id) => Promise<boolean>)

Type declaration

    • (id): Promise<boolean>
    • Deletes the given notification channel from the storage. Returns true if the channel existed.

      Parameters

      • id: string

        The identifier of the notification channel

      Returns Promise<boolean>

get: ((id) => Promise<undefined | NotificationChannel>)

Type declaration

    • (id): Promise<undefined | NotificationChannel>
    • Returns the requested channel. undefined if no match was found or if the notification channel expired.

      Parameters

      • id: string

        The identifier of the notification channel.

      Returns Promise<undefined | NotificationChannel>

getAll: ((topic) => Promise<string[]>)

Type declaration

    • (topic): Promise<string[]>
    • Returns the identifiers of all notification channel entries that have the given identifier as their topic. The identifiers can potentially correspond to expired channels.

      Parameters

      Returns Promise<string[]>

update: ((channel) => Promise<void>)

Type declaration

    • (channel): Promise<void>
    • Updates the given notification channel. The id and the topic can not be updated.

      Parameters

      Returns Promise<void>