@wix/auto_sdk_calendar_events 1.0.57 → 1.0.58

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../index.ts","../../src/calendar-v3-event-events.public.ts","../../src/calendar-v3-event-events.universal.ts","../../src/calendar-v3-event-events.http.ts","../../src/calendar-v3-event-events.context.ts"],"sourcesContent":["export * from './src/calendar-v3-event-events.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCancelEventApplicationErrors,\n BulkCancelEventOptions,\n BulkCancelEventResponse,\n BulkCreateEventOptions,\n BulkCreateEventResponse,\n BulkUpdateEventOptions,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n CancelEventApplicationErrors,\n CancelEventOptions,\n CancelEventResponse,\n CreateEventOptions,\n Event,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventQuery,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n EventsQueryBuilder,\n FieldWithLiterals,\n GetEventOptions,\n ListEventsByContactIdOptions,\n ListEventsByContactIdResponse,\n ListEventsByMemberIdOptions,\n ListEventsByMemberIdResponse,\n ListEventsOptions,\n ListEventsResponse,\n MaskedEvent,\n QueryEventsOptions,\n QueryEventsResponse,\n RestoreEventDefaultsOptions,\n RestoreEventDefaultsResponse,\n SplitRecurringEventOptions,\n SplitRecurringEventResponse,\n UpdateEvent,\n UpdateEventOptions,\n bulkCancelEvent as universalBulkCancelEvent,\n bulkCreateEvent as universalBulkCreateEvent,\n bulkUpdateEvent as universalBulkUpdateEvent,\n cancelEvent as universalCancelEvent,\n createEvent as universalCreateEvent,\n getEvent as universalGetEvent,\n listEvents as universalListEvents,\n listEventsByContactId as universalListEventsByContactId,\n listEventsByMemberId as universalListEventsByMemberId,\n queryEvents as universalQueryEvents,\n restoreEventDefaults as universalRestoreEventDefaults,\n splitRecurringEvent as universalSplitRecurringEvent,\n typedQueryEvents as universalTypedQueryEvents,\n updateEvent as universalUpdateEvent,\n} from './calendar-v3-event-events.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/calendar' };\n\nexport function listEventsByContactId(\n httpClient: HttpClient\n): ListEventsByContactIdSignature {\n return (contactId: string, options?: ListEventsByContactIdOptions) =>\n universalListEventsByContactId(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsByContactIdSignature {\n /**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param - ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n */\n (contactId: string, options?: ListEventsByContactIdOptions): Promise<\n NonNullablePaths<\n ListEventsByContactIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function listEventsByMemberId(\n httpClient: HttpClient\n): ListEventsByMemberIdSignature {\n return (memberId: string, options?: ListEventsByMemberIdOptions) =>\n universalListEventsByMemberId(\n memberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsByMemberIdSignature {\n /**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param - ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n */\n (memberId: string, options?: ListEventsByMemberIdOptions): Promise<\n NonNullablePaths<\n ListEventsByMemberIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function getEvent(httpClient: HttpClient): GetEventSignature {\n return (eventId: string, options?: GetEventOptions) =>\n universalGetEvent(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEventSignature {\n /**\n * Retrieves an event.\n * @param - ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @returns Retrieved event.\n */\n (eventId: string, options?: GetEventOptions): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function listEvents(httpClient: HttpClient): ListEventsSignature {\n return (eventIds: string[], options?: ListEventsOptions) =>\n universalListEvents(\n eventIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsSignature {\n /**\n * Retrieves a list of events by their IDs.\n * @param - IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n */\n (eventIds: string[], options?: ListEventsOptions): Promise<\n NonNullablePaths<\n ListEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function queryEvents(httpClient: HttpClient): QueryEventsSignature {\n return (options?: QueryEventsOptions) =>\n universalQueryEvents(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryEventsSignature {\n /**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n */\n (options?: QueryEventsOptions): EventsQueryBuilder;\n}\n\nexport function typedQueryEvents(\n httpClient: HttpClient\n): TypedQueryEventsSignature {\n return (query: EventQuery, options?: QueryEventsOptions) =>\n universalTypedQueryEvents(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryEventsSignature {\n /** */\n (query: EventQuery, options?: QueryEventsOptions): Promise<\n NonNullablePaths<\n QueryEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function createEvent(httpClient: HttpClient): CreateEventSignature {\n return (\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n ) =>\n universalCreateEvent(\n event,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateEventSignature {\n /**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param - Event to create.\n * @returns Created event.\n */\n (\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n ): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function bulkCreateEvent(\n httpClient: HttpClient\n): BulkCreateEventSignature {\n return (\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n ) =>\n universalBulkCreateEvent(\n events,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateEventSignature {\n /**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param - Events to create.\n */\n (\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n ): Promise<\n NonNullablePaths<\n BulkCreateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport function updateEvent(httpClient: HttpClient): UpdateEventSignature {\n return (\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n ) =>\n universalUpdateEvent(\n _id,\n event,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateEventSignature {\n /**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param - Event ID.\n * @returns Updated event.\n */\n (\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n ): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function bulkUpdateEvent(\n httpClient: HttpClient\n): BulkUpdateEventSignature {\n return (\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n ) =>\n universalBulkUpdateEvent(\n events,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateEventSignature {\n /**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param - Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n */\n (\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n ): Promise<\n NonNullablePaths<\n BulkUpdateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport function restoreEventDefaults(\n httpClient: HttpClient\n): RestoreEventDefaultsSignature {\n return (\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n ) =>\n universalRestoreEventDefaults(\n eventId,\n fields,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RestoreEventDefaultsSignature {\n /**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n * @param - ID of the event for which to restore default values.\n * @param - Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n */\n (\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n ): Promise<\n NonNullablePaths<\n RestoreEventDefaultsResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n >\n >;\n}\n\nexport function splitRecurringEvent(\n httpClient: HttpClient\n): SplitRecurringEventSignature {\n return (\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n ) =>\n universalSplitRecurringEvent(\n recurringEventId,\n splitLocalDate,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SplitRecurringEventSignature {\n /**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n * @param - ID of the `MASTER` event to split.\n * @param - Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n */\n (\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n ): Promise<\n NonNullablePaths<\n SplitRecurringEventResponse,\n | `updatedRecurringEventEndingBeforeSplit.status`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceType`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.frequency`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.days`\n | `updatedRecurringEventEndingBeforeSplit.transparency`\n | `updatedRecurringEventEndingBeforeSplit.location.type`\n | `updatedRecurringEventEndingBeforeSplit.resources`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.transparency`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.permissionRole`\n | `updatedRecurringEventEndingBeforeSplit.participants.list`\n | `updatedRecurringEventEndingBeforeSplit.participants.status`\n | `updatedRecurringEventEndingBeforeSplit.conferencingDetails.type`\n | `updatedRecurringEventEndingBeforeSplit.inheritedFields`\n | `updatedRecurringEventEndingBeforeSplit.permissions`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.identity.wixUserId`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.role`\n | `newRecurringEventStartingFromSplit.status`\n | `newRecurringEventStartingFromSplit.recurrenceType`\n | `newRecurringEventStartingFromSplit.recurrenceRule.frequency`\n | `newRecurringEventStartingFromSplit.recurrenceRule.days`\n | `newRecurringEventStartingFromSplit.transparency`\n | `newRecurringEventStartingFromSplit.location.type`\n | `newRecurringEventStartingFromSplit.resources`\n | `newRecurringEventStartingFromSplit.resources.${number}.transparency`\n | `newRecurringEventStartingFromSplit.resources.${number}.permissionRole`\n | `newRecurringEventStartingFromSplit.participants.list`\n | `newRecurringEventStartingFromSplit.participants.status`\n | `newRecurringEventStartingFromSplit.conferencingDetails.type`\n | `newRecurringEventStartingFromSplit.inheritedFields`\n | `newRecurringEventStartingFromSplit.permissions`\n | `newRecurringEventStartingFromSplit.permissions.${number}.identity.wixUserId`\n | `newRecurringEventStartingFromSplit.permissions.${number}.role`,\n 6\n >\n >;\n}\n\nexport function cancelEvent(httpClient: HttpClient): CancelEventSignature {\n return (eventId: string, options?: CancelEventOptions) =>\n universalCancelEvent(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelEventSignature {\n /**\n * Cancels an event.\n * @param - ID of the event to cancel.\n */\n (eventId: string, options?: CancelEventOptions): Promise<\n NonNullablePaths<\n CancelEventResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n > & {\n __applicationErrorsType?: CancelEventApplicationErrors;\n }\n >;\n}\n\nexport function bulkCancelEvent(\n httpClient: HttpClient\n): BulkCancelEventSignature {\n return (eventIds: string[], options?: BulkCancelEventOptions) =>\n universalBulkCancelEvent(\n eventIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCancelEventSignature {\n /**\n * Cancels multiple events in bulk.\n * @param - IDs of the events to cancel.\n */\n (eventIds: string[], options?: BulkCancelEventOptions): Promise<\n NonNullablePaths<\n BulkCancelEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkCancelEventApplicationErrors;\n }\n >;\n}\n\nexport const onEventCancelled = EventDefinition(\n 'wix.calendar.v3.event_cancelled',\n true,\n (event: EventCancelledEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.event.createdDate' },\n { path: 'data.event.updatedDate' },\n { path: 'data.event.start.utcDate' },\n { path: 'data.event.end.utcDate' },\n { path: 'data.event.adjustedStart.utcDate' },\n { path: 'data.event.adjustedEnd.utcDate' },\n { path: 'data.event.recurrenceRule.until.utcDate' },\n { path: 'data.event.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventCancelledEnvelope>();\nexport const onEventCreated = EventDefinition(\n 'wix.calendar.v3.event_created',\n true,\n (event: EventCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.start.utcDate' },\n { path: 'entity.end.utcDate' },\n { path: 'entity.adjustedStart.utcDate' },\n { path: 'entity.adjustedEnd.utcDate' },\n { path: 'entity.recurrenceRule.until.utcDate' },\n { path: 'entity.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventCreatedEnvelope>();\nexport const onEventRecurringSplit = EventDefinition(\n 'wix.calendar.v3.event_recurring_split',\n true,\n (event: EventRecurringSplitEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.updatedRecurringEventEndingBeforeSplit.createdDate' },\n { path: 'data.updatedRecurringEventEndingBeforeSplit.updatedDate' },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.start.utcDate',\n },\n { path: 'data.updatedRecurringEventEndingBeforeSplit.end.utcDate' },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'data.newRecurringEventStartingFromSplit.createdDate' },\n { path: 'data.newRecurringEventStartingFromSplit.updatedDate' },\n { path: 'data.newRecurringEventStartingFromSplit.start.utcDate' },\n { path: 'data.newRecurringEventStartingFromSplit.end.utcDate' },\n {\n path: 'data.newRecurringEventStartingFromSplit.adjustedStart.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventRecurringSplitEnvelope>();\nexport const onEventUpdated = EventDefinition(\n 'wix.calendar.v3.event_updated',\n true,\n (event: EventUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.start.utcDate' },\n { path: 'entity.end.utcDate' },\n { path: 'entity.adjustedStart.utcDate' },\n { path: 'entity.adjustedEnd.utcDate' },\n { path: 'entity.recurrenceRule.until.utcDate' },\n { path: 'entity.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.start.utcDate' },\n { path: 'modifiedFields.end.utcDate' },\n { path: 'modifiedFields.adjustedStart.utcDate' },\n { path: 'modifiedFields.adjustedEnd.utcDate' },\n { path: 'modifiedFields.recurrenceRule.until.utcDate' },\n { path: 'modifiedFields.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ])\n )\n)<EventUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n Address,\n AddressHint,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCancelEventOptions,\n BulkCancelEventRequest,\n BulkCancelEventResponse,\n BulkCreateEventOptions,\n BulkCreateEventRequest,\n BulkCreateEventResponse,\n BulkEventResult,\n BulkUpdateEventOptions,\n BulkUpdateEventRequest,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n BusinessSchedule,\n CancelEventOptions,\n CancelEventRequest,\n CancelEventResponse,\n Categories,\n ChangeContext,\n ChangeContextPayloadOneOf,\n CommonCursorPaging,\n CommonCursorPagingMetadata,\n CommonCursors,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ConferencingDetails,\n ConsentPolicy,\n CreateEventOptions,\n CreateEventRequest,\n CreateEventResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n Day,\n DayOfWeek,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Event,\n EventCancelled,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventMetadata,\n EventQuerySpec,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n EventUpdatedWithMetadata,\n EventsQueryBuilder,\n EventsQueryResult,\n ExtendedFields,\n Field,\n Frequency,\n GeoCoordinates,\n GetEventOptions,\n GetEventRequest,\n GetEventResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ItemMetadata,\n ListEventsByContactIdOptions,\n ListEventsByContactIdRequest,\n ListEventsByContactIdResponse,\n ListEventsByMemberIdOptions,\n ListEventsByMemberIdRequest,\n ListEventsByMemberIdResponse,\n ListEventsOptions,\n ListEventsRequest,\n ListEventsResponse,\n ListRecurringEventInstancesHistoryRequest,\n ListRecurringEventInstancesHistoryResponse,\n Locale,\n Location,\n LocationType,\n MaskedEvent,\n MessageEnvelope,\n Multilingual,\n Participant,\n ParticipantNotification,\n Participants,\n ParticipantsStatus,\n Permission,\n PlacementType,\n Properties,\n PropertiesChange,\n QueryEventsOptions,\n QueryEventsRequest,\n QueryEventsResponse,\n RecurrenceRule,\n RecurrenceType,\n RecurringEventSplit,\n RequestedFields,\n ResolutionMethod,\n Resource,\n RestoreEventDefaultsOptions,\n RestoreEventDefaultsRequest,\n RestoreEventDefaultsResponse,\n RestoreInfo,\n Role,\n SiteCloned,\n SiteCreated,\n SitePropertiesEvent,\n SitePropertiesNotification,\n SortOrder,\n Sorting,\n SpecialHourPeriod,\n SplitRecurringEventOptions,\n SplitRecurringEventRequest,\n SplitRecurringEventResponse,\n Status,\n SupportedLanguage,\n TimePeriod,\n Translation,\n Transparency,\n Type,\n UpdateEvent,\n UpdateEventOptions,\n UpdateEventParticipantsRequest,\n UpdateEventParticipantsResponse,\n UpdateEventRequest,\n UpdateEventResponse,\n UpdateEventsWithFixedBusinessResourceIdRequest,\n UpdateEventsWithFixedBusinessResourceIdResponse,\n UpdateScheduleWithFixedBusinessResourceIdRequest,\n UpdateScheduleWithFixedBusinessResourceIdResponse,\n WebhookIdentityType,\n ZonedDate,\n} from './calendar-v3-event-events.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCalendarV3Event from './calendar-v3-event-events.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * An event is a scheduled entry on a calendar that includes details like timing,\n * location, and participants. Each event is associated with\n * a [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction),\n * from which it may [inherit default values](https://dev.wix.com/docs/rest/business-management/calendar/default-values).\n * Events can either be standalone, part of a recurring series, or define a\n * recurrence pattern. You can also specify whether events block time on the\n * schedule or allow other events to be scheduled concurrently.\n */\nexport interface Event {\n /**\n * Event ID.\n * @minLength 36\n * @maxLength 250\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * the event belongs to.\n * After creating an event, you can't assign it to a different schedule.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the external schedule the event belongs to.\n *\n * For example, if the event belongs to a Bookings staff member, identical to the ID of the [resource](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction). If the schedule belongs to a Bookings service, identical to the ID of the [service](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup).\n * @format GUID\n * @readonly\n */\n externalScheduleId?: string | null;\n /**\n * Schedule name.\n * @readonly\n */\n scheduleName?: string | null;\n /**\n * Event type. You can set the event type but you can't update it.\n *\n * Supported values:\n * + `DEFAULT`: A standard event that's not further specified.\n * + `WORKING_HOURS`: The event adds working hours to a schedule. By default not returned in [queryEvents()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/query-events).\n *\n * Additional supported values, if Wix Bookings is installed:\n * + `APPOINTMENT`: Bookings appointment event.\n * + `CLASS`: Bookings class event.\n * + `COURSE`: Bookings course event.\n * @immutable\n */\n type?: string | null;\n /**\n * Event status.\n *\n * Supported values:\n * + `CONFIRMED`: Event is scheduled to happen or has happened.\n * + `CANCELLED`: Event has been canceled.\n *\n * Default: `CONFIRMED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Event title.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n title?: string | null;\n /** Information about when the event starts. */\n start?: ZonedDate;\n /**\n * Information about when the event ends.\n *\n * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first).\n */\n end?: ZonedDate;\n /**\n * Information about when the event starts adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedStart?: ZonedDate;\n /**\n * Information about when the event ends adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedEnd?: ZonedDate;\n /**\n * Time zone the event is associated with in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * Only regional time zones and UTC are supported.\n * For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n */\n timeZone?: string | null;\n /**\n * Information about whether the event is a single occurrence or part of a\n * recurring series.\n *\n * Supported values:\n * + `NONE`: The event occurs only once and doesn't repeat.\n * + `MASTER`: Defines the recurrence pattern for a series of recurring events.\n * + `INSTANCE`: A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`.\n * + `EXCEPTION`: A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event.\n *\n * Default: `NONE`\n * @readonly\n */\n recurrenceType?: RecurrenceTypeWithLiterals;\n /**\n * Recurrence pattern for a series of events. This field is required when\n * creating a `MASTER` event and isn't available for non-recurring events.\n * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events.\n *\n * For example, an event that repeats every second Monday until January 7, 2026,\n * at 8:00 AM has the following `recurrenceRule`:\n * - `frequency = WEEKLY`\n * - `interval = 2`\n * - `days = [MONDAY]`\n * - `until = 20260107T08:00:00Z`\n */\n recurrenceRule?: RecurrenceRule;\n /**\n * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE`\n * and `EXCEPTION` events.\n * @minLength 64\n * @maxLength 64\n * @readonly\n */\n recurringEventId?: string | null;\n /**\n * Specifies whether the event blocks time in the schedule it belongs to.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Event location.\n *\n * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to\n */\n location?: Location;\n /**\n * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction)\n * affected by the event. This could include, for example, the\n * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction)\n * providing the service or the room where the appointment takes place.\n *\n * Max: 100 resources\n * @maxSize 100\n */\n resources?: Resource[];\n /**\n * Maximum number of participants who can participate in the event.\n *\n * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n totalCapacity?: number | null;\n /**\n * Number of participants who can still be added to the event.\n * @readonly\n */\n remainingCapacity?: number | null;\n /**\n * Information about the event's participants.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n * @readonly\n */\n participants?: Participants;\n /**\n * Information about the event's online conferencing.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n conferencingDetails?: ConferencingDetails;\n /**\n * Additional notes about the event.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n notes?: string | null;\n /**\n * List of fields whose values are inherited.\n * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event.\n * @readonly\n */\n inheritedFields?: FieldWithLiterals[];\n /**\n * ID of the app that owns the event. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * to which the event belongs.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * List of permissions associated with the event. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles)\n * for more information.\n * @readonly\n */\n permissions?: Permission[];\n /** Extensions enabling applications or users to save custom data related to the event. */\n extendedFields?: ExtendedFields;\n /**\n * Revision number, which increments each time the event is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the event.\n * Ignored when creating an event.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum Status {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Event is scheduled to happen or has happened. */\n CONFIRMED = 'CONFIRMED',\n /** Event has been canceled. */\n CANCELLED = 'CANCELLED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'CONFIRMED'\n | 'CANCELLED';\n\n/** A date time with a time zone, having the UTC offset and date determined by the server. */\nexport interface ZonedDate {\n /**\n * Local date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\n * For example, `2024-01-30T13:30:00`.\n * Wix Calendar APIs ignore seconds.\n * @format LOCAL_DATE_TIME\n */\n localDate?: string | null;\n /**\n * Time zone in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n * @readonly\n */\n timeZone?: string | null;\n /**\n * UTC date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\n * For example, `2024-01-30T13:30:00`.\n * Not available for adjusted date fields.\n * @readonly\n */\n utcDate?: Date | null;\n}\n\nexport enum RecurrenceType {\n UNKNOWN_RECURRENCE_TYPE = 'UNKNOWN_RECURRENCE_TYPE',\n /** The event occurs only once and doesn't repeat. */\n NONE = 'NONE',\n /** Defines the recurrence pattern for a series of recurring events. */\n MASTER = 'MASTER',\n /** A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`. */\n INSTANCE = 'INSTANCE',\n /** A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event. */\n EXCEPTION = 'EXCEPTION',\n}\n\n/** @enumType */\nexport type RecurrenceTypeWithLiterals =\n | RecurrenceType\n | 'UNKNOWN_RECURRENCE_TYPE'\n | 'NONE'\n | 'MASTER'\n | 'INSTANCE'\n | 'EXCEPTION';\n\nexport interface RecurrenceRule {\n /**\n * Frequency how often the event repeats. Works together with `interval`.\n *\n * Supported values:\n * + `WEEKLY`: The event's recurrence pattern is based on weeks.\n */\n frequency?: FrequencyWithLiterals;\n /**\n * Interval how often the event repeats. Works together with `frequency`.\n * For example, `frequency` set to `WEEKLY` and `interval` set to `2` means\n * the event repeats every 2 weeks.\n *\n * Min: `1`\n * Max: `4`\n * Default: `1`\n * @min 1\n * @max 4\n */\n interval?: number | null;\n /**\n * Days of the week when the recurring event takes place.\n * Currently, only a single day is supported.\n *\n * Min: 1 day\n * Max: 1 day\n * @minSize 1\n * @maxSize 1\n */\n days?: DayWithLiterals[];\n /**\n * Date until when the event repeats.\n * If not specified, the event repeats forever.\n */\n until?: ZonedDate;\n /**\n * Date until when the event repeats\n * adjusted to the `timeZone` of the business\n * [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedUntil?: ZonedDate;\n}\n\nexport enum Frequency {\n UNKNOWN_FREQUENCY = 'UNKNOWN_FREQUENCY',\n /** The event's recurrence pattern is based on weeks. */\n WEEKLY = 'WEEKLY',\n}\n\n/** @enumType */\nexport type FrequencyWithLiterals = Frequency | 'UNKNOWN_FREQUENCY' | 'WEEKLY';\n\nexport enum Day {\n /** The recurring event takes place on Mondays. */\n MONDAY = 'MONDAY',\n /** The recurring event takes place on Tuesdays. */\n TUESDAY = 'TUESDAY',\n /** The recurring event takes place on Wednesday. */\n WEDNESDAY = 'WEDNESDAY',\n /** The recurring event takes place on Thursdays. */\n THURSDAY = 'THURSDAY',\n /** The recurring event takes place on Fridays. */\n FRIDAY = 'FRIDAY',\n /** The recurring event takes place on Saturdays. */\n SATURDAY = 'SATURDAY',\n /** The recurring event takes place on Sundays. */\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayWithLiterals =\n | Day\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\nexport enum Transparency {\n UNKNOWN_TRANSPARENCY = 'UNKNOWN_TRANSPARENCY',\n /** The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time. */\n OPAQUE = 'OPAQUE',\n /** The schedule remains open during the event, allowing other events to be scheduled concurrently. */\n TRANSPARENT = 'TRANSPARENT',\n}\n\n/** @enumType */\nexport type TransparencyWithLiterals =\n | Transparency\n | 'UNKNOWN_TRANSPARENCY'\n | 'OPAQUE'\n | 'TRANSPARENT';\n\nexport interface Location {\n /**\n * [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object)\n * ID. Available only for `BUSINESS` locations.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Location type.\n *\n * Supported values:\n * + `BUSINESS`: The event is held at a business location.\n * + `CUSTOMER`: The event is held at the customer's location, such as their home or office.\n * + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.\n */\n type?: LocationTypeWithLiterals;\n /**\n * Location name. For `BUSINESS` locations, it's identical to the\n * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)\n * `name`.\n *\n * Min: 1 character\n * Max: 150 characters\n * @minLength 1\n * @maxLength 150\n */\n name?: string | null;\n /**\n * Location address. For `BUSINESS` locations, it's identical to the\n * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)'s\n * `formattedAddress`.\n * @minLength 1\n * @maxLength 300\n */\n address?: string | null;\n}\n\nexport enum LocationType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** The event is held at a business location. */\n BUSINESS = 'BUSINESS',\n /** The event is held at the customer's location, such as their home or office. */\n CUSTOMER = 'CUSTOMER',\n /** The event is held at an address or venue not tied to the business or customer. */\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n | LocationType\n | 'UNKNOWN_TYPE'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'CUSTOM';\n\nexport interface Resource {\n /**\n * Resource ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Resource name.\n * @readonly\n */\n name?: string | null;\n /**\n * Resource type.\n * @readonly\n */\n type?: string | null;\n /**\n * Specifies whether the event blocks time in the resource's schedule.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same resource from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`.\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Permission role associated with the resource. Refer to the\n * [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions#roles)\n * for more information.\n */\n permissionRole?: RoleWithLiterals;\n}\n\nexport enum Role {\n UNKNOWN_ROLE = 'UNKNOWN_ROLE',\n /** Full read and write access. */\n WRITER = 'WRITER',\n /** Full read access, write access limited to `event.notes`. */\n COMMENTER = 'COMMENTER',\n}\n\n/** @enumType */\nexport type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'WRITER' | 'COMMENTER';\n\nexport interface Participants {\n /**\n * Total number of participants.\n *\n * Min: `0`\n */\n total?: number | null;\n /**\n * Full or partial list of the participants.\n *\n * Max: 50 participants\n * @maxSize 50\n */\n list?: Participant[];\n /**\n * Whether there are more participants for the event than listed.\n *\n * + `false`: The list includes all participants.\n * + `true`: The list doesn't include all participants.\n */\n hasMore?: boolean | null;\n /**\n * Participant's status.\n *\n * Supported values:\n * + `CONFIRMED`: All participants are confirmed.\n * + `PENDING_CONFIRMATION`: At least one participant isn't confirmed yet.\n */\n status?: ParticipantsStatusWithLiterals;\n}\n\nexport interface Participant {\n /**\n * Participant name.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Participant's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Participant's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID of the participant.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport enum ParticipantsStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** All participants are confirmed. */\n CONFIRMED = 'CONFIRMED',\n /** At least one participant isn't confirmed yet. */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n}\n\n/** @enumType */\nexport type ParticipantsStatusWithLiterals =\n | ParticipantsStatus\n | 'UNKNOWN_STATUS'\n | 'CONFIRMED'\n | 'PENDING_CONFIRMATION';\n\nexport interface ConferencingDetails {\n /** Conference type. For example, `Zoom`. */\n type?: TypeWithLiterals;\n /**\n * URL used by the host to start the conference.\n *\n * Min: 1 character\n * Max: 2000 characters\n * @minLength 1\n * @maxLength 2000\n */\n hostUrl?: string | null;\n /**\n * URL used by a guest to join the conference.\n *\n * Min: 1 character\n * Max: 2000 characters\n * @minLength 1\n * @maxLength 2000\n */\n guestUrl?: string | null;\n /**\n * Conference password.\n *\n * Min: 1 character\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n password?: string | null;\n /**\n * Conference ID in an external system.\n *\n * Min: 1 character\n * Max: 150 characters\n * @minLength 1\n * @maxLength 150\n */\n externalId?: string | null;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ZOOM = 'ZOOM',\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'ZOOM' | 'CUSTOM';\n\nexport enum Field {\n UNKNOWN_FIELD = 'UNKNOWN_FIELD',\n /** `title` is inherited from the schedule or `MASTER` event. */\n TITLE = 'TITLE',\n /** `timeZone` is inherited from the schedule or `MASTER` event. */\n TIME_ZONE = 'TIME_ZONE',\n /** `start` and `end` are inherited from the `MASTER` event. */\n TIME = 'TIME',\n /** `location` is inherited from the schedule or `MASTER` event. */\n LOCATION = 'LOCATION',\n /** `resources` is inherited from the `MASTER` event. */\n RESOURCES = 'RESOURCES',\n /** `capacity` is inherited from the schedule or `MASTER` event. */\n CAPACITY = 'CAPACITY',\n /** `participants` is inherited from the `MASTER` event. */\n PARTICIPANTS = 'PARTICIPANTS',\n /** `conferencingDetails` is inherited from the schedule or `MASTER` event. */\n CONFERENCING_DETAILS = 'CONFERENCING_DETAILS',\n}\n\n/** @enumType */\nexport type FieldWithLiterals =\n | Field\n | 'UNKNOWN_FIELD'\n | 'TITLE'\n | 'TIME_ZONE'\n | 'TIME'\n | 'LOCATION'\n | 'RESOURCES'\n | 'CAPACITY'\n | 'PARTICIPANTS'\n | 'CONFERENCING_DETAILS';\n\nexport interface Permission {\n /**\n * [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-users)\n * granted the permission.\n */\n identity?: CommonIdentificationData;\n /**\n * Permission role.\n *\n * Supported values:\n * + `WRITER`: Full read and write access.\n * + `COMMENTER`: Full read access, write access limited to `event.notes`.\n */\n role?: RoleWithLiterals;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'WIX_USER';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface RecurringEventSplit {\n /** Original `MASTER` event that was shortened. */\n updatedRecurringEventEndingBeforeSplit?: Event;\n /** New `MASTER` event starting with the first event after the split date. */\n newRecurringEventStartingFromSplit?: Event;\n}\n\nexport interface EventCancelled {\n /** Canceled event. */\n event?: Event;\n}\n\nexport interface ParticipantNotification {\n /**\n * Whether to notify the participants about changes made to the schedule or event.\n *\n * Default: `false`\n */\n notifyParticipants?: boolean | null;\n /**\n * Message to send.\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n message?: string | null;\n /**\n * Information about the delivery channels used to send the notification.\n * For example, `{\"channels\": \"SMS\" }`, `{\"channels\": \"EMAIL\" }`, or `{\"channels\": \"EMAIL, SMS\" }`.\n *\n * Max: 10 keys\n * Max key length: 64 characters\n * Max value length: 1000 characters\n */\n metadata?: Record<string, string>;\n}\n\n/** Deprecated. Use EventUpdated instead, which includes the modified fields and additional metadata. */\nexport interface EventUpdatedWithMetadata {\n /** The updated event. */\n event?: Event;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface UpdateScheduleWithFixedBusinessResourceIdRequest {\n /** @format GUID */\n metaSiteId?: string;\n /** @format GUID */\n currentBusinessResourceId?: string;\n migrateBusinessConferenceId?: boolean;\n}\n\nexport interface UpdateScheduleWithFixedBusinessResourceIdResponse {}\n\nexport interface UpdateEventsWithFixedBusinessResourceIdRequest {\n /** @format GUID */\n metaSiteId?: string;\n /** @format GUID */\n currentBusinessResourceId?: string;\n migrateBusinessConferenceId?: boolean;\n}\n\nexport interface UpdateEventsWithFixedBusinessResourceIdResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ListEventsByContactIdRequest {\n /**\n * ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * @format GUID\n */\n contactId: string | null;\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/** TODO Diverge */\nexport interface CommonCursorPaging {\n /**\n * Number of events to return.\n * Defaults to `50`. Maximum `100`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\n/** TODO Diverge */\nexport interface Sorting {\n /**\n * The field to sort by.\n * Either `start` or `end`.\n * Default is `start`.\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface ListEventsByContactIdResponse {\n /** Retrieved events. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CommonCursorPagingMetadata;\n}\n\n/** TODO Diverge */\nexport interface CommonCursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */\n cursors?: CommonCursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface CommonCursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface ListEventsByMemberIdRequest {\n /**\n * ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n * @minLength 2\n * @maxLength 36\n */\n memberId: string | null;\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * IDs of the events to retrieve.\n * If you provide a list of IDs, all other filters are ignored.\n *\n * Max: 100 `eventId`s\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds?: string[];\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\nexport interface ListEventsByMemberIdResponse {\n /** Retrieved events. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CommonCursorPagingMetadata;\n}\n\n/** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */\nexport interface SitePropertiesNotification {\n /** The site ID for which this update notification applies. */\n metasiteId?: string;\n /** The actual update event. */\n event?: SitePropertiesEvent;\n /**\n * A convenience set of mappings from the MetaSite ID to its constituent services.\n * @maxSize 500\n */\n translations?: Translation[];\n /** Context of the notification */\n changeContext?: ChangeContext;\n}\n\n/** The actual update event for a particular notification. */\nexport interface SitePropertiesEvent {\n /** Version of the site's properties represented by this update. */\n version?: number;\n /** Set of properties that were updated - corresponds to the fields in \"properties\". */\n fields?: string[];\n /** Updated properties. */\n properties?: Properties;\n}\n\nexport interface Properties {\n /** Site categories. */\n categories?: Categories;\n /** Site locale. */\n locale?: Locale;\n /**\n * Site language.\n *\n * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n */\n language?: string | null;\n /**\n * Site currency format used to bill customers.\n *\n * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n paymentCurrency?: string | null;\n /** Timezone in `America/New_York` format. */\n timeZone?: string | null;\n /** Email address. */\n email?: string | null;\n /** Phone number. */\n phone?: string | null;\n /** Fax number. */\n fax?: string | null;\n /** Address. */\n address?: Address;\n /** Site display name. */\n siteDisplayName?: string | null;\n /** Business name. */\n businessName?: string | null;\n /** Path to the site's logo in Wix Media (without Wix Media base URL). */\n logo?: string | null;\n /** Site description. */\n description?: string | null;\n /**\n * Business schedule. Regular and exceptional time periods when the business is open or the service is available.\n *\n * __Note:__ Not supported by Wix Bookings.\n */\n businessSchedule?: BusinessSchedule;\n /** Supported languages of a site and the primary language. */\n multilingual?: Multilingual;\n /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */\n consentPolicy?: ConsentPolicy;\n /**\n * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.\n *\n * Site business type.\n */\n businessConfig?: string | null;\n /** External site URL that uses Wix as its headless business solution. */\n externalSiteUrl?: string | null;\n /** Track clicks analytics. */\n trackClicksAnalytics?: boolean;\n}\n\nexport interface Categories {\n /** Primary site category. */\n primary?: string;\n /**\n * Secondary site category.\n * @maxSize 50\n */\n secondary?: string[];\n /** Business Term Id */\n businessTermId?: string | null;\n}\n\nexport interface Locale {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */\n country?: string;\n}\n\nexport interface Address {\n /** Street name. */\n street?: string;\n /** City name. */\n city?: string;\n /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */\n country?: string;\n /** State. */\n state?: string;\n /**\n * Zip or postal code.\n * @maxLength 20\n */\n zip?: string;\n /** Extra information to be displayed in the address. */\n hint?: AddressHint;\n /** Whether this address represents a physical location. */\n isPhysical?: boolean;\n /** Google-formatted version of this address. */\n googleFormattedAddress?: string;\n /** Street number. */\n streetNumber?: string;\n /** Apartment number. */\n apartmentNumber?: string;\n /** Geographic coordinates of location. */\n coordinates?: GeoCoordinates;\n}\n\n/**\n * Extra information on displayed addresses.\n * This is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\n * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.\n */\nexport interface AddressHint {\n /** Extra text displayed next to, or instead of, the actual address. */\n text?: string;\n /** Where the extra text should be displayed. */\n placement?: PlacementTypeWithLiterals;\n}\n\n/** Where the extra text should be displayed: before, after or instead of the actual address. */\nexport enum PlacementType {\n BEFORE = 'BEFORE',\n AFTER = 'AFTER',\n REPLACE = 'REPLACE',\n}\n\n/** @enumType */\nexport type PlacementTypeWithLiterals =\n | PlacementType\n | 'BEFORE'\n | 'AFTER'\n | 'REPLACE';\n\n/** Geocoordinates for a particular address. */\nexport interface GeoCoordinates {\n /** Latitude of the location. Must be between -90 and 90. */\n latitude?: number;\n /** Longitude of the location. Must be between -180 and 180. */\n longitude?: number;\n}\n\n/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */\nexport interface BusinessSchedule {\n /**\n * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.\n * @maxSize 100\n */\n periods?: TimePeriod[];\n /**\n * Exceptions to the business's regular hours. The business can be open or closed during the exception.\n * @maxSize 100\n */\n specialHourPeriod?: SpecialHourPeriod[];\n}\n\n/** Weekly recurring time periods when the business is regularly open or the service is available. */\nexport interface TimePeriod {\n /** Day of the week the period starts on. */\n openDay?: DayOfWeekWithLiterals;\n /**\n * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n */\n openTime?: string;\n /** Day of the week the period ends on. */\n closeDay?: DayOfWeekWithLiterals;\n /**\n * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n *\n * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n */\n closeTime?: string;\n}\n\n/** Enumerates the days of the week. */\nexport enum DayOfWeek {\n MONDAY = 'MONDAY',\n TUESDAY = 'TUESDAY',\n WEDNESDAY = 'WEDNESDAY',\n THURSDAY = 'THURSDAY',\n FRIDAY = 'FRIDAY',\n SATURDAY = 'SATURDAY',\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n | DayOfWeek\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\n/** Exception to the business's regular hours. The business can be open or closed during the exception. */\nexport interface SpecialHourPeriod {\n /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n startDate?: string;\n /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n endDate?: string;\n /**\n * Whether the business is closed (or the service is not available) during the exception.\n *\n * Default: `true`.\n */\n isClosed?: boolean;\n /** Additional info about the exception. For example, \"We close earlier on New Year's Eve.\" */\n comment?: string;\n}\n\nexport interface Multilingual {\n /**\n * Supported languages list.\n * @maxSize 200\n */\n supportedLanguages?: SupportedLanguage[];\n /** Whether to redirect to user language. */\n autoRedirect?: boolean;\n}\n\nexport interface SupportedLanguage {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Locale. */\n locale?: Locale;\n /** Whether the supported language is the primary language for the site. */\n isPrimary?: boolean;\n /** Language icon. */\n countryCode?: string;\n /** How the language will be resolved. For internal use. */\n resolutionMethod?: ResolutionMethodWithLiterals;\n /** Whether the supported language is the primary language for site visitors. */\n isVisitorPrimary?: boolean | null;\n}\n\nexport enum ResolutionMethod {\n QUERY_PARAM = 'QUERY_PARAM',\n SUBDOMAIN = 'SUBDOMAIN',\n SUBDIRECTORY = 'SUBDIRECTORY',\n}\n\n/** @enumType */\nexport type ResolutionMethodWithLiterals =\n | ResolutionMethod\n | 'QUERY_PARAM'\n | 'SUBDOMAIN'\n | 'SUBDIRECTORY';\n\nexport interface ConsentPolicy {\n /** Whether the site uses cookies that are essential to site operation. Always `true`. */\n essential?: boolean | null;\n /** Whether the site uses cookies that affect site performance and other functional measurements. */\n functional?: boolean | null;\n /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */\n analytics?: boolean | null;\n /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */\n advertising?: boolean | null;\n /** CCPA compliance flag. */\n dataToThirdParty?: boolean | null;\n}\n\n/** A single mapping from the MetaSite ID to a particular service. */\nexport interface Translation {\n /** The service type. */\n serviceType?: string;\n /** The application definition ID; this only applies to services of type ThirdPartyApps. */\n appDefId?: string;\n /** The instance ID of the service. */\n instanceId?: string;\n}\n\nexport interface ChangeContext extends ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\n/** @oneof */\nexport interface ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\nexport interface PropertiesChange {}\n\nexport interface SiteCreated {\n /** Origin template site id. */\n originTemplateId?: string | null;\n}\n\nexport interface SiteCloned {\n /** Origin site id. */\n originMetaSiteId?: string;\n}\n\nexport interface Empty {}\n\nexport interface GetEventRequest {\n /**\n * ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELDS = 'UNKNOWN_REQUESTED_FIELDS',\n /** Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. */\n PI_FIELDS = 'PI_FIELDS',\n /** Returns only fields containing your own personal data. */\n OWN_PI_FIELDS = 'OWN_PI_FIELDS',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELDS'\n | 'PI_FIELDS'\n | 'OWN_PI_FIELDS';\n\nexport interface GetEventResponse {\n /** Retrieved event. */\n event?: Event;\n}\n\nexport interface ListEventsRequest {\n /**\n * IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n * @minSize 1\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds: string[];\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListEventsResponse {\n /** Retrieved events matching the provided IDs. */\n events?: Event[];\n}\n\nexport interface QueryEventsRequest {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Query containing filters and paging.\n * Do not specify filters for start and end dates inside `query.filter`, instead\n * specify `fromLocalDate` and `toLocalDate`.\n */\n query?: CursorQuery;\n /**\n * Filters events based on their `recurrenceType`.\n *\n * Max: 5 recurrence types can be specified.\n * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned.\n * @maxSize 5\n */\n recurrenceType?: RecurrenceTypeWithLiterals[];\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/** TODO Diverge */\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language)\n * for more information.\n *\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * Do not specify filters for start and end dates inside `query.filter`, instead\n * specify `fromLocalDate` and `toLocalDate`. For a detailed list of supported\n * filters, refer to the [supported filters article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting).\n */\n filter?: Record<string, any> | null;\n /**\n * Whether to sort events by their start date in ascending order or by their end date in descending order.\n * Default is start ascending.\n * @maxSize 1\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */\n cursorPaging?: CursorPaging;\n}\n\n/** TODO Diverge */\nexport interface CursorPaging {\n /**\n * Number of events to return.\n * Defaults to `50`. Maximum `1000`.\n * @min 1\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface QueryEventsResponse {\n /** Retrieved events matching the provided query. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\n/** TODO Diverge */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface ListRecurringEventInstancesHistoryRequest {\n /**\n * The ID of the recurring event.\n * Required, unless `cursorPaging` is provided.\n * @minLength 64\n * @maxLength 64\n */\n recurringEventId?: string | null;\n /**\n * The revision of the recurring event.\n * Required, unless `cursorPaging` is provided.\n */\n revision?: string | null;\n /**\n * Inclusive start date for which events are returned, in ISO-8601 format.\n * Events that begin at or after the `fromDate` are included in the results.\n * Required, unless `cursorPaging` is provided.\n */\n fromDate?: Date | null;\n /**\n * Exclusive end date for which events are returned, in ISO-8601 format.\n * Events that begin before the `toDate` are included in the results.\n * Required, unless `cursorPaging` is provided.\n */\n toDate?: Date | null;\n /** Optional cursor pointing to the next page of events. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListRecurringEventInstancesHistoryResponse {\n /** The recurring event instances. */\n recurringEventInstances?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CreateEventRequest {\n /** Event to create. */\n event: Event;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Idempotency key guaranteeing that you don't create the same event more\n * than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateEventResponse {\n /** Created event. */\n event?: Event;\n}\n\nexport interface BulkCreateEventRequest {\n /**\n * Events to create.\n * @minSize 1\n * @maxSize 50\n */\n events: MaskedEvent[];\n /**\n * Whether to return created events.\n *\n * Default: `false`.\n */\n returnEntity?: boolean | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface MaskedEvent {\n /** Event to create. */\n event?: Event;\n}\n\nexport interface BulkCreateEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkEventResult {\n /** Whether the requested action was successful. */\n itemMetadata?: ItemMetadata;\n /** The event. */\n item?: Event;\n}\n\nexport interface ItemMetadata {\n /**\n * Event ID.\n * Should always be available, unless it's impossible (for example, when failing to create an event).\n */\n _id?: string | null;\n /** Index of the item within the request array, for correlation between request and response items. */\n originalIndex?: number;\n /**\n * Whether the requested action was successful for this event.\n * When `false`, the `error` field is populated.\n */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of events that were successfully processed. */\n totalSuccesses?: number;\n /** Number of events that couldn't be processed. */\n totalFailures?: number;\n}\n\nexport interface UpdateEventRequest {\n /** Event to update. */\n event: Event;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface UpdateEventResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface BulkUpdateEventRequest {\n /**\n * Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n * @minSize 1\n * @maxSize 50\n */\n events: BulkUpdateEventRequestMaskedEvent[];\n /**\n * Whether to return the updated events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface BulkUpdateEventRequestMaskedEvent {\n /** Event to update. */\n event?: Event;\n}\n\nexport interface BulkUpdateEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface UpdateEventParticipantsRequest {\n /**\n * ID of the event to update.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @minLength 36\n * @maxLength 250\n */\n eventId?: string | null;\n /** The participants to update. */\n participants?: Participants;\n}\n\nexport interface UpdateEventParticipantsResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface RestoreEventDefaultsRequest {\n /**\n * ID of the event for which to restore default values.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n * @minSize 1\n */\n fields: FieldWithLiterals[];\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface RestoreEventDefaultsResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface SplitRecurringEventRequest {\n /**\n * ID of the `MASTER` event to split.\n * @minLength 36\n * @maxLength 250\n */\n recurringEventId: string | null;\n /**\n * Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n * @format LOCAL_DATE_TIME\n */\n splitLocalDate: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface SplitRecurringEventResponse {\n /** Original `MASTER` event that was shortened. */\n updatedRecurringEventEndingBeforeSplit?: Event;\n /** New `MASTER` event starting with the first event after the split date. */\n newRecurringEventStartingFromSplit?: Event;\n}\n\nexport interface CancelEventRequest {\n /**\n * ID of the event to cancel.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Information about whether participants of the canceled event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface CancelEventResponse {\n /** Canceled event. */\n event?: Event;\n}\n\nexport interface BulkCancelEventRequest {\n /**\n * IDs of the events to cancel.\n * @minSize 1\n * @maxSize 50\n */\n eventIds: string[];\n /**\n * Whether to return the canceled events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the canceled events are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface BulkCancelEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\n/** @docsIgnore */\nexport type CancelEventApplicationErrors = {\n code?: 'EVENT_ALREADY_CANCELLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkCancelEventApplicationErrors = {\n code?: 'EVENT_ALREADY_CANCELLED';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\ninterface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface EventCancelledEnvelope {\n data: EventCancelled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an event is canceled.\n *\n * Not triggered when `INSTANCE` events are canceled. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_cancelled\n * @slug cancelled\n */\nexport declare function onEventCancelled(\n handler: (event: EventCancelledEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventCreatedEnvelope {\n entity: Event;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an event is created, including when an existing `MASTER`\n * event is split.\n *\n * Not triggered when `INSTANCE` events are created. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_created\n * @slug created\n */\nexport declare function onEventCreated(\n handler: (event: EventCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventRecurringSplitEnvelope {\n data: RecurringEventSplit;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `MASTER` event is split.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_recurring_split\n * @slug recurring_split\n */\nexport declare function onEventRecurringSplit(\n handler: (event: EventRecurringSplitEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventUpdatedEnvelope {\n entity: Event;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when an event is updated, including when it's canceled.\n *\n * Not triggered when `INSTANCE` events are updated. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_updated\n * @slug updated\n */\nexport declare function onEventUpdated(\n handler: (event: EventUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param contactId - ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * @public\n * @requiredField contactId\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId\n */\nexport async function listEventsByContactId(\n contactId: string,\n options?: ListEventsByContactIdOptions\n): Promise<\n NonNullablePaths<\n ListEventsByContactIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n appId: options?.appId,\n cursorPaging: options?.cursorPaging,\n sort: options?.sort,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEventsByContactId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n fromLocalDate: '$[1].fromLocalDate',\n toLocalDate: '$[1].toLocalDate',\n timeZone: '$[1].timeZone',\n appId: '$[1].appId',\n cursorPaging: '$[1].cursorPaging',\n sort: '$[1].sort',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsByContactIdOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param memberId - ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n * @public\n * @requiredField memberId\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId\n */\nexport async function listEventsByMemberId(\n memberId: string,\n options?: ListEventsByMemberIdOptions\n): Promise<\n NonNullablePaths<\n ListEventsByMemberIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n memberId: memberId,\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n appId: options?.appId,\n cursorPaging: options?.cursorPaging,\n eventIds: options?.eventIds,\n sort: options?.sort,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEventsByMemberId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n memberId: '$[0]',\n fromLocalDate: '$[1].fromLocalDate',\n toLocalDate: '$[1].toLocalDate',\n timeZone: '$[1].timeZone',\n appId: '$[1].appId',\n cursorPaging: '$[1].cursorPaging',\n eventIds: '$[1].eventIds',\n sort: '$[1].sort',\n },\n singleArgumentUnchanged: false,\n },\n ['memberId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsByMemberIdOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * IDs of the events to retrieve.\n * If you provide a list of IDs, all other filters are ignored.\n *\n * Max: 100 `eventId`s\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds?: string[];\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/**\n * Retrieves an event.\n * @param eventId - ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @public\n * @requiredField eventId\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @returns Retrieved event.\n * @fqn wix.calendar.events.v3.EventsService.GetEvent\n */\nexport async function getEvent(\n eventId: string,\n options?: GetEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n timeZone: options?.timeZone,\n fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.getEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n timeZone: '$[1].timeZone',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of events by their IDs.\n * @param eventIds - IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n * @public\n * @requiredField eventIds\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.ListEvents\n */\nexport async function listEvents(\n eventIds: string[],\n options?: ListEventsOptions\n): Promise<\n NonNullablePaths<\n ListEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventIds: eventIds,\n timeZone: options?.timeZone,\n fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEvents(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventIds: '$[0]',\n timeZone: '$[1].timeZone',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['eventIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n * @public\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.QueryEvents\n */\nexport function queryEvents(options?: QueryEventsOptions): EventsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Event, 'CURSOR', QueryEventsRequest, QueryEventsResponse>(\n {\n func: async (payload: QueryEventsRequest) => {\n const reqOpts = ambassadorWixCalendarV3Event.queryEvents({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryEventsRequest['query']) => {\n const args = [query, options] as [\n QueryEventsRequest['query'],\n QueryEventsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryEventsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.events,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n }\n );\n}\n\nexport interface QueryEventsOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null | undefined;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null | undefined;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null | undefined;\n /**\n * Filters events based on their `recurrenceType`.\n *\n * Max: 5 recurrence types can be specified.\n * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned.\n * @maxSize 5\n */\n recurrenceType?: RecurrenceTypeWithLiterals[] | undefined;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: CommonCursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface EventsQueryResult extends QueryCursorResult {\n items: Event[];\n query: EventsQueryBuilder;\n next: () => Promise<EventsQueryResult>;\n prev: () => Promise<EventsQueryResult>;\n}\n\nexport interface EventsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'scheduleId'\n | 'externalScheduleId'\n | 'type'\n | 'recurringEventId'\n | 'transparency'\n | 'location.id'\n | 'location.type'\n | 'totalCapacity'\n | 'remainingCapacity'\n | 'participants.total'\n | 'appId',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (propertyName: string, value: any[]) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasAll: (propertyName: string, value: any[]) => EventsQueryBuilder;\n in: (\n propertyName:\n | 'scheduleId'\n | 'externalScheduleId'\n | 'type'\n | 'recurringEventId'\n | 'location.id'\n | 'location.type'\n | 'appId',\n value: any\n ) => EventsQueryBuilder;\n exists: (\n propertyName: 'location' | 'totalCapacity' | 'conferencingDetails',\n value: boolean\n ) => EventsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => EventsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => EventsQueryBuilder;\n find: () => Promise<EventsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.calendar.events.v3.EventsService.QueryEvents\n * @requiredField query\n */\nexport async function typedQueryEvents(\n query: EventQuery,\n options?: QueryEventsOptions\n): Promise<\n NonNullablePaths<\n QueryEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.queryEvents(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EventQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['transparency'];\n operators: ['$eq'];\n sort: 'NONE';\n },\n {\n fields: [\n 'appId',\n 'externalScheduleId',\n 'location._id',\n 'location.type',\n 'recurringEventId',\n 'scheduleId',\n 'type'\n ];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n },\n {\n fields: ['participants.total', 'remainingCapacity'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['totalCapacity'];\n operators: ['$eq', '$exists', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['resources._id', 'resources.transparency', 'resources.type'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'NONE';\n },\n {\n fields: ['conferencingDetails', 'location'];\n operators: ['$exists'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Event, EventQuerySpec>;\nexport type EventQuery = {\n /** \n Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. \n */\n cursorPaging?: {\n /** \n Number of events to return.\n Defaults to `50`. Maximum `1000`. \n @min: 1,\n @max: 1000 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language)\n for more information.\n\n Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n\n Do not specify filters for start and end dates inside `query.filter`, instead\n specify `fromLocalDate` and `toLocalDate`. For a detailed list of supported\n filters, refer to the [supported filters article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Whether to sort events by their start date in ascending order or by their end date in descending order.\n Default is start ascending. \n @maxSize: 1 \n */\n sort?: {\n /** \n The field to sort by.\n Either `start` or `end`.\n Default is `start`. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param event - Event to create.\n * @public\n * @requiredField event\n * @requiredField event.conferencingDetails.guestUrl\n * @requiredField event.conferencingDetails.hostUrl\n * @requiredField event.conferencingDetails.type\n * @requiredField event.end\n * @requiredField event.end.localDate\n * @requiredField event.location.type\n * @requiredField event.participants.list.name\n * @requiredField event.recurrenceRule.days\n * @requiredField event.recurrenceRule.frequency\n * @requiredField event.recurrenceRule.until.localDate\n * @requiredField event.resources._id\n * @requiredField event.scheduleId\n * @requiredField event.start\n * @requiredField event.start.localDate\n * @permissionId CALENDAR.EVENT_CREATE_OWN\n * @permissionId CALENDAR.EVENT_CREATE\n * @applicableIdentity APP\n * @returns Created event.\n * @fqn wix.calendar.events.v3.EventsService.CreateEvent\n */\nexport async function createEvent(\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n event: event,\n timeZone: options?.timeZone,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.createEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n event: '$[0]',\n timeZone: '$[1].timeZone',\n idempotencyKey: '$[1].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['event', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Idempotency key guaranteeing that you don't create the same event more\n * than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\n/**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param events - Events to create.\n * @public\n * @requiredField events\n * @requiredField events.event\n * @requiredField events.event.conferencingDetails.guestUrl\n * @requiredField events.event.conferencingDetails.hostUrl\n * @requiredField events.event.conferencingDetails.type\n * @requiredField events.event.end\n * @requiredField events.event.end.localDate\n * @requiredField events.event.location.type\n * @requiredField events.event.participants.list.name\n * @requiredField events.event.recurrenceRule.days\n * @requiredField events.event.recurrenceRule.frequency\n * @requiredField events.event.recurrenceRule.until.localDate\n * @requiredField events.event.resources._id\n * @requiredField events.event.scheduleId\n * @requiredField events.event.start\n * @requiredField events.event.start.localDate\n * @permissionId CALENDAR.EVENT_CREATE_OWN\n * @permissionId CALENDAR.EVENT_CREATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkCreateEvent\n */\nexport async function bulkCreateEvent(\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n): Promise<\n NonNullablePaths<\n BulkCreateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n events: events,\n returnEntity: options?.returnEntity,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkCreateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n events: '$[0]',\n returnEntity: '$[1].returnEntity',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['events', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateEventOptions {\n /**\n * Whether to return created events.\n *\n * Default: `false`.\n */\n returnEntity?: boolean | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param _id - Event ID.\n * @public\n * @requiredField _id\n * @requiredField event\n * @requiredField event.conferencingDetails.guestUrl\n * @requiredField event.conferencingDetails.hostUrl\n * @requiredField event.conferencingDetails.type\n * @requiredField event.end.localDate\n * @requiredField event.location.type\n * @requiredField event.participants.list.name\n * @requiredField event.recurrenceRule.days\n * @requiredField event.recurrenceRule.frequency\n * @requiredField event.recurrenceRule.until.localDate\n * @requiredField event.resources._id\n * @requiredField event.revision\n * @requiredField event.start.localDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @returns Updated event.\n * @fqn wix.calendar.events.v3.EventsService.UpdateEvent\n */\nexport async function updateEvent(\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n event: { ...event, id: _id },\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.updateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { event: '$[1]' },\n explicitPathsToArguments: {\n 'event.id': '$[0]',\n participantNotification: '$[2].participantNotification',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'event', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateEvent {\n /**\n * Event ID.\n * @minLength 36\n * @maxLength 250\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * the event belongs to.\n * After creating an event, you can't assign it to a different schedule.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the external schedule the event belongs to.\n *\n * For example, if the event belongs to a Bookings staff member, identical to the ID of the [resource](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction). If the schedule belongs to a Bookings service, identical to the ID of the [service](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup).\n * @format GUID\n * @readonly\n */\n externalScheduleId?: string | null;\n /**\n * Schedule name.\n * @readonly\n */\n scheduleName?: string | null;\n /**\n * Event type. You can set the event type but you can't update it.\n *\n * Supported values:\n * + `DEFAULT`: A standard event that's not further specified.\n * + `WORKING_HOURS`: The event adds working hours to a schedule. By default not returned in [queryEvents()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/query-events).\n *\n * Additional supported values, if Wix Bookings is installed:\n * + `APPOINTMENT`: Bookings appointment event.\n * + `CLASS`: Bookings class event.\n * + `COURSE`: Bookings course event.\n * @immutable\n */\n type?: string | null;\n /**\n * Event status.\n *\n * Supported values:\n * + `CONFIRMED`: Event is scheduled to happen or has happened.\n * + `CANCELLED`: Event has been canceled.\n *\n * Default: `CONFIRMED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Event title.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n title?: string | null;\n /** Information about when the event starts. */\n start?: ZonedDate;\n /**\n * Information about when the event ends.\n *\n * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first).\n */\n end?: ZonedDate;\n /**\n * Information about when the event starts adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedStart?: ZonedDate;\n /**\n * Information about when the event ends adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedEnd?: ZonedDate;\n /**\n * Time zone the event is associated with in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * Only regional time zones and UTC are supported.\n * For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n */\n timeZone?: string | null;\n /**\n * Information about whether the event is a single occurrence or part of a\n * recurring series.\n *\n * Supported values:\n * + `NONE`: The event occurs only once and doesn't repeat.\n * + `MASTER`: Defines the recurrence pattern for a series of recurring events.\n * + `INSTANCE`: A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`.\n * + `EXCEPTION`: A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event.\n *\n * Default: `NONE`\n * @readonly\n */\n recurrenceType?: RecurrenceTypeWithLiterals;\n /**\n * Recurrence pattern for a series of events. This field is required when\n * creating a `MASTER` event and isn't available for non-recurring events.\n * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events.\n *\n * For example, an event that repeats every second Monday until January 7, 2026,\n * at 8:00 AM has the following `recurrenceRule`:\n * - `frequency = WEEKLY`\n * - `interval = 2`\n * - `days = [MONDAY]`\n * - `until = 20260107T08:00:00Z`\n */\n recurrenceRule?: RecurrenceRule;\n /**\n * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE`\n * and `EXCEPTION` events.\n * @minLength 64\n * @maxLength 64\n * @readonly\n */\n recurringEventId?: string | null;\n /**\n * Specifies whether the event blocks time in the schedule it belongs to.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Event location.\n *\n * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to\n */\n location?: Location;\n /**\n * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction)\n * affected by the event. This could include, for example, the\n * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction)\n * providing the service or the room where the appointment takes place.\n *\n * Max: 100 resources\n * @maxSize 100\n */\n resources?: Resource[];\n /**\n * Maximum number of participants who can participate in the event.\n *\n * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n totalCapacity?: number | null;\n /**\n * Number of participants who can still be added to the event.\n * @readonly\n */\n remainingCapacity?: number | null;\n /**\n * Information about the event's participants.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n * @readonly\n */\n participants?: Participants;\n /**\n * Information about the event's online conferencing.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n conferencingDetails?: ConferencingDetails;\n /**\n * Additional notes about the event.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n notes?: string | null;\n /**\n * List of fields whose values are inherited.\n * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event.\n * @readonly\n */\n inheritedFields?: FieldWithLiterals[];\n /**\n * ID of the app that owns the event. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * to which the event belongs.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * List of permissions associated with the event. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles)\n * for more information.\n * @readonly\n */\n permissions?: Permission[];\n /** Extensions enabling applications or users to save custom data related to the event. */\n extendedFields?: ExtendedFields;\n /**\n * Revision number, which increments each time the event is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the event.\n * Ignored when creating an event.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface UpdateEventOptions {\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param events - Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n * @public\n * @requiredField events\n * @requiredField events.event\n * @requiredField events.event._id\n * @requiredField events.event.conferencingDetails.guestUrl\n * @requiredField events.event.conferencingDetails.hostUrl\n * @requiredField events.event.conferencingDetails.type\n * @requiredField events.event.end.localDate\n * @requiredField events.event.location.type\n * @requiredField events.event.participants.list.name\n * @requiredField events.event.recurrenceRule.days\n * @requiredField events.event.recurrenceRule.frequency\n * @requiredField events.event.recurrenceRule.until.localDate\n * @requiredField events.event.resources._id\n * @requiredField events.event.revision\n * @requiredField events.event.start.localDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkUpdateEvent\n */\nexport async function bulkUpdateEvent(\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n events: events,\n returnEntity: options?.returnEntity,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkUpdateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n events: '$[0]',\n returnEntity: '$[1].returnEntity',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['events', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateEventOptions {\n /**\n * Whether to return the updated events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n * @param eventId - ID of the event for which to restore default values.\n * @param fields - Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n * @public\n * @requiredField eventId\n * @requiredField fields\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.RestoreEventDefaults\n */\nexport async function restoreEventDefaults(\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n): Promise<\n NonNullablePaths<\n RestoreEventDefaultsResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n fields: fields,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.restoreEventDefaults(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n fields: '$[1]',\n participantNotification: '$[2].participantNotification',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'fields', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RestoreEventDefaultsOptions {\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n * @param recurringEventId - ID of the `MASTER` event to split.\n * @param splitLocalDate - Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n * @public\n * @requiredField recurringEventId\n * @requiredField splitLocalDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.SplitRecurringEvent\n */\nexport async function splitRecurringEvent(\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n): Promise<\n NonNullablePaths<\n SplitRecurringEventResponse,\n | `updatedRecurringEventEndingBeforeSplit.status`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceType`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.frequency`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.days`\n | `updatedRecurringEventEndingBeforeSplit.transparency`\n | `updatedRecurringEventEndingBeforeSplit.location.type`\n | `updatedRecurringEventEndingBeforeSplit.resources`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.transparency`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.permissionRole`\n | `updatedRecurringEventEndingBeforeSplit.participants.list`\n | `updatedRecurringEventEndingBeforeSplit.participants.status`\n | `updatedRecurringEventEndingBeforeSplit.conferencingDetails.type`\n | `updatedRecurringEventEndingBeforeSplit.inheritedFields`\n | `updatedRecurringEventEndingBeforeSplit.permissions`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.identity.wixUserId`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.role`\n | `newRecurringEventStartingFromSplit.status`\n | `newRecurringEventStartingFromSplit.recurrenceType`\n | `newRecurringEventStartingFromSplit.recurrenceRule.frequency`\n | `newRecurringEventStartingFromSplit.recurrenceRule.days`\n | `newRecurringEventStartingFromSplit.transparency`\n | `newRecurringEventStartingFromSplit.location.type`\n | `newRecurringEventStartingFromSplit.resources`\n | `newRecurringEventStartingFromSplit.resources.${number}.transparency`\n | `newRecurringEventStartingFromSplit.resources.${number}.permissionRole`\n | `newRecurringEventStartingFromSplit.participants.list`\n | `newRecurringEventStartingFromSplit.participants.status`\n | `newRecurringEventStartingFromSplit.conferencingDetails.type`\n | `newRecurringEventStartingFromSplit.inheritedFields`\n | `newRecurringEventStartingFromSplit.permissions`\n | `newRecurringEventStartingFromSplit.permissions.${number}.identity.wixUserId`\n | `newRecurringEventStartingFromSplit.permissions.${number}.role`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n recurringEventId: recurringEventId,\n splitLocalDate: splitLocalDate,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.splitRecurringEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n recurringEventId: '$[0]',\n splitLocalDate: '$[1]',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['recurringEventId', 'splitLocalDate', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SplitRecurringEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Cancels an event.\n * @param eventId - ID of the event to cancel.\n * @public\n * @requiredField eventId\n * @permissionId CALENDAR.EVENT_CANCEL_OWN\n * @permissionId CALENDAR.EVENT_CANCEL\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.CancelEvent\n */\nexport async function cancelEvent(\n eventId: string,\n options?: CancelEventOptions\n): Promise<\n NonNullablePaths<\n CancelEventResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n > & {\n __applicationErrorsType?: CancelEventApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.cancelEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CancelEventOptions {\n /**\n * Information about whether participants of the canceled event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Cancels multiple events in bulk.\n * @param eventIds - IDs of the events to cancel.\n * @public\n * @requiredField eventIds\n * @permissionId CALENDAR.EVENT_CANCEL_OWN\n * @permissionId CALENDAR.EVENT_CANCEL\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkCancelEvent\n */\nexport async function bulkCancelEvent(\n eventIds: string[],\n options?: BulkCancelEventOptions\n): Promise<\n NonNullablePaths<\n BulkCancelEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkCancelEventApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventIds: eventIds,\n returnEntity: options?.returnEntity,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkCancelEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventIds: '$[0]',\n returnEntity: '$[1].returnEntity',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCancelEventOptions {\n /**\n * Whether to return the canceled events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the canceled events are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCalendarEventsV3EventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/events-3',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n {\n srcPath: '/_api/calendar/v3/ro/events',\n destPath: '/v3/events',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n _: [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/participant-events-3',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n {\n srcPath: '/_api/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n {\n srcPath: '/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n ],\n _: [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n {\n srcPath: '/_api/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_calendar_events';\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n */\nexport function listEventsByContactId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventsByContactId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({\n protoPath: '/v3/events/contactId/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventsByContactId;\n}\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n */\nexport function listEventsByMemberId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventsByMemberId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({\n protoPath: '/v3/events/memberId/{memberId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventsByMemberId;\n}\n\n/** Retrieves an event. */\nexport function getEvent(payload: object): RequestOptionsFactory<any> {\n function __getEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.GetEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getEvent;\n}\n\n/** Retrieves a list of events by their IDs. */\nexport function listEvents(payload: object): RequestOptionsFactory<any> {\n function __listEvents({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.ListEvents',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEvents;\n}\n\n/**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n */\nexport function queryEvents(payload: object): RequestOptionsFactory<any> {\n function __queryEvents({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.QueryEvents',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryEvents;\n}\n\n/**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n */\nexport function createEvent(payload: object): RequestOptionsFactory<any> {\n function __createEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.CreateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createEvent;\n}\n\n/**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n */\nexport function bulkCreateEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'events.fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'events.event.createdDate' },\n { path: 'events.event.updatedDate' },\n { path: 'events.event.start.utcDate' },\n { path: 'events.event.end.utcDate' },\n { path: 'events.event.adjustedStart.utcDate' },\n { path: 'events.event.adjustedEnd.utcDate' },\n { path: 'events.event.recurrenceRule.until.utcDate' },\n { path: 'events.event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkCreateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateEvent;\n}\n\n/**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n */\nexport function updateEvent(payload: object): RequestOptionsFactory<any> {\n function __updateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'PATCH' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.UpdateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{event.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateEvent;\n}\n\n/**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n */\nexport function bulkUpdateEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'events.fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'events.event.createdDate' },\n { path: 'events.event.updatedDate' },\n { path: 'events.event.start.utcDate' },\n { path: 'events.event.end.utcDate' },\n { path: 'events.event.adjustedStart.utcDate' },\n { path: 'events.event.adjustedEnd.utcDate' },\n { path: 'events.event.recurrenceRule.until.utcDate' },\n { path: 'events.event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkUpdateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateEvent;\n}\n\n/**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n */\nexport function restoreEventDefaults(\n payload: object\n): RequestOptionsFactory<any> {\n function __restoreEventDefaults({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.RestoreEventDefaults',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}/restore-defaults',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __restoreEventDefaults;\n}\n\n/**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n */\nexport function splitRecurringEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __splitRecurringEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.SplitRecurringEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{recurringEventId}/split',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'updatedRecurringEventEndingBeforeSplit.createdDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.updatedDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.start.utcDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.end.utcDate' },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'newRecurringEventStartingFromSplit.createdDate' },\n { path: 'newRecurringEventStartingFromSplit.updatedDate' },\n { path: 'newRecurringEventStartingFromSplit.start.utcDate' },\n { path: 'newRecurringEventStartingFromSplit.end.utcDate' },\n {\n path: 'newRecurringEventStartingFromSplit.adjustedStart.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.adjustedEnd.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __splitRecurringEvent;\n}\n\n/** Cancels an event. */\nexport function cancelEvent(payload: object): RequestOptionsFactory<any> {\n function __cancelEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.CancelEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelEvent;\n}\n\n/** Cancels multiple events in bulk. */\nexport function bulkCancelEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkCancelEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkCancelEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCancelEvent;\n}\n","import {\n listEventsByContactId as publicListEventsByContactId,\n listEventsByMemberId as publicListEventsByMemberId,\n getEvent as publicGetEvent,\n listEvents as publicListEvents,\n queryEvents as publicQueryEvents,\n typedQueryEvents as publicTypedQueryEvents,\n createEvent as publicCreateEvent,\n bulkCreateEvent as publicBulkCreateEvent,\n updateEvent as publicUpdateEvent,\n bulkUpdateEvent as publicBulkUpdateEvent,\n restoreEventDefaults as publicRestoreEventDefaults,\n splitRecurringEvent as publicSplitRecurringEvent,\n cancelEvent as publicCancelEvent,\n bulkCancelEvent as publicBulkCancelEvent,\n} from './calendar-v3-event-events.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n EventQuery,\n EventsQueryBuilder,\n QueryEventsOptions,\n typedQueryEvents as universalTypedQueryEvents,\n} from './calendar-v3-event-events.universal.js';\nimport { onEventCancelled as publicOnEventCancelled } from './calendar-v3-event-events.public.js';\nimport { onEventCreated as publicOnEventCreated } from './calendar-v3-event-events.public.js';\nimport { onEventRecurringSplit as publicOnEventRecurringSplit } from './calendar-v3-event-events.public.js';\nimport { onEventUpdated as publicOnEventUpdated } from './calendar-v3-event-events.public.js';\n\nfunction customQueryEvents(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryEventsOptions) =>\n publicQueryEvents(httpClient)(options),\n typedQueryFunction: (query: EventQuery, options?: QueryEventsOptions) =>\n publicTypedQueryEvents(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: EventQuery,\n options?: QueryEventsOptions\n ): ReturnType<typeof universalTypedQueryEvents>;\n function overloadedQuery(options?: QueryEventsOptions): EventsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: EventQuery | QueryEventsOptions,\n options?: QueryEventsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const listEventsByContactId: MaybeContext<\n BuildRESTFunction<typeof publicListEventsByContactId> &\n typeof publicListEventsByContactId\n> = /*#__PURE__*/ createRESTModule(publicListEventsByContactId);\nexport const listEventsByMemberId: MaybeContext<\n BuildRESTFunction<typeof publicListEventsByMemberId> &\n typeof publicListEventsByMemberId\n> = /*#__PURE__*/ createRESTModule(publicListEventsByMemberId);\nexport const getEvent: MaybeContext<\n BuildRESTFunction<typeof publicGetEvent> & typeof publicGetEvent\n> = /*#__PURE__*/ createRESTModule(publicGetEvent);\nexport const listEvents: MaybeContext<\n BuildRESTFunction<typeof publicListEvents> & typeof publicListEvents\n> = /*#__PURE__*/ createRESTModule(publicListEvents);\nexport const createEvent: MaybeContext<\n BuildRESTFunction<typeof publicCreateEvent> & typeof publicCreateEvent\n> = /*#__PURE__*/ createRESTModule(publicCreateEvent);\nexport const bulkCreateEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateEvent> & typeof publicBulkCreateEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateEvent);\nexport const updateEvent: MaybeContext<\n BuildRESTFunction<typeof publicUpdateEvent> & typeof publicUpdateEvent\n> = /*#__PURE__*/ createRESTModule(publicUpdateEvent);\nexport const bulkUpdateEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateEvent> & typeof publicBulkUpdateEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateEvent);\nexport const restoreEventDefaults: MaybeContext<\n BuildRESTFunction<typeof publicRestoreEventDefaults> &\n typeof publicRestoreEventDefaults\n> = /*#__PURE__*/ createRESTModule(publicRestoreEventDefaults);\nexport const splitRecurringEvent: MaybeContext<\n BuildRESTFunction<typeof publicSplitRecurringEvent> &\n typeof publicSplitRecurringEvent\n> = /*#__PURE__*/ createRESTModule(publicSplitRecurringEvent);\nexport const cancelEvent: MaybeContext<\n BuildRESTFunction<typeof publicCancelEvent> & typeof publicCancelEvent\n> = /*#__PURE__*/ createRESTModule(publicCancelEvent);\nexport const bulkCancelEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkCancelEvent> & typeof publicBulkCancelEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkCancelEvent);\nexport const queryEvents: MaybeContext<\n BuildRESTFunction<typeof customQueryEvents> & typeof customQueryEvents\n> = /*#__PURE__*/ createRESTModule(customQueryEvents);\n/**\n * Triggered when an event is canceled.\n *\n * Not triggered when `INSTANCE` events are canceled. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventCancelled: BuildEventDefinition<\n typeof publicOnEventCancelled\n> &\n typeof publicOnEventCancelled = createEventModule(publicOnEventCancelled);\n/**\n * Triggered when an event is created, including when an existing `MASTER`\n * event is split.\n *\n * Not triggered when `INSTANCE` events are created. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventCreated: BuildEventDefinition<typeof publicOnEventCreated> &\n typeof publicOnEventCreated = createEventModule(publicOnEventCreated);\n/**\n * Triggered when a `MASTER` event is split.\n */\nexport const onEventRecurringSplit: BuildEventDefinition<\n typeof publicOnEventRecurringSplit\n> &\n typeof publicOnEventRecurringSplit = createEventModule(\n publicOnEventRecurringSplit\n);\n/**\n * Triggered when an event is updated, including when it's canceled.\n *\n * Not triggered when `INSTANCE` events are updated. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventUpdated: BuildEventDefinition<typeof publicOnEventUpdated> &\n typeof publicOnEventUpdated = createEventModule(publicOnEventUpdated);\n\nexport {\n Status,\n RecurrenceType,\n Frequency,\n Day,\n Transparency,\n LocationType,\n Role,\n ParticipantsStatus,\n Type,\n Field,\n IdentityType,\n WebhookIdentityType,\n SortOrder,\n PlacementType,\n DayOfWeek,\n ResolutionMethod,\n RequestedFields,\n} from './calendar-v3-event-events.universal.js';\nexport {\n Event,\n ZonedDate,\n RecurrenceRule,\n Location,\n Resource,\n Participants,\n Participant,\n ConferencingDetails,\n Permission,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ExtendedFields,\n RecurringEventSplit,\n EventCancelled,\n ParticipantNotification,\n EventUpdatedWithMetadata,\n UpdateScheduleWithFixedBusinessResourceIdRequest,\n UpdateScheduleWithFixedBusinessResourceIdResponse,\n UpdateEventsWithFixedBusinessResourceIdRequest,\n UpdateEventsWithFixedBusinessResourceIdResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListEventsByContactIdRequest,\n CommonCursorPaging,\n Sorting,\n ListEventsByContactIdResponse,\n CommonCursorPagingMetadata,\n CommonCursors,\n ListEventsByMemberIdRequest,\n ListEventsByMemberIdResponse,\n SitePropertiesNotification,\n SitePropertiesEvent,\n Properties,\n Categories,\n Locale,\n Address,\n AddressHint,\n GeoCoordinates,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Multilingual,\n SupportedLanguage,\n ConsentPolicy,\n Translation,\n ChangeContext,\n ChangeContextPayloadOneOf,\n PropertiesChange,\n SiteCreated,\n SiteCloned,\n Empty,\n GetEventRequest,\n GetEventResponse,\n ListEventsRequest,\n ListEventsResponse,\n QueryEventsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n QueryEventsResponse,\n CursorPagingMetadata,\n Cursors,\n ListRecurringEventInstancesHistoryRequest,\n ListRecurringEventInstancesHistoryResponse,\n CreateEventRequest,\n CreateEventResponse,\n BulkCreateEventRequest,\n MaskedEvent,\n BulkCreateEventResponse,\n BulkEventResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n UpdateEventRequest,\n UpdateEventResponse,\n BulkUpdateEventRequest,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n UpdateEventParticipantsRequest,\n UpdateEventParticipantsResponse,\n RestoreEventDefaultsRequest,\n RestoreEventDefaultsResponse,\n SplitRecurringEventRequest,\n SplitRecurringEventResponse,\n CancelEventRequest,\n CancelEventResponse,\n BulkCancelEventRequest,\n BulkCancelEventResponse,\n BaseEventMetadata,\n EventMetadata,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n ListEventsByContactIdOptions,\n ListEventsByMemberIdOptions,\n GetEventOptions,\n ListEventsOptions,\n QueryEventsOptions,\n EventsQueryResult,\n EventsQueryBuilder,\n EventQuerySpec,\n CreateEventOptions,\n BulkCreateEventOptions,\n UpdateEvent,\n UpdateEventOptions,\n BulkUpdateEventOptions,\n RestoreEventDefaultsOptions,\n SplitRecurringEventOptions,\n CancelEventOptions,\n BulkCancelEventOptions,\n} from './calendar-v3-event-events.universal.js';\nexport {\n StatusWithLiterals,\n RecurrenceTypeWithLiterals,\n FrequencyWithLiterals,\n DayWithLiterals,\n TransparencyWithLiterals,\n LocationTypeWithLiterals,\n RoleWithLiterals,\n ParticipantsStatusWithLiterals,\n TypeWithLiterals,\n FieldWithLiterals,\n IdentityTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SortOrderWithLiterals,\n PlacementTypeWithLiterals,\n DayOfWeekWithLiterals,\n ResolutionMethodWithLiterals,\n RequestedFieldsWithLiterals,\n CancelEventApplicationErrors,\n BulkCancelEventApplicationErrors,\n CommonQueryWithEntityContext,\n EventQuery,\n} from './calendar-v3-event-events.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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;AAAA,EACvB,CAAC;AAOD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,YAEK,2DAAiBA,SAAc;AAC1C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMb,eAEK,2DAAiB,iBAAiB;AAQ7C,IAAMc,wBAGqB,mDAAkB,gBAAsB;AASnE,IAAMC,sBACmB,mDAAkB,cAAoB;AAI/D,IAAMC,6BAG0B;AAAA,EACrC;AACF;AAQO,IAAMC,sBACmB,mDAAkB,cAAoB;","names":["bulkCancelEvent","bulkCreateEvent","bulkUpdateEvent","cancelEvent","createEvent","getEvent","listEvents","listEventsByContactId","listEventsByMemberId","onEventCancelled","onEventCreated","onEventRecurringSplit","onEventUpdated","queryEvents","restoreEventDefaults","splitRecurringEvent","updateEvent","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","RecurrenceType","Frequency","Day","Transparency","LocationType","Role","ParticipantsStatus","Type","Field","IdentityType","WebhookIdentityType","SortOrder","PlacementType","DayOfWeek","ResolutionMethod","RequestedFields","listEventsByContactId","sdkTransformError","listEventsByMemberId","getEvent","listEvents","queryEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","listEventsByContactId","listEventsByMemberId","getEvent","listEvents","queryEvents","typedQueryEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","import_rest_modules","queryEvents","typedQueryEvents","listEventsByContactId","listEventsByMemberId","getEvent","listEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","onEventCancelled","onEventCreated","onEventRecurringSplit","onEventUpdated"]}
1
+ {"version":3,"sources":["../../index.ts","../../src/calendar-v3-event-events.public.ts","../../src/calendar-v3-event-events.universal.ts","../../src/calendar-v3-event-events.http.ts","../../src/calendar-v3-event-events.context.ts"],"sourcesContent":["export * from './src/calendar-v3-event-events.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkCancelEventApplicationErrors,\n BulkCancelEventOptions,\n BulkCancelEventResponse,\n BulkCreateEventOptions,\n BulkCreateEventResponse,\n BulkUpdateEventOptions,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n CancelEventApplicationErrors,\n CancelEventOptions,\n CancelEventResponse,\n CreateEventOptions,\n Event,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventQuery,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n EventsQueryBuilder,\n FieldWithLiterals,\n GetEventOptions,\n ListEventsByContactIdOptions,\n ListEventsByContactIdResponse,\n ListEventsByMemberIdOptions,\n ListEventsByMemberIdResponse,\n ListEventsOptions,\n ListEventsResponse,\n MaskedEvent,\n QueryEventsOptions,\n QueryEventsResponse,\n RestoreEventDefaultsOptions,\n RestoreEventDefaultsResponse,\n SplitRecurringEventOptions,\n SplitRecurringEventResponse,\n UpdateEvent,\n UpdateEventOptions,\n bulkCancelEvent as universalBulkCancelEvent,\n bulkCreateEvent as universalBulkCreateEvent,\n bulkUpdateEvent as universalBulkUpdateEvent,\n cancelEvent as universalCancelEvent,\n createEvent as universalCreateEvent,\n getEvent as universalGetEvent,\n listEvents as universalListEvents,\n listEventsByContactId as universalListEventsByContactId,\n listEventsByMemberId as universalListEventsByMemberId,\n queryEvents as universalQueryEvents,\n restoreEventDefaults as universalRestoreEventDefaults,\n splitRecurringEvent as universalSplitRecurringEvent,\n typedQueryEvents as universalTypedQueryEvents,\n updateEvent as universalUpdateEvent,\n} from './calendar-v3-event-events.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/calendar' };\n\nexport function listEventsByContactId(\n httpClient: HttpClient\n): ListEventsByContactIdSignature {\n return (contactId: string, options?: ListEventsByContactIdOptions) =>\n universalListEventsByContactId(\n contactId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsByContactIdSignature {\n /**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param - ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n */\n (contactId: string, options?: ListEventsByContactIdOptions): Promise<\n NonNullablePaths<\n ListEventsByContactIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function listEventsByMemberId(\n httpClient: HttpClient\n): ListEventsByMemberIdSignature {\n return (memberId: string, options?: ListEventsByMemberIdOptions) =>\n universalListEventsByMemberId(\n memberId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsByMemberIdSignature {\n /**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param - ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n */\n (memberId: string, options?: ListEventsByMemberIdOptions): Promise<\n NonNullablePaths<\n ListEventsByMemberIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function getEvent(httpClient: HttpClient): GetEventSignature {\n return (eventId: string, options?: GetEventOptions) =>\n universalGetEvent(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetEventSignature {\n /**\n * Retrieves an event.\n * @param - ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @returns Retrieved event.\n */\n (eventId: string, options?: GetEventOptions): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function listEvents(httpClient: HttpClient): ListEventsSignature {\n return (eventIds: string[], options?: ListEventsOptions) =>\n universalListEvents(\n eventIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListEventsSignature {\n /**\n * Retrieves a list of events by their IDs.\n * @param - IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n */\n (eventIds: string[], options?: ListEventsOptions): Promise<\n NonNullablePaths<\n ListEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function queryEvents(httpClient: HttpClient): QueryEventsSignature {\n return (options?: QueryEventsOptions) =>\n universalQueryEvents(\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryEventsSignature {\n /**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n */\n (options?: QueryEventsOptions): EventsQueryBuilder;\n}\n\nexport function typedQueryEvents(\n httpClient: HttpClient\n): TypedQueryEventsSignature {\n return (query: EventQuery, options?: QueryEventsOptions) =>\n universalTypedQueryEvents(\n query,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryEventsSignature {\n /** */\n (query: EventQuery, options?: QueryEventsOptions): Promise<\n NonNullablePaths<\n QueryEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n >;\n}\n\nexport function createEvent(httpClient: HttpClient): CreateEventSignature {\n return (\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n ) =>\n universalCreateEvent(\n event,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateEventSignature {\n /**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param - Event to create.\n * @returns Created event.\n */\n (\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n ): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function bulkCreateEvent(\n httpClient: HttpClient\n): BulkCreateEventSignature {\n return (\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n ) =>\n universalBulkCreateEvent(\n events,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCreateEventSignature {\n /**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param - Events to create.\n */\n (\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n ): Promise<\n NonNullablePaths<\n BulkCreateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport function updateEvent(httpClient: HttpClient): UpdateEventSignature {\n return (\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n ) =>\n universalUpdateEvent(\n _id,\n event,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdateEventSignature {\n /**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param - Event ID.\n * @returns Updated event.\n */\n (\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n ): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n >;\n}\n\nexport function bulkUpdateEvent(\n httpClient: HttpClient\n): BulkUpdateEventSignature {\n return (\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n ) =>\n universalBulkUpdateEvent(\n events,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdateEventSignature {\n /**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param - Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n */\n (\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n ): Promise<\n NonNullablePaths<\n BulkUpdateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n >;\n}\n\nexport function restoreEventDefaults(\n httpClient: HttpClient\n): RestoreEventDefaultsSignature {\n return (\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n ) =>\n universalRestoreEventDefaults(\n eventId,\n fields,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface RestoreEventDefaultsSignature {\n /**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n * @param - ID of the event for which to restore default values.\n * @param - Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n */\n (\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n ): Promise<\n NonNullablePaths<\n RestoreEventDefaultsResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n >\n >;\n}\n\nexport function splitRecurringEvent(\n httpClient: HttpClient\n): SplitRecurringEventSignature {\n return (\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n ) =>\n universalSplitRecurringEvent(\n recurringEventId,\n splitLocalDate,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface SplitRecurringEventSignature {\n /**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n * @param - ID of the `MASTER` event to split.\n * @param - Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n */\n (\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n ): Promise<\n NonNullablePaths<\n SplitRecurringEventResponse,\n | `updatedRecurringEventEndingBeforeSplit.status`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceType`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.frequency`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.days`\n | `updatedRecurringEventEndingBeforeSplit.transparency`\n | `updatedRecurringEventEndingBeforeSplit.location.type`\n | `updatedRecurringEventEndingBeforeSplit.resources`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.transparency`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.permissionRole`\n | `updatedRecurringEventEndingBeforeSplit.participants.list`\n | `updatedRecurringEventEndingBeforeSplit.participants.status`\n | `updatedRecurringEventEndingBeforeSplit.conferencingDetails.type`\n | `updatedRecurringEventEndingBeforeSplit.inheritedFields`\n | `updatedRecurringEventEndingBeforeSplit.permissions`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.identity.wixUserId`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.role`\n | `newRecurringEventStartingFromSplit.status`\n | `newRecurringEventStartingFromSplit.recurrenceType`\n | `newRecurringEventStartingFromSplit.recurrenceRule.frequency`\n | `newRecurringEventStartingFromSplit.recurrenceRule.days`\n | `newRecurringEventStartingFromSplit.transparency`\n | `newRecurringEventStartingFromSplit.location.type`\n | `newRecurringEventStartingFromSplit.resources`\n | `newRecurringEventStartingFromSplit.resources.${number}.transparency`\n | `newRecurringEventStartingFromSplit.resources.${number}.permissionRole`\n | `newRecurringEventStartingFromSplit.participants.list`\n | `newRecurringEventStartingFromSplit.participants.status`\n | `newRecurringEventStartingFromSplit.conferencingDetails.type`\n | `newRecurringEventStartingFromSplit.inheritedFields`\n | `newRecurringEventStartingFromSplit.permissions`\n | `newRecurringEventStartingFromSplit.permissions.${number}.identity.wixUserId`\n | `newRecurringEventStartingFromSplit.permissions.${number}.role`,\n 6\n >\n >;\n}\n\nexport function cancelEvent(httpClient: HttpClient): CancelEventSignature {\n return (eventId: string, options?: CancelEventOptions) =>\n universalCancelEvent(\n eventId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CancelEventSignature {\n /**\n * Cancels an event.\n * @param - ID of the event to cancel.\n */\n (eventId: string, options?: CancelEventOptions): Promise<\n NonNullablePaths<\n CancelEventResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n > & {\n __applicationErrorsType?: CancelEventApplicationErrors;\n }\n >;\n}\n\nexport function bulkCancelEvent(\n httpClient: HttpClient\n): BulkCancelEventSignature {\n return (eventIds: string[], options?: BulkCancelEventOptions) =>\n universalBulkCancelEvent(\n eventIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkCancelEventSignature {\n /**\n * Cancels multiple events in bulk.\n * @param - IDs of the events to cancel.\n */\n (eventIds: string[], options?: BulkCancelEventOptions): Promise<\n NonNullablePaths<\n BulkCancelEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkCancelEventApplicationErrors;\n }\n >;\n}\n\nexport const onEventCancelled = EventDefinition(\n 'wix.calendar.v3.event_cancelled',\n true,\n (event: EventCancelledEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.event.createdDate' },\n { path: 'data.event.updatedDate' },\n { path: 'data.event.start.utcDate' },\n { path: 'data.event.end.utcDate' },\n { path: 'data.event.adjustedStart.utcDate' },\n { path: 'data.event.adjustedEnd.utcDate' },\n { path: 'data.event.recurrenceRule.until.utcDate' },\n { path: 'data.event.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventCancelledEnvelope>();\nexport const onEventCreated = EventDefinition(\n 'wix.calendar.v3.event_created',\n true,\n (event: EventCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.start.utcDate' },\n { path: 'entity.end.utcDate' },\n { path: 'entity.adjustedStart.utcDate' },\n { path: 'entity.adjustedEnd.utcDate' },\n { path: 'entity.recurrenceRule.until.utcDate' },\n { path: 'entity.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventCreatedEnvelope>();\nexport const onEventRecurringSplit = EventDefinition(\n 'wix.calendar.v3.event_recurring_split',\n true,\n (event: EventRecurringSplitEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'data.updatedRecurringEventEndingBeforeSplit.createdDate' },\n { path: 'data.updatedRecurringEventEndingBeforeSplit.updatedDate' },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.start.utcDate',\n },\n { path: 'data.updatedRecurringEventEndingBeforeSplit.end.utcDate' },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'data.updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'data.newRecurringEventStartingFromSplit.createdDate' },\n { path: 'data.newRecurringEventStartingFromSplit.updatedDate' },\n { path: 'data.newRecurringEventStartingFromSplit.start.utcDate' },\n { path: 'data.newRecurringEventStartingFromSplit.end.utcDate' },\n {\n path: 'data.newRecurringEventStartingFromSplit.adjustedStart.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.adjustedEnd.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'data.newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<EventRecurringSplitEnvelope>();\nexport const onEventUpdated = EventDefinition(\n 'wix.calendar.v3.event_updated',\n true,\n (event: EventUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'entity.start.utcDate' },\n { path: 'entity.end.utcDate' },\n { path: 'entity.adjustedStart.utcDate' },\n { path: 'entity.adjustedEnd.utcDate' },\n { path: 'entity.recurrenceRule.until.utcDate' },\n { path: 'entity.recurrenceRule.adjustedUntil.utcDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n { path: 'modifiedFields.start.utcDate' },\n { path: 'modifiedFields.end.utcDate' },\n { path: 'modifiedFields.adjustedStart.utcDate' },\n { path: 'modifiedFields.adjustedEnd.utcDate' },\n { path: 'modifiedFields.recurrenceRule.until.utcDate' },\n { path: 'modifiedFields.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ])\n )\n)<EventUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n ActionEvent,\n Address,\n AddressHint,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkCancelEventOptions,\n BulkCancelEventRequest,\n BulkCancelEventResponse,\n BulkCreateEventOptions,\n BulkCreateEventRequest,\n BulkCreateEventResponse,\n BulkEventResult,\n BulkUpdateEventOptions,\n BulkUpdateEventRequest,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n BusinessSchedule,\n CancelEventOptions,\n CancelEventRequest,\n CancelEventResponse,\n Categories,\n ChangeContext,\n ChangeContextPayloadOneOf,\n CommonCursorPaging,\n CommonCursorPagingMetadata,\n CommonCursors,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ConferencingDetails,\n ConsentPolicy,\n CreateEventOptions,\n CreateEventRequest,\n CreateEventResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n Day,\n DayOfWeek,\n DomainEvent,\n DomainEventBodyOneOf,\n Empty,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Event,\n EventCancelled,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventMetadata,\n EventQuerySpec,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n EventUpdatedWithMetadata,\n EventsQueryBuilder,\n EventsQueryResult,\n ExtendedFields,\n Field,\n Frequency,\n GeoCoordinates,\n GetEventOptions,\n GetEventRequest,\n GetEventResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n IdentityType,\n ItemMetadata,\n ListEventsByContactIdOptions,\n ListEventsByContactIdRequest,\n ListEventsByContactIdResponse,\n ListEventsByMemberIdOptions,\n ListEventsByMemberIdRequest,\n ListEventsByMemberIdResponse,\n ListEventsOptions,\n ListEventsRequest,\n ListEventsResponse,\n ListRecurringEventInstancesHistoryRequest,\n ListRecurringEventInstancesHistoryResponse,\n Locale,\n Location,\n LocationType,\n MaskedEvent,\n MessageEnvelope,\n Multilingual,\n Participant,\n ParticipantNotification,\n Participants,\n ParticipantsStatus,\n Permission,\n PlacementType,\n Properties,\n PropertiesChange,\n QueryEventsOptions,\n QueryEventsRequest,\n QueryEventsResponse,\n RecurrenceRule,\n RecurrenceType,\n RecurringEventSplit,\n RequestedFields,\n ResolutionMethod,\n Resource,\n RestoreEventDefaultsOptions,\n RestoreEventDefaultsRequest,\n RestoreEventDefaultsResponse,\n RestoreInfo,\n Role,\n SiteCloned,\n SiteCreated,\n SitePropertiesEvent,\n SitePropertiesNotification,\n SortOrder,\n Sorting,\n SpecialHourPeriod,\n SplitRecurringEventOptions,\n SplitRecurringEventRequest,\n SplitRecurringEventResponse,\n Status,\n SupportedLanguage,\n TimePeriod,\n Translation,\n Transparency,\n Type,\n UpdateEvent,\n UpdateEventOptions,\n UpdateEventParticipantsRequest,\n UpdateEventParticipantsResponse,\n UpdateEventRequest,\n UpdateEventResponse,\n UpdateEventsWithFixedBusinessResourceIdRequest,\n UpdateEventsWithFixedBusinessResourceIdResponse,\n UpdateScheduleWithFixedBusinessResourceIdRequest,\n UpdateScheduleWithFixedBusinessResourceIdResponse,\n WebhookIdentityType,\n ZonedDate,\n} from './calendar-v3-event-events.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCalendarV3Event from './calendar-v3-event-events.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\n\n/**\n * An event is a scheduled entry on a calendar that includes details like timing,\n * location, and participants. Each event is associated with\n * a [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction),\n * from which it may [inherit default values](https://dev.wix.com/docs/rest/business-management/calendar/default-values).\n * Events can either be standalone, part of a recurring series, or define a\n * recurrence pattern. You can also specify whether events block time on the\n * schedule or allow other events to be scheduled concurrently.\n */\nexport interface Event {\n /**\n * Event ID.\n * @minLength 36\n * @maxLength 250\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * the event belongs to.\n * After creating an event, you can't assign it to a different schedule.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the external schedule the event belongs to.\n *\n * For example, if the event belongs to a Bookings staff member, identical to the ID of the [resource](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction). If the schedule belongs to a Bookings service, identical to the ID of the [service](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup).\n * @format GUID\n * @readonly\n */\n externalScheduleId?: string | null;\n /**\n * Schedule name.\n * @readonly\n */\n scheduleName?: string | null;\n /**\n * Event type. You can set the event type but you can't update it.\n *\n * Supported values:\n * + `DEFAULT`: A standard event that's not further specified.\n * + `WORKING_HOURS`: The event adds working hours to a schedule. By default not returned in [queryEvents()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/query-events).\n *\n * Additional supported values, if Wix Bookings is installed:\n * + `APPOINTMENT`: Bookings appointment event.\n * + `CLASS`: Bookings class event.\n * + `COURSE`: Bookings course event.\n * @immutable\n */\n type?: string | null;\n /**\n * Event status.\n *\n * Supported values:\n * + `CONFIRMED`: Event is scheduled to happen or has happened.\n * + `CANCELLED`: Event has been canceled.\n *\n * Default: `CONFIRMED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Event title.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n title?: string | null;\n /** Information about when the event starts. */\n start?: ZonedDate;\n /**\n * Information about when the event ends.\n *\n * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first).\n */\n end?: ZonedDate;\n /**\n * Information about when the event starts adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedStart?: ZonedDate;\n /**\n * Information about when the event ends adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedEnd?: ZonedDate;\n /**\n * Time zone the event is associated with in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * Only regional time zones and UTC are supported.\n * For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n */\n timeZone?: string | null;\n /**\n * Information about whether the event is a single occurrence or part of a\n * recurring series.\n *\n * Supported values:\n * + `NONE`: The event occurs only once and doesn't repeat.\n * + `MASTER`: Defines the recurrence pattern for a series of recurring events.\n * + `INSTANCE`: A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`.\n * + `EXCEPTION`: A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event.\n *\n * Default: `NONE`\n * @readonly\n */\n recurrenceType?: RecurrenceTypeWithLiterals;\n /**\n * Recurrence pattern for a series of events. This field is required when\n * creating a `MASTER` event and isn't available for non-recurring events.\n * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events.\n *\n * For example, an event that repeats every second Monday until January 7, 2026,\n * at 8:00 AM has the following `recurrenceRule`:\n * - `frequency = WEEKLY`\n * - `interval = 2`\n * - `days = [MONDAY]`\n * - `until = 20260107T08:00:00Z`\n */\n recurrenceRule?: RecurrenceRule;\n /**\n * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE`\n * and `EXCEPTION` events.\n * @minLength 64\n * @maxLength 64\n * @readonly\n */\n recurringEventId?: string | null;\n /**\n * Specifies whether the event blocks time in the schedule it belongs to.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Event location.\n *\n * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to\n */\n location?: Location;\n /**\n * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction)\n * affected by the event. This could include, for example, the\n * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction)\n * providing the service or the room where the appointment takes place.\n *\n * Max: 100 resources\n * @maxSize 100\n */\n resources?: Resource[];\n /**\n * Maximum number of participants who can participate in the event.\n *\n * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n totalCapacity?: number | null;\n /**\n * Number of participants who can still be added to the event.\n * @readonly\n */\n remainingCapacity?: number | null;\n /**\n * Information about the event's participants.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n * @readonly\n */\n participants?: Participants;\n /**\n * Information about the event's online conferencing.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n conferencingDetails?: ConferencingDetails;\n /**\n * Additional notes about the event.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n notes?: string | null;\n /**\n * List of fields whose values are inherited.\n * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event.\n * @readonly\n */\n inheritedFields?: FieldWithLiterals[];\n /**\n * ID of the app that owns the event. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * to which the event belongs.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * List of permissions associated with the event. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles)\n * for more information.\n * @readonly\n */\n permissions?: Permission[];\n /** Extensions enabling applications or users to save custom data related to the event. */\n extendedFields?: ExtendedFields;\n /**\n * Revision number, which increments each time the event is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the event.\n * Ignored when creating an event.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport enum Status {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** Event is scheduled to happen or has happened. */\n CONFIRMED = 'CONFIRMED',\n /** Event has been canceled. */\n CANCELLED = 'CANCELLED',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN_STATUS'\n | 'CONFIRMED'\n | 'CANCELLED';\n\n/** A date time with a time zone, having the UTC offset and date determined by the server. */\nexport interface ZonedDate {\n /**\n * Local date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\n * For example, `2024-01-30T13:30:00`.\n * Wix Calendar APIs ignore seconds.\n * @format LOCAL_DATE_TIME\n */\n localDate?: string | null;\n /**\n * Time zone in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * For example, `America/New_York`.\n * @readonly\n */\n timeZone?: string | null;\n /**\n * UTC date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601).\n * For example, `2024-01-30T13:30:00`.\n * Not available for adjusted date fields.\n * @readonly\n */\n utcDate?: Date | null;\n}\n\nexport enum RecurrenceType {\n UNKNOWN_RECURRENCE_TYPE = 'UNKNOWN_RECURRENCE_TYPE',\n /** The event occurs only once and doesn't repeat. */\n NONE = 'NONE',\n /** Defines the recurrence pattern for a series of recurring events. */\n MASTER = 'MASTER',\n /** A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`. */\n INSTANCE = 'INSTANCE',\n /** A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event. */\n EXCEPTION = 'EXCEPTION',\n}\n\n/** @enumType */\nexport type RecurrenceTypeWithLiterals =\n | RecurrenceType\n | 'UNKNOWN_RECURRENCE_TYPE'\n | 'NONE'\n | 'MASTER'\n | 'INSTANCE'\n | 'EXCEPTION';\n\nexport interface RecurrenceRule {\n /**\n * Frequency how often the event repeats. Works together with `interval`.\n *\n * Supported values:\n * + `WEEKLY`: The event's recurrence pattern is based on weeks.\n */\n frequency?: FrequencyWithLiterals;\n /**\n * Interval how often the event repeats. Works together with `frequency`.\n * For example, `frequency` set to `WEEKLY` and `interval` set to `2` means\n * the event repeats every 2 weeks.\n *\n * Min: `1`\n * Max: `4`\n * Default: `1`\n * @min 1\n * @max 4\n */\n interval?: number | null;\n /**\n * Days of the week when the recurring event takes place.\n * Currently, only a single day is supported.\n *\n * Min: 1 day\n * Max: 1 day\n * @minSize 1\n * @maxSize 1\n */\n days?: DayWithLiterals[];\n /**\n * Date until when the event repeats.\n * If not specified, the event repeats forever.\n */\n until?: ZonedDate;\n /**\n * Date until when the event repeats\n * adjusted to the `timeZone` of the business\n * [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedUntil?: ZonedDate;\n}\n\nexport enum Frequency {\n UNKNOWN_FREQUENCY = 'UNKNOWN_FREQUENCY',\n /** The event's recurrence pattern is based on weeks. */\n WEEKLY = 'WEEKLY',\n}\n\n/** @enumType */\nexport type FrequencyWithLiterals = Frequency | 'UNKNOWN_FREQUENCY' | 'WEEKLY';\n\nexport enum Day {\n /** The recurring event takes place on Mondays. */\n MONDAY = 'MONDAY',\n /** The recurring event takes place on Tuesdays. */\n TUESDAY = 'TUESDAY',\n /** The recurring event takes place on Wednesday. */\n WEDNESDAY = 'WEDNESDAY',\n /** The recurring event takes place on Thursdays. */\n THURSDAY = 'THURSDAY',\n /** The recurring event takes place on Fridays. */\n FRIDAY = 'FRIDAY',\n /** The recurring event takes place on Saturdays. */\n SATURDAY = 'SATURDAY',\n /** The recurring event takes place on Sundays. */\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayWithLiterals =\n | Day\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\nexport enum Transparency {\n UNKNOWN_TRANSPARENCY = 'UNKNOWN_TRANSPARENCY',\n /** The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time. */\n OPAQUE = 'OPAQUE',\n /** The schedule remains open during the event, allowing other events to be scheduled concurrently. */\n TRANSPARENT = 'TRANSPARENT',\n}\n\n/** @enumType */\nexport type TransparencyWithLiterals =\n | Transparency\n | 'UNKNOWN_TRANSPARENCY'\n | 'OPAQUE'\n | 'TRANSPARENT';\n\nexport interface Location {\n /**\n * [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object)\n * ID. Available only for `BUSINESS` locations.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Location type.\n *\n * Supported values:\n * + `BUSINESS`: The event is held at a business location.\n * + `CUSTOMER`: The event is held at the customer's location, such as their home or office.\n * + `CUSTOM`: The event is held at an address or venue not tied to the business or customer.\n */\n type?: LocationTypeWithLiterals;\n /**\n * Location name. For `BUSINESS` locations, it's identical to the\n * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)\n * `name`.\n *\n * Min: 1 character\n * Max: 150 characters\n * @minLength 1\n * @maxLength 150\n */\n name?: string | null;\n /**\n * Location address. For `BUSINESS` locations, it's identical to the\n * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)'s\n * `formattedAddress`.\n * @minLength 1\n * @maxLength 300\n */\n address?: string | null;\n}\n\nexport enum LocationType {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n /** The event is held at a business location. */\n BUSINESS = 'BUSINESS',\n /** The event is held at the customer's location, such as their home or office. */\n CUSTOMER = 'CUSTOMER',\n /** The event is held at an address or venue not tied to the business or customer. */\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type LocationTypeWithLiterals =\n | LocationType\n | 'UNKNOWN_TYPE'\n | 'BUSINESS'\n | 'CUSTOMER'\n | 'CUSTOM';\n\nexport interface Resource {\n /**\n * Resource ID.\n * @format GUID\n */\n _id?: string | null;\n /**\n * Resource name.\n * @readonly\n */\n name?: string | null;\n /**\n * Resource type.\n * @readonly\n */\n type?: string | null;\n /**\n * Specifies whether the event blocks time in the resource's schedule.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same resource from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`.\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Permission role associated with the resource. Refer to the\n * [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions#roles)\n * for more information.\n */\n permissionRole?: RoleWithLiterals;\n}\n\nexport enum Role {\n UNKNOWN_ROLE = 'UNKNOWN_ROLE',\n /** Full read and write access. */\n WRITER = 'WRITER',\n /** Full read access, write access limited to `event.notes`. */\n COMMENTER = 'COMMENTER',\n}\n\n/** @enumType */\nexport type RoleWithLiterals = Role | 'UNKNOWN_ROLE' | 'WRITER' | 'COMMENTER';\n\nexport interface Participants {\n /**\n * Total number of participants.\n *\n * Min: `0`\n */\n total?: number | null;\n /**\n * Full or partial list of the participants.\n *\n * Max: 50 participants\n * @maxSize 50\n */\n list?: Participant[];\n /**\n * Whether there are more participants for the event than listed.\n *\n * + `false`: The list includes all participants.\n * + `true`: The list doesn't include all participants.\n */\n hasMore?: boolean | null;\n /**\n * Participant's status.\n *\n * Supported values:\n * + `CONFIRMED`: All participants are confirmed.\n * + `PENDING_CONFIRMATION`: At least one participant isn't confirmed yet.\n */\n status?: ParticipantsStatusWithLiterals;\n}\n\nexport interface Participant {\n /**\n * Participant name.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n name?: string | null;\n /**\n * Participant's phone number.\n * @format PHONE\n */\n phone?: string | null;\n /**\n * Participant's email address.\n * @format EMAIL\n */\n email?: string | null;\n /**\n * [Contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID of the participant.\n * @format GUID\n */\n contactId?: string | null;\n}\n\nexport enum ParticipantsStatus {\n UNKNOWN_STATUS = 'UNKNOWN_STATUS',\n /** All participants are confirmed. */\n CONFIRMED = 'CONFIRMED',\n /** At least one participant isn't confirmed yet. */\n PENDING_CONFIRMATION = 'PENDING_CONFIRMATION',\n}\n\n/** @enumType */\nexport type ParticipantsStatusWithLiterals =\n | ParticipantsStatus\n | 'UNKNOWN_STATUS'\n | 'CONFIRMED'\n | 'PENDING_CONFIRMATION';\n\nexport interface ConferencingDetails {\n /** Conference type. For example, `Zoom`. */\n type?: TypeWithLiterals;\n /**\n * URL used by the host to start the conference.\n *\n * Min: 1 character\n * Max: 2000 characters\n * @minLength 1\n * @maxLength 2000\n */\n hostUrl?: string | null;\n /**\n * URL used by a guest to join the conference.\n *\n * Min: 1 character\n * Max: 2000 characters\n * @minLength 1\n * @maxLength 2000\n */\n guestUrl?: string | null;\n /**\n * Conference password.\n *\n * Min: 1 character\n * Max: 100 characters\n * @minLength 1\n * @maxLength 100\n */\n password?: string | null;\n /**\n * Conference ID in an external system.\n *\n * Min: 1 character\n * Max: 150 characters\n * @minLength 1\n * @maxLength 150\n */\n externalId?: string | null;\n}\n\nexport enum Type {\n UNKNOWN_TYPE = 'UNKNOWN_TYPE',\n ZOOM = 'ZOOM',\n CUSTOM = 'CUSTOM',\n}\n\n/** @enumType */\nexport type TypeWithLiterals = Type | 'UNKNOWN_TYPE' | 'ZOOM' | 'CUSTOM';\n\nexport enum Field {\n UNKNOWN_FIELD = 'UNKNOWN_FIELD',\n /** `title` is inherited from the schedule or `MASTER` event. */\n TITLE = 'TITLE',\n /** `timeZone` is inherited from the schedule or `MASTER` event. */\n TIME_ZONE = 'TIME_ZONE',\n /** `start` and `end` are inherited from the `MASTER` event. */\n TIME = 'TIME',\n /** `location` is inherited from the schedule or `MASTER` event. */\n LOCATION = 'LOCATION',\n /** `resources` is inherited from the `MASTER` event. */\n RESOURCES = 'RESOURCES',\n /** `capacity` is inherited from the schedule or `MASTER` event. */\n CAPACITY = 'CAPACITY',\n /** `participants` is inherited from the `MASTER` event. */\n PARTICIPANTS = 'PARTICIPANTS',\n /** `conferencingDetails` is inherited from the schedule or `MASTER` event. */\n CONFERENCING_DETAILS = 'CONFERENCING_DETAILS',\n}\n\n/** @enumType */\nexport type FieldWithLiterals =\n | Field\n | 'UNKNOWN_FIELD'\n | 'TITLE'\n | 'TIME_ZONE'\n | 'TIME'\n | 'LOCATION'\n | 'RESOURCES'\n | 'CAPACITY'\n | 'PARTICIPANTS'\n | 'CONFERENCING_DETAILS';\n\nexport interface Permission {\n /**\n * [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-users)\n * granted the permission.\n */\n identity?: CommonIdentificationData;\n /**\n * Permission role.\n *\n * Supported values:\n * + `WRITER`: Full read and write access.\n * + `COMMENTER`: Full read access, write access limited to `event.notes`.\n */\n role?: RoleWithLiterals;\n}\n\nexport interface CommonIdentificationData\n extends CommonIdentificationDataIdOneOf {\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n}\n\n/** @oneof */\nexport interface CommonIdentificationDataIdOneOf {\n /**\n * ID of a Wix user. For example, the site owner or a\n * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).\n * @format GUID\n */\n wixUserId?: string;\n}\n\nexport enum IdentityType {\n UNKNOWN = 'UNKNOWN',\n WIX_USER = 'WIX_USER',\n}\n\n/** @enumType */\nexport type IdentityTypeWithLiterals = IdentityType | 'UNKNOWN' | 'WIX_USER';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface RecurringEventSplit {\n /** Original `MASTER` event that was shortened. */\n updatedRecurringEventEndingBeforeSplit?: Event;\n /** New `MASTER` event starting with the first event after the split date. */\n newRecurringEventStartingFromSplit?: Event;\n}\n\nexport interface EventCancelled {\n /** Canceled event. */\n event?: Event;\n}\n\nexport interface ParticipantNotification {\n /**\n * Whether to notify the participants about changes made to the schedule or event.\n *\n * Default: `false`\n */\n notifyParticipants?: boolean | null;\n /**\n * Message to send.\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n message?: string | null;\n /**\n * Information about the delivery channels used to send the notification.\n * For example, `{\"channels\": \"SMS\" }`, `{\"channels\": \"EMAIL\" }`, or `{\"channels\": \"EMAIL, SMS\" }`.\n *\n * Max: 10 keys\n * Max key length: 64 characters\n * Max value length: 1000 characters\n */\n metadata?: Record<string, string>;\n}\n\n/** Deprecated. Use EventUpdated instead, which includes the modified fields and additional metadata. */\nexport interface EventUpdatedWithMetadata {\n /** The updated event. */\n event?: Event;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n}\n\nexport interface UpdateScheduleWithFixedBusinessResourceIdRequest {\n /** @format GUID */\n metaSiteId?: string;\n /** @format GUID */\n currentBusinessResourceId?: string;\n migrateBusinessConferenceId?: boolean;\n}\n\nexport interface UpdateScheduleWithFixedBusinessResourceIdResponse {}\n\nexport interface UpdateEventsWithFixedBusinessResourceIdRequest {\n /** @format GUID */\n metaSiteId?: string;\n /** @format GUID */\n currentBusinessResourceId?: string;\n migrateBusinessConferenceId?: boolean;\n}\n\nexport interface UpdateEventsWithFixedBusinessResourceIdResponse {}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\nexport interface ListEventsByContactIdRequest {\n /**\n * ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * @format GUID\n */\n contactId: string | null;\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/** TODO Diverge */\nexport interface CommonCursorPaging {\n /**\n * Number of events to return.\n * Defaults to `50`. Maximum `100`.\n * @min 1\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\n/** TODO Diverge */\nexport interface Sorting {\n /**\n * The field to sort by.\n * Either `start` or `end`.\n * Default is `start`.\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface ListEventsByContactIdResponse {\n /** Retrieved events. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CommonCursorPagingMetadata;\n}\n\n/** TODO Diverge */\nexport interface CommonCursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */\n cursors?: CommonCursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface CommonCursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface ListEventsByMemberIdRequest {\n /**\n * ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n * @minLength 2\n * @maxLength 36\n */\n memberId: string | null;\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * IDs of the events to retrieve.\n * If you provide a list of IDs, all other filters are ignored.\n *\n * Max: 100 `eventId`s\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds?: string[];\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\nexport interface ListEventsByMemberIdResponse {\n /** Retrieved events. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CommonCursorPagingMetadata;\n}\n\n/** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */\nexport interface SitePropertiesNotification {\n /** The site ID for which this update notification applies. */\n metasiteId?: string;\n /** The actual update event. */\n event?: SitePropertiesEvent;\n /**\n * A convenience set of mappings from the MetaSite ID to its constituent services.\n * @maxSize 500\n */\n translations?: Translation[];\n /** Context of the notification */\n changeContext?: ChangeContext;\n}\n\n/** The actual update event for a particular notification. */\nexport interface SitePropertiesEvent {\n /** Version of the site's properties represented by this update. */\n version?: number;\n /** Set of properties that were updated - corresponds to the fields in \"properties\". */\n fields?: string[];\n /** Updated properties. */\n properties?: Properties;\n}\n\nexport interface Properties {\n /** Site categories. */\n categories?: Categories;\n /** Site locale. */\n locale?: Locale;\n /**\n * Site language.\n *\n * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n */\n language?: string | null;\n /**\n * Site currency format used to bill customers.\n *\n * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n */\n paymentCurrency?: string | null;\n /** Timezone in `America/New_York` format. */\n timeZone?: string | null;\n /** Email address. */\n email?: string | null;\n /** Phone number. */\n phone?: string | null;\n /** Fax number. */\n fax?: string | null;\n /** Address. */\n address?: Address;\n /** Site display name. */\n siteDisplayName?: string | null;\n /** Business name. */\n businessName?: string | null;\n /** Path to the site's logo in Wix Media (without Wix Media base URL). */\n logo?: string | null;\n /** Site description. */\n description?: string | null;\n /**\n * Business schedule. Regular and exceptional time periods when the business is open or the service is available.\n *\n * __Note:__ Not supported by Wix Bookings.\n */\n businessSchedule?: BusinessSchedule;\n /** Supported languages of a site and the primary language. */\n multilingual?: Multilingual;\n /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */\n consentPolicy?: ConsentPolicy;\n /**\n * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.\n *\n * Site business type.\n */\n businessConfig?: string | null;\n /** External site URL that uses Wix as its headless business solution. */\n externalSiteUrl?: string | null;\n /** Track clicks analytics. */\n trackClicksAnalytics?: boolean;\n}\n\nexport interface Categories {\n /** Primary site category. */\n primary?: string;\n /**\n * Secondary site category.\n * @maxSize 50\n */\n secondary?: string[];\n /** Business Term Id */\n businessTermId?: string | null;\n}\n\nexport interface Locale {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */\n country?: string;\n}\n\nexport interface Address {\n /** Street name. */\n street?: string;\n /** City name. */\n city?: string;\n /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */\n country?: string;\n /** State. */\n state?: string;\n /**\n * Zip or postal code.\n * @maxLength 20\n */\n zip?: string;\n /** Extra information to be displayed in the address. */\n hint?: AddressHint;\n /** Whether this address represents a physical location. */\n isPhysical?: boolean;\n /** Google-formatted version of this address. */\n googleFormattedAddress?: string;\n /** Street number. */\n streetNumber?: string;\n /** Apartment number. */\n apartmentNumber?: string;\n /** Geographic coordinates of location. */\n coordinates?: GeoCoordinates;\n}\n\n/**\n * Extra information on displayed addresses.\n * This is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\n * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string.\n */\nexport interface AddressHint {\n /** Extra text displayed next to, or instead of, the actual address. */\n text?: string;\n /** Where the extra text should be displayed. */\n placement?: PlacementTypeWithLiterals;\n}\n\n/** Where the extra text should be displayed: before, after or instead of the actual address. */\nexport enum PlacementType {\n BEFORE = 'BEFORE',\n AFTER = 'AFTER',\n REPLACE = 'REPLACE',\n}\n\n/** @enumType */\nexport type PlacementTypeWithLiterals =\n | PlacementType\n | 'BEFORE'\n | 'AFTER'\n | 'REPLACE';\n\n/** Geocoordinates for a particular address. */\nexport interface GeoCoordinates {\n /** Latitude of the location. Must be between -90 and 90. */\n latitude?: number;\n /** Longitude of the location. Must be between -180 and 180. */\n longitude?: number;\n}\n\n/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */\nexport interface BusinessSchedule {\n /**\n * Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods.\n * @maxSize 100\n */\n periods?: TimePeriod[];\n /**\n * Exceptions to the business's regular hours. The business can be open or closed during the exception.\n * @maxSize 100\n */\n specialHourPeriod?: SpecialHourPeriod[];\n}\n\n/** Weekly recurring time periods when the business is regularly open or the service is available. */\nexport interface TimePeriod {\n /** Day of the week the period starts on. */\n openDay?: DayOfWeekWithLiterals;\n /**\n * Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n */\n openTime?: string;\n /** Day of the week the period ends on. */\n closeDay?: DayOfWeekWithLiterals;\n /**\n * Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents\n * midnight at the end of the specified day.\n *\n * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n */\n closeTime?: string;\n}\n\n/** Enumerates the days of the week. */\nexport enum DayOfWeek {\n MONDAY = 'MONDAY',\n TUESDAY = 'TUESDAY',\n WEDNESDAY = 'WEDNESDAY',\n THURSDAY = 'THURSDAY',\n FRIDAY = 'FRIDAY',\n SATURDAY = 'SATURDAY',\n SUNDAY = 'SUNDAY',\n}\n\n/** @enumType */\nexport type DayOfWeekWithLiterals =\n | DayOfWeek\n | 'MONDAY'\n | 'TUESDAY'\n | 'WEDNESDAY'\n | 'THURSDAY'\n | 'FRIDAY'\n | 'SATURDAY'\n | 'SUNDAY';\n\n/** Exception to the business's regular hours. The business can be open or closed during the exception. */\nexport interface SpecialHourPeriod {\n /** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n startDate?: string;\n /** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */\n endDate?: string;\n /**\n * Whether the business is closed (or the service is not available) during the exception.\n *\n * Default: `true`.\n */\n isClosed?: boolean;\n /** Additional info about the exception. For example, \"We close earlier on New Year's Eve.\" */\n comment?: string;\n}\n\nexport interface Multilingual {\n /**\n * Supported languages list.\n * @maxSize 200\n */\n supportedLanguages?: SupportedLanguage[];\n /** Whether to redirect to user language. */\n autoRedirect?: boolean;\n}\n\nexport interface SupportedLanguage {\n /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */\n languageCode?: string;\n /** Locale. */\n locale?: Locale;\n /** Whether the supported language is the primary language for the site. */\n isPrimary?: boolean;\n /** Language icon. */\n countryCode?: string;\n /** How the language will be resolved. For internal use. */\n resolutionMethod?: ResolutionMethodWithLiterals;\n /** Whether the supported language is the primary language for site visitors. */\n isVisitorPrimary?: boolean | null;\n}\n\nexport enum ResolutionMethod {\n QUERY_PARAM = 'QUERY_PARAM',\n SUBDOMAIN = 'SUBDOMAIN',\n SUBDIRECTORY = 'SUBDIRECTORY',\n}\n\n/** @enumType */\nexport type ResolutionMethodWithLiterals =\n | ResolutionMethod\n | 'QUERY_PARAM'\n | 'SUBDOMAIN'\n | 'SUBDIRECTORY';\n\nexport interface ConsentPolicy {\n /** Whether the site uses cookies that are essential to site operation. Always `true`. */\n essential?: boolean | null;\n /** Whether the site uses cookies that affect site performance and other functional measurements. */\n functional?: boolean | null;\n /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */\n analytics?: boolean | null;\n /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */\n advertising?: boolean | null;\n /** CCPA compliance flag. */\n dataToThirdParty?: boolean | null;\n}\n\n/** A single mapping from the MetaSite ID to a particular service. */\nexport interface Translation {\n /** The service type. */\n serviceType?: string;\n /** The application definition ID; this only applies to services of type ThirdPartyApps. */\n appDefId?: string;\n /** The instance ID of the service. */\n instanceId?: string;\n}\n\nexport interface ChangeContext extends ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\n/** @oneof */\nexport interface ChangeContextPayloadOneOf {\n /** Properties were updated. */\n propertiesChange?: PropertiesChange;\n /** Default properties were created on site creation. */\n siteCreated?: SiteCreated;\n /** Properties were cloned on site cloning. */\n siteCloned?: SiteCloned;\n}\n\nexport interface PropertiesChange {}\n\nexport interface SiteCreated {\n /** Origin template site id. */\n originTemplateId?: string | null;\n}\n\nexport interface SiteCloned {\n /** Origin site id. */\n originMetaSiteId?: string;\n}\n\nexport interface Empty {}\n\nexport interface GetEventRequest {\n /**\n * ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport enum RequestedFields {\n UNKNOWN_REQUESTED_FIELDS = 'UNKNOWN_REQUESTED_FIELDS',\n /** Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. */\n PI_FIELDS = 'PI_FIELDS',\n /** Returns only fields containing your own personal data. */\n OWN_PI_FIELDS = 'OWN_PI_FIELDS',\n}\n\n/** @enumType */\nexport type RequestedFieldsWithLiterals =\n | RequestedFields\n | 'UNKNOWN_REQUESTED_FIELDS'\n | 'PI_FIELDS'\n | 'OWN_PI_FIELDS';\n\nexport interface GetEventResponse {\n /** Retrieved event. */\n event?: Event;\n}\n\nexport interface ListEventsRequest {\n /**\n * IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n * @minSize 1\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds: string[];\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\nexport interface ListEventsResponse {\n /** Retrieved events matching the provided IDs. */\n events?: Event[];\n}\n\nexport interface QueryEventsRequest {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Query containing filters and paging.\n * Do not specify filters for start and end dates inside `query.filter`, instead\n * specify `fromLocalDate` and `toLocalDate`.\n */\n query?: CursorQuery;\n /**\n * Filters events based on their `recurrenceType`.\n *\n * Max: 5 recurrence types can be specified.\n * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned.\n * @maxSize 5\n */\n recurrenceType?: RecurrenceTypeWithLiterals[];\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/** TODO Diverge */\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n * See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language)\n * for more information.\n *\n * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * Do not specify filters for start and end dates inside `query.filter`, instead\n * specify `fromLocalDate` and `toLocalDate`. For a detailed list of supported\n * filters, refer to the [supported filters article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting).\n */\n filter?: Record<string, any> | null;\n /**\n * Whether to sort events by their start date in ascending order or by their end date in descending order.\n * Default is start ascending.\n * @maxSize 1\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */\n cursorPaging?: CursorPaging;\n}\n\n/** TODO Diverge */\nexport interface CursorPaging {\n /**\n * Number of events to return.\n * Defaults to `50`. Maximum `1000`.\n * @min 1\n * @max 1000\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * You can get the relevant cursor token\n * from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n */\n cursor?: string | null;\n}\n\nexport interface QueryEventsResponse {\n /** Retrieved events matching the provided query. */\n events?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\n/** TODO Diverge */\nexport interface CursorPagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */\n cursors?: Cursors;\n /**\n * Indicates if there are more results after the current page.\n * If `true`, another page of results can be retrieved.\n * If `false`, this is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /** Cursor pointing to next page in the list of results. */\n next?: string | null;\n}\n\nexport interface ListRecurringEventInstancesHistoryRequest {\n /**\n * The ID of the recurring event.\n * Required, unless `cursorPaging` is provided.\n * @minLength 64\n * @maxLength 64\n */\n recurringEventId?: string | null;\n /**\n * The revision of the recurring event.\n * Required, unless `cursorPaging` is provided.\n */\n revision?: string | null;\n /**\n * Inclusive start date for which events are returned, in ISO-8601 format.\n * Events that begin at or after the `fromDate` are included in the results.\n * Required, unless `cursorPaging` is provided.\n */\n fromDate?: Date | null;\n /**\n * Exclusive end date for which events are returned, in ISO-8601 format.\n * Events that begin before the `toDate` are included in the results.\n * Required, unless `cursorPaging` is provided.\n */\n toDate?: Date | null;\n /** Optional cursor pointing to the next page of events. */\n cursorPaging?: CursorPaging;\n}\n\nexport interface ListRecurringEventInstancesHistoryResponse {\n /** The recurring event instances. */\n recurringEventInstances?: Event[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CreateEventRequest {\n /** Event to create. */\n event: Event;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Idempotency key guaranteeing that you don't create the same event more\n * than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\nexport interface CreateEventResponse {\n /** Created event. */\n event?: Event;\n}\n\nexport interface BulkCreateEventRequest {\n /**\n * Events to create.\n * @minSize 1\n * @maxSize 50\n */\n events: MaskedEvent[];\n /**\n * Whether to return created events.\n *\n * Default: `false`.\n */\n returnEntity?: boolean | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface MaskedEvent {\n /** Event to create. */\n event?: Event;\n}\n\nexport interface BulkCreateEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkEventResult {\n /** Whether the requested action was successful. */\n itemMetadata?: ItemMetadata;\n /** The event. */\n item?: Event;\n}\n\nexport interface ItemMetadata {\n /**\n * Event ID.\n * Should always be available, unless it's impossible (for example, when failing to create an event).\n */\n _id?: string | null;\n /** Index of the item within the request array, for correlation between request and response items. */\n originalIndex?: number;\n /**\n * Whether the requested action was successful for this event.\n * When `false`, the `error` field is populated.\n */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkActionMetadata {\n /** Number of events that were successfully processed. */\n totalSuccesses?: number;\n /** Number of events that couldn't be processed. */\n totalFailures?: number;\n}\n\nexport interface UpdateEventRequest {\n /** Event to update. */\n event: Event;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface UpdateEventResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface BulkUpdateEventRequest {\n /**\n * Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n * @minSize 1\n * @maxSize 50\n */\n events: BulkUpdateEventRequestMaskedEvent[];\n /**\n * Whether to return the updated events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface BulkUpdateEventRequestMaskedEvent {\n /** Event to update. */\n event?: Event;\n}\n\nexport interface BulkUpdateEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface UpdateEventParticipantsRequest {\n /**\n * ID of the event to update.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @minLength 36\n * @maxLength 250\n */\n eventId?: string | null;\n /** The participants to update. */\n participants?: Participants;\n}\n\nexport interface UpdateEventParticipantsResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface RestoreEventDefaultsRequest {\n /**\n * ID of the event for which to restore default values.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n * @minSize 1\n */\n fields: FieldWithLiterals[];\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface RestoreEventDefaultsResponse {\n /** Updated event. */\n event?: Event;\n}\n\nexport interface SplitRecurringEventRequest {\n /**\n * ID of the `MASTER` event to split.\n * @minLength 36\n * @maxLength 250\n */\n recurringEventId: string | null;\n /**\n * Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n * @format LOCAL_DATE_TIME\n */\n splitLocalDate: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface SplitRecurringEventResponse {\n /** Original `MASTER` event that was shortened. */\n updatedRecurringEventEndingBeforeSplit?: Event;\n /** New `MASTER` event starting with the first event after the split date. */\n newRecurringEventStartingFromSplit?: Event;\n}\n\nexport interface CancelEventRequest {\n /**\n * ID of the event to cancel.\n * @minLength 36\n * @maxLength 250\n */\n eventId: string | null;\n /**\n * Information about whether participants of the canceled event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface CancelEventResponse {\n /** Canceled event. */\n event?: Event;\n}\n\nexport interface BulkCancelEventRequest {\n /**\n * IDs of the events to cancel.\n * @minSize 1\n * @maxSize 50\n */\n eventIds: string[];\n /**\n * Whether to return the canceled events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the canceled events are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\nexport interface BulkCancelEventResponse {\n /** The result for each event, containing the event and whether the action was successful. */\n results?: BulkEventResult[];\n /** Total successes and failures. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\n/** @docsIgnore */\nexport type CancelEventApplicationErrors = {\n code?: 'EVENT_ALREADY_CANCELLED';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkCancelEventApplicationErrors = {\n code?: 'EVENT_ALREADY_CANCELLED';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\ninterface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface EventCancelledEnvelope {\n data: EventCancelled;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an event is canceled.\n *\n * Not triggered when `INSTANCE` events are canceled. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_cancelled\n * @slug cancelled\n */\nexport declare function onEventCancelled(\n handler: (event: EventCancelledEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventCreatedEnvelope {\n entity: Event;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an event is created, including when an existing `MASTER`\n * event is split.\n *\n * Not triggered when `INSTANCE` events are created. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_created\n * @slug created\n */\nexport declare function onEventCreated(\n handler: (event: EventCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventRecurringSplitEnvelope {\n data: RecurringEventSplit;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a `MASTER` event is split.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_recurring_split\n * @slug recurring_split\n */\nexport declare function onEventRecurringSplit(\n handler: (event: EventRecurringSplitEnvelope) => void | Promise<void>\n): void;\n\nexport interface EventUpdatedEnvelope {\n entity: Event;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when an event is updated, including when it's canceled.\n *\n * Not triggered when `INSTANCE` events are updated. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n * @permissionScope Read Calendar - Including PI\n * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI\n * @permissionScope Manage Calendars\n * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE\n * @permissionScope Manage Bookings\n * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS\n * @permissionScope Read Bookings - Including Participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE\n * @permissionScope Read Bookings - all read permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS\n * @permissionScope Manage Bookings - all permissions\n * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS\n * @permissionScope Read bookings calendar - including participants\n * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS\n * @permissionId CALENDAR.EVENT_READ_PI\n * @webhook\n * @eventType wix.calendar.v3.event_updated\n * @slug updated\n */\nexport declare function onEventUpdated(\n handler: (event: EventUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param contactId - ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * @public\n * @requiredField contactId\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId\n */\nexport async function listEventsByContactId(\n contactId: string,\n options?: ListEventsByContactIdOptions\n): Promise<\n NonNullablePaths<\n ListEventsByContactIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n contactId: contactId,\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n appId: options?.appId,\n cursorPaging: options?.cursorPaging,\n sort: options?.sort,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEventsByContactId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n contactId: '$[0]',\n fromLocalDate: '$[1].fromLocalDate',\n toLocalDate: '$[1].toLocalDate',\n timeZone: '$[1].timeZone',\n appId: '$[1].appId',\n cursorPaging: '$[1].cursorPaging',\n sort: '$[1].sort',\n },\n singleArgumentUnchanged: false,\n },\n ['contactId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsByContactIdOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n * @param memberId - ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object)\n * to retrieve events for. Required, unless you provide `cursorPaging`.\n * Provide `me` to retrieve events for the currently logged-in member.\n * You must have the `Read Calendars - Including PI`\n * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app)\n * to retrieve events for members who aren't the currently logged in member.\n * @public\n * @requiredField memberId\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId\n */\nexport async function listEventsByMemberId(\n memberId: string,\n options?: ListEventsByMemberIdOptions\n): Promise<\n NonNullablePaths<\n ListEventsByMemberIdResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n memberId: memberId,\n fromLocalDate: options?.fromLocalDate,\n toLocalDate: options?.toLocalDate,\n timeZone: options?.timeZone,\n appId: options?.appId,\n cursorPaging: options?.cursorPaging,\n eventIds: options?.eventIds,\n sort: options?.sort,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEventsByMemberId(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n memberId: '$[0]',\n fromLocalDate: '$[1].fromLocalDate',\n toLocalDate: '$[1].toLocalDate',\n timeZone: '$[1].timeZone',\n appId: '$[1].appId',\n cursorPaging: '$[1].cursorPaging',\n eventIds: '$[1].eventIds',\n sort: '$[1].sort',\n },\n singleArgumentUnchanged: false,\n },\n ['memberId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsByMemberIdOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`. Can't be more than a full year after\n * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions)\n * to filter events by.\n * @format GUID\n */\n appId?: string | null;\n /** Cursor to retrieve the next page of the results. */\n cursorPaging?: CommonCursorPaging;\n /**\n * IDs of the events to retrieve.\n * If you provide a list of IDs, all other filters are ignored.\n *\n * Max: 100 `eventId`s\n * @maxSize 100\n * @minLength 36\n * @maxLength 250\n */\n eventIds?: string[];\n /**\n * Sorting for the results.\n * If not specified, results are sorted by `start` ascending.\n * For DESC order, events are sorted by `end` time in descending order.\n */\n sort?: Sorting;\n}\n\n/**\n * Retrieves an event.\n * @param eventId - ID of the event to retrieve.\n *\n * Min: 36 characters\n * Max: 250 characters\n * @public\n * @requiredField eventId\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @returns Retrieved event.\n * @fqn wix.calendar.events.v3.EventsService.GetEvent\n */\nexport async function getEvent(\n eventId: string,\n options?: GetEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n timeZone: options?.timeZone,\n fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.getEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n timeZone: '$[1].timeZone',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface GetEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Retrieves a list of events by their IDs.\n * @param eventIds - IDs of the events to retrieve.\n *\n * Min: 1 event ID\n * Max: 100 event IDs\n * @public\n * @requiredField eventIds\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.ListEvents\n */\nexport async function listEvents(\n eventIds: string[],\n options?: ListEventsOptions\n): Promise<\n NonNullablePaths<\n ListEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventIds: eventIds,\n timeZone: options?.timeZone,\n fields: options?.fields,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.listEvents(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventIds: '$[0]',\n timeZone: '$[1].timeZone',\n fields: '$[1].fields',\n },\n singleArgumentUnchanged: false,\n },\n ['eventIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListEventsOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[];\n}\n\n/**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n * @public\n * @permissionId CALENDAR.EVENT_READ\n * @permissionId CALENDAR.EVENT_READ_PI\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.QueryEvents\n */\nexport function queryEvents(options?: QueryEventsOptions): EventsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Event, 'CURSOR', QueryEventsRequest, QueryEventsResponse>(\n {\n func: async (payload: QueryEventsRequest) => {\n const reqOpts = ambassadorWixCalendarV3Event.queryEvents({\n ...payload,\n ...(options ?? {}),\n });\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryEventsRequest['query']) => {\n const args = [query, options] as [\n QueryEventsRequest['query'],\n QueryEventsOptions\n ];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryEventsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.events,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n }\n );\n}\n\nexport interface QueryEventsOptions {\n /**\n * Local start date and time from which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before the `fromLocalDate` but end after it are included in\n * the results. Must be earlier than `toLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n fromLocalDate?: string | null | undefined;\n /**\n * Local end date and time up to which events are returned in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2024-01-30T13:30:00`.\n *\n * Events that start before `toLocalDate` but end after it are included in the\n * results. Must be later than `fromLocalDate` unless the sort order is\n * descending.\n * @format LOCAL_DATE_TIME\n */\n toLocalDate?: string | null | undefined;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and\n * `adjustedEnd`. For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties).\n */\n timeZone?: string | null | undefined;\n /**\n * Filters events based on their `recurrenceType`.\n *\n * Max: 5 recurrence types can be specified.\n * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned.\n * @maxSize 5\n */\n recurrenceType?: RecurrenceTypeWithLiterals[] | undefined;\n /**\n * Information about which fields containing personal data to return. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions)\n * for more information.\n *\n * Supported values:\n * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope.\n * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data.\n *\n * Max: 1 field\n * Default: No personal data is returned.\n * @maxSize 1\n */\n fields?: RequestedFieldsWithLiterals[] | undefined;\n}\n\ninterface QueryCursorResult {\n cursors: CommonCursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface EventsQueryResult extends QueryCursorResult {\n items: Event[];\n query: EventsQueryBuilder;\n next: () => Promise<EventsQueryResult>;\n prev: () => Promise<EventsQueryResult>;\n}\n\nexport interface EventsQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n eq: (\n propertyName:\n | 'scheduleId'\n | 'externalScheduleId'\n | 'type'\n | 'recurringEventId'\n | 'transparency'\n | 'location.id'\n | 'location.type'\n | 'totalCapacity'\n | 'remainingCapacity'\n | 'participants.total'\n | 'appId',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ne: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n ge: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n gt: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n le: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n */\n lt: (\n propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total',\n value: any\n ) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasSome: (propertyName: string, value: any[]) => EventsQueryBuilder;\n /** @param propertyName - Property whose value is compared with `values`.\n * @param values - List of values to compare against.\n */\n hasAll: (propertyName: string, value: any[]) => EventsQueryBuilder;\n in: (\n propertyName:\n | 'scheduleId'\n | 'externalScheduleId'\n | 'type'\n | 'recurringEventId'\n | 'location.id'\n | 'location.type'\n | 'appId',\n value: any\n ) => EventsQueryBuilder;\n exists: (\n propertyName: 'location' | 'totalCapacity' | 'conferencingDetails',\n value: boolean\n ) => EventsQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object. */\n limit: (limit: number) => EventsQueryBuilder;\n /** @param cursor - A pointer to specific record */\n skipTo: (cursor: string) => EventsQueryBuilder;\n find: () => Promise<EventsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.calendar.events.v3.EventsService.QueryEvents\n * @requiredField query\n */\nexport async function typedQueryEvents(\n query: EventQuery,\n options?: QueryEventsOptions\n): Promise<\n NonNullablePaths<\n QueryEventsResponse,\n | `events`\n | `events.${number}.status`\n | `events.${number}.recurrenceType`\n | `events.${number}.recurrenceRule.frequency`\n | `events.${number}.transparency`\n | `events.${number}.location.type`\n | `events.${number}.participants.status`\n | `events.${number}.conferencingDetails.type`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n query: query,\n ...options,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.queryEvents(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface EventQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['transparency'];\n operators: ['$eq'];\n sort: 'NONE';\n },\n {\n fields: [\n 'appId',\n 'externalScheduleId',\n 'location._id',\n 'location.type',\n 'recurringEventId',\n 'scheduleId',\n 'type'\n ];\n operators: ['$eq', '$in'];\n sort: 'NONE';\n },\n {\n fields: ['participants.total', 'remainingCapacity'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['totalCapacity'];\n operators: ['$eq', '$exists', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'NONE';\n },\n {\n fields: ['resources._id', 'resources.transparency', 'resources.type'];\n operators: ['$hasAll', '$hasSome'];\n sort: 'NONE';\n },\n {\n fields: ['conferencingDetails', 'location'];\n operators: ['$exists'];\n sort: 'NONE';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Event, EventQuerySpec>;\nexport type EventQuery = {\n /** \n Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. \n */\n cursorPaging?: {\n /** \n Number of events to return.\n Defaults to `50`. Maximum `1000`. \n @min: 1,\n @max: 1000 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n You can get the relevant cursor token\n from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language)\n for more information.\n\n Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n\n Do not specify filters for start and end dates inside `query.filter`, instead\n specify `fromLocalDate` and `toLocalDate`. For a detailed list of supported\n filters, refer to the [supported filters article](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/supported-filters-and-sorting). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Whether to sort events by their start date in ascending order or by their end date in descending order.\n Default is start ascending. \n @maxSize: 1 \n */\n sort?: {\n /** \n The field to sort by.\n Either `start` or `end`.\n Default is `start`. \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\n/**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param event - Event to create.\n * @public\n * @requiredField event\n * @requiredField event.conferencingDetails.guestUrl\n * @requiredField event.conferencingDetails.hostUrl\n * @requiredField event.conferencingDetails.type\n * @requiredField event.end\n * @requiredField event.end.localDate\n * @requiredField event.location.type\n * @requiredField event.participants.list.name\n * @requiredField event.recurrenceRule.days\n * @requiredField event.recurrenceRule.frequency\n * @requiredField event.recurrenceRule.until.localDate\n * @requiredField event.resources._id\n * @requiredField event.scheduleId\n * @requiredField event.start\n * @requiredField event.start.localDate\n * @permissionId CALENDAR.EVENT_CREATE_OWN\n * @permissionId CALENDAR.EVENT_CREATE\n * @applicableIdentity APP\n * @returns Created event.\n * @fqn wix.calendar.events.v3.EventsService.CreateEvent\n */\nexport async function createEvent(\n event: NonNullablePaths<\n Event,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `scheduleId`\n | `start`\n | `start.localDate`,\n 5\n >,\n options?: CreateEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n event: event,\n timeZone: options?.timeZone,\n idempotencyKey: options?.idempotencyKey,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.createEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n event: '$[0]',\n timeZone: '$[1].timeZone',\n idempotencyKey: '$[1].idempotencyKey',\n },\n singleArgumentUnchanged: false,\n },\n ['event', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n /**\n * Idempotency key guaranteeing that you don't create the same event more\n * than once.\n * @format GUID\n */\n idempotencyKey?: string | null;\n}\n\n/**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n * @param events - Events to create.\n * @public\n * @requiredField events\n * @requiredField events.event\n * @requiredField events.event.conferencingDetails.guestUrl\n * @requiredField events.event.conferencingDetails.hostUrl\n * @requiredField events.event.conferencingDetails.type\n * @requiredField events.event.end\n * @requiredField events.event.end.localDate\n * @requiredField events.event.location.type\n * @requiredField events.event.participants.list.name\n * @requiredField events.event.recurrenceRule.days\n * @requiredField events.event.recurrenceRule.frequency\n * @requiredField events.event.recurrenceRule.until.localDate\n * @requiredField events.event.resources._id\n * @requiredField events.event.scheduleId\n * @requiredField events.event.start\n * @requiredField events.event.start.localDate\n * @permissionId CALENDAR.EVENT_CREATE_OWN\n * @permissionId CALENDAR.EVENT_CREATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkCreateEvent\n */\nexport async function bulkCreateEvent(\n events: NonNullablePaths<\n MaskedEvent,\n | `event`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.scheduleId`\n | `event.start`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkCreateEventOptions\n): Promise<\n NonNullablePaths<\n BulkCreateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n events: events,\n returnEntity: options?.returnEntity,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkCreateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n events: '$[0]',\n returnEntity: '$[1].returnEntity',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['events', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateEventOptions {\n /**\n * Whether to return created events.\n *\n * Default: `false`.\n */\n returnEntity?: boolean | null;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param _id - Event ID.\n * @public\n * @requiredField _id\n * @requiredField event\n * @requiredField event.conferencingDetails.guestUrl\n * @requiredField event.conferencingDetails.hostUrl\n * @requiredField event.conferencingDetails.type\n * @requiredField event.end.localDate\n * @requiredField event.location.type\n * @requiredField event.participants.list.name\n * @requiredField event.recurrenceRule.days\n * @requiredField event.recurrenceRule.frequency\n * @requiredField event.recurrenceRule.until.localDate\n * @requiredField event.resources._id\n * @requiredField event.revision\n * @requiredField event.start.localDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @returns Updated event.\n * @fqn wix.calendar.events.v3.EventsService.UpdateEvent\n */\nexport async function updateEvent(\n _id: string,\n event: NonNullablePaths<\n UpdateEvent,\n | `conferencingDetails.guestUrl`\n | `conferencingDetails.hostUrl`\n | `conferencingDetails.type`\n | `end.localDate`\n | `location.type`\n | `participants.list.${number}.name`\n | `recurrenceRule.days`\n | `recurrenceRule.frequency`\n | `recurrenceRule.until.localDate`\n | `resources.${number}._id`\n | `revision`\n | `start.localDate`,\n 5\n >,\n options?: UpdateEventOptions\n): Promise<\n NonNullablePaths<\n Event,\n | `status`\n | `recurrenceType`\n | `recurrenceRule.frequency`\n | `recurrenceRule.days`\n | `transparency`\n | `location.type`\n | `resources`\n | `resources.${number}.transparency`\n | `resources.${number}.permissionRole`\n | `participants.list`\n | `participants.status`\n | `conferencingDetails.type`\n | `inheritedFields`\n | `permissions`\n | `permissions.${number}.identity.wixUserId`\n | `permissions.${number}.role`,\n 5\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n event: { ...event, id: _id },\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.updateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.event!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { event: '$[1]' },\n explicitPathsToArguments: {\n 'event.id': '$[0]',\n participantNotification: '$[2].participantNotification',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['_id', 'event', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateEvent {\n /**\n * Event ID.\n * @minLength 36\n * @maxLength 250\n * @readonly\n */\n _id?: string | null;\n /**\n * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * the event belongs to.\n * After creating an event, you can't assign it to a different schedule.\n * @format GUID\n * @immutable\n */\n scheduleId?: string | null;\n /**\n * ID of the external schedule the event belongs to.\n *\n * For example, if the event belongs to a Bookings staff member, identical to the ID of the [resource](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction). If the schedule belongs to a Bookings service, identical to the ID of the [service](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/setup).\n * @format GUID\n * @readonly\n */\n externalScheduleId?: string | null;\n /**\n * Schedule name.\n * @readonly\n */\n scheduleName?: string | null;\n /**\n * Event type. You can set the event type but you can't update it.\n *\n * Supported values:\n * + `DEFAULT`: A standard event that's not further specified.\n * + `WORKING_HOURS`: The event adds working hours to a schedule. By default not returned in [queryEvents()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/query-events).\n *\n * Additional supported values, if Wix Bookings is installed:\n * + `APPOINTMENT`: Bookings appointment event.\n * + `CLASS`: Bookings class event.\n * + `COURSE`: Bookings course event.\n * @immutable\n */\n type?: string | null;\n /**\n * Event status.\n *\n * Supported values:\n * + `CONFIRMED`: Event is scheduled to happen or has happened.\n * + `CANCELLED`: Event has been canceled.\n *\n * Default: `CONFIRMED`\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Event title.\n *\n * Min: 1 character\n * Max: 200 characters\n * @minLength 1\n * @maxLength 200\n */\n title?: string | null;\n /** Information about when the event starts. */\n start?: ZonedDate;\n /**\n * Information about when the event ends.\n *\n * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first).\n */\n end?: ZonedDate;\n /**\n * Information about when the event starts adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedStart?: ZonedDate;\n /**\n * Information about when the event ends adjusted to the `timeZone` of the\n * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties)\n * or a different `timeZone` you provide in the call's request.\n * @readonly\n */\n adjustedEnd?: ZonedDate;\n /**\n * Time zone the event is associated with in\n * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database).\n * Only regional time zones and UTC are supported.\n * For example, `America/New_York` or `UTC`.\n *\n * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n */\n timeZone?: string | null;\n /**\n * Information about whether the event is a single occurrence or part of a\n * recurring series.\n *\n * Supported values:\n * + `NONE`: The event occurs only once and doesn't repeat.\n * + `MASTER`: Defines the recurrence pattern for a series of recurring events.\n * + `INSTANCE`: A specific occurrence of a recurring event. You can't create an event with `{\"recurrenceType\": \"INSTANCE\"}`, instead it's automatically generated based on the recurrence rule. If you update an `INSTANCE` event, `recurrenceType` automatically changes to `EXCEPTION`.\n * + `EXCEPTION`: A modified instance of a recurring event that differs from the recurrence pattern. For example, an event with a different time or location. You can't create an `EXCEPTION` event directly, instead it's set automatically when you update an `INSTANCE` event.\n *\n * Default: `NONE`\n * @readonly\n */\n recurrenceType?: RecurrenceTypeWithLiterals;\n /**\n * Recurrence pattern for a series of events. This field is required when\n * creating a `MASTER` event and isn't available for non-recurring events.\n * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events.\n *\n * For example, an event that repeats every second Monday until January 7, 2026,\n * at 8:00 AM has the following `recurrenceRule`:\n * - `frequency = WEEKLY`\n * - `interval = 2`\n * - `days = [MONDAY]`\n * - `until = 20260107T08:00:00Z`\n */\n recurrenceRule?: RecurrenceRule;\n /**\n * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE`\n * and `EXCEPTION` events.\n * @minLength 64\n * @maxLength 64\n * @readonly\n */\n recurringEventId?: string | null;\n /**\n * Specifies whether the event blocks time in the schedule it belongs to.\n *\n * Supported values:\n * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same entities (for example, Booking staff members) from being scheduled at the same time.\n * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently.\n *\n * Default: `OPAQUE`\n */\n transparency?: TransparencyWithLiterals;\n /**\n * Event location.\n *\n * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to\n */\n location?: Location;\n /**\n * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction)\n * affected by the event. This could include, for example, the\n * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction)\n * providing the service or the room where the appointment takes place.\n *\n * Max: 100 resources\n * @maxSize 100\n */\n resources?: Resource[];\n /**\n * Maximum number of participants who can participate in the event.\n *\n * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n totalCapacity?: number | null;\n /**\n * Number of participants who can still be added to the event.\n * @readonly\n */\n remainingCapacity?: number | null;\n /**\n * Information about the event's participants.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n * @readonly\n */\n participants?: Participants;\n /**\n * Information about the event's online conferencing.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to.\n */\n conferencingDetails?: ConferencingDetails;\n /**\n * Additional notes about the event.\n * Returned only if explicitly requested. For more details, see the [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#retrieve-personal-information).\n *\n * Min: 1 character\n * Max: 5000 characters\n * @minLength 1\n * @maxLength 5000\n */\n notes?: string | null;\n /**\n * List of fields whose values are inherited.\n * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction).\n * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event.\n * @readonly\n */\n inheritedFields?: FieldWithLiterals[];\n /**\n * ID of the app that owns the event. Identical to `appId` of the\n * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction)\n * to which the event belongs.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n /**\n * List of permissions associated with the event. Refer to the\n * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles)\n * for more information.\n * @readonly\n */\n permissions?: Permission[];\n /** Extensions enabling applications or users to save custom data related to the event. */\n extendedFields?: ExtendedFields;\n /**\n * Revision number, which increments each time the event is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the event.\n * Ignored when creating an event.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.\n * @readonly\n */\n _updatedDate?: Date | null;\n}\n\nexport interface UpdateEventOptions {\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n * @param events - Events to update.\n *\n * Min: 1 event\n * Max: 50 events\n * @public\n * @requiredField events\n * @requiredField events.event\n * @requiredField events.event._id\n * @requiredField events.event.conferencingDetails.guestUrl\n * @requiredField events.event.conferencingDetails.hostUrl\n * @requiredField events.event.conferencingDetails.type\n * @requiredField events.event.end.localDate\n * @requiredField events.event.location.type\n * @requiredField events.event.participants.list.name\n * @requiredField events.event.recurrenceRule.days\n * @requiredField events.event.recurrenceRule.frequency\n * @requiredField events.event.recurrenceRule.until.localDate\n * @requiredField events.event.resources._id\n * @requiredField events.event.revision\n * @requiredField events.event.start.localDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkUpdateEvent\n */\nexport async function bulkUpdateEvent(\n events: NonNullablePaths<\n BulkUpdateEventRequestMaskedEvent,\n | `event`\n | `event._id`\n | `event.conferencingDetails.guestUrl`\n | `event.conferencingDetails.hostUrl`\n | `event.conferencingDetails.type`\n | `event.end.localDate`\n | `event.location.type`\n | `event.participants.list.${number}.name`\n | `event.recurrenceRule.days`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.until.localDate`\n | `event.resources.${number}._id`\n | `event.revision`\n | `event.start.localDate`,\n 6\n >[],\n options?: BulkUpdateEventOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n events: events,\n returnEntity: options?.returnEntity,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkUpdateEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n events: '$[0]',\n returnEntity: '$[1].returnEntity',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['events', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateEventOptions {\n /**\n * Whether to return the updated events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n * @param eventId - ID of the event for which to restore default values.\n * @param fields - Fields for which to restore default values.\n *\n * `TIME` restores default values for `start` and `end`.\n *\n * Min: 1 field\n * @public\n * @requiredField eventId\n * @requiredField fields\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.RestoreEventDefaults\n */\nexport async function restoreEventDefaults(\n eventId: string,\n fields: FieldWithLiterals[],\n options?: RestoreEventDefaultsOptions\n): Promise<\n NonNullablePaths<\n RestoreEventDefaultsResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n fields: fields,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.restoreEventDefaults(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n fields: '$[1]',\n participantNotification: '$[2].participantNotification',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'fields', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface RestoreEventDefaultsOptions {\n /**\n * Information about whether participants of the updated event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n * @param recurringEventId - ID of the `MASTER` event to split.\n * @param splitLocalDate - Local date and time at which the `MASTER` event is split in\n * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example,\n * `2025-03-11T09:00:00`.\n * Must be a future date that's after the `start` date of the next `INSTANCE` or\n * `EXCEPTION` event in the series. Additionally, there must be another\n * `INSTANCE` or `EXCEPTION` event following this next event, as the changes\n * wouldn't affect any event without a subsequent occurrence.\n * @public\n * @requiredField recurringEventId\n * @requiredField splitLocalDate\n * @permissionId CALENDAR.EVENT_UPDATE_OWN\n * @permissionId CALENDAR.EVENT_UPDATE\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.SplitRecurringEvent\n */\nexport async function splitRecurringEvent(\n recurringEventId: string,\n splitLocalDate: string,\n options?: SplitRecurringEventOptions\n): Promise<\n NonNullablePaths<\n SplitRecurringEventResponse,\n | `updatedRecurringEventEndingBeforeSplit.status`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceType`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.frequency`\n | `updatedRecurringEventEndingBeforeSplit.recurrenceRule.days`\n | `updatedRecurringEventEndingBeforeSplit.transparency`\n | `updatedRecurringEventEndingBeforeSplit.location.type`\n | `updatedRecurringEventEndingBeforeSplit.resources`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.transparency`\n | `updatedRecurringEventEndingBeforeSplit.resources.${number}.permissionRole`\n | `updatedRecurringEventEndingBeforeSplit.participants.list`\n | `updatedRecurringEventEndingBeforeSplit.participants.status`\n | `updatedRecurringEventEndingBeforeSplit.conferencingDetails.type`\n | `updatedRecurringEventEndingBeforeSplit.inheritedFields`\n | `updatedRecurringEventEndingBeforeSplit.permissions`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.identity.wixUserId`\n | `updatedRecurringEventEndingBeforeSplit.permissions.${number}.role`\n | `newRecurringEventStartingFromSplit.status`\n | `newRecurringEventStartingFromSplit.recurrenceType`\n | `newRecurringEventStartingFromSplit.recurrenceRule.frequency`\n | `newRecurringEventStartingFromSplit.recurrenceRule.days`\n | `newRecurringEventStartingFromSplit.transparency`\n | `newRecurringEventStartingFromSplit.location.type`\n | `newRecurringEventStartingFromSplit.resources`\n | `newRecurringEventStartingFromSplit.resources.${number}.transparency`\n | `newRecurringEventStartingFromSplit.resources.${number}.permissionRole`\n | `newRecurringEventStartingFromSplit.participants.list`\n | `newRecurringEventStartingFromSplit.participants.status`\n | `newRecurringEventStartingFromSplit.conferencingDetails.type`\n | `newRecurringEventStartingFromSplit.inheritedFields`\n | `newRecurringEventStartingFromSplit.permissions`\n | `newRecurringEventStartingFromSplit.permissions.${number}.identity.wixUserId`\n | `newRecurringEventStartingFromSplit.permissions.${number}.role`,\n 6\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n recurringEventId: recurringEventId,\n splitLocalDate: splitLocalDate,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.splitRecurringEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n recurringEventId: '$[0]',\n splitLocalDate: '$[1]',\n timeZone: '$[2].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['recurringEventId', 'splitLocalDate', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SplitRecurringEventOptions {\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Cancels an event.\n * @param eventId - ID of the event to cancel.\n * @public\n * @requiredField eventId\n * @permissionId CALENDAR.EVENT_CANCEL_OWN\n * @permissionId CALENDAR.EVENT_CANCEL\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.CancelEvent\n */\nexport async function cancelEvent(\n eventId: string,\n options?: CancelEventOptions\n): Promise<\n NonNullablePaths<\n CancelEventResponse,\n | `event.status`\n | `event.recurrenceType`\n | `event.recurrenceRule.frequency`\n | `event.recurrenceRule.days`\n | `event.transparency`\n | `event.location.type`\n | `event.resources`\n | `event.resources.${number}.transparency`\n | `event.resources.${number}.permissionRole`\n | `event.participants.list`\n | `event.participants.status`\n | `event.conferencingDetails.type`\n | `event.inheritedFields`\n | `event.permissions`\n | `event.permissions.${number}.identity.wixUserId`\n | `event.permissions.${number}.role`,\n 6\n > & {\n __applicationErrorsType?: CancelEventApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventId: eventId,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.cancelEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventId: '$[0]',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CancelEventOptions {\n /**\n * Information about whether participants of the canceled event are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n\n/**\n * Cancels multiple events in bulk.\n * @param eventIds - IDs of the events to cancel.\n * @public\n * @requiredField eventIds\n * @permissionId CALENDAR.EVENT_CANCEL_OWN\n * @permissionId CALENDAR.EVENT_CANCEL\n * @applicableIdentity APP\n * @fqn wix.calendar.events.v3.EventsService.BulkCancelEvent\n */\nexport async function bulkCancelEvent(\n eventIds: string[],\n options?: BulkCancelEventOptions\n): Promise<\n NonNullablePaths<\n BulkCancelEventResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `results.${number}.item.status`\n | `results.${number}.item.recurrenceType`\n | `results.${number}.item.recurrenceRule.frequency`\n | `results.${number}.item.transparency`\n | `results.${number}.item.location.type`\n | `results.${number}.item.participants.status`\n | `results.${number}.item.conferencingDetails.type`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkCancelEventApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n eventIds: eventIds,\n returnEntity: options?.returnEntity,\n participantNotification: options?.participantNotification,\n timeZone: options?.timeZone,\n });\n\n const reqOpts = ambassadorWixCalendarV3Event.bulkCancelEvent(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n eventIds: '$[0]',\n returnEntity: '$[1].returnEntity',\n participantNotification: '$[1].participantNotification',\n timeZone: '$[1].timeZone',\n },\n singleArgumentUnchanged: false,\n },\n ['eventIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCancelEventOptions {\n /**\n * Whether to return the canceled events.\n *\n * Default: `false`\n */\n returnEntity?: boolean | null;\n /**\n * Information about whether participants of the canceled events are notified and\n * the message they receive.\n */\n participantNotification?: ParticipantNotification;\n /**\n * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database)\n * for calculating `adjustedStart` and `adjustedEnd`. For example,\n * `America/New_York` or `UTC`.\n *\n * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties).\n */\n timeZone?: string | null;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCalendarEventsV3EventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/events-3',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n {\n srcPath: '/_api/calendar/v3/ro/events',\n destPath: '/v3/events',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n _: [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/calendar/v3/events',\n destPath: '/v3/events',\n },\n {\n srcPath: '/_api/calendar/v3/bulk/events',\n destPath: '/v3/bulk/events',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nfunction resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/participant-events-3',\n destPath: '',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n {\n srcPath: '/_api/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n {\n srcPath: '/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n ],\n _: [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/calendar/v3/events/memberId',\n destPath: '/v3/events/memberId',\n },\n {\n srcPath: '/_api/calendar/v3/events/contactId',\n destPath: '/v3/events/contactId',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_calendar_events';\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n */\nexport function listEventsByContactId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventsByContactId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({\n protoPath: '/v3/events/contactId/{contactId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventsByContactId;\n}\n\n/**\n * Retrieves a list of events filtered by the participant's\n * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction)\n * ID.\n *\n *\n * You can't set `toLocalDate` to a value that's more than a full year after\n * `fromLocalDate`.\n */\nexport function listEventsByMemberId(\n payload: object\n): RequestOptionsFactory<any> {\n function __listEventsByMemberId({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn:\n 'wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarParticipanteventsV3ParticipantEventsServiceUrl({\n protoPath: '/v3/events/memberId/{memberId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEventsByMemberId;\n}\n\n/** Retrieves an event. */\nexport function getEvent(payload: object): RequestOptionsFactory<any> {\n function __getEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.GetEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getEvent;\n}\n\n/** Retrieves a list of events by their IDs. */\nexport function listEvents(payload: object): RequestOptionsFactory<any> {\n function __listEvents({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'GET' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.ListEvents',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __listEvents;\n}\n\n/**\n * Creates a query to retrieve a list of events.\n *\n * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object.\n *\n * The returned object contains the query definition, which is typically used to run the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-builder/find) function.\n *\n * You can refine the query by chaining `EventsQueryBuilder` functions onto the query. `EventsQueryBuilder` functions enable you to sort, filter, and control the results that `queryEvents()` returns.\n *\n * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override:\n *\n * + `limit` is `50`.\n * + Sorted by `event.start` in ascending order.\n *\n * The functions that are chained to `queryEvents()` are applied in the order they are called.\n *\n * The following `EventsQueryBuilder` functions are supported for the `queryEvents()` function. For a full description of the events object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/events-query-result/items) property in `EventsQueryResult`.\n *\n */\nexport function queryEvents(payload: object): RequestOptionsFactory<any> {\n function __queryEvents({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.QueryEvents',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/query',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'events.createdDate' },\n { path: 'events.updatedDate' },\n { path: 'events.start.utcDate' },\n { path: 'events.end.utcDate' },\n { path: 'events.adjustedStart.utcDate' },\n { path: 'events.adjustedEnd.utcDate' },\n { path: 'events.recurrenceRule.until.utcDate' },\n { path: 'events.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __queryEvents;\n}\n\n/**\n * Creates an event.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is created. Then, you can't set `start.localDate` to a past date, though the time can be earlier on the same day. You can, however, create single-occurrence events for past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`. `INSTANCE` events are generated automatically based on the recurrence rule in the relevant `MASTER` event. `EXCEPTION` events are automatically created when you [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n */\nexport function createEvent(payload: object): RequestOptionsFactory<any> {\n function __createEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.CreateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createEvent;\n}\n\n/**\n * Creates multiple events in bulk.\n *\n *\n * If you provide `recurrenceRule`, an event with `{\"recurrenceType\": \"MASTER\"}` is\n * created. Then, you can't set `start.localDate` to a past date, though the time can be\n * earlier on the same day. You can, however, create single-occurrence events for\n * past dates.\n *\n * You can't create an event with `recurrenceType` set to `INSTANCE` or `EXCEPTION`.\n * `INSTANCE` events are generated automatically based on the recurrence rule in the\n * relevant `MASTER` event. `EXCEPTION` events are automatically created when you\n * [update](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * an `INSTANCE` event, which changes its `recurrenceType` to `EXCEPTION`.\n */\nexport function bulkCreateEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'events.fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'events.event.createdDate' },\n { path: 'events.event.updatedDate' },\n { path: 'events.event.start.utcDate' },\n { path: 'events.event.end.utcDate' },\n { path: 'events.event.adjustedStart.utcDate' },\n { path: 'events.event.adjustedEnd.utcDate' },\n { path: 'events.event.recurrenceRule.until.utcDate' },\n { path: 'events.event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkCreateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateEvent;\n}\n\n/**\n * Updates an event.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n */\nexport function updateEvent(payload: object): RequestOptionsFactory<any> {\n function __updateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'PATCH' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.UpdateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{event.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateEvent;\n}\n\n/**\n * Updates multiple events in bulk.\n *\n *\n * When updating an event with `{\"recurrenceType\": \"INSTANCE\"}`, the\n * `recurrenceType` automatically changes to `EXCEPTION`.\n *\n * When updating an event with `{\"recurrenceType\": \"MASTER\"}`:\n * + Past `INSTANCE` and `EXCEPTION` events remain unchanged.\n * + For future `INSTANCE` events, all relevant fields are updated.\n * + For future `EXCEPTION` events, only changes to the `inheritedFields` are\n * applied, while other fields remain unchanged.\n */\nexport function bulkUpdateEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateEvent({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'events.fieldmask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'events.event.createdDate' },\n { path: 'events.event.updatedDate' },\n { path: 'events.event.start.utcDate' },\n { path: 'events.event.end.utcDate' },\n { path: 'events.event.adjustedStart.utcDate' },\n { path: 'events.event.adjustedEnd.utcDate' },\n { path: 'events.event.recurrenceRule.until.utcDate' },\n { path: 'events.event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkUpdateEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateEvent;\n}\n\n/**\n * Restores the event's default values from the relevant schedule or `MASTER`\n * event.\n *\n *\n * You must provide `fields` to specify which `inheritedFields` are restored.\n *\n * For example, if you've created an event that takes place in a non-default\n * location with a custom title and capacity, but you want to reset only title\n * and capacity to default values without affecting the location, provide the\n * event ID and set `fields` to `[\"TITLE\", \"CAPACITY\"]`.\n *\n * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values)\n * for more information.\n */\nexport function restoreEventDefaults(\n payload: object\n): RequestOptionsFactory<any> {\n function __restoreEventDefaults({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.RestoreEventDefaults',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}/restore-defaults',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __restoreEventDefaults;\n}\n\n/**\n * Splits a recurring `MASTER` event into 2 separate `MASTER` events.\n *\n *\n * You must provide a `splitLocalDate` that's in the future and after the `start`\n * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally,\n * there must be another `INSTANCE` or `EXCEPTION` event following this next event,\n * as the changes wouldn't affect any event without a subsequent occurrence.\n *\n * If you want to modify a `MASTER` event with the changes already applying to\n * the very next event, use\n * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event)\n * instead, as this preserves past events and only modifies future events.\n *\n * The main consequences are:\n * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate`\n * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION`\n * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event\n * starts before but ends after `splitLocalDate`, `until.localDate` is set\n * to value that's later than `splitLocalDate`.\n * - **A new `MASTER` event is created**, starting from the first event that\n * begins after `splitLocalDate`.\n * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**.\n * Their `recurringEventId` is set to the ID of the newly created `MASTER` event.\n */\nexport function splitRecurringEvent(\n payload: object\n): RequestOptionsFactory<any> {\n function __splitRecurringEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.SplitRecurringEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{recurringEventId}/split',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'updatedRecurringEventEndingBeforeSplit.createdDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.updatedDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.start.utcDate' },\n { path: 'updatedRecurringEventEndingBeforeSplit.end.utcDate' },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.adjustedStart.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.adjustedEnd.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'updatedRecurringEventEndingBeforeSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n { path: 'newRecurringEventStartingFromSplit.createdDate' },\n { path: 'newRecurringEventStartingFromSplit.updatedDate' },\n { path: 'newRecurringEventStartingFromSplit.start.utcDate' },\n { path: 'newRecurringEventStartingFromSplit.end.utcDate' },\n {\n path: 'newRecurringEventStartingFromSplit.adjustedStart.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.adjustedEnd.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.recurrenceRule.until.utcDate',\n },\n {\n path: 'newRecurringEventStartingFromSplit.recurrenceRule.adjustedUntil.utcDate',\n },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __splitRecurringEvent;\n}\n\n/** Cancels an event. */\nexport function cancelEvent(payload: object): RequestOptionsFactory<any> {\n function __cancelEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.CancelEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/events/{eventId}/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'event.createdDate' },\n { path: 'event.updatedDate' },\n { path: 'event.start.utcDate' },\n { path: 'event.end.utcDate' },\n { path: 'event.adjustedStart.utcDate' },\n { path: 'event.adjustedEnd.utcDate' },\n { path: 'event.recurrenceRule.until.utcDate' },\n { path: 'event.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __cancelEvent;\n}\n\n/** Cancels multiple events in bulk. */\nexport function bulkCancelEvent(payload: object): RequestOptionsFactory<any> {\n function __bulkCancelEvent({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.calendar.v3.event',\n method: 'POST' as any,\n methodFqn: 'wix.calendar.events.v3.EventsService.BulkCancelEvent',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCalendarEventsV3EventsServiceUrl({\n protoPath: '/v3/bulk/events/cancel',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.start.utcDate' },\n { path: 'results.item.end.utcDate' },\n { path: 'results.item.adjustedStart.utcDate' },\n { path: 'results.item.adjustedEnd.utcDate' },\n { path: 'results.item.recurrenceRule.until.utcDate' },\n { path: 'results.item.recurrenceRule.adjustedUntil.utcDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCancelEvent;\n}\n","import {\n listEventsByContactId as publicListEventsByContactId,\n listEventsByMemberId as publicListEventsByMemberId,\n getEvent as publicGetEvent,\n listEvents as publicListEvents,\n queryEvents as publicQueryEvents,\n typedQueryEvents as publicTypedQueryEvents,\n createEvent as publicCreateEvent,\n bulkCreateEvent as publicBulkCreateEvent,\n updateEvent as publicUpdateEvent,\n bulkUpdateEvent as publicBulkUpdateEvent,\n restoreEventDefaults as publicRestoreEventDefaults,\n splitRecurringEvent as publicSplitRecurringEvent,\n cancelEvent as publicCancelEvent,\n bulkCancelEvent as publicBulkCancelEvent,\n} from './calendar-v3-event-events.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n EventQuery,\n EventsQueryBuilder,\n QueryEventsOptions,\n typedQueryEvents as universalTypedQueryEvents,\n} from './calendar-v3-event-events.universal.js';\nimport { onEventCancelled as publicOnEventCancelled } from './calendar-v3-event-events.public.js';\nimport { onEventCreated as publicOnEventCreated } from './calendar-v3-event-events.public.js';\nimport { onEventRecurringSplit as publicOnEventRecurringSplit } from './calendar-v3-event-events.public.js';\nimport { onEventUpdated as publicOnEventUpdated } from './calendar-v3-event-events.public.js';\n\nfunction customQueryEvents(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: (options?: QueryEventsOptions) =>\n publicQueryEvents(httpClient)(options),\n typedQueryFunction: (query: EventQuery, options?: QueryEventsOptions) =>\n publicTypedQueryEvents(httpClient)(query, options),\n hasOptionsParameter: true,\n });\n\n function overloadedQuery(\n query: EventQuery,\n options?: QueryEventsOptions\n ): ReturnType<typeof universalTypedQueryEvents>;\n function overloadedQuery(options?: QueryEventsOptions): EventsQueryBuilder;\n function overloadedQuery(\n queryOrOptions?: EventQuery | QueryEventsOptions,\n options?: QueryEventsOptions\n ): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const listEventsByContactId: MaybeContext<\n BuildRESTFunction<typeof publicListEventsByContactId> &\n typeof publicListEventsByContactId\n> = /*#__PURE__*/ createRESTModule(publicListEventsByContactId);\nexport const listEventsByMemberId: MaybeContext<\n BuildRESTFunction<typeof publicListEventsByMemberId> &\n typeof publicListEventsByMemberId\n> = /*#__PURE__*/ createRESTModule(publicListEventsByMemberId);\nexport const getEvent: MaybeContext<\n BuildRESTFunction<typeof publicGetEvent> & typeof publicGetEvent\n> = /*#__PURE__*/ createRESTModule(publicGetEvent);\nexport const listEvents: MaybeContext<\n BuildRESTFunction<typeof publicListEvents> & typeof publicListEvents\n> = /*#__PURE__*/ createRESTModule(publicListEvents);\nexport const createEvent: MaybeContext<\n BuildRESTFunction<typeof publicCreateEvent> & typeof publicCreateEvent\n> = /*#__PURE__*/ createRESTModule(publicCreateEvent);\nexport const bulkCreateEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkCreateEvent> & typeof publicBulkCreateEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkCreateEvent);\nexport const updateEvent: MaybeContext<\n BuildRESTFunction<typeof publicUpdateEvent> & typeof publicUpdateEvent\n> = /*#__PURE__*/ createRESTModule(publicUpdateEvent);\nexport const bulkUpdateEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdateEvent> & typeof publicBulkUpdateEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdateEvent);\nexport const restoreEventDefaults: MaybeContext<\n BuildRESTFunction<typeof publicRestoreEventDefaults> &\n typeof publicRestoreEventDefaults\n> = /*#__PURE__*/ createRESTModule(publicRestoreEventDefaults);\nexport const splitRecurringEvent: MaybeContext<\n BuildRESTFunction<typeof publicSplitRecurringEvent> &\n typeof publicSplitRecurringEvent\n> = /*#__PURE__*/ createRESTModule(publicSplitRecurringEvent);\nexport const cancelEvent: MaybeContext<\n BuildRESTFunction<typeof publicCancelEvent> & typeof publicCancelEvent\n> = /*#__PURE__*/ createRESTModule(publicCancelEvent);\nexport const bulkCancelEvent: MaybeContext<\n BuildRESTFunction<typeof publicBulkCancelEvent> & typeof publicBulkCancelEvent\n> = /*#__PURE__*/ createRESTModule(publicBulkCancelEvent);\nexport const queryEvents: MaybeContext<\n BuildRESTFunction<typeof customQueryEvents> & typeof customQueryEvents\n> = /*#__PURE__*/ createRESTModule(customQueryEvents);\n/**\n * Triggered when an event is canceled.\n *\n * Not triggered when `INSTANCE` events are canceled. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventCancelled: BuildEventDefinition<\n typeof publicOnEventCancelled\n> &\n typeof publicOnEventCancelled = createEventModule(publicOnEventCancelled);\n/**\n * Triggered when an event is created, including when an existing `MASTER`\n * event is split.\n *\n * Not triggered when `INSTANCE` events are created. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventCreated: BuildEventDefinition<typeof publicOnEventCreated> &\n typeof publicOnEventCreated = createEventModule(publicOnEventCreated);\n/**\n * Triggered when a `MASTER` event is split.\n */\nexport const onEventRecurringSplit: BuildEventDefinition<\n typeof publicOnEventRecurringSplit\n> &\n typeof publicOnEventRecurringSplit = createEventModule(\n publicOnEventRecurringSplit\n);\n/**\n * Triggered when an event is updated, including when it's canceled.\n *\n * Not triggered when `INSTANCE` events are updated. You can use the\n * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction)\n * to get notified about `INSTANCE` events.\n */\nexport const onEventUpdated: BuildEventDefinition<typeof publicOnEventUpdated> &\n typeof publicOnEventUpdated = createEventModule(publicOnEventUpdated);\n\nexport {\n Status,\n RecurrenceType,\n Frequency,\n Day,\n Transparency,\n LocationType,\n Role,\n ParticipantsStatus,\n Type,\n Field,\n IdentityType,\n WebhookIdentityType,\n SortOrder,\n PlacementType,\n DayOfWeek,\n ResolutionMethod,\n RequestedFields,\n} from './calendar-v3-event-events.universal.js';\nexport {\n Event,\n ZonedDate,\n RecurrenceRule,\n Location,\n Resource,\n Participants,\n Participant,\n ConferencingDetails,\n Permission,\n CommonIdentificationData,\n CommonIdentificationDataIdOneOf,\n ExtendedFields,\n RecurringEventSplit,\n EventCancelled,\n ParticipantNotification,\n EventUpdatedWithMetadata,\n UpdateScheduleWithFixedBusinessResourceIdRequest,\n UpdateScheduleWithFixedBusinessResourceIdResponse,\n UpdateEventsWithFixedBusinessResourceIdRequest,\n UpdateEventsWithFixedBusinessResourceIdResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n ListEventsByContactIdRequest,\n CommonCursorPaging,\n Sorting,\n ListEventsByContactIdResponse,\n CommonCursorPagingMetadata,\n CommonCursors,\n ListEventsByMemberIdRequest,\n ListEventsByMemberIdResponse,\n SitePropertiesNotification,\n SitePropertiesEvent,\n Properties,\n Categories,\n Locale,\n Address,\n AddressHint,\n GeoCoordinates,\n BusinessSchedule,\n TimePeriod,\n SpecialHourPeriod,\n Multilingual,\n SupportedLanguage,\n ConsentPolicy,\n Translation,\n ChangeContext,\n ChangeContextPayloadOneOf,\n PropertiesChange,\n SiteCreated,\n SiteCloned,\n Empty,\n GetEventRequest,\n GetEventResponse,\n ListEventsRequest,\n ListEventsResponse,\n QueryEventsRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n CursorPaging,\n QueryEventsResponse,\n CursorPagingMetadata,\n Cursors,\n ListRecurringEventInstancesHistoryRequest,\n ListRecurringEventInstancesHistoryResponse,\n CreateEventRequest,\n CreateEventResponse,\n BulkCreateEventRequest,\n MaskedEvent,\n BulkCreateEventResponse,\n BulkEventResult,\n ItemMetadata,\n ApplicationError,\n BulkActionMetadata,\n UpdateEventRequest,\n UpdateEventResponse,\n BulkUpdateEventRequest,\n BulkUpdateEventRequestMaskedEvent,\n BulkUpdateEventResponse,\n UpdateEventParticipantsRequest,\n UpdateEventParticipantsResponse,\n RestoreEventDefaultsRequest,\n RestoreEventDefaultsResponse,\n SplitRecurringEventRequest,\n SplitRecurringEventResponse,\n CancelEventRequest,\n CancelEventResponse,\n BulkCancelEventRequest,\n BulkCancelEventResponse,\n BaseEventMetadata,\n EventMetadata,\n EventCancelledEnvelope,\n EventCreatedEnvelope,\n EventRecurringSplitEnvelope,\n EventUpdatedEnvelope,\n ListEventsByContactIdOptions,\n ListEventsByMemberIdOptions,\n GetEventOptions,\n ListEventsOptions,\n QueryEventsOptions,\n EventsQueryResult,\n EventsQueryBuilder,\n EventQuerySpec,\n CreateEventOptions,\n BulkCreateEventOptions,\n UpdateEvent,\n UpdateEventOptions,\n BulkUpdateEventOptions,\n RestoreEventDefaultsOptions,\n SplitRecurringEventOptions,\n CancelEventOptions,\n BulkCancelEventOptions,\n} from './calendar-v3-event-events.universal.js';\nexport {\n StatusWithLiterals,\n RecurrenceTypeWithLiterals,\n FrequencyWithLiterals,\n DayWithLiterals,\n TransparencyWithLiterals,\n LocationTypeWithLiterals,\n RoleWithLiterals,\n ParticipantsStatusWithLiterals,\n TypeWithLiterals,\n FieldWithLiterals,\n IdentityTypeWithLiterals,\n WebhookIdentityTypeWithLiterals,\n SortOrderWithLiterals,\n PlacementTypeWithLiterals,\n DayOfWeekWithLiterals,\n ResolutionMethodWithLiterals,\n RequestedFieldsWithLiterals,\n CancelEventApplicationErrors,\n BulkCancelEventApplicationErrors,\n CommonQueryWithEntityContext,\n EventQuery,\n} from './calendar-v3-event-events.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,gBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,wBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,6BAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,2BAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,IAAAC,oBAAqD;AACrD,IAAAC,0BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,2CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;A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;;;AGl+BxB,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAY1C,SAAS,kBAAkB,YAAwB;AACjD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,CAAC,YACrBC,aAAkB,UAAU,EAAE,OAAO;AAAA,IACvC,oBAAoB,CAAC,OAAmB,YACtCC,kBAAuB,UAAU,EAAE,OAAO,OAAO;AAAA,IACnD,qBAAqB;AAAA,EACvB,CAAC;AAOD,WAAS,gBACP,gBACA,SACK;AACL,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,yBAGK,2DAAiBA,sBAA2B;AACvD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,YAEK,2DAAiBA,SAAc;AAC1C,IAAMC,cAEK,2DAAiBA,WAAgB;AAC5C,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMC,wBAGK,2DAAiBA,qBAA0B;AACtD,IAAMC,uBAGK,2DAAiBA,oBAAyB;AACrD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,mBAEK,2DAAiBA,gBAAqB;AACjD,IAAMb,eAEK,2DAAiB,iBAAiB;AAQ7C,IAAMc,wBAGqB,mDAAkB,gBAAsB;AASnE,IAAMC,sBACmB,mDAAkB,cAAoB;AAI/D,IAAMC,6BAG0B;AAAA,EACrC;AACF;AAQO,IAAMC,sBACmB,mDAAkB,cAAoB;","names":["bulkCancelEvent","bulkCreateEvent","bulkUpdateEvent","cancelEvent","createEvent","getEvent","listEvents","listEventsByContactId","listEventsByMemberId","onEventCancelled","onEventCreated","onEventRecurringSplit","onEventUpdated","queryEvents","restoreEventDefaults","splitRecurringEvent","updateEvent","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Status","RecurrenceType","Frequency","Day","Transparency","LocationType","Role","ParticipantsStatus","Type","Field","IdentityType","WebhookIdentityType","SortOrder","PlacementType","DayOfWeek","ResolutionMethod","RequestedFields","listEventsByContactId","sdkTransformError","listEventsByMemberId","getEvent","listEvents","queryEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","listEventsByContactId","listEventsByMemberId","getEvent","listEvents","queryEvents","typedQueryEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","import_rest_modules","queryEvents","typedQueryEvents","listEventsByContactId","listEventsByMemberId","getEvent","listEvents","createEvent","bulkCreateEvent","updateEvent","bulkUpdateEvent","restoreEventDefaults","splitRecurringEvent","cancelEvent","bulkCancelEvent","onEventCancelled","onEventCreated","onEventRecurringSplit","onEventUpdated"]}