@meeting-baas/sdk
Version:
Official SDK for Meeting BaaS API - https://meetingbaas.com
650 lines • 66.6 kB
JavaScript
"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.CalendarsApi = exports.CalendarsApiFactory = exports.CalendarsApiFp = exports.CalendarsApiAxiosParamCreator = 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");
/**
* CalendarsApi - axios parameter creator
* @export
*/
const CalendarsApiAxiosParamCreator = function (configuration) {
return {
/**
* Integrates a new calendar with the system using OAuth credentials. This endpoint establishes a connection with the calendar provider (Google, Microsoft), sets up webhook notifications for real-time updates, and performs an initial sync of all calendar events. It requires OAuth credentials (client ID, client secret, and refresh token) and the platform type. Once created, the calendar is assigned a unique UUID that should be used for all subsequent operations. Returns the newly created calendar object with all integration details.
* @summary Create Calendar
* @param {CreateCalendarParams} createCalendarParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createCalendar: async (createCalendarParams, options = {}) => {
// verify required parameter 'createCalendarParams' is not null or undefined
(0, common_1.assertParamExists)('createCalendar', 'createCalendarParams', createCalendarParams);
const localVarPath = `/calendars/`;
// 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: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCalendarParams, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Permanently removes a calendar integration by its UUID, including all associated events and bot configurations. This operation cancels any active subscriptions with the calendar provider, stops all webhook notifications, and unschedules any pending recordings. All related resources are cleaned up in the database. This action cannot be undone, and subsequent requests to this calendar\'s UUID will return 404 Not Found errors.
* @summary Delete Calendar
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteCalendar: async (uuid, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('deleteCalendar', 'uuid', uuid);
const localVarPath = `/calendars/{uuid}`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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: 'DELETE', ...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,
};
},
/**
* Retrieves detailed information about a specific calendar integration by its UUID. Returns comprehensive calendar data including the calendar name, email address, provider details (Google, Microsoft), sync status, and other metadata. This endpoint is useful for displaying calendar information to users or verifying the status of a calendar integration before performing operations on its events.
* @summary Get Calendar
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCalendar: async (uuid, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('getCalendar', 'uuid', uuid);
const localVarPath = `/calendars/{uuid}`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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,
};
},
/**
* Retrieves comprehensive details about a specific calendar event by its UUID. Returns complete event information including title, meeting link, start and end times, organizer status, recurrence information, and the full list of attendees with their names and email addresses. Also includes any associated bot parameters if recording is scheduled for this event. The raw calendar data from the provider is also included for advanced use cases.
* @summary Get Event
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEvent: async (uuid, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('getEvent', 'uuid', uuid);
const localVarPath = `/calendar_events/{uuid}`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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,
};
},
/**
* Retrieves all calendars that have been integrated with the system for the authenticated user. Returns a list of calendars with their names, email addresses, provider information, and sync status. This endpoint shows only calendars that have been formally connected through the create_calendar endpoint, not all available calendars from the provider.
* @summary List Calendars
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCalendars: async (options = {}) => {
const localVarPath = `/calendars/`;
// 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,
};
},
/**
* Retrieves a paginated list of calendar events with comprehensive filtering options. Supports filtering by organizer email, attendee email, date ranges (start_date_gte, start_date_lte), and event status. Results can be limited to upcoming events (default), past events, or all events. Each event includes full details such as meeting links, participants, and recording status. The response includes a \'next\' pagination cursor for retrieving additional results.
* @summary List Events
* @param {string} calendarId Calendar ID to filter events by This is required to specify which calendar\'s events to retrieve
* @param {string | null} [attendeeEmail] If provided, filters events to include only those with this attendee\'s email address Example: \"jane.smith@example.com\"
* @param {string | null} [cursor] Optional cursor for pagination This value is included in the `next` field of the previous response
* @param {string | null} [organizerEmail] If provided, filters events to include only those with this organizer\'s email address Example: \"john.doe@example.com\"
* @param {string | null} [startDateGte] If provided, filters events to include only those with a start date greater than or equal to this timestamp Format: ISO-8601 string, e.g., \"2023-01-01T00:00:00Z\"
* @param {string | null} [startDateLte] If provided, filters events to include only those with a start date less than or equal to this timestamp Format: ISO-8601 string, e.g., \"2023-12-31T23:59:59Z\"
* @param {string | null} [status] Filter events by meeting status Valid values: \"upcoming\" (default) returns events after current time, \"past\" returns previous events, \"all\" returns both
* @param {string | null} [updatedAtGte] If provided, fetches only events updated at or after this timestamp Format: ISO-8601 string, e.g., \"2023-01-01T00:00:00Z\"
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listEvents: async (calendarId, attendeeEmail, cursor, organizerEmail, startDateGte, startDateLte, status, updatedAtGte, options = {}) => {
// verify required parameter 'calendarId' is not null or undefined
(0, common_1.assertParamExists)('listEvents', 'calendarId', calendarId);
const localVarPath = `/calendar_events/`;
// 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);
if (attendeeEmail !== undefined) {
localVarQueryParameter['attendee_email'] = attendeeEmail;
}
if (calendarId !== undefined) {
localVarQueryParameter['calendar_id'] = calendarId;
}
if (cursor !== undefined) {
localVarQueryParameter['cursor'] = cursor;
}
if (organizerEmail !== undefined) {
localVarQueryParameter['organizer_email'] = organizerEmail;
}
if (startDateGte !== undefined) {
localVarQueryParameter['start_date_gte'] = startDateGte;
}
if (startDateLte !== undefined) {
localVarQueryParameter['start_date_lte'] = startDateLte;
}
if (status !== undefined) {
localVarQueryParameter['status'] = status;
}
if (updatedAtGte !== undefined) {
localVarQueryParameter['updated_at_gte'] = updatedAtGte;
}
(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,
};
},
/**
* Retrieves unprocessed calendar data directly from the provider (Google, Microsoft) using provided OAuth credentials. This endpoint is typically used during the initial setup process to allow users to select which calendars to integrate. Returns a list of available calendars with their unique IDs, email addresses, and primary status. This data is not persisted until a calendar is formally created using the create_calendar endpoint.
* @summary List Raw Calendars
* @param {ListRawCalendarsParams} listRawCalendarsParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listRawCalendars: async (listRawCalendarsParams, options = {}) => {
// verify required parameter 'listRawCalendarsParams' is not null or undefined
(0, common_1.assertParamExists)('listRawCalendars', 'listRawCalendarsParams', listRawCalendarsParams);
const localVarPath = `/calendars/raw`;
// 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: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(listRawCalendarsParams, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Updates the configuration of a bot already scheduled to record an event. Allows modification of recording settings, webhook URLs, and other bot parameters without canceling and recreating the scheduled recording. For recurring events, the \'all_occurrences\' parameter determines whether changes apply to all instances or just the specific occurrence. Returns the updated event(s) with the modified bot parameters.
* @summary Patch Bot
* @param {string} uuid The UUID identifier
* @param {BotParam3} botParam3
* @param {boolean | null} [allOccurrences] schedule a bot to all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
patchBot: async (uuid, botParam3, allOccurrences, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('patchBot', 'uuid', uuid);
// verify required parameter 'botParam3' is not null or undefined
(0, common_1.assertParamExists)('patchBot', 'botParam3', botParam3);
const localVarPath = `/calendar_events/{uuid}/bot`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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: 'PATCH', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
if (allOccurrences !== undefined) {
localVarQueryParameter['all_occurrences'] = allOccurrences;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(botParam3, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Configures a bot to automatically join and record a specific calendar event at its scheduled time. The request body contains detailed bot configuration, including recording options, streaming settings, and webhook notification URLs. For recurring events, the \'all_occurrences\' parameter can be set to true to schedule recording for all instances of the recurring series, or false (default) to schedule only the specific instance. Returns the updated event(s) with the bot parameters attached.
* @summary Schedule Record Event
* @param {string} uuid The UUID identifier
* @param {BotParam2} botParam2
* @param {boolean | null} [allOccurrences] schedule a bot to all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
scheduleRecordEvent: async (uuid, botParam2, allOccurrences, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('scheduleRecordEvent', 'uuid', uuid);
// verify required parameter 'botParam2' is not null or undefined
(0, common_1.assertParamExists)('scheduleRecordEvent', 'botParam2', botParam2);
const localVarPath = `/calendar_events/{uuid}/bot`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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: 'POST', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
if (allOccurrences !== undefined) {
localVarQueryParameter['all_occurrences'] = allOccurrences;
}
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(botParam2, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Cancels a previously scheduled recording for a calendar event and releases associated bot resources. For recurring events, the \'all_occurrences\' parameter controls whether to unschedule from all instances of the recurring series or just the specific occurrence. This operation is idempotent and will not error if no bot was scheduled. Returns the updated event(s) with the bot parameters removed.
* @summary Unschedule Record Event
* @param {string} uuid The UUID identifier
* @param {boolean | null} [allOccurrences] unschedule a bot from all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
unscheduleRecordEvent: async (uuid, allOccurrences, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('unscheduleRecordEvent', 'uuid', uuid);
const localVarPath = `/calendar_events/{uuid}/bot`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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: 'DELETE', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
if (allOccurrences !== undefined) {
localVarQueryParameter['all_occurrences'] = allOccurrences;
}
(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,
};
},
/**
* Updates a calendar integration with new credentials or platform while maintaining the same UUID. This operation is performed as an atomic transaction to ensure data integrity. The system automatically unschedules existing bots to prevent duplicates, updates the calendar credentials, and triggers a full resync of all events. Useful when OAuth tokens need to be refreshed or when migrating a calendar between providers. Returns the updated calendar object with its new configuration.
* @summary Update Calendar
* @param {string} uuid The UUID identifier
* @param {UpdateCalendarParams} updateCalendarParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
updateCalendar: async (uuid, updateCalendarParams, options = {}) => {
// verify required parameter 'uuid' is not null or undefined
(0, common_1.assertParamExists)('updateCalendar', 'uuid', uuid);
// verify required parameter 'updateCalendarParams' is not null or undefined
(0, common_1.assertParamExists)('updateCalendar', 'updateCalendarParams', updateCalendarParams);
const localVarPath = `/calendars/{uuid}`
.replace(`{${"uuid"}}`, encodeURIComponent(String(uuid)));
// 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: 'PATCH', ...baseOptions, ...options };
const localVarHeaderParameter = {};
const localVarQueryParameter = {};
// authentication ApiKeyAuth required
await (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "x-meeting-baas-api-key", configuration);
localVarHeaderParameter['Content-Type'] = 'application/json';
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCalendarParams, localVarRequestOptions, configuration);
return {
url: (0, common_1.toPathString)(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
exports.CalendarsApiAxiosParamCreator = CalendarsApiAxiosParamCreator;
/**
* CalendarsApi - functional programming interface
* @export
*/
const CalendarsApiFp = function (configuration) {
const localVarAxiosParamCreator = (0, exports.CalendarsApiAxiosParamCreator)(configuration);
return {
/**
* Integrates a new calendar with the system using OAuth credentials. This endpoint establishes a connection with the calendar provider (Google, Microsoft), sets up webhook notifications for real-time updates, and performs an initial sync of all calendar events. It requires OAuth credentials (client ID, client secret, and refresh token) and the platform type. Once created, the calendar is assigned a unique UUID that should be used for all subsequent operations. Returns the newly created calendar object with all integration details.
* @summary Create Calendar
* @param {CreateCalendarParams} createCalendarParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async createCalendar(createCalendarParams, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.createCalendar(createCalendarParams, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.createCalendar']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Permanently removes a calendar integration by its UUID, including all associated events and bot configurations. This operation cancels any active subscriptions with the calendar provider, stops all webhook notifications, and unschedules any pending recordings. All related resources are cleaned up in the database. This action cannot be undone, and subsequent requests to this calendar\'s UUID will return 404 Not Found errors.
* @summary Delete Calendar
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async deleteCalendar(uuid, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCalendar(uuid, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.deleteCalendar']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Retrieves detailed information about a specific calendar integration by its UUID. Returns comprehensive calendar data including the calendar name, email address, provider details (Google, Microsoft), sync status, and other metadata. This endpoint is useful for displaying calendar information to users or verifying the status of a calendar integration before performing operations on its events.
* @summary Get Calendar
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getCalendar(uuid, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getCalendar(uuid, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.getCalendar']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Retrieves comprehensive details about a specific calendar event by its UUID. Returns complete event information including title, meeting link, start and end times, organizer status, recurrence information, and the full list of attendees with their names and email addresses. Also includes any associated bot parameters if recording is scheduled for this event. The raw calendar data from the provider is also included for advanced use cases.
* @summary Get Event
* @param {string} uuid The UUID identifier
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async getEvent(uuid, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.getEvent(uuid, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.getEvent']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Retrieves all calendars that have been integrated with the system for the authenticated user. Returns a list of calendars with their names, email addresses, provider information, and sync status. This endpoint shows only calendars that have been formally connected through the create_calendar endpoint, not all available calendars from the provider.
* @summary List Calendars
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listCalendars(options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.listCalendars(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.listCalendars']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Retrieves a paginated list of calendar events with comprehensive filtering options. Supports filtering by organizer email, attendee email, date ranges (start_date_gte, start_date_lte), and event status. Results can be limited to upcoming events (default), past events, or all events. Each event includes full details such as meeting links, participants, and recording status. The response includes a \'next\' pagination cursor for retrieving additional results.
* @summary List Events
* @param {string} calendarId Calendar ID to filter events by This is required to specify which calendar\'s events to retrieve
* @param {string | null} [attendeeEmail] If provided, filters events to include only those with this attendee\'s email address Example: \"jane.smith@example.com\"
* @param {string | null} [cursor] Optional cursor for pagination This value is included in the `next` field of the previous response
* @param {string | null} [organizerEmail] If provided, filters events to include only those with this organizer\'s email address Example: \"john.doe@example.com\"
* @param {string | null} [startDateGte] If provided, filters events to include only those with a start date greater than or equal to this timestamp Format: ISO-8601 string, e.g., \"2023-01-01T00:00:00Z\"
* @param {string | null} [startDateLte] If provided, filters events to include only those with a start date less than or equal to this timestamp Format: ISO-8601 string, e.g., \"2023-12-31T23:59:59Z\"
* @param {string | null} [status] Filter events by meeting status Valid values: \"upcoming\" (default) returns events after current time, \"past\" returns previous events, \"all\" returns both
* @param {string | null} [updatedAtGte] If provided, fetches only events updated at or after this timestamp Format: ISO-8601 string, e.g., \"2023-01-01T00:00:00Z\"
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listEvents(calendarId, attendeeEmail, cursor, organizerEmail, startDateGte, startDateLte, status, updatedAtGte, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.listEvents(calendarId, attendeeEmail, cursor, organizerEmail, startDateGte, startDateLte, status, updatedAtGte, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.listEvents']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Retrieves unprocessed calendar data directly from the provider (Google, Microsoft) using provided OAuth credentials. This endpoint is typically used during the initial setup process to allow users to select which calendars to integrate. Returns a list of available calendars with their unique IDs, email addresses, and primary status. This data is not persisted until a calendar is formally created using the create_calendar endpoint.
* @summary List Raw Calendars
* @param {ListRawCalendarsParams} listRawCalendarsParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async listRawCalendars(listRawCalendarsParams, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.listRawCalendars(listRawCalendarsParams, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.listRawCalendars']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Updates the configuration of a bot already scheduled to record an event. Allows modification of recording settings, webhook URLs, and other bot parameters without canceling and recreating the scheduled recording. For recurring events, the \'all_occurrences\' parameter determines whether changes apply to all instances or just the specific occurrence. Returns the updated event(s) with the modified bot parameters.
* @summary Patch Bot
* @param {string} uuid The UUID identifier
* @param {BotParam3} botParam3
* @param {boolean | null} [allOccurrences] schedule a bot to all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async patchBot(uuid, botParam3, allOccurrences, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.patchBot(uuid, botParam3, allOccurrences, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.patchBot']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Configures a bot to automatically join and record a specific calendar event at its scheduled time. The request body contains detailed bot configuration, including recording options, streaming settings, and webhook notification URLs. For recurring events, the \'all_occurrences\' parameter can be set to true to schedule recording for all instances of the recurring series, or false (default) to schedule only the specific instance. Returns the updated event(s) with the bot parameters attached.
* @summary Schedule Record Event
* @param {string} uuid The UUID identifier
* @param {BotParam2} botParam2
* @param {boolean | null} [allOccurrences] schedule a bot to all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async scheduleRecordEvent(uuid, botParam2, allOccurrences, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.scheduleRecordEvent(uuid, botParam2, allOccurrences, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.scheduleRecordEvent']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Cancels a previously scheduled recording for a calendar event and releases associated bot resources. For recurring events, the \'all_occurrences\' parameter controls whether to unschedule from all instances of the recurring series or just the specific occurrence. This operation is idempotent and will not error if no bot was scheduled. Returns the updated event(s) with the bot parameters removed.
* @summary Unschedule Record Event
* @param {string} uuid The UUID identifier
* @param {boolean | null} [allOccurrences] unschedule a bot from all occurences of a recurring event
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async unscheduleRecordEvent(uuid, allOccurrences, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.unscheduleRecordEvent(uuid, allOccurrences, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.unscheduleRecordEvent']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
/**
* Updates a calendar integration with new credentials or platform while maintaining the same UUID. This operation is performed as an atomic transaction to ensure data integrity. The system automatically unschedules existing bots to prevent duplicates, updates the calendar credentials, and triggers a full resync of all events. Useful when OAuth tokens need to be refreshed or when migrating a calendar between providers. Returns the updated calendar object with its new configuration.
* @summary Update Calendar
* @param {string} uuid The UUID identifier
* @param {UpdateCalendarParams} updateCalendarParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async updateCalendar(uuid, updateCalendarParams, options) {
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCalendar(uuid, updateCalendarParams, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = base_1.operationServerMap['CalendarsApi.updateCalendar']?.[localVarOperationServerIndex]?.url;
return (axios, basePath = '') => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, basePath, configuration)(axios, localVarOperationServerBasePath || basePath);
},
};
};
exports.CalendarsApiFp = CalendarsApiFp;
/**
* CalendarsApi - factory interface
* @export
*/
const CalendarsApiFactory = function (configuration, basePath, axios) {
const localVarFp = (0, exports.CalendarsApiFp)(configuration);
return {
/**
* Integrates a new calendar with the system using OAuth credentials. This endpoint establishes a connection with the calendar provider (Google, Microsoft), sets up webhook notifications for real-time updates, and performs an initial sync of all calendar events. It requires OAuth credentials (client ID, client secret, and refresh token) and the platform type. Once created, the calendar is assigned a unique UUID that should be used for all subsequent operations. Returns the newly created calendar object with all integration details.
* @summary Create Calendar
* @param {CalendarsApiCreateCalendarRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createCalendar(requestParameters, options) {
return localVarFp.createCalendar(requestParameters.createCalendarParams, options).then((request) => request(axios, basePath));
},
/**
* Permanently removes a calendar integration by its UUID, including all associated events and bot configurations. This operation cancels any active subscriptions with the calendar provider, stops all webhook notifications, and unschedules any pending recordings. All related resources are cleaned up in the database. This action cannot be undone, and subsequent requests to this calendar\'s UUID will return 404 Not Found errors.
* @summary Delete Calendar
* @param {CalendarsApiDeleteCalendarRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteCalendar(requestParameters, options) {
return localVarFp.deleteCalendar(requestParameters.uuid, options).then((request) => request(axios, basePath));
},
/**
* Retrieves detailed information about a specific calendar integration by its UUID. Returns comprehensive calendar data including the calendar name, email address, provider details (Google, Microsoft), sync status, and other metadata. This endpoint is useful for displaying calendar information to users or verifying the status of a calendar integration before performing operations on its events.
* @summary Get Calendar
* @param {CalendarsApiGetCalendarRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getCalendar(requestParameters, options) {
return localVarFp.getCalendar(requestParameters.uuid, options).then((request) => request(axios, basePath));
},
/**
* Retrieves comprehensive details about a specific calendar event by its UUID. Returns complete event information including title, meeting link, start and end times, organizer status, recurrence information, and the full list of attendees with their names and email addresses. Also includes any associated bot parameters if recording is scheduled for this event. The raw calendar data from the provider is also included for advanced use cases.
* @summary Get Event
* @param {CalendarsApiGetEventRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getEvent(requestParameters, options) {
return localVarFp.getEvent(requestParameters.uuid, options).then((request) => request(axios, basePath));
},
/**
* Retrieves all calendars that have been integrated with the system for the authenticated user. Returns a list of calendars with their names, email addresses, provider information, and sync status. This endpoint shows only calendars that have been formally connected through the create_calendar endpoint, not all available calendars from the provider.
* @summary List Calendars
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
listCalendars(options) {
return localVarFp.listCalendars(options).then((request)