UNPKG

@dolbyio/dolbyio-rest-apis-client

Version:
58 lines (57 loc) 2.44 kB
import { Webhook, UpdateWebhookRequest, ListWebhooksRequest, AddWebhookRequest } from './types/webhooks'; /** * Gets the specified webhook. * * @link https://docs.dolby.io/streaming-apis/reference/webhooks_get * * @param apiSecret The API Secret used to authenticate this request. * @param webhookId Identifier of the webhook to read. * * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link Webhook} object. */ export declare const read: (apiSecret: string, webhookId: number) => Promise<Webhook>; /** * Updates the webhook. * * @link https://docs.dolby.io/streaming-apis/reference/webhooks_updatewebhook * * @param apiSecret The API Secret used to authenticate this request. * @param webhookId Identifier of the webhook to update. * @param webhook Settings of the webhook to update. * * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link Webhook} object. */ export declare const update: (apiSecret: string, webhookId: number, webhook: UpdateWebhookRequest) => Promise<Webhook>; /** * Removes the webhook from the account. * * @link https://docs.dolby.io/streaming-apis/reference/webhooks_removewebhook * * @param apiSecret The API Secret used to authenticate this request. * @param webhookId Identifier of the publish token to delete. * * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link Webhook} object. */ export declare const remove: (apiSecret: string, webhookId: number) => Promise<Webhook>; /** * Lists the webhooks of the account. * * @link https://docs.dolby.io/streaming-apis/reference/webhooks_listwebhooks * * @param apiSecret The API Secret used to authenticate this request. * @param listRequest The options to list the webhooks. * * @returns A {@link !Promise Promise} whose fulfillment handler receives an array of {@link Webhook} objects. */ export declare const list: (apiSecret: string, listRequest: ListWebhooksRequest) => Promise<Webhook[]>; /** * Adds a new webhook to the account. * * @link https://docs.dolby.io/streaming-apis/reference/webhooks_addwebhook * * @param apiSecret The API Secret used to authenticate this request. * @param webhook Information about the new webhook. * * @returns A {@link !Promise Promise} whose fulfillment handler receives a {@link Webhook} object. */ export declare const add: (apiSecret: string, webhook: AddWebhookRequest) => Promise<Webhook>;