UNPKG

@dolbyio/dolbyio-rest-apis-client

Version:
48 lines (47 loc) 1.97 kB
/// <reference types="node" /> import http from 'http'; import { JwtToken } from './types/jwtToken'; import { UpdateWebhookOptions, Webhook } from './types/webhooks'; /** * Registers a webhook that is triggered when a job completes. * * @link https://docs.dolby.io/media-apis/reference/media-webhook-post * * @param accessToken Access token to use for authentication. * @param url The callback url that will be called when job execution completes. * @param headers (Optional) Headers to include in the webhook call. * * @returns The webhook identifier through a {@link Promise}. */ export declare const registerWebhook: (accessToken: JwtToken, url: string, headers?: http.OutgoingHttpHeaders) => Promise<string | null>; /** * Updates the previously registered webhook configuration. * * @link https://docs.dolby.io/media-apis/reference/media-webhook-put * * @param accessToken Access token to use for authentication. * @param options Options to update the webhook. */ export declare const updateWebhook: (accessToken: JwtToken, options: UpdateWebhookOptions) => Promise<void>; /** * Retrieves the previously registered webhook configuration. * * @link https://docs.dolby.io/media-apis/reference/media-webhook-get * * @param accessToken Access token to use for authentication. * @param webhookId Identifier of the webhook to retrieve. * * @returns The {@link Webhook} object through a {@link Promise}. */ export declare const retrieveWebhook: (accessToken: JwtToken, webhookId: string) => Promise<Webhook>; /** * Deletes a previously registered webhook configuration. * * @link https://docs.dolby.io/media-apis/reference/media-webhook-delete * * @param accessToken Access token to use for authentication. * @param webhookId Identifier of the webhook to delete. * * @returns The webhook identifier through a {@link Promise}. */ export declare const deleteWebhook: (accessToken: JwtToken, webhookId: string) => Promise<string | null>;