UNPKG

@meeting-baas/sdk

Version:

Official SDK for Meeting BaaS API - https://meetingbaas.com

227 lines 53 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * Meeting BaaS API * Meeting BaaS API * * The version of the OpenAPI document: 1.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = void 0; const axios_1 = __importDefault(require("axios")); // Some imports not used depending on template conditions // @ts-ignore const common_1 = require("../common"); // @ts-ignore const base_1 = require("../base"); /** * WebhooksApi - axios parameter creator * @export */ const WebhooksApiAxiosParamCreator = function (configuration) { return { /** * Meeting BaaS sends the following webhook events related to bot recordings. ## Bot Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"Jane Smith\\\", \\\"John Doe\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` **When it\'s triggered:** - After a bot successfully records and processes a meeting - After the recording is uploaded and made available - When all processing of the meeting recording is complete **What to do with it:** - Download the MP4 recording for storage in your system - Store the transcript data in your database - Update meeting status in your application - Notify users that the recording is available ### 2. `failed` Sent when a bot fails to join or record a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` **Common error types:** - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error **What to do with it:** - Log the failure for troubleshooting - Notify administrators or users about the failed recording - Attempt to reschedule if appropriate - Update meeting status in your system ### 3. `transcription_complete` Sent when transcription is completed separately from recording. **Payload Structure:** ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` **When it\'s triggered:** - After requesting retranscription via the API - When an asynchronous transcription job completes - When a higher quality or different language transcription becomes available **What to do with it:** - Update the transcript data in your system - Notify users that improved transcription is available - Run any post-processing on the new transcript data ## Webhook Usage Tips - Each event includes the `bot_id` so you can correlate with your internal data - The complete event includes speaker identification and full transcript data - For downloading recordings, the mp4 URL is valid for 24 hours - Handle the webhook asynchronously and return 200 OK quickly to prevent timeouts For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Bot Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ botWebhookDocumentation: async (options = {}) => { const localVarPath = `/bots/webhooks/bot`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication ApiKeyAuth required await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration); (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Meeting BaaS sends the following webhook events related to calendar integrations. ## Calendar Webhook Event Types ### 1. `calendar.syncEvents` Sent when calendar events are synced with external providers. **Payload Structure:** ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` **When it\'s triggered:** - After initial calendar connection is established - When external calendar providers (Google, Microsoft) send change notifications - After manual calendar resync operations - During scheduled periodic syncs - When events are created, updated, or deleted in the source calendar **What to do with it:** - Update your local copy of calendar events - Process any new events that match your criteria - Remove any deleted events from your system - Update schedules for any modified events - Refresh your UI to show the latest calendar data **Field details:** - `calendar_id`: The UUID of the synchronized calendar - `last_updated_ts`: ISO-8601 timestamp when the sync occurred - `affected_event_uuids**: Array of UUIDs for events that were changed ## Integration with Meeting BaaS Calendar API After receiving a calendar webhook event, you can: 1. Use the `/calendar_events` endpoint to retrieve detailed information about specific events 2. Use the `/calendars/:uuid` endpoint to get calendar metadata 3. Schedule recording bots for any new meetings with the `/calendar_events/:uuid/bot` endpoint ## Webhook Usage Tips - Each event includes affected event UUIDs for efficient processing - You don\'t need to retrieve all calendar events - just process the changed ones - The timestamp helps determine the sequence of updates - For high-frequency calendars, consider batch processing of multiple events For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Calendar Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ calendarWebhookDocumentation: async (options = {}) => { const localVarPath = `/bots/webhooks/calendar`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication ApiKeyAuth required await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration); (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Meeting BaaS sends webhook events to your configured webhook URL when specific events occur. ## Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. Contains full transcription data and a link to the recording. ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"John Doe\\\", \\\"Jane Smith\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` The `complete` event includes: - **bot_id**: Unique identifier for the bot that completed recording - **speakers**: A set of speaker names identified in the meeting - **transcript**: Full transcript data with speaker identification and word timing - **mp4**: URL to the recording file (valid for 24 hours by default) - **event**: Event type identifier (\"complete\") ### 2. `failed` Sent when a bot fails to join or record a meeting. Contains error details. ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` The `failed` event includes: - **bot_id**: Unique identifier for the bot that failed - **error**: Error code identifying the type of failure - **message**: Detailed human-readable error message Common error types include: - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error ### 3. `calendar.syncEvents` Sent when calendar events are synced. Contains information about which events were updated. ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` The `calendar.syncEvents` event includes: - **calendar_id**: UUID of the calendar that was synced - **last_updated_ts**: ISO-8601 timestamp of when the sync occurred - **affected_event_uuids**: Array of UUIDs for calendar events that were added, updated, or deleted This event is triggered when: - Calendar data is synced with the external provider (Google, Microsoft) - Multiple events may be created, updated, or deleted in a single sync operation - Use this event to update your local cache of calendar events ### 4. `transcription_complete` Sent when transcription is completed separately from recording (e.g., after retranscribing). ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` The `transcription_complete` event includes: - **bot_id**: Unique identifier for the bot with the completed transcription This event is sent when: - You request a retranscription via the `/bots/retranscribe` endpoint - An asynchronous transcription process completes after the recording has ended ## Setting Up Webhooks You can configure webhooks in two ways: 1. **Account-level webhook URL**: Set a default webhook URL for all bots in your account using the `/accounts/webhook_url` endpoint 2. **Bot-specific webhook URL**: Provide a `webhook_url` parameter when creating a bot with the `/bots` endpoint Your webhook endpoint must: - Accept POST requests with JSON payload - Return a 2xx status code to acknowledge receipt - Process requests within 10 seconds to avoid timeouts - Handle each event type appropriately based on the event type All webhook requests include: - `x-meeting-baas-api-key` header with your API key for verification - `content-type: application/json` header - JSON body containing the event details ## Webhook Reliability If your endpoint fails to respond or returns an error, the system will attempt to retry the webhook delivery. For critical events, we recommend implementing: - Idempotency handling to prevent duplicate processing of the same event - Proper logging of webhook receipts for audit purposes - Asynchronous processing to quickly acknowledge receipt before handling the event data For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookDocumentation: async (options = {}) => { const localVarPath = `/bots/webhooks`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL); let baseOptions; if (configuration) { baseOptions = configuration.baseOptions; } const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options }; const localVarHeaderParameter = {}; const localVarQueryParameter = {}; // authentication ApiKeyAuth required await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration); (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers }; return { url: (0, common_1.toPathString)(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; exports.WebhooksApiAxiosParamCreator = WebhooksApiAxiosParamCreator; /** * WebhooksApi - functional programming interface * @export */ const WebhooksApiFp = function (configuration) { const localVarAxiosParamCreator = (0, exports.WebhooksApiAxiosParamCreator)(configuration); return { /** * Meeting BaaS sends the following webhook events related to bot recordings. ## Bot Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"Jane Smith\\\", \\\"John Doe\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` **When it\'s triggered:** - After a bot successfully records and processes a meeting - After the recording is uploaded and made available - When all processing of the meeting recording is complete **What to do with it:** - Download the MP4 recording for storage in your system - Store the transcript data in your database - Update meeting status in your application - Notify users that the recording is available ### 2. `failed` Sent when a bot fails to join or record a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` **Common error types:** - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error **What to do with it:** - Log the failure for troubleshooting - Notify administrators or users about the failed recording - Attempt to reschedule if appropriate - Update meeting status in your system ### 3. `transcription_complete` Sent when transcription is completed separately from recording. **Payload Structure:** ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` **When it\'s triggered:** - After requesting retranscription via the API - When an asynchronous transcription job completes - When a higher quality or different language transcription becomes available **What to do with it:** - Update the transcript data in your system - Notify users that improved transcription is available - Run any post-processing on the new transcript data ## Webhook Usage Tips - Each event includes the `bot_id` so you can correlate with your internal data - The complete event includes speaker identification and full transcript data - For downloading recordings, the mp4 URL is valid for 24 hours - Handle the webhook asynchronously and return 200 OK quickly to prevent timeouts For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Bot Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ async botWebhookDocumentation(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.botWebhookDocumentation(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhooksApi.botWebhookDocumentation']?.[localVarOperationServerIndex]?.url; return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Meeting BaaS sends the following webhook events related to calendar integrations. ## Calendar Webhook Event Types ### 1. `calendar.syncEvents` Sent when calendar events are synced with external providers. **Payload Structure:** ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` **When it\'s triggered:** - After initial calendar connection is established - When external calendar providers (Google, Microsoft) send change notifications - After manual calendar resync operations - During scheduled periodic syncs - When events are created, updated, or deleted in the source calendar **What to do with it:** - Update your local copy of calendar events - Process any new events that match your criteria - Remove any deleted events from your system - Update schedules for any modified events - Refresh your UI to show the latest calendar data **Field details:** - `calendar_id`: The UUID of the synchronized calendar - `last_updated_ts`: ISO-8601 timestamp when the sync occurred - `affected_event_uuids**: Array of UUIDs for events that were changed ## Integration with Meeting BaaS Calendar API After receiving a calendar webhook event, you can: 1. Use the `/calendar_events` endpoint to retrieve detailed information about specific events 2. Use the `/calendars/:uuid` endpoint to get calendar metadata 3. Schedule recording bots for any new meetings with the `/calendar_events/:uuid/bot` endpoint ## Webhook Usage Tips - Each event includes affected event UUIDs for efficient processing - You don\'t need to retrieve all calendar events - just process the changed ones - The timestamp helps determine the sequence of updates - For high-frequency calendars, consider batch processing of multiple events For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Calendar Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ async calendarWebhookDocumentation(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.calendarWebhookDocumentation(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhooksApi.calendarWebhookDocumentation']?.[localVarOperationServerIndex]?.url; return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** * Meeting BaaS sends webhook events to your configured webhook URL when specific events occur. ## Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. Contains full transcription data and a link to the recording. ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"John Doe\\\", \\\"Jane Smith\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` The `complete` event includes: - **bot_id**: Unique identifier for the bot that completed recording - **speakers**: A set of speaker names identified in the meeting - **transcript**: Full transcript data with speaker identification and word timing - **mp4**: URL to the recording file (valid for 24 hours by default) - **event**: Event type identifier (\"complete\") ### 2. `failed` Sent when a bot fails to join or record a meeting. Contains error details. ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` The `failed` event includes: - **bot_id**: Unique identifier for the bot that failed - **error**: Error code identifying the type of failure - **message**: Detailed human-readable error message Common error types include: - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error ### 3. `calendar.syncEvents` Sent when calendar events are synced. Contains information about which events were updated. ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` The `calendar.syncEvents` event includes: - **calendar_id**: UUID of the calendar that was synced - **last_updated_ts**: ISO-8601 timestamp of when the sync occurred - **affected_event_uuids**: Array of UUIDs for calendar events that were added, updated, or deleted This event is triggered when: - Calendar data is synced with the external provider (Google, Microsoft) - Multiple events may be created, updated, or deleted in a single sync operation - Use this event to update your local cache of calendar events ### 4. `transcription_complete` Sent when transcription is completed separately from recording (e.g., after retranscribing). ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` The `transcription_complete` event includes: - **bot_id**: Unique identifier for the bot with the completed transcription This event is sent when: - You request a retranscription via the `/bots/retranscribe` endpoint - An asynchronous transcription process completes after the recording has ended ## Setting Up Webhooks You can configure webhooks in two ways: 1. **Account-level webhook URL**: Set a default webhook URL for all bots in your account using the `/accounts/webhook_url` endpoint 2. **Bot-specific webhook URL**: Provide a `webhook_url` parameter when creating a bot with the `/bots` endpoint Your webhook endpoint must: - Accept POST requests with JSON payload - Return a 2xx status code to acknowledge receipt - Process requests within 10 seconds to avoid timeouts - Handle each event type appropriately based on the event type All webhook requests include: - `x-meeting-baas-api-key` header with your API key for verification - `content-type: application/json` header - JSON body containing the event details ## Webhook Reliability If your endpoint fails to respond or returns an error, the system will attempt to retry the webhook delivery. For critical events, we recommend implementing: - Idempotency handling to prevent duplicate processing of the same event - Proper logging of webhook receipts for audit purposes - Asynchronous processing to quickly acknowledge receipt before handling the event data For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ async webhookDocumentation(options) { const localVarAxiosArgs = await localVarAxiosParamCreator.webhookDocumentation(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = base_1.operationServerMap['WebhooksApi.webhookDocumentation']?.[localVarOperationServerIndex]?.url; return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath); }, }; }; exports.WebhooksApiFp = WebhooksApiFp; /** * WebhooksApi - factory interface * @export */ const WebhooksApiFactory = function (configuration, basePath, axios) { const localVarFp = (0, exports.WebhooksApiFp)(configuration); return { /** * Meeting BaaS sends the following webhook events related to bot recordings. ## Bot Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"Jane Smith\\\", \\\"John Doe\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` **When it\'s triggered:** - After a bot successfully records and processes a meeting - After the recording is uploaded and made available - When all processing of the meeting recording is complete **What to do with it:** - Download the MP4 recording for storage in your system - Store the transcript data in your database - Update meeting status in your application - Notify users that the recording is available ### 2. `failed` Sent when a bot fails to join or record a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` **Common error types:** - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error **What to do with it:** - Log the failure for troubleshooting - Notify administrators or users about the failed recording - Attempt to reschedule if appropriate - Update meeting status in your system ### 3. `transcription_complete` Sent when transcription is completed separately from recording. **Payload Structure:** ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` **When it\'s triggered:** - After requesting retranscription via the API - When an asynchronous transcription job completes - When a higher quality or different language transcription becomes available **What to do with it:** - Update the transcript data in your system - Notify users that improved transcription is available - Run any post-processing on the new transcript data ## Webhook Usage Tips - Each event includes the `bot_id` so you can correlate with your internal data - The complete event includes speaker identification and full transcript data - For downloading recordings, the mp4 URL is valid for 24 hours - Handle the webhook asynchronously and return 200 OK quickly to prevent timeouts For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Bot Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ botWebhookDocumentation(options) { return localVarFp.botWebhookDocumentation(options).then((request) => request(axios, basePath)); }, /** * Meeting BaaS sends the following webhook events related to calendar integrations. ## Calendar Webhook Event Types ### 1. `calendar.syncEvents` Sent when calendar events are synced with external providers. **Payload Structure:** ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` **When it\'s triggered:** - After initial calendar connection is established - When external calendar providers (Google, Microsoft) send change notifications - After manual calendar resync operations - During scheduled periodic syncs - When events are created, updated, or deleted in the source calendar **What to do with it:** - Update your local copy of calendar events - Process any new events that match your criteria - Remove any deleted events from your system - Update schedules for any modified events - Refresh your UI to show the latest calendar data **Field details:** - `calendar_id`: The UUID of the synchronized calendar - `last_updated_ts`: ISO-8601 timestamp when the sync occurred - `affected_event_uuids**: Array of UUIDs for events that were changed ## Integration with Meeting BaaS Calendar API After receiving a calendar webhook event, you can: 1. Use the `/calendar_events` endpoint to retrieve detailed information about specific events 2. Use the `/calendars/:uuid` endpoint to get calendar metadata 3. Schedule recording bots for any new meetings with the `/calendar_events/:uuid/bot` endpoint ## Webhook Usage Tips - Each event includes affected event UUIDs for efficient processing - You don\'t need to retrieve all calendar events - just process the changed ones - The timestamp helps determine the sequence of updates - For high-frequency calendars, consider batch processing of multiple events For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Calendar Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ calendarWebhookDocumentation(options) { return localVarFp.calendarWebhookDocumentation(options).then((request) => request(axios, basePath)); }, /** * Meeting BaaS sends webhook events to your configured webhook URL when specific events occur. ## Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. Contains full transcription data and a link to the recording. ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"John Doe\\\", \\\"Jane Smith\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` The `complete` event includes: - **bot_id**: Unique identifier for the bot that completed recording - **speakers**: A set of speaker names identified in the meeting - **transcript**: Full transcript data with speaker identification and word timing - **mp4**: URL to the recording file (valid for 24 hours by default) - **event**: Event type identifier (\"complete\") ### 2. `failed` Sent when a bot fails to join or record a meeting. Contains error details. ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` The `failed` event includes: - **bot_id**: Unique identifier for the bot that failed - **error**: Error code identifying the type of failure - **message**: Detailed human-readable error message Common error types include: - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error ### 3. `calendar.syncEvents` Sent when calendar events are synced. Contains information about which events were updated. ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` The `calendar.syncEvents` event includes: - **calendar_id**: UUID of the calendar that was synced - **last_updated_ts**: ISO-8601 timestamp of when the sync occurred - **affected_event_uuids**: Array of UUIDs for calendar events that were added, updated, or deleted This event is triggered when: - Calendar data is synced with the external provider (Google, Microsoft) - Multiple events may be created, updated, or deleted in a single sync operation - Use this event to update your local cache of calendar events ### 4. `transcription_complete` Sent when transcription is completed separately from recording (e.g., after retranscribing). ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` The `transcription_complete` event includes: - **bot_id**: Unique identifier for the bot with the completed transcription This event is sent when: - You request a retranscription via the `/bots/retranscribe` endpoint - An asynchronous transcription process completes after the recording has ended ## Setting Up Webhooks You can configure webhooks in two ways: 1. **Account-level webhook URL**: Set a default webhook URL for all bots in your account using the `/accounts/webhook_url` endpoint 2. **Bot-specific webhook URL**: Provide a `webhook_url` parameter when creating a bot with the `/bots` endpoint Your webhook endpoint must: - Accept POST requests with JSON payload - Return a 2xx status code to acknowledge receipt - Process requests within 10 seconds to avoid timeouts - Handle each event type appropriately based on the event type All webhook requests include: - `x-meeting-baas-api-key` header with your API key for verification - `content-type: application/json` header - JSON body containing the event details ## Webhook Reliability If your endpoint fails to respond or returns an error, the system will attempt to retry the webhook delivery. For critical events, we recommend implementing: - Idempotency handling to prevent duplicate processing of the same event - Proper logging of webhook receipts for audit purposes - Asynchronous processing to quickly acknowledge receipt before handling the event data For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} */ webhookDocumentation(options) { return localVarFp.webhookDocumentation(options).then((request) => request(axios, basePath)); }, }; }; exports.WebhooksApiFactory = WebhooksApiFactory; /** * WebhooksApi - object-oriented interface * @export * @class WebhooksApi * @extends {BaseAPI} */ class WebhooksApi extends base_1.BaseAPI { /** * Meeting BaaS sends the following webhook events related to bot recordings. ## Bot Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"Jane Smith\\\", \\\"John Doe\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` **When it\'s triggered:** - After a bot successfully records and processes a meeting - After the recording is uploaded and made available - When all processing of the meeting recording is complete **What to do with it:** - Download the MP4 recording for storage in your system - Store the transcript data in your database - Update meeting status in your application - Notify users that the recording is available ### 2. `failed` Sent when a bot fails to join or record a meeting. **Payload Structure:** ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` **Common error types:** - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error **What to do with it:** - Log the failure for troubleshooting - Notify administrators or users about the failed recording - Attempt to reschedule if appropriate - Update meeting status in your system ### 3. `transcription_complete` Sent when transcription is completed separately from recording. **Payload Structure:** ```json { \\\"event\\\": \\\"transcription_complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\" } } ``` **When it\'s triggered:** - After requesting retranscription via the API - When an asynchronous transcription job completes - When a higher quality or different language transcription becomes available **What to do with it:** - Update the transcript data in your system - Notify users that improved transcription is available - Run any post-processing on the new transcript data ## Webhook Usage Tips - Each event includes the `bot_id` so you can correlate with your internal data - The complete event includes speaker identification and full transcript data - For downloading recordings, the mp4 URL is valid for 24 hours - Handle the webhook asynchronously and return 200 OK quickly to prevent timeouts For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Bot Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApi */ botWebhookDocumentation(options) { return (0, exports.WebhooksApiFp)(this.configuration).botWebhookDocumentation(options).then((request) => request(this.axios, this.basePath)); } /** * Meeting BaaS sends the following webhook events related to calendar integrations. ## Calendar Webhook Event Types ### 1. `calendar.syncEvents` Sent when calendar events are synced with external providers. **Payload Structure:** ```json { \\\"event\\\": \\\"calendar.syncEvents\\\", \\\"data\\\": { \\\"calendar_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"last_updated_ts\\\": \\\"2023-05-01T12:00:00Z\\\", \\\"affected_event_uuids\\\": [ \\\"123e4567-e89b-12d3-a456-426614174001\\\", \\\"123e4567-e89b-12d3-a456-426614174002\\\" ] } } ``` **When it\'s triggered:** - After initial calendar connection is established - When external calendar providers (Google, Microsoft) send change notifications - After manual calendar resync operations - During scheduled periodic syncs - When events are created, updated, or deleted in the source calendar **What to do with it:** - Update your local copy of calendar events - Process any new events that match your criteria - Remove any deleted events from your system - Update schedules for any modified events - Refresh your UI to show the latest calendar data **Field details:** - `calendar_id`: The UUID of the synchronized calendar - `last_updated_ts`: ISO-8601 timestamp when the sync occurred - `affected_event_uuids**: Array of UUIDs for events that were changed ## Integration with Meeting BaaS Calendar API After receiving a calendar webhook event, you can: 1. Use the `/calendar_events` endpoint to retrieve detailed information about specific events 2. Use the `/calendars/:uuid` endpoint to get calendar metadata 3. Schedule recording bots for any new meetings with the `/calendar_events/:uuid/bot` endpoint ## Webhook Usage Tips - Each event includes affected event UUIDs for efficient processing - You don\'t need to retrieve all calendar events - just process the changed ones - The timestamp helps determine the sequence of updates - For high-frequency calendars, consider batch processing of multiple events For security, always validate the API key in the `x-meeting-baas-api-key` header matches your API key. * @summary Calendar Webhook Events Documentation * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WebhooksApi */ calendarWebhookDocumentation(options) { return (0, exports.WebhooksApiFp)(this.configuration).calendarWebhookDocumentation(options).then((request) => request(this.axios, this.basePath)); } /** * Meeting BaaS sends webhook events to your configured webhook URL when specific events occur. ## Webhook Event Types ### 1. `complete` Sent when a bot successfully completes recording a meeting. Contains full transcription data and a link to the recording. ```json { \\\"event\\\": \\\"complete\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"transcript\\\": [ { \\\"speaker\\\": \\\"John Doe\\\", \\\"offset\\\": 1.5, \\\"words\\\": [ { \\\"start\\\": 1.5, \\\"end\\\": 1.9, \\\"word\\\": \\\"Hello\\\" }, { \\\"start\\\": 2.0, \\\"end\\\": 2.4, \\\"word\\\": \\\"everyone\\\" } ] } ], \\\"speakers\\\": [ \\\"John Doe\\\", \\\"Jane Smith\\\" ], \\\"mp4\\\": \\\"https://storage.example.com/recordings/video123.mp4?token=abc\\\", \\\"event\\\": \\\"complete\\\" } } ``` The `complete` event includes: - **bot_id**: Unique identifier for the bot that completed recording - **speakers**: A set of speaker names identified in the meeting - **transcript**: Full transcript data with speaker identification and word timing - **mp4**: URL to the recording file (valid for 24 hours by default) - **event**: Event type identifier (\"complete\") ### 2. `failed` Sent when a bot fails to join or record a meeting. Contains error details. ```json { \\\"event\\\": \\\"failed\\\", \\\"data\\\": { \\\"bot_id\\\": \\\"123e4567-e89b-12d3-a456-426614174000\\\", \\\"error\\\": \\\"meeting_not_found\\\", \\\"message\\\": \\\"Could not join meeting: The meeting ID was not found or has expired\\\" } } ``` The `failed` event includes: - **bot_id**: Unique identifier for the bot that failed - **error**: Error code identifying the type of failure - **message**: Detailed human-readable error message Common error types include: - `meeting_not_found`: The meeting ID or link was invalid or expired - `access_denied`: The bot was denied access to the meeting - `authentication_error`: Failed to authenticate with the meeting platform - `network_error`: Network connectivity issues during recording - `internal_error`: Internal server error ### 3. `calendar.syncEvents` Sent when calendar events are synced. Contains information about which events were updated. ```json { \\\"event\\\": \\\"calendar.syncEvents\\\",