UNPKG

@dolbyio/dolbyio-rest-apis-client

Version:
69 lines (68 loc) 3.01 kB
import { Webhook, UpdateWebhookRequest, ListWebhooksRequest, AddWebhookRequest, TestWebhookRequest } from './types/webhooks'; /** * Gets the specified webhook. * * @see {@link https://optiview.dolby.com/docs/millicast/api/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. * * @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-update-webhook/} * * @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. * * @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-remove-webhook/} * * @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. * * @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-list-webhooks/} * * @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. * * @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-add-webhook/} * * @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>; /** * Sends a test event for the specified webhook type. * * @see {@link https://optiview.dolby.com/docs/millicast/api/webhooks-test-webhook/} * * @param apiSecret The API Secret used to authenticate this request. * @param testRequest Test request for the webhook. * * @returns A {@link !Promise Promise} whose fulfillment handler receives a flag indicating if the operation was successful or not. */ export declare const test: (apiSecret: string, testRequest: TestWebhookRequest) => Promise<boolean>;