@hostinger/mail-sdk 1.19.8 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.github/workflows/build-release.yaml +58 -35
  2. package/README.md +2 -2
  3. package/api.ts +2905 -760
  4. package/base.ts +1 -1
  5. package/common.ts +1 -1
  6. package/configuration.ts +2 -2
  7. package/dist/api.d.ts +2206 -720
  8. package/dist/api.js +1249 -6
  9. package/dist/base.d.ts +1 -1
  10. package/dist/base.js +1 -1
  11. package/dist/common.d.ts +1 -1
  12. package/dist/common.js +1 -1
  13. package/dist/configuration.d.ts +1 -1
  14. package/dist/configuration.js +2 -2
  15. package/dist/esm/api.d.ts +2206 -720
  16. package/dist/esm/api.js +1239 -5
  17. package/dist/esm/base.d.ts +1 -1
  18. package/dist/esm/base.js +1 -1
  19. package/dist/esm/common.d.ts +1 -1
  20. package/dist/esm/common.js +1 -1
  21. package/dist/esm/configuration.d.ts +1 -1
  22. package/dist/esm/configuration.js +2 -2
  23. package/dist/esm/index.d.ts +1 -1
  24. package/dist/esm/index.js +1 -1
  25. package/dist/index.d.ts +1 -1
  26. package/dist/index.js +1 -1
  27. package/docs/CalendarEventsApi.md +505 -0
  28. package/docs/CalendarsApi.md +317 -0
  29. package/docs/MessagesApi.md +3 -0
  30. package/docs/SendApi.md +2 -2
  31. package/docs/V1CalendarEventsAttendee.md +25 -0
  32. package/docs/V1CalendarEventsAttendeeInput.md +23 -0
  33. package/docs/V1CalendarEventsCollection.md +23 -0
  34. package/docs/V1CalendarEventsCollectionMeta.md +20 -0
  35. package/docs/V1CalendarEventsCreateRequest.md +43 -0
  36. package/docs/V1CalendarEventsEvent.md +61 -0
  37. package/docs/V1CalendarEventsEventListItem.md +43 -0
  38. package/docs/V1CalendarEventsOrganizer.md +23 -0
  39. package/docs/V1CalendarEventsRecurrenceDay.md +23 -0
  40. package/docs/V1CalendarEventsRecurrenceRule.md +35 -0
  41. package/docs/V1CalendarEventsReminder.md +23 -0
  42. package/docs/V1CalendarEventsReplyRequest.md +23 -0
  43. package/docs/V1CalendarEventsRescheduleRequest.md +33 -0
  44. package/docs/V1CalendarEventsResource.md +21 -0
  45. package/docs/V1CalendarEventsUpdateRequest.md +49 -0
  46. package/docs/V1CalendarsCalendar.md +31 -0
  47. package/docs/V1CalendarsCollection.md +23 -0
  48. package/docs/V1CalendarsCreateRequest.md +27 -0
  49. package/docs/V1CalendarsResource.md +21 -0
  50. package/docs/V1CalendarsUpdateRequest.md +27 -0
  51. package/index.ts +1 -1
  52. package/package.json +1 -1
package/dist/esm/api.js CHANGED
@@ -3,7 +3,7 @@
3
3
  /**
4
4
  * Hostinger Mail API
5
5
  *
6
- * API Version: 1.3.0
6
+ * API Version: 1.4.0
7
7
  *
8
8
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
9
9
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -23,6 +23,83 @@ import globalAxios from 'axios';
23
23
  import { DUMMY_BASE_URL, assertParamExists, encodePathParam, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
24
24
  // @ts-ignore
25
25
  import { BASE_PATH, BaseAPI, operationServerMap } from './base';
26
+ export const V1CalendarEventsAttendeeParticipationStatusEnum = {
27
+ NeedsAction: 'NEEDS-ACTION',
28
+ Accepted: 'ACCEPTED',
29
+ Declined: 'DECLINED',
30
+ Tentative: 'TENTATIVE',
31
+ Delegated: 'DELEGATED'
32
+ };
33
+ export const V1CalendarEventsEventParticipationStatusEnum = {
34
+ NeedsAction: 'NEEDS-ACTION',
35
+ Accepted: 'ACCEPTED',
36
+ Declined: 'DECLINED',
37
+ Tentative: 'TENTATIVE',
38
+ Delegated: 'DELEGATED'
39
+ };
40
+ export const V1CalendarEventsEventStatusEnum = {
41
+ Confirmed: 'CONFIRMED',
42
+ Cancelled: 'CANCELLED'
43
+ };
44
+ export const V1CalendarEventsEventListItemParticipationStatusEnum = {
45
+ NeedsAction: 'NEEDS-ACTION',
46
+ Accepted: 'ACCEPTED',
47
+ Declined: 'DECLINED',
48
+ Tentative: 'TENTATIVE',
49
+ Delegated: 'DELEGATED'
50
+ };
51
+ export const V1CalendarEventsEventListItemStatusEnum = {
52
+ Confirmed: 'CONFIRMED',
53
+ Cancelled: 'CANCELLED'
54
+ };
55
+ export const V1CalendarEventsRecurrenceDayDayEnum = {
56
+ Monday: 'monday',
57
+ Tuesday: 'tuesday',
58
+ Wednesday: 'wednesday',
59
+ Thursday: 'thursday',
60
+ Friday: 'friday',
61
+ Saturday: 'saturday',
62
+ Sunday: 'sunday'
63
+ };
64
+ export const V1CalendarEventsRecurrenceRuleFrequencyEnum = {
65
+ Secondly: 'SECONDLY',
66
+ Minutely: 'MINUTELY',
67
+ Hourly: 'HOURLY',
68
+ Daily: 'DAILY',
69
+ Weekly: 'WEEKLY',
70
+ Monthly: 'MONTHLY',
71
+ Yearly: 'YEARLY'
72
+ };
73
+ export const V1CalendarEventsRecurrenceRuleWeekStartEnum = {
74
+ Monday: 'monday',
75
+ Tuesday: 'tuesday',
76
+ Wednesday: 'wednesday',
77
+ Thursday: 'thursday',
78
+ Friday: 'friday',
79
+ Saturday: 'saturday',
80
+ Sunday: 'sunday'
81
+ };
82
+ export const V1CalendarEventsReminderUnitEnum = {
83
+ Minutes: 'minutes',
84
+ Hours: 'hours',
85
+ Days: 'days',
86
+ Weeks: 'weeks'
87
+ };
88
+ export const V1CalendarEventsReplyRequestParticipationStatusEnum = {
89
+ Accepted: 'ACCEPTED',
90
+ Declined: 'DECLINED',
91
+ Tentative: 'TENTATIVE'
92
+ };
93
+ export const V1CalendarEventsRescheduleRequestScopeEnum = {
94
+ This: 'this',
95
+ Future: 'future',
96
+ All: 'all'
97
+ };
98
+ export const V1CalendarEventsUpdateRequestScopeEnum = {
99
+ This: 'this',
100
+ Future: 'future',
101
+ All: 'all'
102
+ };
26
103
  export const V1WebhooksCreateRequestEventsEnum = {
27
104
  MessageReceived: 'message.received'
28
105
  };
@@ -150,6 +227,1163 @@ export class AccountApi extends BaseAPI {
150
227
  return AccountApiFp(this.configuration).getCurrentAccount(options).then((request) => request(this.axios, this.basePath));
151
228
  }
152
229
  }
230
+ /**
231
+ * CalendarEventsApi - axios parameter creator
232
+ * @export
233
+ */
234
+ export const CalendarEventsApiAxiosParamCreator = function (configuration) {
235
+ return {
236
+ /**
237
+ * Create an event in one calendar of the mailbox. `calendarUuid` comes from `listCalendars`: use the calendar with `default` true unless another one is named. A calendar the mailbox can only read is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. The mailbox becomes the organizer and every address in `attendees` immediately receives an email invitation, which cannot be recalled. Without attendees no email is sent. A timed event needs `allDay` false, `start`, `end` and `timeZone`. An all-day event needs `allDay` true and a `start` date; `end` is optional. Set `recurrenceRule` for a repeating event and `reminder` for an alarm. Returns the created event. Its `uuid` is the `eventUuid` for `getCalendarEvent`, `updateCalendarEvent`, `rescheduleCalendarEvent` and `deleteCalendarEvent`.
238
+ * @summary Create calendar event
239
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
240
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
241
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ createCalendarEvent: (mailboxResourceId_1, calendarUuid_1, v1CalendarEventsCreateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, v1CalendarEventsCreateRequest_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options = {}) {
246
+ // verify required parameter 'mailboxResourceId' is not null or undefined
247
+ assertParamExists('createCalendarEvent', 'mailboxResourceId', mailboxResourceId);
248
+ // verify required parameter 'calendarUuid' is not null or undefined
249
+ assertParamExists('createCalendarEvent', 'calendarUuid', calendarUuid);
250
+ // verify required parameter 'v1CalendarEventsCreateRequest' is not null or undefined
251
+ assertParamExists('createCalendarEvent', 'v1CalendarEventsCreateRequest', v1CalendarEventsCreateRequest);
252
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events`
253
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
254
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid));
255
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
256
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
257
+ let baseOptions;
258
+ if (configuration) {
259
+ baseOptions = configuration.baseOptions;
260
+ }
261
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
262
+ const localVarHeaderParameter = {};
263
+ const localVarQueryParameter = {};
264
+ // authentication BearerAuth required
265
+ // http bearer authentication required
266
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
267
+ localVarHeaderParameter['Content-Type'] = 'application/json';
268
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
271
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarEventsCreateRequest, localVarRequestOptions, configuration);
272
+ return {
273
+ url: toPathString(localVarUrlObj),
274
+ options: localVarRequestOptions,
275
+ };
276
+ }),
277
+ /**
278
+ * Delete an event, one occurrence of a recurring event, or a recurring event from one occurrence on. This cannot be undone. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. For a one-off event omit `scope` and `recurrenceId`. For a recurring event, `scope` `this` removes only the occurrence at `recurrenceId`, `future` removes it and every later one, `all` (the default) deletes the whole series. An event with `editable` true can be deleted with any scope, and its attendees receive a cancellation or the updated series by email. An invitation from someone else on the own calendar of the mailbox can be deleted with `all` or `this`: the organizer receives a decline for the removed occurrences. Any other event is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. `notifyAttendees` false deletes without sending any email.
279
+ * @summary Delete calendar event
280
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
281
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
282
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
283
+ * @param {DeleteCalendarEventScopeEnum} [scope] For a recurring event: `this` removes the occurrence at `recurrenceId`, `future` removes it and every later one, `all` deletes the whole series. Omitted means `all`. Required when `recurrenceId` is sent.
284
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Required when `scope` is `this` or `future`. A value that matches no occurrence, or any value on a one-off event, returns `404`.
285
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
286
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is deleted and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ deleteCalendarEvent: (mailboxResourceId_1, calendarUuid_1, eventUuid_1, scope_1, recurrenceId_1, notifyAttendees_1, ifMatch_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, eventUuid_1, scope_1, recurrenceId_1, notifyAttendees_1, ifMatch_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options = {}) {
291
+ // verify required parameter 'mailboxResourceId' is not null or undefined
292
+ assertParamExists('deleteCalendarEvent', 'mailboxResourceId', mailboxResourceId);
293
+ // verify required parameter 'calendarUuid' is not null or undefined
294
+ assertParamExists('deleteCalendarEvent', 'calendarUuid', calendarUuid);
295
+ // verify required parameter 'eventUuid' is not null or undefined
296
+ assertParamExists('deleteCalendarEvent', 'eventUuid', eventUuid);
297
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
298
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
299
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid))
300
+ .replace(`{${"eventUuid"}}`, encodePathParam('eventUuid', eventUuid));
301
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
302
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
303
+ let baseOptions;
304
+ if (configuration) {
305
+ baseOptions = configuration.baseOptions;
306
+ }
307
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
308
+ const localVarHeaderParameter = {};
309
+ const localVarQueryParameter = {};
310
+ // authentication BearerAuth required
311
+ // http bearer authentication required
312
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
313
+ if (scope !== undefined) {
314
+ localVarQueryParameter['scope'] = scope;
315
+ }
316
+ if (recurrenceId !== undefined) {
317
+ localVarQueryParameter['recurrenceId'] = (recurrenceId instanceof Date) ?
318
+ recurrenceId.toISOString() :
319
+ recurrenceId;
320
+ }
321
+ if (notifyAttendees !== undefined) {
322
+ localVarQueryParameter['notifyAttendees'] = notifyAttendees;
323
+ }
324
+ if (ifMatch != null) {
325
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
326
+ }
327
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
328
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ return {
331
+ url: toPathString(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ };
334
+ }),
335
+ /**
336
+ * Retrieve the full details of one event: title, times, description, location, meeting link, recurrence rule, reminder, organizer, attendees with their answers, and its `etag`. `calendarUuid` and `eventUuid` come from `listCalendarEvents` (the `calendarUuid` and `uuid` of an item). For one occurrence of a recurring event pass the `recurrenceId` of the item; without it the whole series is returned and `recurrenceId` is null. A `recurrenceId` that matches no occurrence returns `404`. Call it before `updateCalendarEvent`, which replaces every field, so the values that should stay can be sent back. `replyable` true means the mailbox was invited by someone else and can answer with `replyToCalendarEvent`. `editable` true means the event can be changed or moved.
337
+ * @summary Get calendar event
338
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
339
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
340
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
341
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Omit it for a one-off event or for the whole series.
342
+ * @param {*} [options] Override http request option.
343
+ * @throws {RequiredError}
344
+ */
345
+ getCalendarEvent: (mailboxResourceId_1, calendarUuid_1, eventUuid_1, recurrenceId_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, eventUuid_1, recurrenceId_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options = {}) {
346
+ // verify required parameter 'mailboxResourceId' is not null or undefined
347
+ assertParamExists('getCalendarEvent', 'mailboxResourceId', mailboxResourceId);
348
+ // verify required parameter 'calendarUuid' is not null or undefined
349
+ assertParamExists('getCalendarEvent', 'calendarUuid', calendarUuid);
350
+ // verify required parameter 'eventUuid' is not null or undefined
351
+ assertParamExists('getCalendarEvent', 'eventUuid', eventUuid);
352
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
353
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
354
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid))
355
+ .replace(`{${"eventUuid"}}`, encodePathParam('eventUuid', eventUuid));
356
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
357
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
358
+ let baseOptions;
359
+ if (configuration) {
360
+ baseOptions = configuration.baseOptions;
361
+ }
362
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
363
+ const localVarHeaderParameter = {};
364
+ const localVarQueryParameter = {};
365
+ // authentication BearerAuth required
366
+ // http bearer authentication required
367
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
368
+ if (recurrenceId !== undefined) {
369
+ localVarQueryParameter['recurrenceId'] = (recurrenceId instanceof Date) ?
370
+ recurrenceId.toISOString() :
371
+ recurrenceId;
372
+ }
373
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
374
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
375
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
376
+ return {
377
+ url: toPathString(localVarUrlObj),
378
+ options: localVarRequestOptions,
379
+ };
380
+ }),
381
+ /**
382
+ * List the events of one calendar that overlap a time range. It covers one calendar only: get the calendars from `listCalendars` and call it for each. The range runs from `start` (inclusive) to `end` (exclusive), at most 32 days; for a longer period call it again with the next range. Recurring events are expanded: each occurrence is a separate item with the same `uuid` and its own `recurrenceId`. Results are not paginated. Items hold summary fields only. For description, location, attendees and organizer call `getCalendarEvent` with the `calendarUuid`, `uuid` (as `eventUuid`) and `recurrenceId` of the item. Times are in UTC; `timeZone` is the zone the event was created in. `participationStatus` is the answer of the mailbox to an invitation from someone else, null for its own events. `status` CANCELLED means the organizer cancelled the event.
383
+ * @summary List calendar events
384
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
385
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
386
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
387
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
388
+ * @param {string} [timeZone] IANA time zone used to place all-day events and events without a time zone on days, also across a daylight saving change. Defaults to the fixed offset of `start`.
389
+ * @param {*} [options] Override http request option.
390
+ * @throws {RequiredError}
391
+ */
392
+ listCalendarEvents: (mailboxResourceId_1, calendarUuid_1, start_1, end_1, timeZone_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, start_1, end_1, timeZone_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, start, end, timeZone, options = {}) {
393
+ // verify required parameter 'mailboxResourceId' is not null or undefined
394
+ assertParamExists('listCalendarEvents', 'mailboxResourceId', mailboxResourceId);
395
+ // verify required parameter 'calendarUuid' is not null or undefined
396
+ assertParamExists('listCalendarEvents', 'calendarUuid', calendarUuid);
397
+ // verify required parameter 'start' is not null or undefined
398
+ assertParamExists('listCalendarEvents', 'start', start);
399
+ // verify required parameter 'end' is not null or undefined
400
+ assertParamExists('listCalendarEvents', 'end', end);
401
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events`
402
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
403
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid));
404
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
405
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
406
+ let baseOptions;
407
+ if (configuration) {
408
+ baseOptions = configuration.baseOptions;
409
+ }
410
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
411
+ const localVarHeaderParameter = {};
412
+ const localVarQueryParameter = {};
413
+ // authentication BearerAuth required
414
+ // http bearer authentication required
415
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
416
+ if (start !== undefined) {
417
+ localVarQueryParameter['start'] = (start instanceof Date) ?
418
+ start.toISOString() :
419
+ start;
420
+ }
421
+ if (end !== undefined) {
422
+ localVarQueryParameter['end'] = (end instanceof Date) ?
423
+ end.toISOString() :
424
+ end;
425
+ }
426
+ if (timeZone !== undefined) {
427
+ localVarQueryParameter['timeZone'] = timeZone;
428
+ }
429
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
430
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
431
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
432
+ return {
433
+ url: toPathString(localVarUrlObj),
434
+ options: localVarRequestOptions,
435
+ };
436
+ }),
437
+ /**
438
+ * Answer an invitation from someone else: accept, decline or tentatively accept. It saves the answer on the event and emails it to the organizer, which cannot be recalled. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. It works only when `getCalendarEvent` returns `replyable` true. An event the mailbox organizes or is not invited to is rejected with `403` and code `ERR_EVENT_NOT_REPLYABLE`, an event the organizer cancelled with `409` and code `ERR_EVENT_CANCELLED`. Send the `recurrenceId` of an item to answer one occurrence of a recurring event, or omit it to answer the whole series. Returns the event with the new `participationStatus`.
439
+ * @summary Reply to calendar event
440
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
441
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
442
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
443
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
444
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, the answer is not saved and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ replyToCalendarEvent: (mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsReplyRequest_1, ifMatch_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsReplyRequest_1, ifMatch_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options = {}) {
449
+ // verify required parameter 'mailboxResourceId' is not null or undefined
450
+ assertParamExists('replyToCalendarEvent', 'mailboxResourceId', mailboxResourceId);
451
+ // verify required parameter 'calendarUuid' is not null or undefined
452
+ assertParamExists('replyToCalendarEvent', 'calendarUuid', calendarUuid);
453
+ // verify required parameter 'eventUuid' is not null or undefined
454
+ assertParamExists('replyToCalendarEvent', 'eventUuid', eventUuid);
455
+ // verify required parameter 'v1CalendarEventsReplyRequest' is not null or undefined
456
+ assertParamExists('replyToCalendarEvent', 'v1CalendarEventsReplyRequest', v1CalendarEventsReplyRequest);
457
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}/reply`
458
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
459
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid))
460
+ .replace(`{${"eventUuid"}}`, encodePathParam('eventUuid', eventUuid));
461
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
462
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
463
+ let baseOptions;
464
+ if (configuration) {
465
+ baseOptions = configuration.baseOptions;
466
+ }
467
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
468
+ const localVarHeaderParameter = {};
469
+ const localVarQueryParameter = {};
470
+ // authentication BearerAuth required
471
+ // http bearer authentication required
472
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
473
+ localVarHeaderParameter['Content-Type'] = 'application/json';
474
+ if (ifMatch != null) {
475
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
476
+ }
477
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
478
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
479
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
480
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarEventsReplyRequest, localVarRequestOptions, configuration);
481
+ return {
482
+ url: toPathString(localVarUrlObj),
483
+ options: localVarRequestOptions,
484
+ };
485
+ }),
486
+ /**
487
+ * Move an event to another time or change its length, keeping everything else (title, attendees, description and so on) as stored, so the event does not have to be fetched first. To change other fields use `updateCalendarEvent`. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. Only an event with `editable` true can be moved; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` moves only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) moves the whole series: only the time of day and the length apply and the series keeps the date of its first occurrence. Attendees receive an email update unless `notifyAttendees` is false. Returns the moved event, or the moved occurrence for `scope` `this`.
488
+ * @summary Reschedule calendar event
489
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
490
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
491
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
492
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
493
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
494
+ * @param {*} [options] Override http request option.
495
+ * @throws {RequiredError}
496
+ */
497
+ rescheduleCalendarEvent: (mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsRescheduleRequest_1, ifMatch_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsRescheduleRequest_1, ifMatch_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options = {}) {
498
+ // verify required parameter 'mailboxResourceId' is not null or undefined
499
+ assertParamExists('rescheduleCalendarEvent', 'mailboxResourceId', mailboxResourceId);
500
+ // verify required parameter 'calendarUuid' is not null or undefined
501
+ assertParamExists('rescheduleCalendarEvent', 'calendarUuid', calendarUuid);
502
+ // verify required parameter 'eventUuid' is not null or undefined
503
+ assertParamExists('rescheduleCalendarEvent', 'eventUuid', eventUuid);
504
+ // verify required parameter 'v1CalendarEventsRescheduleRequest' is not null or undefined
505
+ assertParamExists('rescheduleCalendarEvent', 'v1CalendarEventsRescheduleRequest', v1CalendarEventsRescheduleRequest);
506
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}/reschedule`
507
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
508
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid))
509
+ .replace(`{${"eventUuid"}}`, encodePathParam('eventUuid', eventUuid));
510
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
511
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
512
+ let baseOptions;
513
+ if (configuration) {
514
+ baseOptions = configuration.baseOptions;
515
+ }
516
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
517
+ const localVarHeaderParameter = {};
518
+ const localVarQueryParameter = {};
519
+ // authentication BearerAuth required
520
+ // http bearer authentication required
521
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
522
+ localVarHeaderParameter['Content-Type'] = 'application/json';
523
+ if (ifMatch != null) {
524
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
525
+ }
526
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
527
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
528
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
529
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarEventsRescheduleRequest, localVarRequestOptions, configuration);
530
+ return {
531
+ url: toPathString(localVarUrlObj),
532
+ options: localVarRequestOptions,
533
+ };
534
+ }),
535
+ /**
536
+ * Change the details of an event: title, times, description, location, attendees, recurrence and so on. Every field replaces the stored value and an omitted optional field is cleared, so call `getCalendarEvent` first and send back the values that should stay. To only move an event in time, use `rescheduleCalendarEvent`. Only an event with `editable` true can be changed; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` changes only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) changes the whole series, keeping the date of its first occurrence. Attendees receive an email update, added attendees an invitation and removed ones a cancellation, unless `notifyAttendees` is false. Returns the changed event, or the changed occurrence for `scope` `this`.
537
+ * @summary Update calendar event
538
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
539
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
540
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
541
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
542
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
543
+ * @param {*} [options] Override http request option.
544
+ * @throws {RequiredError}
545
+ */
546
+ updateCalendarEvent: (mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsUpdateRequest_1, ifMatch_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, eventUuid_1, v1CalendarEventsUpdateRequest_1, ifMatch_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options = {}) {
547
+ // verify required parameter 'mailboxResourceId' is not null or undefined
548
+ assertParamExists('updateCalendarEvent', 'mailboxResourceId', mailboxResourceId);
549
+ // verify required parameter 'calendarUuid' is not null or undefined
550
+ assertParamExists('updateCalendarEvent', 'calendarUuid', calendarUuid);
551
+ // verify required parameter 'eventUuid' is not null or undefined
552
+ assertParamExists('updateCalendarEvent', 'eventUuid', eventUuid);
553
+ // verify required parameter 'v1CalendarEventsUpdateRequest' is not null or undefined
554
+ assertParamExists('updateCalendarEvent', 'v1CalendarEventsUpdateRequest', v1CalendarEventsUpdateRequest);
555
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
556
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
557
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid))
558
+ .replace(`{${"eventUuid"}}`, encodePathParam('eventUuid', eventUuid));
559
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
560
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
561
+ let baseOptions;
562
+ if (configuration) {
563
+ baseOptions = configuration.baseOptions;
564
+ }
565
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
566
+ const localVarHeaderParameter = {};
567
+ const localVarQueryParameter = {};
568
+ // authentication BearerAuth required
569
+ // http bearer authentication required
570
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
571
+ localVarHeaderParameter['Content-Type'] = 'application/json';
572
+ if (ifMatch != null) {
573
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
574
+ }
575
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
576
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
577
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
578
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarEventsUpdateRequest, localVarRequestOptions, configuration);
579
+ return {
580
+ url: toPathString(localVarUrlObj),
581
+ options: localVarRequestOptions,
582
+ };
583
+ }),
584
+ };
585
+ };
586
+ /**
587
+ * CalendarEventsApi - functional programming interface
588
+ * @export
589
+ */
590
+ export const CalendarEventsApiFp = function (configuration) {
591
+ const localVarAxiosParamCreator = CalendarEventsApiAxiosParamCreator(configuration);
592
+ return {
593
+ /**
594
+ * Create an event in one calendar of the mailbox. `calendarUuid` comes from `listCalendars`: use the calendar with `default` true unless another one is named. A calendar the mailbox can only read is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. The mailbox becomes the organizer and every address in `attendees` immediately receives an email invitation, which cannot be recalled. Without attendees no email is sent. A timed event needs `allDay` false, `start`, `end` and `timeZone`. An all-day event needs `allDay` true and a `start` date; `end` is optional. Set `recurrenceRule` for a repeating event and `reminder` for an alarm. Returns the created event. Its `uuid` is the `eventUuid` for `getCalendarEvent`, `updateCalendarEvent`, `rescheduleCalendarEvent` and `deleteCalendarEvent`.
595
+ * @summary Create calendar event
596
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
597
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
598
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
599
+ * @param {*} [options] Override http request option.
600
+ * @throws {RequiredError}
601
+ */
602
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
603
+ return __awaiter(this, void 0, void 0, function* () {
604
+ var _a, _b;
605
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options);
606
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.createCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
607
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
608
+ });
609
+ },
610
+ /**
611
+ * Delete an event, one occurrence of a recurring event, or a recurring event from one occurrence on. This cannot be undone. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. For a one-off event omit `scope` and `recurrenceId`. For a recurring event, `scope` `this` removes only the occurrence at `recurrenceId`, `future` removes it and every later one, `all` (the default) deletes the whole series. An event with `editable` true can be deleted with any scope, and its attendees receive a cancellation or the updated series by email. An invitation from someone else on the own calendar of the mailbox can be deleted with `all` or `this`: the organizer receives a decline for the removed occurrences. Any other event is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. `notifyAttendees` false deletes without sending any email.
612
+ * @summary Delete calendar event
613
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
614
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
615
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
616
+ * @param {DeleteCalendarEventScopeEnum} [scope] For a recurring event: `this` removes the occurrence at `recurrenceId`, `future` removes it and every later one, `all` deletes the whole series. Omitted means `all`. Required when `recurrenceId` is sent.
617
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Required when `scope` is `this` or `future`. A value that matches no occurrence, or any value on a one-off event, returns `404`.
618
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
619
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is deleted and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
624
+ return __awaiter(this, void 0, void 0, function* () {
625
+ var _a, _b;
626
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options);
627
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.deleteCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
628
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
629
+ });
630
+ },
631
+ /**
632
+ * Retrieve the full details of one event: title, times, description, location, meeting link, recurrence rule, reminder, organizer, attendees with their answers, and its `etag`. `calendarUuid` and `eventUuid` come from `listCalendarEvents` (the `calendarUuid` and `uuid` of an item). For one occurrence of a recurring event pass the `recurrenceId` of the item; without it the whole series is returned and `recurrenceId` is null. A `recurrenceId` that matches no occurrence returns `404`. Call it before `updateCalendarEvent`, which replaces every field, so the values that should stay can be sent back. `replyable` true means the mailbox was invited by someone else and can answer with `replyToCalendarEvent`. `editable` true means the event can be changed or moved.
633
+ * @summary Get calendar event
634
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
635
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
636
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
637
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Omit it for a one-off event or for the whole series.
638
+ * @param {*} [options] Override http request option.
639
+ * @throws {RequiredError}
640
+ */
641
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
642
+ return __awaiter(this, void 0, void 0, function* () {
643
+ var _a, _b;
644
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options);
645
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.getCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
646
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
647
+ });
648
+ },
649
+ /**
650
+ * List the events of one calendar that overlap a time range. It covers one calendar only: get the calendars from `listCalendars` and call it for each. The range runs from `start` (inclusive) to `end` (exclusive), at most 32 days; for a longer period call it again with the next range. Recurring events are expanded: each occurrence is a separate item with the same `uuid` and its own `recurrenceId`. Results are not paginated. Items hold summary fields only. For description, location, attendees and organizer call `getCalendarEvent` with the `calendarUuid`, `uuid` (as `eventUuid`) and `recurrenceId` of the item. Times are in UTC; `timeZone` is the zone the event was created in. `participationStatus` is the answer of the mailbox to an invitation from someone else, null for its own events. `status` CANCELLED means the organizer cancelled the event.
651
+ * @summary List calendar events
652
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
653
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
654
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
655
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
656
+ * @param {string} [timeZone] IANA time zone used to place all-day events and events without a time zone on days, also across a daylight saving change. Defaults to the fixed offset of `start`.
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ */
660
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
661
+ return __awaiter(this, void 0, void 0, function* () {
662
+ var _a, _b;
663
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options);
664
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.listCalendarEvents']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
665
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
666
+ });
667
+ },
668
+ /**
669
+ * Answer an invitation from someone else: accept, decline or tentatively accept. It saves the answer on the event and emails it to the organizer, which cannot be recalled. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. It works only when `getCalendarEvent` returns `replyable` true. An event the mailbox organizes or is not invited to is rejected with `403` and code `ERR_EVENT_NOT_REPLYABLE`, an event the organizer cancelled with `409` and code `ERR_EVENT_CANCELLED`. Send the `recurrenceId` of an item to answer one occurrence of a recurring event, or omit it to answer the whole series. Returns the event with the new `participationStatus`.
670
+ * @summary Reply to calendar event
671
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
672
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
673
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
674
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
675
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, the answer is not saved and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
676
+ * @param {*} [options] Override http request option.
677
+ * @throws {RequiredError}
678
+ */
679
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
680
+ return __awaiter(this, void 0, void 0, function* () {
681
+ var _a, _b;
682
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options);
683
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.replyToCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
684
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
685
+ });
686
+ },
687
+ /**
688
+ * Move an event to another time or change its length, keeping everything else (title, attendees, description and so on) as stored, so the event does not have to be fetched first. To change other fields use `updateCalendarEvent`. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. Only an event with `editable` true can be moved; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` moves only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) moves the whole series: only the time of day and the length apply and the series keeps the date of its first occurrence. Attendees receive an email update unless `notifyAttendees` is false. Returns the moved event, or the moved occurrence for `scope` `this`.
689
+ * @summary Reschedule calendar event
690
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
691
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
692
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
693
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
694
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ */
698
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
699
+ return __awaiter(this, void 0, void 0, function* () {
700
+ var _a, _b;
701
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options);
702
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.rescheduleCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
703
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
704
+ });
705
+ },
706
+ /**
707
+ * Change the details of an event: title, times, description, location, attendees, recurrence and so on. Every field replaces the stored value and an omitted optional field is cleared, so call `getCalendarEvent` first and send back the values that should stay. To only move an event in time, use `rescheduleCalendarEvent`. Only an event with `editable` true can be changed; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` changes only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) changes the whole series, keeping the date of its first occurrence. Attendees receive an email update, added attendees an invitation and removed ones a cancellation, unless `notifyAttendees` is false. Returns the changed event, or the changed occurrence for `scope` `this`.
708
+ * @summary Update calendar event
709
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
710
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
711
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
712
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
713
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
714
+ * @param {*} [options] Override http request option.
715
+ * @throws {RequiredError}
716
+ */
717
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
718
+ return __awaiter(this, void 0, void 0, function* () {
719
+ var _a, _b;
720
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options);
721
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarEventsApi.updateCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
722
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
723
+ });
724
+ },
725
+ };
726
+ };
727
+ /**
728
+ * CalendarEventsApi - factory interface
729
+ * @export
730
+ */
731
+ export const CalendarEventsApiFactory = function (configuration, basePath, axios) {
732
+ const localVarFp = CalendarEventsApiFp(configuration);
733
+ return {
734
+ /**
735
+ * Create an event in one calendar of the mailbox. `calendarUuid` comes from `listCalendars`: use the calendar with `default` true unless another one is named. A calendar the mailbox can only read is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. The mailbox becomes the organizer and every address in `attendees` immediately receives an email invitation, which cannot be recalled. Without attendees no email is sent. A timed event needs `allDay` false, `start`, `end` and `timeZone`. An all-day event needs `allDay` true and a `start` date; `end` is optional. Set `recurrenceRule` for a repeating event and `reminder` for an alarm. Returns the created event. Its `uuid` is the `eventUuid` for `getCalendarEvent`, `updateCalendarEvent`, `rescheduleCalendarEvent` and `deleteCalendarEvent`.
736
+ * @summary Create calendar event
737
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
738
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
739
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
740
+ * @param {*} [options] Override http request option.
741
+ * @throws {RequiredError}
742
+ */
743
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
744
+ return localVarFp.createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options).then((request) => request(axios, basePath));
745
+ },
746
+ /**
747
+ * Delete an event, one occurrence of a recurring event, or a recurring event from one occurrence on. This cannot be undone. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. For a one-off event omit `scope` and `recurrenceId`. For a recurring event, `scope` `this` removes only the occurrence at `recurrenceId`, `future` removes it and every later one, `all` (the default) deletes the whole series. An event with `editable` true can be deleted with any scope, and its attendees receive a cancellation or the updated series by email. An invitation from someone else on the own calendar of the mailbox can be deleted with `all` or `this`: the organizer receives a decline for the removed occurrences. Any other event is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. `notifyAttendees` false deletes without sending any email.
748
+ * @summary Delete calendar event
749
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
750
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
751
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
752
+ * @param {DeleteCalendarEventScopeEnum} [scope] For a recurring event: `this` removes the occurrence at `recurrenceId`, `future` removes it and every later one, `all` deletes the whole series. Omitted means `all`. Required when `recurrenceId` is sent.
753
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Required when `scope` is `this` or `future`. A value that matches no occurrence, or any value on a one-off event, returns `404`.
754
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
755
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is deleted and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ */
759
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
760
+ return localVarFp.deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options).then((request) => request(axios, basePath));
761
+ },
762
+ /**
763
+ * Retrieve the full details of one event: title, times, description, location, meeting link, recurrence rule, reminder, organizer, attendees with their answers, and its `etag`. `calendarUuid` and `eventUuid` come from `listCalendarEvents` (the `calendarUuid` and `uuid` of an item). For one occurrence of a recurring event pass the `recurrenceId` of the item; without it the whole series is returned and `recurrenceId` is null. A `recurrenceId` that matches no occurrence returns `404`. Call it before `updateCalendarEvent`, which replaces every field, so the values that should stay can be sent back. `replyable` true means the mailbox was invited by someone else and can answer with `replyToCalendarEvent`. `editable` true means the event can be changed or moved.
764
+ * @summary Get calendar event
765
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
766
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
767
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
768
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Omit it for a one-off event or for the whole series.
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ */
772
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
773
+ return localVarFp.getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options).then((request) => request(axios, basePath));
774
+ },
775
+ /**
776
+ * List the events of one calendar that overlap a time range. It covers one calendar only: get the calendars from `listCalendars` and call it for each. The range runs from `start` (inclusive) to `end` (exclusive), at most 32 days; for a longer period call it again with the next range. Recurring events are expanded: each occurrence is a separate item with the same `uuid` and its own `recurrenceId`. Results are not paginated. Items hold summary fields only. For description, location, attendees and organizer call `getCalendarEvent` with the `calendarUuid`, `uuid` (as `eventUuid`) and `recurrenceId` of the item. Times are in UTC; `timeZone` is the zone the event was created in. `participationStatus` is the answer of the mailbox to an invitation from someone else, null for its own events. `status` CANCELLED means the organizer cancelled the event.
777
+ * @summary List calendar events
778
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
779
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
780
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
781
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
782
+ * @param {string} [timeZone] IANA time zone used to place all-day events and events without a time zone on days, also across a daylight saving change. Defaults to the fixed offset of `start`.
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ */
786
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
787
+ return localVarFp.listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options).then((request) => request(axios, basePath));
788
+ },
789
+ /**
790
+ * Answer an invitation from someone else: accept, decline or tentatively accept. It saves the answer on the event and emails it to the organizer, which cannot be recalled. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. It works only when `getCalendarEvent` returns `replyable` true. An event the mailbox organizes or is not invited to is rejected with `403` and code `ERR_EVENT_NOT_REPLYABLE`, an event the organizer cancelled with `409` and code `ERR_EVENT_CANCELLED`. Send the `recurrenceId` of an item to answer one occurrence of a recurring event, or omit it to answer the whole series. Returns the event with the new `participationStatus`.
791
+ * @summary Reply to calendar event
792
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
793
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
794
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
795
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
796
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, the answer is not saved and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
797
+ * @param {*} [options] Override http request option.
798
+ * @throws {RequiredError}
799
+ */
800
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
801
+ return localVarFp.replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options).then((request) => request(axios, basePath));
802
+ },
803
+ /**
804
+ * Move an event to another time or change its length, keeping everything else (title, attendees, description and so on) as stored, so the event does not have to be fetched first. To change other fields use `updateCalendarEvent`. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. Only an event with `editable` true can be moved; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` moves only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) moves the whole series: only the time of day and the length apply and the series keeps the date of its first occurrence. Attendees receive an email update unless `notifyAttendees` is false. Returns the moved event, or the moved occurrence for `scope` `this`.
805
+ * @summary Reschedule calendar event
806
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
807
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
808
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
809
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
810
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
811
+ * @param {*} [options] Override http request option.
812
+ * @throws {RequiredError}
813
+ */
814
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
815
+ return localVarFp.rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options).then((request) => request(axios, basePath));
816
+ },
817
+ /**
818
+ * Change the details of an event: title, times, description, location, attendees, recurrence and so on. Every field replaces the stored value and an omitted optional field is cleared, so call `getCalendarEvent` first and send back the values that should stay. To only move an event in time, use `rescheduleCalendarEvent`. Only an event with `editable` true can be changed; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` changes only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) changes the whole series, keeping the date of its first occurrence. Attendees receive an email update, added attendees an invitation and removed ones a cancellation, unless `notifyAttendees` is false. Returns the changed event, or the changed occurrence for `scope` `this`.
819
+ * @summary Update calendar event
820
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
821
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
822
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
823
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
824
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
825
+ * @param {*} [options] Override http request option.
826
+ * @throws {RequiredError}
827
+ */
828
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
829
+ return localVarFp.updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options).then((request) => request(axios, basePath));
830
+ },
831
+ };
832
+ };
833
+ /**
834
+ * CalendarEventsApi - object-oriented interface
835
+ * @export
836
+ * @class CalendarEventsApi
837
+ * @extends {BaseAPI}
838
+ */
839
+ export class CalendarEventsApi extends BaseAPI {
840
+ /**
841
+ * Create an event in one calendar of the mailbox. `calendarUuid` comes from `listCalendars`: use the calendar with `default` true unless another one is named. A calendar the mailbox can only read is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. The mailbox becomes the organizer and every address in `attendees` immediately receives an email invitation, which cannot be recalled. Without attendees no email is sent. A timed event needs `allDay` false, `start`, `end` and `timeZone`. An all-day event needs `allDay` true and a `start` date; `end` is optional. Set `recurrenceRule` for a repeating event and `reminder` for an alarm. Returns the created event. Its `uuid` is the `eventUuid` for `getCalendarEvent`, `updateCalendarEvent`, `rescheduleCalendarEvent` and `deleteCalendarEvent`.
842
+ * @summary Create calendar event
843
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
844
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
845
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
846
+ * @param {*} [options] Override http request option.
847
+ * @throws {RequiredError}
848
+ * @memberof CalendarEventsApi
849
+ */
850
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
851
+ return CalendarEventsApiFp(this.configuration).createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options).then((request) => request(this.axios, this.basePath));
852
+ }
853
+ /**
854
+ * Delete an event, one occurrence of a recurring event, or a recurring event from one occurrence on. This cannot be undone. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. For a one-off event omit `scope` and `recurrenceId`. For a recurring event, `scope` `this` removes only the occurrence at `recurrenceId`, `future` removes it and every later one, `all` (the default) deletes the whole series. An event with `editable` true can be deleted with any scope, and its attendees receive a cancellation or the updated series by email. An invitation from someone else on the own calendar of the mailbox can be deleted with `all` or `this`: the organizer receives a decline for the removed occurrences. Any other event is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. `notifyAttendees` false deletes without sending any email.
855
+ * @summary Delete calendar event
856
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
857
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
858
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
859
+ * @param {DeleteCalendarEventScopeEnum} [scope] For a recurring event: `this` removes the occurrence at `recurrenceId`, `future` removes it and every later one, `all` deletes the whole series. Omitted means `all`. Required when `recurrenceId` is sent.
860
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Required when `scope` is `this` or `future`. A value that matches no occurrence, or any value on a one-off event, returns `404`.
861
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
862
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is deleted and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
863
+ * @param {*} [options] Override http request option.
864
+ * @throws {RequiredError}
865
+ * @memberof CalendarEventsApi
866
+ */
867
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
868
+ return CalendarEventsApiFp(this.configuration).deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options).then((request) => request(this.axios, this.basePath));
869
+ }
870
+ /**
871
+ * Retrieve the full details of one event: title, times, description, location, meeting link, recurrence rule, reminder, organizer, attendees with their answers, and its `etag`. `calendarUuid` and `eventUuid` come from `listCalendarEvents` (the `calendarUuid` and `uuid` of an item). For one occurrence of a recurring event pass the `recurrenceId` of the item; without it the whole series is returned and `recurrenceId` is null. A `recurrenceId` that matches no occurrence returns `404`. Call it before `updateCalendarEvent`, which replaces every field, so the values that should stay can be sent back. `replyable` true means the mailbox was invited by someone else and can answer with `replyToCalendarEvent`. `editable` true means the event can be changed or moved.
872
+ * @summary Get calendar event
873
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
874
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
875
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
876
+ * @param {string} [recurrenceId] `recurrenceId` of one occurrence, copied unchanged from a `listCalendarEvents` item. Omit it for a one-off event or for the whole series.
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ * @memberof CalendarEventsApi
880
+ */
881
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
882
+ return CalendarEventsApiFp(this.configuration).getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options).then((request) => request(this.axios, this.basePath));
883
+ }
884
+ /**
885
+ * List the events of one calendar that overlap a time range. It covers one calendar only: get the calendars from `listCalendars` and call it for each. The range runs from `start` (inclusive) to `end` (exclusive), at most 32 days; for a longer period call it again with the next range. Recurring events are expanded: each occurrence is a separate item with the same `uuid` and its own `recurrenceId`. Results are not paginated. Items hold summary fields only. For description, location, attendees and organizer call `getCalendarEvent` with the `calendarUuid`, `uuid` (as `eventUuid`) and `recurrenceId` of the item. Times are in UTC; `timeZone` is the zone the event was created in. `participationStatus` is the answer of the mailbox to an invitation from someone else, null for its own events. `status` CANCELLED means the organizer cancelled the event.
886
+ * @summary List calendar events
887
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
888
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
889
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
890
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
891
+ * @param {string} [timeZone] IANA time zone used to place all-day events and events without a time zone on days, also across a daylight saving change. Defaults to the fixed offset of `start`.
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ * @memberof CalendarEventsApi
895
+ */
896
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
897
+ return CalendarEventsApiFp(this.configuration).listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options).then((request) => request(this.axios, this.basePath));
898
+ }
899
+ /**
900
+ * Answer an invitation from someone else: accept, decline or tentatively accept. It saves the answer on the event and emails it to the organizer, which cannot be recalled. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. It works only when `getCalendarEvent` returns `replyable` true. An event the mailbox organizes or is not invited to is rejected with `403` and code `ERR_EVENT_NOT_REPLYABLE`, an event the organizer cancelled with `409` and code `ERR_EVENT_CANCELLED`. Send the `recurrenceId` of an item to answer one occurrence of a recurring event, or omit it to answer the whole series. Returns the event with the new `participationStatus`.
901
+ * @summary Reply to calendar event
902
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
903
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
904
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
905
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
906
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, the answer is not saved and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
907
+ * @param {*} [options] Override http request option.
908
+ * @throws {RequiredError}
909
+ * @memberof CalendarEventsApi
910
+ */
911
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
912
+ return CalendarEventsApiFp(this.configuration).replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
913
+ }
914
+ /**
915
+ * Move an event to another time or change its length, keeping everything else (title, attendees, description and so on) as stored, so the event does not have to be fetched first. To change other fields use `updateCalendarEvent`. `calendarUuid` and `eventUuid` come from `listCalendarEvents`. Only an event with `editable` true can be moved; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` moves only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) moves the whole series: only the time of day and the length apply and the series keeps the date of its first occurrence. Attendees receive an email update unless `notifyAttendees` is false. Returns the moved event, or the moved occurrence for `scope` `this`.
916
+ * @summary Reschedule calendar event
917
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
918
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
919
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
920
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
921
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
922
+ * @param {*} [options] Override http request option.
923
+ * @throws {RequiredError}
924
+ * @memberof CalendarEventsApi
925
+ */
926
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
927
+ return CalendarEventsApiFp(this.configuration).rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
928
+ }
929
+ /**
930
+ * Change the details of an event: title, times, description, location, attendees, recurrence and so on. Every field replaces the stored value and an omitted optional field is cleared, so call `getCalendarEvent` first and send back the values that should stay. To only move an event in time, use `rescheduleCalendarEvent`. Only an event with `editable` true can be changed; any other is rejected with `403` and code `ERR_EVENT_NOT_EDITABLE`. For a recurring event, `scope` `this` changes only the occurrence at `recurrenceId`, `future` ends the series before that occurrence and starts a new one with a new `uuid`, `all` (the default) changes the whole series, keeping the date of its first occurrence. Attendees receive an email update, added attendees an invitation and removed ones a cancellation, unless `notifyAttendees` is false. Returns the changed event, or the changed occurrence for `scope` `this`.
931
+ * @summary Update calendar event
932
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
933
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
934
+ * @param {string} eventUuid Event identifier: the `uuid` of an event returned by `listCalendarEvents`. Every occurrence of a recurring event has the same uuid; `recurrenceId` picks one occurrence.
935
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
936
+ * @param {string} [ifMatch] Optional `etag` from `getCalendarEvent`. When the event changed since that call, nothing is changed and the request fails with `412`: fetch the event again and retry. Omit it to apply the request to the current version.
937
+ * @param {*} [options] Override http request option.
938
+ * @throws {RequiredError}
939
+ * @memberof CalendarEventsApi
940
+ */
941
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
942
+ return CalendarEventsApiFp(this.configuration).updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
943
+ }
944
+ }
945
+ /**
946
+ * @export
947
+ */
948
+ export const DeleteCalendarEventScopeEnum = {
949
+ This: 'this',
950
+ Future: 'future',
951
+ All: 'all'
952
+ };
953
+ /**
954
+ * @export
955
+ */
956
+ export const DeleteCalendarEventNotifyAttendeesEnum = {
957
+ True: 'true',
958
+ False: 'false',
959
+ _1: '1',
960
+ _0: '0'
961
+ };
962
+ /**
963
+ * CalendarsApi - axios parameter creator
964
+ * @export
965
+ */
966
+ export const CalendarsApiAxiosParamCreator = function (configuration) {
967
+ return {
968
+ /**
969
+ * Create a calendar owned by the mailbox. The number of calendars a mailbox can own is limited; when the limit is reached the request fails with `400` and code `ERR_CALENDAR_LIMIT_REACHED`.
970
+ * @summary Create calendar
971
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
972
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
973
+ * @param {*} [options] Override http request option.
974
+ * @throws {RequiredError}
975
+ */
976
+ createCalendar: (mailboxResourceId_1, v1CalendarsCreateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, v1CalendarsCreateRequest_1, ...args_1], void 0, function* (mailboxResourceId, v1CalendarsCreateRequest, options = {}) {
977
+ // verify required parameter 'mailboxResourceId' is not null or undefined
978
+ assertParamExists('createCalendar', 'mailboxResourceId', mailboxResourceId);
979
+ // verify required parameter 'v1CalendarsCreateRequest' is not null or undefined
980
+ assertParamExists('createCalendar', 'v1CalendarsCreateRequest', v1CalendarsCreateRequest);
981
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars`
982
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
983
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
984
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
985
+ let baseOptions;
986
+ if (configuration) {
987
+ baseOptions = configuration.baseOptions;
988
+ }
989
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
990
+ const localVarHeaderParameter = {};
991
+ const localVarQueryParameter = {};
992
+ // authentication BearerAuth required
993
+ // http bearer authentication required
994
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
995
+ localVarHeaderParameter['Content-Type'] = 'application/json';
996
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
997
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
998
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
999
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarsCreateRequest, localVarRequestOptions, configuration);
1000
+ return {
1001
+ url: toPathString(localVarUrlObj),
1002
+ options: localVarRequestOptions,
1003
+ };
1004
+ }),
1005
+ /**
1006
+ * Delete a calendar owned by the mailbox together with all its events, or remove a calendar shared with the mailbox from its list. This cannot be undone. A calendar that cannot be deleted is rejected with `403` and code `ERR_CALENDAR_NOT_DELETABLE`.
1007
+ * @summary Delete calendar
1008
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1009
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1010
+ * @param {*} [options] Override http request option.
1011
+ * @throws {RequiredError}
1012
+ */
1013
+ deleteCalendar: (mailboxResourceId_1, calendarUuid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, options = {}) {
1014
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1015
+ assertParamExists('deleteCalendar', 'mailboxResourceId', mailboxResourceId);
1016
+ // verify required parameter 'calendarUuid' is not null or undefined
1017
+ assertParamExists('deleteCalendar', 'calendarUuid', calendarUuid);
1018
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1019
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1020
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid));
1021
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1022
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1023
+ let baseOptions;
1024
+ if (configuration) {
1025
+ baseOptions = configuration.baseOptions;
1026
+ }
1027
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1028
+ const localVarHeaderParameter = {};
1029
+ const localVarQueryParameter = {};
1030
+ // authentication BearerAuth required
1031
+ // http bearer authentication required
1032
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1033
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1034
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1035
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1036
+ return {
1037
+ url: toPathString(localVarUrlObj),
1038
+ options: localVarRequestOptions,
1039
+ };
1040
+ }),
1041
+ /**
1042
+ * Retrieve one calendar of a mailbox: its name, description, color, whether it is the default calendar and whether it is shown in the calendar view. It does not return events; use `listCalendarEvents` for those.
1043
+ * @summary Get calendar
1044
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1045
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1046
+ * @param {*} [options] Override http request option.
1047
+ * @throws {RequiredError}
1048
+ */
1049
+ getCalendar: (mailboxResourceId_1, calendarUuid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, options = {}) {
1050
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1051
+ assertParamExists('getCalendar', 'mailboxResourceId', mailboxResourceId);
1052
+ // verify required parameter 'calendarUuid' is not null or undefined
1053
+ assertParamExists('getCalendar', 'calendarUuid', calendarUuid);
1054
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1055
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1056
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid));
1057
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1058
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1059
+ let baseOptions;
1060
+ if (configuration) {
1061
+ baseOptions = configuration.baseOptions;
1062
+ }
1063
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1064
+ const localVarHeaderParameter = {};
1065
+ const localVarQueryParameter = {};
1066
+ // authentication BearerAuth required
1067
+ // http bearer authentication required
1068
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1069
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1070
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1071
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1072
+ return {
1073
+ url: toPathString(localVarUrlObj),
1074
+ options: localVarRequestOptions,
1075
+ };
1076
+ }),
1077
+ /**
1078
+ * List the calendars of a mailbox: its own calendars and the calendars shared with it, in display order. Call it first to get the `calendarUuid` every calendar event operation needs: the `uuid` of each calendar. The calendar with `default` true is where new events go unless another one is named. `visible` false means the calendar is hidden in the calendar view; its events still exist.
1079
+ * @summary List calendars
1080
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1081
+ * @param {number} [page] Page number (1-based).
1082
+ * @param {number} [perPage] Items per page (max 200).
1083
+ * @param {*} [options] Override http request option.
1084
+ * @throws {RequiredError}
1085
+ */
1086
+ listCalendars: (mailboxResourceId_1, page_1, perPage_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, page_1, perPage_1, ...args_1], void 0, function* (mailboxResourceId, page, perPage, options = {}) {
1087
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1088
+ assertParamExists('listCalendars', 'mailboxResourceId', mailboxResourceId);
1089
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars`
1090
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId));
1091
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1092
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1093
+ let baseOptions;
1094
+ if (configuration) {
1095
+ baseOptions = configuration.baseOptions;
1096
+ }
1097
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1098
+ const localVarHeaderParameter = {};
1099
+ const localVarQueryParameter = {};
1100
+ // authentication BearerAuth required
1101
+ // http bearer authentication required
1102
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1103
+ if (page !== undefined) {
1104
+ localVarQueryParameter['page'] = page;
1105
+ }
1106
+ if (perPage !== undefined) {
1107
+ localVarQueryParameter['perPage'] = perPage;
1108
+ }
1109
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1111
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1112
+ return {
1113
+ url: toPathString(localVarUrlObj),
1114
+ options: localVarRequestOptions,
1115
+ };
1116
+ }),
1117
+ /**
1118
+ * Update the name, description, color and visibility of a calendar. Name, description and color replace the stored values: an omitted `description` is cleared and an omitted `color` resets to the default color. An omitted `visible` keeps the current value.
1119
+ * @summary Update calendar
1120
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1121
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1122
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ */
1126
+ updateCalendar: (mailboxResourceId_1, calendarUuid_1, v1CalendarsUpdateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, v1CalendarsUpdateRequest_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options = {}) {
1127
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1128
+ assertParamExists('updateCalendar', 'mailboxResourceId', mailboxResourceId);
1129
+ // verify required parameter 'calendarUuid' is not null or undefined
1130
+ assertParamExists('updateCalendar', 'calendarUuid', calendarUuid);
1131
+ // verify required parameter 'v1CalendarsUpdateRequest' is not null or undefined
1132
+ assertParamExists('updateCalendar', 'v1CalendarsUpdateRequest', v1CalendarsUpdateRequest);
1133
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1134
+ .replace(`{${"mailboxResourceId"}}`, encodePathParam('mailboxResourceId', mailboxResourceId))
1135
+ .replace(`{${"calendarUuid"}}`, encodePathParam('calendarUuid', calendarUuid));
1136
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1137
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1138
+ let baseOptions;
1139
+ if (configuration) {
1140
+ baseOptions = configuration.baseOptions;
1141
+ }
1142
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1143
+ const localVarHeaderParameter = {};
1144
+ const localVarQueryParameter = {};
1145
+ // authentication BearerAuth required
1146
+ // http bearer authentication required
1147
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
1148
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1149
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
1150
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1151
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1152
+ localVarRequestOptions.data = serializeDataIfNeeded(v1CalendarsUpdateRequest, localVarRequestOptions, configuration);
1153
+ return {
1154
+ url: toPathString(localVarUrlObj),
1155
+ options: localVarRequestOptions,
1156
+ };
1157
+ }),
1158
+ };
1159
+ };
1160
+ /**
1161
+ * CalendarsApi - functional programming interface
1162
+ * @export
1163
+ */
1164
+ export const CalendarsApiFp = function (configuration) {
1165
+ const localVarAxiosParamCreator = CalendarsApiAxiosParamCreator(configuration);
1166
+ return {
1167
+ /**
1168
+ * Create a calendar owned by the mailbox. The number of calendars a mailbox can own is limited; when the limit is reached the request fails with `400` and code `ERR_CALENDAR_LIMIT_REACHED`.
1169
+ * @summary Create calendar
1170
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1171
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1172
+ * @param {*} [options] Override http request option.
1173
+ * @throws {RequiredError}
1174
+ */
1175
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1176
+ return __awaiter(this, void 0, void 0, function* () {
1177
+ var _a, _b;
1178
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options);
1179
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarsApi.createCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1180
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1181
+ });
1182
+ },
1183
+ /**
1184
+ * Delete a calendar owned by the mailbox together with all its events, or remove a calendar shared with the mailbox from its list. This cannot be undone. A calendar that cannot be deleted is rejected with `403` and code `ERR_CALENDAR_NOT_DELETABLE`.
1185
+ * @summary Delete calendar
1186
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1187
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1188
+ * @param {*} [options] Override http request option.
1189
+ * @throws {RequiredError}
1190
+ */
1191
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1192
+ return __awaiter(this, void 0, void 0, function* () {
1193
+ var _a, _b;
1194
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteCalendar(mailboxResourceId, calendarUuid, options);
1195
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarsApi.deleteCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1196
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1197
+ });
1198
+ },
1199
+ /**
1200
+ * Retrieve one calendar of a mailbox: its name, description, color, whether it is the default calendar and whether it is shown in the calendar view. It does not return events; use `listCalendarEvents` for those.
1201
+ * @summary Get calendar
1202
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1203
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1204
+ * @param {*} [options] Override http request option.
1205
+ * @throws {RequiredError}
1206
+ */
1207
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1208
+ return __awaiter(this, void 0, void 0, function* () {
1209
+ var _a, _b;
1210
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCalendar(mailboxResourceId, calendarUuid, options);
1211
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarsApi.getCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1212
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1213
+ });
1214
+ },
1215
+ /**
1216
+ * List the calendars of a mailbox: its own calendars and the calendars shared with it, in display order. Call it first to get the `calendarUuid` every calendar event operation needs: the `uuid` of each calendar. The calendar with `default` true is where new events go unless another one is named. `visible` false means the calendar is hidden in the calendar view; its events still exist.
1217
+ * @summary List calendars
1218
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1219
+ * @param {number} [page] Page number (1-based).
1220
+ * @param {number} [perPage] Items per page (max 200).
1221
+ * @param {*} [options] Override http request option.
1222
+ * @throws {RequiredError}
1223
+ */
1224
+ listCalendars(mailboxResourceId, page, perPage, options) {
1225
+ return __awaiter(this, void 0, void 0, function* () {
1226
+ var _a, _b;
1227
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCalendars(mailboxResourceId, page, perPage, options);
1228
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarsApi.listCalendars']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1229
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1230
+ });
1231
+ },
1232
+ /**
1233
+ * Update the name, description, color and visibility of a calendar. Name, description and color replace the stored values: an omitted `description` is cleared and an omitted `color` resets to the default color. An omitted `visible` keeps the current value.
1234
+ * @summary Update calendar
1235
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1236
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1237
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1238
+ * @param {*} [options] Override http request option.
1239
+ * @throws {RequiredError}
1240
+ */
1241
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1242
+ return __awaiter(this, void 0, void 0, function* () {
1243
+ var _a, _b;
1244
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options);
1245
+ const localVarOperationServerBasePath = (_b = (_a = operationServerMap['CalendarsApi.updateCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1246
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1247
+ });
1248
+ },
1249
+ };
1250
+ };
1251
+ /**
1252
+ * CalendarsApi - factory interface
1253
+ * @export
1254
+ */
1255
+ export const CalendarsApiFactory = function (configuration, basePath, axios) {
1256
+ const localVarFp = CalendarsApiFp(configuration);
1257
+ return {
1258
+ /**
1259
+ * Create a calendar owned by the mailbox. The number of calendars a mailbox can own is limited; when the limit is reached the request fails with `400` and code `ERR_CALENDAR_LIMIT_REACHED`.
1260
+ * @summary Create calendar
1261
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1262
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1263
+ * @param {*} [options] Override http request option.
1264
+ * @throws {RequiredError}
1265
+ */
1266
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1267
+ return localVarFp.createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options).then((request) => request(axios, basePath));
1268
+ },
1269
+ /**
1270
+ * Delete a calendar owned by the mailbox together with all its events, or remove a calendar shared with the mailbox from its list. This cannot be undone. A calendar that cannot be deleted is rejected with `403` and code `ERR_CALENDAR_NOT_DELETABLE`.
1271
+ * @summary Delete calendar
1272
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1273
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1274
+ * @param {*} [options] Override http request option.
1275
+ * @throws {RequiredError}
1276
+ */
1277
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1278
+ return localVarFp.deleteCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(axios, basePath));
1279
+ },
1280
+ /**
1281
+ * Retrieve one calendar of a mailbox: its name, description, color, whether it is the default calendar and whether it is shown in the calendar view. It does not return events; use `listCalendarEvents` for those.
1282
+ * @summary Get calendar
1283
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1284
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1285
+ * @param {*} [options] Override http request option.
1286
+ * @throws {RequiredError}
1287
+ */
1288
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1289
+ return localVarFp.getCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(axios, basePath));
1290
+ },
1291
+ /**
1292
+ * List the calendars of a mailbox: its own calendars and the calendars shared with it, in display order. Call it first to get the `calendarUuid` every calendar event operation needs: the `uuid` of each calendar. The calendar with `default` true is where new events go unless another one is named. `visible` false means the calendar is hidden in the calendar view; its events still exist.
1293
+ * @summary List calendars
1294
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1295
+ * @param {number} [page] Page number (1-based).
1296
+ * @param {number} [perPage] Items per page (max 200).
1297
+ * @param {*} [options] Override http request option.
1298
+ * @throws {RequiredError}
1299
+ */
1300
+ listCalendars(mailboxResourceId, page, perPage, options) {
1301
+ return localVarFp.listCalendars(mailboxResourceId, page, perPage, options).then((request) => request(axios, basePath));
1302
+ },
1303
+ /**
1304
+ * Update the name, description, color and visibility of a calendar. Name, description and color replace the stored values: an omitted `description` is cleared and an omitted `color` resets to the default color. An omitted `visible` keeps the current value.
1305
+ * @summary Update calendar
1306
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1307
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1308
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1309
+ * @param {*} [options] Override http request option.
1310
+ * @throws {RequiredError}
1311
+ */
1312
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1313
+ return localVarFp.updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options).then((request) => request(axios, basePath));
1314
+ },
1315
+ };
1316
+ };
1317
+ /**
1318
+ * CalendarsApi - object-oriented interface
1319
+ * @export
1320
+ * @class CalendarsApi
1321
+ * @extends {BaseAPI}
1322
+ */
1323
+ export class CalendarsApi extends BaseAPI {
1324
+ /**
1325
+ * Create a calendar owned by the mailbox. The number of calendars a mailbox can own is limited; when the limit is reached the request fails with `400` and code `ERR_CALENDAR_LIMIT_REACHED`.
1326
+ * @summary Create calendar
1327
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1328
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1329
+ * @param {*} [options] Override http request option.
1330
+ * @throws {RequiredError}
1331
+ * @memberof CalendarsApi
1332
+ */
1333
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1334
+ return CalendarsApiFp(this.configuration).createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options).then((request) => request(this.axios, this.basePath));
1335
+ }
1336
+ /**
1337
+ * Delete a calendar owned by the mailbox together with all its events, or remove a calendar shared with the mailbox from its list. This cannot be undone. A calendar that cannot be deleted is rejected with `403` and code `ERR_CALENDAR_NOT_DELETABLE`.
1338
+ * @summary Delete calendar
1339
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1340
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1341
+ * @param {*} [options] Override http request option.
1342
+ * @throws {RequiredError}
1343
+ * @memberof CalendarsApi
1344
+ */
1345
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1346
+ return CalendarsApiFp(this.configuration).deleteCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(this.axios, this.basePath));
1347
+ }
1348
+ /**
1349
+ * Retrieve one calendar of a mailbox: its name, description, color, whether it is the default calendar and whether it is shown in the calendar view. It does not return events; use `listCalendarEvents` for those.
1350
+ * @summary Get calendar
1351
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1352
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1353
+ * @param {*} [options] Override http request option.
1354
+ * @throws {RequiredError}
1355
+ * @memberof CalendarsApi
1356
+ */
1357
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1358
+ return CalendarsApiFp(this.configuration).getCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(this.axios, this.basePath));
1359
+ }
1360
+ /**
1361
+ * List the calendars of a mailbox: its own calendars and the calendars shared with it, in display order. Call it first to get the `calendarUuid` every calendar event operation needs: the `uuid` of each calendar. The calendar with `default` true is where new events go unless another one is named. `visible` false means the calendar is hidden in the calendar view; its events still exist.
1362
+ * @summary List calendars
1363
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1364
+ * @param {number} [page] Page number (1-based).
1365
+ * @param {number} [perPage] Items per page (max 200).
1366
+ * @param {*} [options] Override http request option.
1367
+ * @throws {RequiredError}
1368
+ * @memberof CalendarsApi
1369
+ */
1370
+ listCalendars(mailboxResourceId, page, perPage, options) {
1371
+ return CalendarsApiFp(this.configuration).listCalendars(mailboxResourceId, page, perPage, options).then((request) => request(this.axios, this.basePath));
1372
+ }
1373
+ /**
1374
+ * Update the name, description, color and visibility of a calendar. Name, description and color replace the stored values: an omitted `description` is cleared and an omitted `color` resets to the default color. An omitted `visible` keeps the current value.
1375
+ * @summary Update calendar
1376
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1377
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1378
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1379
+ * @param {*} [options] Override http request option.
1380
+ * @throws {RequiredError}
1381
+ * @memberof CalendarsApi
1382
+ */
1383
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1384
+ return CalendarsApiFp(this.configuration).updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
1385
+ }
1386
+ }
153
1387
  /**
154
1388
  * FeedbackApi - axios parameter creator
155
1389
  * @export
@@ -1872,7 +3106,7 @@ export class QuotaApi extends BaseAPI {
1872
3106
  export const SendApiAxiosParamCreator = function (configuration) {
1873
3107
  return {
1874
3108
  /**
1875
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3109
+ * Send a message from the managed mailbox. The message is accepted for delivery and dispatched within a few seconds; a copy is saved to INBOX.Sent once it is sent. A delivery failure after acceptance is not reported on this call.
1876
3110
  * @summary Send email
1877
3111
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1878
3112
  * @param {V1SendRequest} v1SendRequest
@@ -1918,7 +3152,7 @@ export const SendApiFp = function (configuration) {
1918
3152
  const localVarAxiosParamCreator = SendApiAxiosParamCreator(configuration);
1919
3153
  return {
1920
3154
  /**
1921
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3155
+ * Send a message from the managed mailbox. The message is accepted for delivery and dispatched within a few seconds; a copy is saved to INBOX.Sent once it is sent. A delivery failure after acceptance is not reported on this call.
1922
3156
  * @summary Send email
1923
3157
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1924
3158
  * @param {V1SendRequest} v1SendRequest
@@ -1943,7 +3177,7 @@ export const SendApiFactory = function (configuration, basePath, axios) {
1943
3177
  const localVarFp = SendApiFp(configuration);
1944
3178
  return {
1945
3179
  /**
1946
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3180
+ * Send a message from the managed mailbox. The message is accepted for delivery and dispatched within a few seconds; a copy is saved to INBOX.Sent once it is sent. A delivery failure after acceptance is not reported on this call.
1947
3181
  * @summary Send email
1948
3182
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1949
3183
  * @param {V1SendRequest} v1SendRequest
@@ -1963,7 +3197,7 @@ export const SendApiFactory = function (configuration, basePath, axios) {
1963
3197
  */
1964
3198
  export class SendApi extends BaseAPI {
1965
3199
  /**
1966
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3200
+ * Send a message from the managed mailbox. The message is accepted for delivery and dispatched within a few seconds; a copy is saved to INBOX.Sent once it is sent. A delivery failure after acceptance is not reported on this call.
1967
3201
  * @summary Send email
1968
3202
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1969
3203
  * @param {V1SendRequest} v1SendRequest