import { APIResource } from "../../resource.js"; import * as Core from "../../core.js"; export declare class Webhooks extends APIResource { /** * Adds a new webhook to an App. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.createWebhook( * 'app_id', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * events: [ * 'meeting.started', * 'meeting.ended', * 'meeting.participantJoined', * 'meeting.participantLeft', * 'meeting.chatSynced', * 'recording.statusUpdate', * 'livestreaming.statusUpdate', * 'meeting.transcript', * 'meeting.summary', * ], * name: 'All events webhook', * url: 'https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e', * }, * ); * ``` */ createWebhook(appId: string, params: WebhookCreateWebhookParams, options?: Core.RequestOptions): Core.APIPromise; /** * Removes a webhook for the given webhook ID. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.deleteWebhook( * 'app_id', * 'webhook_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ deleteWebhook(appId: string, webhookId: string, params: WebhookDeleteWebhookParams, options?: Core.RequestOptions): Core.APIPromise; /** * Edits the webhook details for the given webhook ID. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.editWebhook( * 'app_id', * 'webhook_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ editWebhook(appId: string, webhookId: string, params: WebhookEditWebhookParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns webhook details for the given webhook ID. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.getWebhookById( * 'app_id', * 'webhook_id', * { account_id: '023e105f4ecef8ad9ca31a8372d0c353' }, * ); * ``` */ getWebhookById(appId: string, webhookId: string, params: WebhookGetWebhookByIDParams, options?: Core.RequestOptions): Core.APIPromise; /** * Returns details of all webhooks for an App. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.getWebhooks('app_id', { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * }); * ``` */ getWebhooks(appId: string, params: WebhookGetWebhooksParams, options?: Core.RequestOptions): Core.APIPromise; /** * Replace all details for the given webhook ID. * * @example * ```ts * const response = * await client.realtimeKit.webhooks.replaceWebhook( * 'app_id', * 'webhook_id', * { * account_id: '023e105f4ecef8ad9ca31a8372d0c353', * events: [ * 'meeting.started', * 'meeting.ended', * 'meeting.participantJoined', * 'meeting.participantLeft', * 'meeting.chatSynced', * 'recording.statusUpdate', * 'livestreaming.statusUpdate', * 'meeting.transcript', * 'meeting.summary', * ], * name: 'All events webhook', * url: 'https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e', * }, * ); * ``` */ replaceWebhook(appId: string, webhookId: string, params: WebhookReplaceWebhookParams, options?: Core.RequestOptions): Core.APIPromise; } export interface WebhookCreateWebhookResponse { data: WebhookCreateWebhookResponse.Data; success: boolean; } export declare namespace WebhookCreateWebhookResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookDeleteWebhookResponse { data: WebhookDeleteWebhookResponse.Data; success: boolean; } export declare namespace WebhookDeleteWebhookResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookEditWebhookResponse { data: WebhookEditWebhookResponse.Data; success: boolean; } export declare namespace WebhookEditWebhookResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookGetWebhookByIDResponse { data: WebhookGetWebhookByIDResponse.Data; success: boolean; } export declare namespace WebhookGetWebhookByIDResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookGetWebhooksResponse { data: Array; success: boolean; } export declare namespace WebhookGetWebhooksResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookReplaceWebhookResponse { data: WebhookReplaceWebhookResponse.Data; success: boolean; } export declare namespace WebhookReplaceWebhookResponse { interface Data { /** * ID of the webhook */ id: string; /** * Timestamp when this webhook was created */ created_at: string; /** * Set to true if the webhook is active */ enabled: boolean; /** * Events this webhook will send updates for */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Name of the webhook */ name: string; /** * Timestamp when this webhook was updated */ updated_at: string; /** * URL the webhook will send events to */ url: string; } } export interface WebhookCreateWebhookParams { /** * Path param: The account identifier tag. */ account_id: string; /** * Body param: Events that this webhook will get triggered by */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Body param: Name of the webhook */ name: string; /** * Body param: URL this webhook will send events to */ url: string; /** * Body param: Set whether or not the webhook should be active when created */ enabled?: boolean; } export interface WebhookDeleteWebhookParams { /** * The account identifier tag. */ account_id: string; } export interface WebhookEditWebhookParams { /** * Path param: The account identifier tag. */ account_id: string; /** * Body param */ enabled?: boolean; /** * Body param: Events that the webhook will get triggered by */ events?: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.chatSynced' | 'meeting.transcript' | 'meeting.summary'>; /** * Body param: Name of the webhook */ name?: string; /** * Body param: URL the webhook will send events to */ url?: string; } export interface WebhookGetWebhookByIDParams { /** * The account identifier tag. */ account_id: string; } export interface WebhookGetWebhooksParams { /** * The account identifier tag. */ account_id: string; } export interface WebhookReplaceWebhookParams { /** * Path param: The account identifier tag. */ account_id: string; /** * Body param: Events that this webhook will get triggered by */ events: Array<'meeting.started' | 'meeting.ended' | 'meeting.participantJoined' | 'meeting.participantLeft' | 'meeting.chatSynced' | 'recording.statusUpdate' | 'livestreaming.statusUpdate' | 'meeting.transcript' | 'meeting.summary'>; /** * Body param: Name of the webhook */ name: string; /** * Body param: URL this webhook will send events to */ url: string; /** * Body param: Set whether or not the webhook should be active when created */ enabled?: boolean; } export declare namespace Webhooks { export { type WebhookCreateWebhookResponse as WebhookCreateWebhookResponse, type WebhookDeleteWebhookResponse as WebhookDeleteWebhookResponse, type WebhookEditWebhookResponse as WebhookEditWebhookResponse, type WebhookGetWebhookByIDResponse as WebhookGetWebhookByIDResponse, type WebhookGetWebhooksResponse as WebhookGetWebhooksResponse, type WebhookReplaceWebhookResponse as WebhookReplaceWebhookResponse, type WebhookCreateWebhookParams as WebhookCreateWebhookParams, type WebhookDeleteWebhookParams as WebhookDeleteWebhookParams, type WebhookEditWebhookParams as WebhookEditWebhookParams, type WebhookGetWebhookByIDParams as WebhookGetWebhookByIDParams, type WebhookGetWebhooksParams as WebhookGetWebhooksParams, type WebhookReplaceWebhookParams as WebhookReplaceWebhookParams, }; } //# sourceMappingURL=webhooks.d.ts.map