hostinger-mail-api-sdk 1.19.9 → 1.20.1

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 (51) hide show
  1. package/README.md +2 -2
  2. package/api.ts +2905 -760
  3. package/base.ts +1 -1
  4. package/common.ts +1 -1
  5. package/configuration.ts +2 -2
  6. package/dist/api.d.ts +2206 -720
  7. package/dist/api.js +1249 -6
  8. package/dist/base.d.ts +1 -1
  9. package/dist/base.js +1 -1
  10. package/dist/common.d.ts +1 -1
  11. package/dist/common.js +1 -1
  12. package/dist/configuration.d.ts +1 -1
  13. package/dist/configuration.js +2 -2
  14. package/dist/esm/api.d.ts +2206 -720
  15. package/dist/esm/api.js +1239 -5
  16. package/dist/esm/base.d.ts +1 -1
  17. package/dist/esm/base.js +1 -1
  18. package/dist/esm/common.d.ts +1 -1
  19. package/dist/esm/common.js +1 -1
  20. package/dist/esm/configuration.d.ts +1 -1
  21. package/dist/esm/configuration.js +2 -2
  22. package/dist/esm/index.d.ts +1 -1
  23. package/dist/esm/index.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/docs/CalendarEventsApi.md +505 -0
  27. package/docs/CalendarsApi.md +317 -0
  28. package/docs/MessagesApi.md +3 -0
  29. package/docs/SendApi.md +2 -2
  30. package/docs/V1CalendarEventsAttendee.md +25 -0
  31. package/docs/V1CalendarEventsAttendeeInput.md +23 -0
  32. package/docs/V1CalendarEventsCollection.md +23 -0
  33. package/docs/V1CalendarEventsCollectionMeta.md +20 -0
  34. package/docs/V1CalendarEventsCreateRequest.md +43 -0
  35. package/docs/V1CalendarEventsEvent.md +61 -0
  36. package/docs/V1CalendarEventsEventListItem.md +43 -0
  37. package/docs/V1CalendarEventsOrganizer.md +23 -0
  38. package/docs/V1CalendarEventsRecurrenceDay.md +23 -0
  39. package/docs/V1CalendarEventsRecurrenceRule.md +35 -0
  40. package/docs/V1CalendarEventsReminder.md +23 -0
  41. package/docs/V1CalendarEventsReplyRequest.md +23 -0
  42. package/docs/V1CalendarEventsRescheduleRequest.md +33 -0
  43. package/docs/V1CalendarEventsResource.md +21 -0
  44. package/docs/V1CalendarEventsUpdateRequest.md +49 -0
  45. package/docs/V1CalendarsCalendar.md +31 -0
  46. package/docs/V1CalendarsCollection.md +23 -0
  47. package/docs/V1CalendarsCreateRequest.md +27 -0
  48. package/docs/V1CalendarsResource.md +21 -0
  49. package/docs/V1CalendarsUpdateRequest.md +27 -0
  50. package/index.ts +1 -1
  51. package/package.json +2 -2
package/dist/api.js CHANGED
@@ -4,7 +4,7 @@
4
4
  /**
5
5
  * Hostinger Mail API
6
6
  *
7
- * API Version: 1.3.0
7
+ * API Version: 1.4.0
8
8
  *
9
9
  * NOTE: This file is auto-generated, DO NOT EDIT THIS FILE MANUALLY!
10
10
  * If you want to contribute or request a new feature, please create an issue or pull request on https://github.com/hostinger/api
@@ -19,13 +19,91 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
19
  });
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.ListWebhooksStatusEnum = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.SendApi = exports.SendApiFactory = exports.SendApiFp = exports.SendApiAxiosParamCreator = exports.QuotaApi = exports.QuotaApiFactory = exports.QuotaApiFp = exports.QuotaApiAxiosParamCreator = exports.MessagesApi = exports.MessagesApiFactory = exports.MessagesApiFp = exports.MessagesApiAxiosParamCreator = exports.FoldersApi = exports.FoldersApiFactory = exports.FoldersApiFp = exports.FoldersApiAxiosParamCreator = exports.FeedbackApi = exports.FeedbackApiFactory = exports.FeedbackApiFp = exports.FeedbackApiAxiosParamCreator = exports.AccountApi = exports.AccountApiFactory = exports.AccountApiFp = exports.AccountApiAxiosParamCreator = exports.V1WebhooksWebhookWithSecretStatusEnum = exports.V1WebhooksWebhookWithSecretEventsEnum = exports.V1WebhooksWebhookStatusEnum = exports.V1WebhooksWebhookEventsEnum = exports.V1WebhooksUpdateRequestStatusEnum = exports.V1WebhooksUpdateRequestEventsEnum = exports.V1WebhooksCreateRequestStatusEnum = exports.V1WebhooksCreateRequestEventsEnum = void 0;
22
+ exports.QuotaApi = exports.QuotaApiFactory = exports.QuotaApiFp = exports.QuotaApiAxiosParamCreator = exports.MessagesApi = exports.MessagesApiFactory = exports.MessagesApiFp = exports.MessagesApiAxiosParamCreator = exports.FoldersApi = exports.FoldersApiFactory = exports.FoldersApiFp = exports.FoldersApiAxiosParamCreator = exports.FeedbackApi = exports.FeedbackApiFactory = exports.FeedbackApiFp = exports.FeedbackApiAxiosParamCreator = exports.CalendarsApi = exports.CalendarsApiFactory = exports.CalendarsApiFp = exports.CalendarsApiAxiosParamCreator = exports.DeleteCalendarEventNotifyAttendeesEnum = exports.DeleteCalendarEventScopeEnum = exports.CalendarEventsApi = exports.CalendarEventsApiFactory = exports.CalendarEventsApiFp = exports.CalendarEventsApiAxiosParamCreator = exports.AccountApi = exports.AccountApiFactory = exports.AccountApiFp = exports.AccountApiAxiosParamCreator = exports.V1WebhooksWebhookWithSecretStatusEnum = exports.V1WebhooksWebhookWithSecretEventsEnum = exports.V1WebhooksWebhookStatusEnum = exports.V1WebhooksWebhookEventsEnum = exports.V1WebhooksUpdateRequestStatusEnum = exports.V1WebhooksUpdateRequestEventsEnum = exports.V1WebhooksCreateRequestStatusEnum = exports.V1WebhooksCreateRequestEventsEnum = exports.V1CalendarEventsUpdateRequestScopeEnum = exports.V1CalendarEventsRescheduleRequestScopeEnum = exports.V1CalendarEventsReplyRequestParticipationStatusEnum = exports.V1CalendarEventsReminderUnitEnum = exports.V1CalendarEventsRecurrenceRuleWeekStartEnum = exports.V1CalendarEventsRecurrenceRuleFrequencyEnum = exports.V1CalendarEventsRecurrenceDayDayEnum = exports.V1CalendarEventsEventListItemStatusEnum = exports.V1CalendarEventsEventListItemParticipationStatusEnum = exports.V1CalendarEventsEventStatusEnum = exports.V1CalendarEventsEventParticipationStatusEnum = exports.V1CalendarEventsAttendeeParticipationStatusEnum = void 0;
23
+ exports.ListWebhooksStatusEnum = exports.WebhooksApi = exports.WebhooksApiFactory = exports.WebhooksApiFp = exports.WebhooksApiAxiosParamCreator = exports.SendApi = exports.SendApiFactory = exports.SendApiFp = exports.SendApiAxiosParamCreator = void 0;
23
24
  const axios_1 = require("axios");
24
25
  // Some imports not used depending on template conditions
25
26
  // @ts-ignore
26
27
  const common_1 = require("./common");
27
28
  // @ts-ignore
28
29
  const base_1 = require("./base");
30
+ exports.V1CalendarEventsAttendeeParticipationStatusEnum = {
31
+ NeedsAction: 'NEEDS-ACTION',
32
+ Accepted: 'ACCEPTED',
33
+ Declined: 'DECLINED',
34
+ Tentative: 'TENTATIVE',
35
+ Delegated: 'DELEGATED'
36
+ };
37
+ exports.V1CalendarEventsEventParticipationStatusEnum = {
38
+ NeedsAction: 'NEEDS-ACTION',
39
+ Accepted: 'ACCEPTED',
40
+ Declined: 'DECLINED',
41
+ Tentative: 'TENTATIVE',
42
+ Delegated: 'DELEGATED'
43
+ };
44
+ exports.V1CalendarEventsEventStatusEnum = {
45
+ Confirmed: 'CONFIRMED',
46
+ Cancelled: 'CANCELLED'
47
+ };
48
+ exports.V1CalendarEventsEventListItemParticipationStatusEnum = {
49
+ NeedsAction: 'NEEDS-ACTION',
50
+ Accepted: 'ACCEPTED',
51
+ Declined: 'DECLINED',
52
+ Tentative: 'TENTATIVE',
53
+ Delegated: 'DELEGATED'
54
+ };
55
+ exports.V1CalendarEventsEventListItemStatusEnum = {
56
+ Confirmed: 'CONFIRMED',
57
+ Cancelled: 'CANCELLED'
58
+ };
59
+ exports.V1CalendarEventsRecurrenceDayDayEnum = {
60
+ Monday: 'monday',
61
+ Tuesday: 'tuesday',
62
+ Wednesday: 'wednesday',
63
+ Thursday: 'thursday',
64
+ Friday: 'friday',
65
+ Saturday: 'saturday',
66
+ Sunday: 'sunday'
67
+ };
68
+ exports.V1CalendarEventsRecurrenceRuleFrequencyEnum = {
69
+ Secondly: 'SECONDLY',
70
+ Minutely: 'MINUTELY',
71
+ Hourly: 'HOURLY',
72
+ Daily: 'DAILY',
73
+ Weekly: 'WEEKLY',
74
+ Monthly: 'MONTHLY',
75
+ Yearly: 'YEARLY'
76
+ };
77
+ exports.V1CalendarEventsRecurrenceRuleWeekStartEnum = {
78
+ Monday: 'monday',
79
+ Tuesday: 'tuesday',
80
+ Wednesday: 'wednesday',
81
+ Thursday: 'thursday',
82
+ Friday: 'friday',
83
+ Saturday: 'saturday',
84
+ Sunday: 'sunday'
85
+ };
86
+ exports.V1CalendarEventsReminderUnitEnum = {
87
+ Minutes: 'minutes',
88
+ Hours: 'hours',
89
+ Days: 'days',
90
+ Weeks: 'weeks'
91
+ };
92
+ exports.V1CalendarEventsReplyRequestParticipationStatusEnum = {
93
+ Accepted: 'ACCEPTED',
94
+ Declined: 'DECLINED',
95
+ Tentative: 'TENTATIVE'
96
+ };
97
+ exports.V1CalendarEventsRescheduleRequestScopeEnum = {
98
+ This: 'this',
99
+ Future: 'future',
100
+ All: 'all'
101
+ };
102
+ exports.V1CalendarEventsUpdateRequestScopeEnum = {
103
+ This: 'this',
104
+ Future: 'future',
105
+ All: 'all'
106
+ };
29
107
  exports.V1WebhooksCreateRequestEventsEnum = {
30
108
  MessageReceived: 'message.received'
31
109
  };
@@ -157,6 +235,1171 @@ class AccountApi extends base_1.BaseAPI {
157
235
  }
158
236
  }
159
237
  exports.AccountApi = AccountApi;
238
+ /**
239
+ * CalendarEventsApi - axios parameter creator
240
+ * @export
241
+ */
242
+ const CalendarEventsApiAxiosParamCreator = function (configuration) {
243
+ return {
244
+ /**
245
+ * 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`.
246
+ * @summary Create calendar event
247
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
248
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
249
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
250
+ * @param {*} [options] Override http request option.
251
+ * @throws {RequiredError}
252
+ */
253
+ 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 = {}) {
254
+ // verify required parameter 'mailboxResourceId' is not null or undefined
255
+ (0, common_1.assertParamExists)('createCalendarEvent', 'mailboxResourceId', mailboxResourceId);
256
+ // verify required parameter 'calendarUuid' is not null or undefined
257
+ (0, common_1.assertParamExists)('createCalendarEvent', 'calendarUuid', calendarUuid);
258
+ // verify required parameter 'v1CalendarEventsCreateRequest' is not null or undefined
259
+ (0, common_1.assertParamExists)('createCalendarEvent', 'v1CalendarEventsCreateRequest', v1CalendarEventsCreateRequest);
260
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events`
261
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
262
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid));
263
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
264
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
265
+ let baseOptions;
266
+ if (configuration) {
267
+ baseOptions = configuration.baseOptions;
268
+ }
269
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
270
+ const localVarHeaderParameter = {};
271
+ const localVarQueryParameter = {};
272
+ // authentication BearerAuth required
273
+ // http bearer authentication required
274
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
275
+ localVarHeaderParameter['Content-Type'] = 'application/json';
276
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
277
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
278
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
279
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarEventsCreateRequest, localVarRequestOptions, configuration);
280
+ return {
281
+ url: (0, common_1.toPathString)(localVarUrlObj),
282
+ options: localVarRequestOptions,
283
+ };
284
+ }),
285
+ /**
286
+ * 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.
287
+ * @summary Delete calendar event
288
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
289
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
290
+ * @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.
291
+ * @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.
292
+ * @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`.
293
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
294
+ * @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.
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ 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 = {}) {
299
+ // verify required parameter 'mailboxResourceId' is not null or undefined
300
+ (0, common_1.assertParamExists)('deleteCalendarEvent', 'mailboxResourceId', mailboxResourceId);
301
+ // verify required parameter 'calendarUuid' is not null or undefined
302
+ (0, common_1.assertParamExists)('deleteCalendarEvent', 'calendarUuid', calendarUuid);
303
+ // verify required parameter 'eventUuid' is not null or undefined
304
+ (0, common_1.assertParamExists)('deleteCalendarEvent', 'eventUuid', eventUuid);
305
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
306
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
307
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid))
308
+ .replace(`{${"eventUuid"}}`, (0, common_1.encodePathParam)('eventUuid', eventUuid));
309
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
310
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
311
+ let baseOptions;
312
+ if (configuration) {
313
+ baseOptions = configuration.baseOptions;
314
+ }
315
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
316
+ const localVarHeaderParameter = {};
317
+ const localVarQueryParameter = {};
318
+ // authentication BearerAuth required
319
+ // http bearer authentication required
320
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
321
+ if (scope !== undefined) {
322
+ localVarQueryParameter['scope'] = scope;
323
+ }
324
+ if (recurrenceId !== undefined) {
325
+ localVarQueryParameter['recurrenceId'] = (recurrenceId instanceof Date) ?
326
+ recurrenceId.toISOString() :
327
+ recurrenceId;
328
+ }
329
+ if (notifyAttendees !== undefined) {
330
+ localVarQueryParameter['notifyAttendees'] = notifyAttendees;
331
+ }
332
+ if (ifMatch != null) {
333
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
334
+ }
335
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
336
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ return {
339
+ url: (0, common_1.toPathString)(localVarUrlObj),
340
+ options: localVarRequestOptions,
341
+ };
342
+ }),
343
+ /**
344
+ * 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.
345
+ * @summary Get calendar event
346
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
347
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
348
+ * @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.
349
+ * @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.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ 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 = {}) {
354
+ // verify required parameter 'mailboxResourceId' is not null or undefined
355
+ (0, common_1.assertParamExists)('getCalendarEvent', 'mailboxResourceId', mailboxResourceId);
356
+ // verify required parameter 'calendarUuid' is not null or undefined
357
+ (0, common_1.assertParamExists)('getCalendarEvent', 'calendarUuid', calendarUuid);
358
+ // verify required parameter 'eventUuid' is not null or undefined
359
+ (0, common_1.assertParamExists)('getCalendarEvent', 'eventUuid', eventUuid);
360
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
361
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
362
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid))
363
+ .replace(`{${"eventUuid"}}`, (0, common_1.encodePathParam)('eventUuid', eventUuid));
364
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
365
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
366
+ let baseOptions;
367
+ if (configuration) {
368
+ baseOptions = configuration.baseOptions;
369
+ }
370
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
371
+ const localVarHeaderParameter = {};
372
+ const localVarQueryParameter = {};
373
+ // authentication BearerAuth required
374
+ // http bearer authentication required
375
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
376
+ if (recurrenceId !== undefined) {
377
+ localVarQueryParameter['recurrenceId'] = (recurrenceId instanceof Date) ?
378
+ recurrenceId.toISOString() :
379
+ recurrenceId;
380
+ }
381
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
382
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
383
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
384
+ return {
385
+ url: (0, common_1.toPathString)(localVarUrlObj),
386
+ options: localVarRequestOptions,
387
+ };
388
+ }),
389
+ /**
390
+ * 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.
391
+ * @summary List calendar events
392
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
393
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
394
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
395
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
396
+ * @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`.
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ 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 = {}) {
401
+ // verify required parameter 'mailboxResourceId' is not null or undefined
402
+ (0, common_1.assertParamExists)('listCalendarEvents', 'mailboxResourceId', mailboxResourceId);
403
+ // verify required parameter 'calendarUuid' is not null or undefined
404
+ (0, common_1.assertParamExists)('listCalendarEvents', 'calendarUuid', calendarUuid);
405
+ // verify required parameter 'start' is not null or undefined
406
+ (0, common_1.assertParamExists)('listCalendarEvents', 'start', start);
407
+ // verify required parameter 'end' is not null or undefined
408
+ (0, common_1.assertParamExists)('listCalendarEvents', 'end', end);
409
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events`
410
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
411
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid));
412
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
413
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
414
+ let baseOptions;
415
+ if (configuration) {
416
+ baseOptions = configuration.baseOptions;
417
+ }
418
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
419
+ const localVarHeaderParameter = {};
420
+ const localVarQueryParameter = {};
421
+ // authentication BearerAuth required
422
+ // http bearer authentication required
423
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
424
+ if (start !== undefined) {
425
+ localVarQueryParameter['start'] = (start instanceof Date) ?
426
+ start.toISOString() :
427
+ start;
428
+ }
429
+ if (end !== undefined) {
430
+ localVarQueryParameter['end'] = (end instanceof Date) ?
431
+ end.toISOString() :
432
+ end;
433
+ }
434
+ if (timeZone !== undefined) {
435
+ localVarQueryParameter['timeZone'] = timeZone;
436
+ }
437
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
438
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
439
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
440
+ return {
441
+ url: (0, common_1.toPathString)(localVarUrlObj),
442
+ options: localVarRequestOptions,
443
+ };
444
+ }),
445
+ /**
446
+ * 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`.
447
+ * @summary Reply to calendar event
448
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
449
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
450
+ * @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.
451
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
452
+ * @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.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ 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 = {}) {
457
+ // verify required parameter 'mailboxResourceId' is not null or undefined
458
+ (0, common_1.assertParamExists)('replyToCalendarEvent', 'mailboxResourceId', mailboxResourceId);
459
+ // verify required parameter 'calendarUuid' is not null or undefined
460
+ (0, common_1.assertParamExists)('replyToCalendarEvent', 'calendarUuid', calendarUuid);
461
+ // verify required parameter 'eventUuid' is not null or undefined
462
+ (0, common_1.assertParamExists)('replyToCalendarEvent', 'eventUuid', eventUuid);
463
+ // verify required parameter 'v1CalendarEventsReplyRequest' is not null or undefined
464
+ (0, common_1.assertParamExists)('replyToCalendarEvent', 'v1CalendarEventsReplyRequest', v1CalendarEventsReplyRequest);
465
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}/reply`
466
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
467
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid))
468
+ .replace(`{${"eventUuid"}}`, (0, common_1.encodePathParam)('eventUuid', eventUuid));
469
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
470
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
471
+ let baseOptions;
472
+ if (configuration) {
473
+ baseOptions = configuration.baseOptions;
474
+ }
475
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
476
+ const localVarHeaderParameter = {};
477
+ const localVarQueryParameter = {};
478
+ // authentication BearerAuth required
479
+ // http bearer authentication required
480
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
481
+ localVarHeaderParameter['Content-Type'] = 'application/json';
482
+ if (ifMatch != null) {
483
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
484
+ }
485
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
486
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
487
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
488
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarEventsReplyRequest, localVarRequestOptions, configuration);
489
+ return {
490
+ url: (0, common_1.toPathString)(localVarUrlObj),
491
+ options: localVarRequestOptions,
492
+ };
493
+ }),
494
+ /**
495
+ * 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`.
496
+ * @summary Reschedule calendar event
497
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
498
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
499
+ * @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.
500
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
501
+ * @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.
502
+ * @param {*} [options] Override http request option.
503
+ * @throws {RequiredError}
504
+ */
505
+ 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 = {}) {
506
+ // verify required parameter 'mailboxResourceId' is not null or undefined
507
+ (0, common_1.assertParamExists)('rescheduleCalendarEvent', 'mailboxResourceId', mailboxResourceId);
508
+ // verify required parameter 'calendarUuid' is not null or undefined
509
+ (0, common_1.assertParamExists)('rescheduleCalendarEvent', 'calendarUuid', calendarUuid);
510
+ // verify required parameter 'eventUuid' is not null or undefined
511
+ (0, common_1.assertParamExists)('rescheduleCalendarEvent', 'eventUuid', eventUuid);
512
+ // verify required parameter 'v1CalendarEventsRescheduleRequest' is not null or undefined
513
+ (0, common_1.assertParamExists)('rescheduleCalendarEvent', 'v1CalendarEventsRescheduleRequest', v1CalendarEventsRescheduleRequest);
514
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}/reschedule`
515
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
516
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid))
517
+ .replace(`{${"eventUuid"}}`, (0, common_1.encodePathParam)('eventUuid', eventUuid));
518
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
519
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
520
+ let baseOptions;
521
+ if (configuration) {
522
+ baseOptions = configuration.baseOptions;
523
+ }
524
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
525
+ const localVarHeaderParameter = {};
526
+ const localVarQueryParameter = {};
527
+ // authentication BearerAuth required
528
+ // http bearer authentication required
529
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
530
+ localVarHeaderParameter['Content-Type'] = 'application/json';
531
+ if (ifMatch != null) {
532
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
533
+ }
534
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
535
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
536
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
537
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarEventsRescheduleRequest, localVarRequestOptions, configuration);
538
+ return {
539
+ url: (0, common_1.toPathString)(localVarUrlObj),
540
+ options: localVarRequestOptions,
541
+ };
542
+ }),
543
+ /**
544
+ * 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`.
545
+ * @summary Update calendar event
546
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
547
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
548
+ * @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.
549
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
550
+ * @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.
551
+ * @param {*} [options] Override http request option.
552
+ * @throws {RequiredError}
553
+ */
554
+ 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 = {}) {
555
+ // verify required parameter 'mailboxResourceId' is not null or undefined
556
+ (0, common_1.assertParamExists)('updateCalendarEvent', 'mailboxResourceId', mailboxResourceId);
557
+ // verify required parameter 'calendarUuid' is not null or undefined
558
+ (0, common_1.assertParamExists)('updateCalendarEvent', 'calendarUuid', calendarUuid);
559
+ // verify required parameter 'eventUuid' is not null or undefined
560
+ (0, common_1.assertParamExists)('updateCalendarEvent', 'eventUuid', eventUuid);
561
+ // verify required parameter 'v1CalendarEventsUpdateRequest' is not null or undefined
562
+ (0, common_1.assertParamExists)('updateCalendarEvent', 'v1CalendarEventsUpdateRequest', v1CalendarEventsUpdateRequest);
563
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}/events/{eventUuid}`
564
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
565
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid))
566
+ .replace(`{${"eventUuid"}}`, (0, common_1.encodePathParam)('eventUuid', eventUuid));
567
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
568
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
569
+ let baseOptions;
570
+ if (configuration) {
571
+ baseOptions = configuration.baseOptions;
572
+ }
573
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
574
+ const localVarHeaderParameter = {};
575
+ const localVarQueryParameter = {};
576
+ // authentication BearerAuth required
577
+ // http bearer authentication required
578
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
579
+ localVarHeaderParameter['Content-Type'] = 'application/json';
580
+ if (ifMatch != null) {
581
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
582
+ }
583
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
584
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
585
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
586
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarEventsUpdateRequest, localVarRequestOptions, configuration);
587
+ return {
588
+ url: (0, common_1.toPathString)(localVarUrlObj),
589
+ options: localVarRequestOptions,
590
+ };
591
+ }),
592
+ };
593
+ };
594
+ exports.CalendarEventsApiAxiosParamCreator = CalendarEventsApiAxiosParamCreator;
595
+ /**
596
+ * CalendarEventsApi - functional programming interface
597
+ * @export
598
+ */
599
+ const CalendarEventsApiFp = function (configuration) {
600
+ const localVarAxiosParamCreator = (0, exports.CalendarEventsApiAxiosParamCreator)(configuration);
601
+ return {
602
+ /**
603
+ * 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`.
604
+ * @summary Create calendar event
605
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
606
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
607
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ */
611
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ var _a, _b;
614
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options);
615
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.createCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
616
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
617
+ });
618
+ },
619
+ /**
620
+ * 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.
621
+ * @summary Delete calendar event
622
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
623
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
624
+ * @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.
625
+ * @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.
626
+ * @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`.
627
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
628
+ * @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.
629
+ * @param {*} [options] Override http request option.
630
+ * @throws {RequiredError}
631
+ */
632
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
633
+ return __awaiter(this, void 0, void 0, function* () {
634
+ var _a, _b;
635
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options);
636
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.deleteCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
637
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
638
+ });
639
+ },
640
+ /**
641
+ * 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.
642
+ * @summary Get calendar event
643
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
644
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
645
+ * @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.
646
+ * @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.
647
+ * @param {*} [options] Override http request option.
648
+ * @throws {RequiredError}
649
+ */
650
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
651
+ return __awaiter(this, void 0, void 0, function* () {
652
+ var _a, _b;
653
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options);
654
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.getCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
655
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
656
+ });
657
+ },
658
+ /**
659
+ * 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.
660
+ * @summary List calendar events
661
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
662
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
663
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
664
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
665
+ * @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`.
666
+ * @param {*} [options] Override http request option.
667
+ * @throws {RequiredError}
668
+ */
669
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
670
+ return __awaiter(this, void 0, void 0, function* () {
671
+ var _a, _b;
672
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options);
673
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.listCalendarEvents']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
674
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
675
+ });
676
+ },
677
+ /**
678
+ * 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`.
679
+ * @summary Reply to calendar event
680
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
681
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
682
+ * @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.
683
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
684
+ * @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.
685
+ * @param {*} [options] Override http request option.
686
+ * @throws {RequiredError}
687
+ */
688
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
689
+ return __awaiter(this, void 0, void 0, function* () {
690
+ var _a, _b;
691
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options);
692
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.replyToCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
693
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
694
+ });
695
+ },
696
+ /**
697
+ * 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`.
698
+ * @summary Reschedule calendar event
699
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
700
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
701
+ * @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.
702
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
703
+ * @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.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ */
707
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
708
+ return __awaiter(this, void 0, void 0, function* () {
709
+ var _a, _b;
710
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options);
711
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.rescheduleCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
712
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
713
+ });
714
+ },
715
+ /**
716
+ * 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`.
717
+ * @summary Update calendar event
718
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
719
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
720
+ * @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.
721
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
722
+ * @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.
723
+ * @param {*} [options] Override http request option.
724
+ * @throws {RequiredError}
725
+ */
726
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
727
+ return __awaiter(this, void 0, void 0, function* () {
728
+ var _a, _b;
729
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options);
730
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarEventsApi.updateCalendarEvent']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
731
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
732
+ });
733
+ },
734
+ };
735
+ };
736
+ exports.CalendarEventsApiFp = CalendarEventsApiFp;
737
+ /**
738
+ * CalendarEventsApi - factory interface
739
+ * @export
740
+ */
741
+ const CalendarEventsApiFactory = function (configuration, basePath, axios) {
742
+ const localVarFp = (0, exports.CalendarEventsApiFp)(configuration);
743
+ return {
744
+ /**
745
+ * 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`.
746
+ * @summary Create calendar event
747
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
748
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
749
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ */
753
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
754
+ return localVarFp.createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options).then((request) => request(axios, basePath));
755
+ },
756
+ /**
757
+ * 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.
758
+ * @summary Delete calendar event
759
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
760
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
761
+ * @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.
762
+ * @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.
763
+ * @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`.
764
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
765
+ * @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.
766
+ * @param {*} [options] Override http request option.
767
+ * @throws {RequiredError}
768
+ */
769
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
770
+ return localVarFp.deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options).then((request) => request(axios, basePath));
771
+ },
772
+ /**
773
+ * 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.
774
+ * @summary Get calendar event
775
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
776
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
777
+ * @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.
778
+ * @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.
779
+ * @param {*} [options] Override http request option.
780
+ * @throws {RequiredError}
781
+ */
782
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
783
+ return localVarFp.getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options).then((request) => request(axios, basePath));
784
+ },
785
+ /**
786
+ * 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.
787
+ * @summary List calendar events
788
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
789
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
790
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
791
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
792
+ * @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`.
793
+ * @param {*} [options] Override http request option.
794
+ * @throws {RequiredError}
795
+ */
796
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
797
+ return localVarFp.listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options).then((request) => request(axios, basePath));
798
+ },
799
+ /**
800
+ * 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`.
801
+ * @summary Reply to calendar event
802
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
803
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
804
+ * @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.
805
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
806
+ * @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.
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
811
+ return localVarFp.replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options).then((request) => request(axios, basePath));
812
+ },
813
+ /**
814
+ * 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`.
815
+ * @summary Reschedule calendar event
816
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
817
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
818
+ * @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.
819
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
820
+ * @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.
821
+ * @param {*} [options] Override http request option.
822
+ * @throws {RequiredError}
823
+ */
824
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
825
+ return localVarFp.rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options).then((request) => request(axios, basePath));
826
+ },
827
+ /**
828
+ * 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`.
829
+ * @summary Update calendar event
830
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
831
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
832
+ * @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.
833
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
834
+ * @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.
835
+ * @param {*} [options] Override http request option.
836
+ * @throws {RequiredError}
837
+ */
838
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
839
+ return localVarFp.updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options).then((request) => request(axios, basePath));
840
+ },
841
+ };
842
+ };
843
+ exports.CalendarEventsApiFactory = CalendarEventsApiFactory;
844
+ /**
845
+ * CalendarEventsApi - object-oriented interface
846
+ * @export
847
+ * @class CalendarEventsApi
848
+ * @extends {BaseAPI}
849
+ */
850
+ class CalendarEventsApi extends base_1.BaseAPI {
851
+ /**
852
+ * 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`.
853
+ * @summary Create calendar event
854
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
855
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
856
+ * @param {V1CalendarEventsCreateRequest} v1CalendarEventsCreateRequest
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ * @memberof CalendarEventsApi
860
+ */
861
+ createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options) {
862
+ return (0, exports.CalendarEventsApiFp)(this.configuration).createCalendarEvent(mailboxResourceId, calendarUuid, v1CalendarEventsCreateRequest, options).then((request) => request(this.axios, this.basePath));
863
+ }
864
+ /**
865
+ * 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.
866
+ * @summary Delete calendar event
867
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
868
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
869
+ * @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.
870
+ * @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.
871
+ * @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`.
872
+ * @param {DeleteCalendarEventNotifyAttendeesEnum} [notifyAttendees] `false` deletes without emailing attendees a cancellation or update, or the organizer a decline. Omitted means `true`.
873
+ * @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.
874
+ * @param {*} [options] Override http request option.
875
+ * @throws {RequiredError}
876
+ * @memberof CalendarEventsApi
877
+ */
878
+ deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options) {
879
+ return (0, exports.CalendarEventsApiFp)(this.configuration).deleteCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, scope, recurrenceId, notifyAttendees, ifMatch, options).then((request) => request(this.axios, this.basePath));
880
+ }
881
+ /**
882
+ * 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.
883
+ * @summary Get calendar event
884
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
885
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
886
+ * @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.
887
+ * @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.
888
+ * @param {*} [options] Override http request option.
889
+ * @throws {RequiredError}
890
+ * @memberof CalendarEventsApi
891
+ */
892
+ getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options) {
893
+ return (0, exports.CalendarEventsApiFp)(this.configuration).getCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, recurrenceId, options).then((request) => request(this.axios, this.basePath));
894
+ }
895
+ /**
896
+ * 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.
897
+ * @summary List calendar events
898
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
899
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
900
+ * @param {string} start Start of the range, inclusive. ISO 8601 date-time with offset.
901
+ * @param {string} end End of the range, exclusive. ISO 8601 date-time after `start` and at most 32 days after it.
902
+ * @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`.
903
+ * @param {*} [options] Override http request option.
904
+ * @throws {RequiredError}
905
+ * @memberof CalendarEventsApi
906
+ */
907
+ listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options) {
908
+ return (0, exports.CalendarEventsApiFp)(this.configuration).listCalendarEvents(mailboxResourceId, calendarUuid, start, end, timeZone, options).then((request) => request(this.axios, this.basePath));
909
+ }
910
+ /**
911
+ * 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`.
912
+ * @summary Reply to calendar event
913
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
914
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
915
+ * @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.
916
+ * @param {V1CalendarEventsReplyRequest} v1CalendarEventsReplyRequest
917
+ * @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.
918
+ * @param {*} [options] Override http request option.
919
+ * @throws {RequiredError}
920
+ * @memberof CalendarEventsApi
921
+ */
922
+ replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options) {
923
+ return (0, exports.CalendarEventsApiFp)(this.configuration).replyToCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsReplyRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
924
+ }
925
+ /**
926
+ * 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`.
927
+ * @summary Reschedule calendar event
928
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
929
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
930
+ * @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.
931
+ * @param {V1CalendarEventsRescheduleRequest} v1CalendarEventsRescheduleRequest
932
+ * @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.
933
+ * @param {*} [options] Override http request option.
934
+ * @throws {RequiredError}
935
+ * @memberof CalendarEventsApi
936
+ */
937
+ rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options) {
938
+ return (0, exports.CalendarEventsApiFp)(this.configuration).rescheduleCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsRescheduleRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
939
+ }
940
+ /**
941
+ * 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`.
942
+ * @summary Update calendar event
943
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
944
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
945
+ * @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.
946
+ * @param {V1CalendarEventsUpdateRequest} v1CalendarEventsUpdateRequest
947
+ * @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.
948
+ * @param {*} [options] Override http request option.
949
+ * @throws {RequiredError}
950
+ * @memberof CalendarEventsApi
951
+ */
952
+ updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options) {
953
+ return (0, exports.CalendarEventsApiFp)(this.configuration).updateCalendarEvent(mailboxResourceId, calendarUuid, eventUuid, v1CalendarEventsUpdateRequest, ifMatch, options).then((request) => request(this.axios, this.basePath));
954
+ }
955
+ }
956
+ exports.CalendarEventsApi = CalendarEventsApi;
957
+ /**
958
+ * @export
959
+ */
960
+ exports.DeleteCalendarEventScopeEnum = {
961
+ This: 'this',
962
+ Future: 'future',
963
+ All: 'all'
964
+ };
965
+ /**
966
+ * @export
967
+ */
968
+ exports.DeleteCalendarEventNotifyAttendeesEnum = {
969
+ True: 'true',
970
+ False: 'false',
971
+ _1: '1',
972
+ _0: '0'
973
+ };
974
+ /**
975
+ * CalendarsApi - axios parameter creator
976
+ * @export
977
+ */
978
+ const CalendarsApiAxiosParamCreator = function (configuration) {
979
+ return {
980
+ /**
981
+ * 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`.
982
+ * @summary Create calendar
983
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
984
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
985
+ * @param {*} [options] Override http request option.
986
+ * @throws {RequiredError}
987
+ */
988
+ createCalendar: (mailboxResourceId_1, v1CalendarsCreateRequest_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, v1CalendarsCreateRequest_1, ...args_1], void 0, function* (mailboxResourceId, v1CalendarsCreateRequest, options = {}) {
989
+ // verify required parameter 'mailboxResourceId' is not null or undefined
990
+ (0, common_1.assertParamExists)('createCalendar', 'mailboxResourceId', mailboxResourceId);
991
+ // verify required parameter 'v1CalendarsCreateRequest' is not null or undefined
992
+ (0, common_1.assertParamExists)('createCalendar', 'v1CalendarsCreateRequest', v1CalendarsCreateRequest);
993
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars`
994
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId));
995
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
996
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
997
+ let baseOptions;
998
+ if (configuration) {
999
+ baseOptions = configuration.baseOptions;
1000
+ }
1001
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
1002
+ const localVarHeaderParameter = {};
1003
+ const localVarQueryParameter = {};
1004
+ // authentication BearerAuth required
1005
+ // http bearer authentication required
1006
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1007
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1008
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1009
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1010
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1011
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarsCreateRequest, localVarRequestOptions, configuration);
1012
+ return {
1013
+ url: (0, common_1.toPathString)(localVarUrlObj),
1014
+ options: localVarRequestOptions,
1015
+ };
1016
+ }),
1017
+ /**
1018
+ * 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`.
1019
+ * @summary Delete calendar
1020
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1021
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1022
+ * @param {*} [options] Override http request option.
1023
+ * @throws {RequiredError}
1024
+ */
1025
+ deleteCalendar: (mailboxResourceId_1, calendarUuid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, options = {}) {
1026
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1027
+ (0, common_1.assertParamExists)('deleteCalendar', 'mailboxResourceId', mailboxResourceId);
1028
+ // verify required parameter 'calendarUuid' is not null or undefined
1029
+ (0, common_1.assertParamExists)('deleteCalendar', 'calendarUuid', calendarUuid);
1030
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1031
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
1032
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid));
1033
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1034
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1035
+ let baseOptions;
1036
+ if (configuration) {
1037
+ baseOptions = configuration.baseOptions;
1038
+ }
1039
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
1040
+ const localVarHeaderParameter = {};
1041
+ const localVarQueryParameter = {};
1042
+ // authentication BearerAuth required
1043
+ // http bearer authentication required
1044
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1045
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1046
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1047
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1048
+ return {
1049
+ url: (0, common_1.toPathString)(localVarUrlObj),
1050
+ options: localVarRequestOptions,
1051
+ };
1052
+ }),
1053
+ /**
1054
+ * 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.
1055
+ * @summary Get calendar
1056
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1057
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1058
+ * @param {*} [options] Override http request option.
1059
+ * @throws {RequiredError}
1060
+ */
1061
+ getCalendar: (mailboxResourceId_1, calendarUuid_1, ...args_1) => __awaiter(this, [mailboxResourceId_1, calendarUuid_1, ...args_1], void 0, function* (mailboxResourceId, calendarUuid, options = {}) {
1062
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1063
+ (0, common_1.assertParamExists)('getCalendar', 'mailboxResourceId', mailboxResourceId);
1064
+ // verify required parameter 'calendarUuid' is not null or undefined
1065
+ (0, common_1.assertParamExists)('getCalendar', 'calendarUuid', calendarUuid);
1066
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1067
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
1068
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid));
1069
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1070
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1071
+ let baseOptions;
1072
+ if (configuration) {
1073
+ baseOptions = configuration.baseOptions;
1074
+ }
1075
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1076
+ const localVarHeaderParameter = {};
1077
+ const localVarQueryParameter = {};
1078
+ // authentication BearerAuth required
1079
+ // http bearer authentication required
1080
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1081
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1082
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1083
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1084
+ return {
1085
+ url: (0, common_1.toPathString)(localVarUrlObj),
1086
+ options: localVarRequestOptions,
1087
+ };
1088
+ }),
1089
+ /**
1090
+ * 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.
1091
+ * @summary List calendars
1092
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1093
+ * @param {number} [page] Page number (1-based).
1094
+ * @param {number} [perPage] Items per page (max 200).
1095
+ * @param {*} [options] Override http request option.
1096
+ * @throws {RequiredError}
1097
+ */
1098
+ 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 = {}) {
1099
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1100
+ (0, common_1.assertParamExists)('listCalendars', 'mailboxResourceId', mailboxResourceId);
1101
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars`
1102
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId));
1103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1104
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1105
+ let baseOptions;
1106
+ if (configuration) {
1107
+ baseOptions = configuration.baseOptions;
1108
+ }
1109
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1110
+ const localVarHeaderParameter = {};
1111
+ const localVarQueryParameter = {};
1112
+ // authentication BearerAuth required
1113
+ // http bearer authentication required
1114
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1115
+ if (page !== undefined) {
1116
+ localVarQueryParameter['page'] = page;
1117
+ }
1118
+ if (perPage !== undefined) {
1119
+ localVarQueryParameter['perPage'] = perPage;
1120
+ }
1121
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1122
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1123
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1124
+ return {
1125
+ url: (0, common_1.toPathString)(localVarUrlObj),
1126
+ options: localVarRequestOptions,
1127
+ };
1128
+ }),
1129
+ /**
1130
+ * 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.
1131
+ * @summary Update calendar
1132
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1133
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1134
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1135
+ * @param {*} [options] Override http request option.
1136
+ * @throws {RequiredError}
1137
+ */
1138
+ 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 = {}) {
1139
+ // verify required parameter 'mailboxResourceId' is not null or undefined
1140
+ (0, common_1.assertParamExists)('updateCalendar', 'mailboxResourceId', mailboxResourceId);
1141
+ // verify required parameter 'calendarUuid' is not null or undefined
1142
+ (0, common_1.assertParamExists)('updateCalendar', 'calendarUuid', calendarUuid);
1143
+ // verify required parameter 'v1CalendarsUpdateRequest' is not null or undefined
1144
+ (0, common_1.assertParamExists)('updateCalendar', 'v1CalendarsUpdateRequest', v1CalendarsUpdateRequest);
1145
+ const localVarPath = `/api/v1/mailboxes/{mailboxResourceId}/calendars/{calendarUuid}`
1146
+ .replace(`{${"mailboxResourceId"}}`, (0, common_1.encodePathParam)('mailboxResourceId', mailboxResourceId))
1147
+ .replace(`{${"calendarUuid"}}`, (0, common_1.encodePathParam)('calendarUuid', calendarUuid));
1148
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1149
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1150
+ let baseOptions;
1151
+ if (configuration) {
1152
+ baseOptions = configuration.baseOptions;
1153
+ }
1154
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
1155
+ const localVarHeaderParameter = {};
1156
+ const localVarQueryParameter = {};
1157
+ // authentication BearerAuth required
1158
+ // http bearer authentication required
1159
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
1160
+ localVarHeaderParameter['Content-Type'] = 'application/json';
1161
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1162
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1163
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1164
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(v1CalendarsUpdateRequest, localVarRequestOptions, configuration);
1165
+ return {
1166
+ url: (0, common_1.toPathString)(localVarUrlObj),
1167
+ options: localVarRequestOptions,
1168
+ };
1169
+ }),
1170
+ };
1171
+ };
1172
+ exports.CalendarsApiAxiosParamCreator = CalendarsApiAxiosParamCreator;
1173
+ /**
1174
+ * CalendarsApi - functional programming interface
1175
+ * @export
1176
+ */
1177
+ const CalendarsApiFp = function (configuration) {
1178
+ const localVarAxiosParamCreator = (0, exports.CalendarsApiAxiosParamCreator)(configuration);
1179
+ return {
1180
+ /**
1181
+ * 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`.
1182
+ * @summary Create calendar
1183
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1184
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ */
1188
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1189
+ return __awaiter(this, void 0, void 0, function* () {
1190
+ var _a, _b;
1191
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options);
1192
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarsApi.createCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1193
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1194
+ });
1195
+ },
1196
+ /**
1197
+ * 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`.
1198
+ * @summary Delete calendar
1199
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1200
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1201
+ * @param {*} [options] Override http request option.
1202
+ * @throws {RequiredError}
1203
+ */
1204
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1205
+ return __awaiter(this, void 0, void 0, function* () {
1206
+ var _a, _b;
1207
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteCalendar(mailboxResourceId, calendarUuid, options);
1208
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarsApi.deleteCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1209
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1210
+ });
1211
+ },
1212
+ /**
1213
+ * 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.
1214
+ * @summary Get calendar
1215
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1216
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1217
+ * @param {*} [options] Override http request option.
1218
+ * @throws {RequiredError}
1219
+ */
1220
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1221
+ return __awaiter(this, void 0, void 0, function* () {
1222
+ var _a, _b;
1223
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getCalendar(mailboxResourceId, calendarUuid, options);
1224
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarsApi.getCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1225
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1226
+ });
1227
+ },
1228
+ /**
1229
+ * 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.
1230
+ * @summary List calendars
1231
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1232
+ * @param {number} [page] Page number (1-based).
1233
+ * @param {number} [perPage] Items per page (max 200).
1234
+ * @param {*} [options] Override http request option.
1235
+ * @throws {RequiredError}
1236
+ */
1237
+ listCalendars(mailboxResourceId, page, perPage, options) {
1238
+ return __awaiter(this, void 0, void 0, function* () {
1239
+ var _a, _b;
1240
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listCalendars(mailboxResourceId, page, perPage, options);
1241
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarsApi.listCalendars']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1242
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1243
+ });
1244
+ },
1245
+ /**
1246
+ * 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.
1247
+ * @summary Update calendar
1248
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1249
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1250
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1251
+ * @param {*} [options] Override http request option.
1252
+ * @throws {RequiredError}
1253
+ */
1254
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1255
+ return __awaiter(this, void 0, void 0, function* () {
1256
+ var _a, _b;
1257
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options);
1258
+ const localVarOperationServerBasePath = (_b = (_a = base_1.operationServerMap['CalendarsApi.updateCalendar']) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.url;
1259
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1260
+ });
1261
+ },
1262
+ };
1263
+ };
1264
+ exports.CalendarsApiFp = CalendarsApiFp;
1265
+ /**
1266
+ * CalendarsApi - factory interface
1267
+ * @export
1268
+ */
1269
+ const CalendarsApiFactory = function (configuration, basePath, axios) {
1270
+ const localVarFp = (0, exports.CalendarsApiFp)(configuration);
1271
+ return {
1272
+ /**
1273
+ * 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`.
1274
+ * @summary Create calendar
1275
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1276
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1277
+ * @param {*} [options] Override http request option.
1278
+ * @throws {RequiredError}
1279
+ */
1280
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1281
+ return localVarFp.createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options).then((request) => request(axios, basePath));
1282
+ },
1283
+ /**
1284
+ * 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`.
1285
+ * @summary Delete calendar
1286
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1287
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1288
+ * @param {*} [options] Override http request option.
1289
+ * @throws {RequiredError}
1290
+ */
1291
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1292
+ return localVarFp.deleteCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(axios, basePath));
1293
+ },
1294
+ /**
1295
+ * 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.
1296
+ * @summary Get calendar
1297
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1298
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1299
+ * @param {*} [options] Override http request option.
1300
+ * @throws {RequiredError}
1301
+ */
1302
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1303
+ return localVarFp.getCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(axios, basePath));
1304
+ },
1305
+ /**
1306
+ * 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.
1307
+ * @summary List calendars
1308
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1309
+ * @param {number} [page] Page number (1-based).
1310
+ * @param {number} [perPage] Items per page (max 200).
1311
+ * @param {*} [options] Override http request option.
1312
+ * @throws {RequiredError}
1313
+ */
1314
+ listCalendars(mailboxResourceId, page, perPage, options) {
1315
+ return localVarFp.listCalendars(mailboxResourceId, page, perPage, options).then((request) => request(axios, basePath));
1316
+ },
1317
+ /**
1318
+ * 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.
1319
+ * @summary Update calendar
1320
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1321
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1322
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1323
+ * @param {*} [options] Override http request option.
1324
+ * @throws {RequiredError}
1325
+ */
1326
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1327
+ return localVarFp.updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options).then((request) => request(axios, basePath));
1328
+ },
1329
+ };
1330
+ };
1331
+ exports.CalendarsApiFactory = CalendarsApiFactory;
1332
+ /**
1333
+ * CalendarsApi - object-oriented interface
1334
+ * @export
1335
+ * @class CalendarsApi
1336
+ * @extends {BaseAPI}
1337
+ */
1338
+ class CalendarsApi extends base_1.BaseAPI {
1339
+ /**
1340
+ * 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`.
1341
+ * @summary Create calendar
1342
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1343
+ * @param {V1CalendarsCreateRequest} v1CalendarsCreateRequest
1344
+ * @param {*} [options] Override http request option.
1345
+ * @throws {RequiredError}
1346
+ * @memberof CalendarsApi
1347
+ */
1348
+ createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options) {
1349
+ return (0, exports.CalendarsApiFp)(this.configuration).createCalendar(mailboxResourceId, v1CalendarsCreateRequest, options).then((request) => request(this.axios, this.basePath));
1350
+ }
1351
+ /**
1352
+ * 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`.
1353
+ * @summary Delete calendar
1354
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1355
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1356
+ * @param {*} [options] Override http request option.
1357
+ * @throws {RequiredError}
1358
+ * @memberof CalendarsApi
1359
+ */
1360
+ deleteCalendar(mailboxResourceId, calendarUuid, options) {
1361
+ return (0, exports.CalendarsApiFp)(this.configuration).deleteCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(this.axios, this.basePath));
1362
+ }
1363
+ /**
1364
+ * 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.
1365
+ * @summary Get calendar
1366
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1367
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1368
+ * @param {*} [options] Override http request option.
1369
+ * @throws {RequiredError}
1370
+ * @memberof CalendarsApi
1371
+ */
1372
+ getCalendar(mailboxResourceId, calendarUuid, options) {
1373
+ return (0, exports.CalendarsApiFp)(this.configuration).getCalendar(mailboxResourceId, calendarUuid, options).then((request) => request(this.axios, this.basePath));
1374
+ }
1375
+ /**
1376
+ * 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.
1377
+ * @summary List calendars
1378
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1379
+ * @param {number} [page] Page number (1-based).
1380
+ * @param {number} [perPage] Items per page (max 200).
1381
+ * @param {*} [options] Override http request option.
1382
+ * @throws {RequiredError}
1383
+ * @memberof CalendarsApi
1384
+ */
1385
+ listCalendars(mailboxResourceId, page, perPage, options) {
1386
+ return (0, exports.CalendarsApiFp)(this.configuration).listCalendars(mailboxResourceId, page, perPage, options).then((request) => request(this.axios, this.basePath));
1387
+ }
1388
+ /**
1389
+ * 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.
1390
+ * @summary Update calendar
1391
+ * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1392
+ * @param {string} calendarUuid Calendar identifier: the `uuid` of a calendar returned by `listCalendars`, or the `calendarUuid` of an event returned by `listCalendarEvents`.
1393
+ * @param {V1CalendarsUpdateRequest} v1CalendarsUpdateRequest
1394
+ * @param {*} [options] Override http request option.
1395
+ * @throws {RequiredError}
1396
+ * @memberof CalendarsApi
1397
+ */
1398
+ updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options) {
1399
+ return (0, exports.CalendarsApiFp)(this.configuration).updateCalendar(mailboxResourceId, calendarUuid, v1CalendarsUpdateRequest, options).then((request) => request(this.axios, this.basePath));
1400
+ }
1401
+ }
1402
+ exports.CalendarsApi = CalendarsApi;
160
1403
  /**
161
1404
  * FeedbackApi - axios parameter creator
162
1405
  * @export
@@ -1895,7 +3138,7 @@ exports.QuotaApi = QuotaApi;
1895
3138
  const SendApiAxiosParamCreator = function (configuration) {
1896
3139
  return {
1897
3140
  /**
1898
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3141
+ * 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.
1899
3142
  * @summary Send email
1900
3143
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1901
3144
  * @param {V1SendRequest} v1SendRequest
@@ -1942,7 +3185,7 @@ const SendApiFp = function (configuration) {
1942
3185
  const localVarAxiosParamCreator = (0, exports.SendApiAxiosParamCreator)(configuration);
1943
3186
  return {
1944
3187
  /**
1945
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3188
+ * 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.
1946
3189
  * @summary Send email
1947
3190
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1948
3191
  * @param {V1SendRequest} v1SendRequest
@@ -1968,7 +3211,7 @@ const SendApiFactory = function (configuration, basePath, axios) {
1968
3211
  const localVarFp = (0, exports.SendApiFp)(configuration);
1969
3212
  return {
1970
3213
  /**
1971
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3214
+ * 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.
1972
3215
  * @summary Send email
1973
3216
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1974
3217
  * @param {V1SendRequest} v1SendRequest
@@ -1989,7 +3232,7 @@ exports.SendApiFactory = SendApiFactory;
1989
3232
  */
1990
3233
  class SendApi extends base_1.BaseAPI {
1991
3234
  /**
1992
- * Send a message from the managed mailbox. Saves a copy to INBOX.Sent.
3235
+ * 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.
1993
3236
  * @summary Send email
1994
3237
  * @param {string} mailboxResourceId Resource ID of the managed mailbox the bearer token is authorized for.
1995
3238
  * @param {V1SendRequest} v1SendRequest