/** * An event is a scheduled entry on a calendar that includes details like timing, * location, and participants. Each event is associated with * a [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction), * from which it may [inherit default values](https://dev.wix.com/docs/rest/business-management/calendar/default-values). * Events can either be standalone, part of a recurring series, or define a * recurrence pattern. You can also specify whether events block time on the * schedule or allow other events to be scheduled concurrently. */ export interface Event { /** * Event ID. * @readonly */ _id?: string | null; /** * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) * the event belongs to. * After creating an event, you can't assign it to a different schedule. */ scheduleId?: string | null; /** * ID of the external schedule the event belongs to. * * 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). * @readonly */ externalScheduleId?: string | null; /** * Schedule name. * @readonly */ scheduleName?: string | null; /** * Event type. You can set the event type but you can't update it. * * Supported values: * + `DEFAULT`: A standard event that's not further specified. * + `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). * * Additional supported values, if Wix Bookings is installed: * + `APPOINTMENT`: Bookings appointment event. * + `CLASS`: Bookings class event. * + `COURSE`: Bookings course event. */ type?: string | null; /** * Event status. * * Supported values: * + `CONFIRMED`: Event is scheduled to happen or has happened. * + `CANCELLED`: Event has been canceled. * * Default: `CONFIRMED` * @readonly */ status?: Status; /** * Event title. * * Min: 1 character * Max: 200 characters */ title?: string | null; /** Information about when the event starts. */ start?: ZonedDate; /** * Information about when the event ends. * * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first). */ end?: ZonedDate; /** * Information about when the event starts adjusted to the `timeZone` of the * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties) * or a different `timeZone` you provide in the call's request. * @readonly */ adjustedStart?: ZonedDate; /** * Information about when the event ends adjusted to the `timeZone` of the * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties) * or a different `timeZone` you provide in the call's request. * @readonly */ adjustedEnd?: ZonedDate; /** * Time zone the event is associated with in * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). * Only regional time zones and UTC are supported. * For example, `America/New_York` or `UTC`. * * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction). */ timeZone?: string | null; /** * Information about whether the event is a single occurrence or part of a * recurring series. * * Supported values: * + `NONE`: The event occurs only once and doesn't repeat. * + `MASTER`: Defines the recurrence pattern for a series of recurring events. * + `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`. * + `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. * * Default: `NONE` * @readonly */ recurrenceType?: RecurrenceType; /** * Recurrence pattern for a series of events. This field is required when * creating a `MASTER` event and isn't available for non-recurring events. * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events. * * For example, an event that repeats every second Monday until January 7, 2026, * at 8:00 AM has the following `recurrenceRule`: * - `frequency = WEEKLY` * - `interval = 2` * - `days = [MONDAY]` * - `until = 20260107T08:00:00Z` */ recurrenceRule?: RecurrenceRule; /** * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE` * and `EXCEPTION` events. * @readonly */ recurringEventId?: string | null; /** * Specifies whether the event blocks time in the schedule it belongs to. * * Supported values: * + `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. * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently. * * Default: `OPAQUE` */ transparency?: Transparency; /** * Event location. * * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to */ location?: Location; /** * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) * affected by the event. This could include, for example, the * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) * providing the service or the room where the appointment takes place. * * Max: 100 resources */ resources?: Resource[]; /** * Maximum number of participants who can participate in the event. * * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to. */ totalCapacity?: number | null; /** * Number of participants who can still be added to the event. * @readonly */ remainingCapacity?: number | null; /** * Information about the event's participants. * 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). * @readonly */ participants?: Participants; /** * Information about the event's online conferencing. * 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). * * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to. */ conferencingDetails?: ConferencingDetails; /** * Additional notes about the event. * 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). * * Min: 1 character * Max: 5000 characters */ notes?: string | null; /** * List of fields whose values are inherited. * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction). * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event. * @readonly */ inheritedFields?: Field[]; /** * ID of the app that owns the event. Identical to `appId` of the * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) * to which the event belongs. * @readonly */ appId?: string | null; /** * List of permissions associated with the event. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles) * for more information. * @readonly */ permissions?: Permission[]; /** Extensions enabling applications or users to save custom data related to the event. */ extendedFields?: ExtendedFields; /** * Revision number, which increments each time the event is updated. * To prevent conflicting changes, the current revision must be passed when updating the event. * Ignored when creating an event. * @readonly */ revision?: string | null; /** * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _createdDate?: Date | null; /** * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _updatedDate?: Date | null; } export declare enum Status { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** Event is scheduled to happen or has happened. */ CONFIRMED = "CONFIRMED", /** Event has been canceled. */ CANCELLED = "CANCELLED" } /** A date time with a time zone, having the UTC offset and date determined by the server. */ export interface ZonedDate { /** * Local date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). * For example, `2024-01-30T13:30:00`. * Wix Calendar APIs ignore seconds. */ localDate?: string | null; /** * Time zone in * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). * For example, `America/New_York`. * @readonly */ timeZone?: string | null; /** * UTC date time in [ISO-8601 format](https://en.wikipedia.org/wiki/ISO_8601). * For example, `2024-01-30T13:30:00`. * Not available for adjusted date fields. * @readonly */ utcDate?: Date | null; } export declare enum RecurrenceType { UNKNOWN_RECURRENCE_TYPE = "UNKNOWN_RECURRENCE_TYPE", /** The event occurs only once and doesn't repeat. */ NONE = "NONE", /** Defines the recurrence pattern for a series of recurring events. */ MASTER = "MASTER", /** 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`. */ INSTANCE = "INSTANCE", /** 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. */ EXCEPTION = "EXCEPTION" } export interface RecurrenceRule { /** * Frequency how often the event repeats. Works together with `interval`. * * Supported values: * + `WEEKLY`: The event's recurrence pattern is based on weeks. */ frequency?: Frequency; /** * Interval how often the event repeats. Works together with `frequency`. * For example, `frequency` set to `WEEKLY` and `interval` set to `2` means * the event repeats every 2 weeks. * * Min: `1` * Max: `4` * Default: `1` */ interval?: number | null; /** * Days of the week when the recurring event takes place. * Currently, only a single day is supported. * * Min: 1 day * Max: 1 day */ days?: Day[]; /** * Date until when the event repeats. * If not specified, the event repeats forever. */ until?: ZonedDate; /** * Date until when the event repeats * adjusted to the `timeZone` of the business * [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties) * or a different `timeZone` you provide in the call's request. * @readonly */ adjustedUntil?: ZonedDate; } export declare enum Frequency { UNKNOWN_FREQUENCY = "UNKNOWN_FREQUENCY", /** The event's recurrence pattern is based on weeks. */ WEEKLY = "WEEKLY" } export declare enum Day { /** The recurring event takes place on Mondays. */ MONDAY = "MONDAY", /** The recurring event takes place on Tuesdays. */ TUESDAY = "TUESDAY", /** The recurring event takes place on Wednesday. */ WEDNESDAY = "WEDNESDAY", /** The recurring event takes place on Thursdays. */ THURSDAY = "THURSDAY", /** The recurring event takes place on Fridays. */ FRIDAY = "FRIDAY", /** The recurring event takes place on Saturdays. */ SATURDAY = "SATURDAY", /** The recurring event takes place on Sundays. */ SUNDAY = "SUNDAY" } export declare enum Transparency { UNKNOWN_TRANSPARENCY = "UNKNOWN_TRANSPARENCY", /** 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. */ OPAQUE = "OPAQUE", /** The schedule remains open during the event, allowing other events to be scheduled concurrently. */ TRANSPARENT = "TRANSPARENT" } export interface Location { /** * [Location](https://dev.wix.com/docs/rest/business-management/locations/location-object) * ID. Available only for `BUSINESS` locations. */ _id?: string | null; /** * Location type. * * Supported values: * + `BUSINESS`: The event is held at a business location. * + `CUSTOMER`: The event is held at the customer's location, such as their home or office. * + `CUSTOM`: The event is held at an address or venue not tied to the business or customer. */ type?: LocationType; /** * Location name. For `BUSINESS` locations, it's identical to the * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object) * `name`. * * Min: 1 character * Max: 150 characters */ name?: string | null; /** * Location address. For `BUSINESS` locations, it's identical to the * [location](https://dev.wix.com/docs/rest/business-management/locations/location-object)'s * `formattedAddress`. */ address?: string | null; } export declare enum LocationType { UNKNOWN_TYPE = "UNKNOWN_TYPE", /** The event is held at a business location. */ BUSINESS = "BUSINESS", /** The event is held at the customer's location, such as their home or office. */ CUSTOMER = "CUSTOMER", /** The event is held at an address or venue not tied to the business or customer. */ CUSTOM = "CUSTOM" } export interface Resource { /** Resource ID. */ _id?: string | null; /** * Resource name. * @readonly */ name?: string | null; /** * Resource type. * @readonly */ type?: string | null; /** * Specifies whether the event blocks time in the resource's schedule. * * Supported values: * + `OPAQUE`: The schedule is blocked during the event, preventing other events that involve the same resource from being scheduled at the same time. * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently. * * Default: `OPAQUE`. */ transparency?: Transparency; /** * Permission role associated with the resource. Refer to the * [permissions article](https://dev.wix.com/docs/rest/business-management/calendar/permissions#roles) * for more information. */ permissionRole?: Role; } export declare enum Role { UNKNOWN_ROLE = "UNKNOWN_ROLE", /** Full read and write access. */ WRITER = "WRITER", /** Full read access, write access limited to `event.notes`. */ COMMENTER = "COMMENTER" } export interface Participants { /** * Total number of participants. * * Min: `0` */ total?: number | null; /** * Full or partial list of the participants. * * Max: 50 participants */ list?: Participant[]; /** * Whether there are more participants for the event than listed. * * + `false`: The list includes all participants. * + `true`: The list doesn't include all participants. */ hasMore?: boolean | null; /** * Participant's status. * * Supported values: * + `CONFIRMED`: All participants are confirmed. * + `PENDING_CONFIRMATION`: At least one participant isn't confirmed yet. */ status?: ParticipantsStatus; } export interface Participant { /** * Participant name. * * Min: 1 character * Max: 200 characters */ name?: string | null; /** Participant's phone number. */ phone?: string | null; /** Participant's email address. */ email?: string | null; /** * [Contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction) * ID of the participant. */ contactId?: string | null; } export declare enum ParticipantsStatus { UNKNOWN_STATUS = "UNKNOWN_STATUS", /** All participants are confirmed. */ CONFIRMED = "CONFIRMED", /** At least one participant isn't confirmed yet. */ PENDING_CONFIRMATION = "PENDING_CONFIRMATION" } export interface ConferencingDetails { /** Conference type. For example, `Zoom`. */ type?: Type; /** * URL used by the host to start the conference. * * Min: 1 character * Max: 2000 characters */ hostUrl?: string | null; /** * URL used by a guest to join the conference. * * Min: 1 character * Max: 2000 characters */ guestUrl?: string | null; /** * Conference password. * * Min: 1 character * Max: 100 characters */ password?: string | null; /** * Conference ID in an external system. * * Min: 1 character * Max: 150 characters */ externalId?: string | null; } export declare enum Type { UNKNOWN_TYPE = "UNKNOWN_TYPE", ZOOM = "ZOOM", CUSTOM = "CUSTOM" } export declare enum Field { UNKNOWN_FIELD = "UNKNOWN_FIELD", /** `title` is inherited from the schedule or `MASTER` event. */ TITLE = "TITLE", /** `timeZone` is inherited from the schedule or `MASTER` event. */ TIME_ZONE = "TIME_ZONE", /** `start` and `end` are inherited from the `MASTER` event. */ TIME = "TIME", /** `location` is inherited from the schedule or `MASTER` event. */ LOCATION = "LOCATION", /** `resources` is inherited from the `MASTER` event. */ RESOURCES = "RESOURCES", /** `capacity` is inherited from the schedule or `MASTER` event. */ CAPACITY = "CAPACITY", /** `participants` is inherited from the `MASTER` event. */ PARTICIPANTS = "PARTICIPANTS", /** `conferencingDetails` is inherited from the schedule or `MASTER` event. */ CONFERENCING_DETAILS = "CONFERENCING_DETAILS" } export interface Permission { /** * [Wix user](https://dev.wix.com/docs/build-apps/develop-your-app/access/about-identities#wix-users) * granted the permission. */ identity?: CommonIdentificationData; /** * Permission role. * * Supported values: * + `WRITER`: Full read and write access. * + `COMMENTER`: Full read access, write access limited to `event.notes`. */ role?: Role; } export interface CommonIdentificationData extends CommonIdentificationDataIdOneOf { /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; } /** @oneof */ export interface CommonIdentificationDataIdOneOf { /** * ID of a Wix user. For example, the site owner or a * [site collaborator](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site). */ wixUserId?: string; } export declare enum IdentityType { UNKNOWN = "UNKNOWN", WIX_USER = "WIX_USER" } export interface ExtendedFields { /** * Extended field data. Each key corresponds to the namespace of the app that created the extended fields. * The value of each key is structured according to the schema defined when the extended fields were configured. * * You can only access fields for which you have the appropriate permissions. * * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields). */ namespaces?: Record>; } export interface MigrateSiteRequest { metaSiteId?: string; /** * Whether to run in safe, dry run mode, and only print logs without applying any changes. * Default to `true`. */ dryRun?: boolean | null; /** * Whether to skip the migration if target data is already present. * Default to `true`. */ skipIfTargetDataPresent?: boolean | null; } export interface MigrateSiteResponse { dryRun?: boolean | null; skipped?: boolean | null; } export interface UpdateScheduleWithFixedBusinessResourceIdRequest { metaSiteId?: string; currentBusinessResourceId?: string; migrateBusinessConferenceId?: boolean; } export interface UpdateScheduleWithFixedBusinessResourceIdResponse { } export interface UpdateEventsWithFixedBusinessResourceIdRequest { metaSiteId?: string; currentBusinessResourceId?: string; migrateBusinessConferenceId?: boolean; } export interface UpdateEventsWithFixedBusinessResourceIdResponse { } export interface GetEventRequest { /** * ID of the event to retrieve. * * Min: 36 characters * Max: 250 characters */ eventId: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[]; } export declare enum RequestedFields { UNKNOWN_REQUESTED_FIELDS = "UNKNOWN_REQUESTED_FIELDS", /** Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. */ PI_FIELDS = "PI_FIELDS", /** Returns only fields containing your own personal data. */ OWN_PI_FIELDS = "OWN_PI_FIELDS" } export interface GetEventResponse { /** Retrieved event. */ event?: Event; } export interface ListEventsRequest { /** * IDs of the events to retrieve. * * Min: 1 event ID * Min: 100 event IDs */ eventIds: string[]; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[]; } export interface ListEventsResponse { /** Retrieved events matching the provided IDs. */ events?: Event[]; } export interface QueryEventsRequest { /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate` unless the sort order is * descending. */ fromLocalDate?: string | null; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate` unless the sort order is * descending. */ toLocalDate?: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** Query containing filters and paging. */ query?: CursorQuery; /** * Filters events based on their `recurrenceType`. * * Max: 5 recurrence types can be specified. * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned. */ recurrenceType?: RecurrenceType[]; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[]; } /** TODO Diverge */ export interface CursorQuery extends CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */ cursorPaging?: CursorPaging; /** * Filter object. * See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) * for more information. * * Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`. * * For a detailed list of supported filters, see Supported Filters. */ filter?: Record | null; /** * Whether to sort events by their start date in ascending order or by their end date in descending order. * Default is start ascending. */ sort?: Sorting[]; } /** @oneof */ export interface CursorQueryPagingMethodOneOf { /** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter`. */ cursorPaging?: CursorPaging; } /** TODO Diverge */ export interface Sorting { /** * The field to sort by. * Either `start` or `end`. * Default is `start`. */ fieldName?: string; /** Sort order. */ order?: SortOrder; } export declare enum SortOrder { ASC = "ASC", DESC = "DESC" } /** TODO Diverge */ export interface CursorPaging { /** * Number of events to return. * Defaults to `50`. Maximum `1000`. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface QueryEventsResponse { /** Retrieved events matching the provided query. */ events?: Event[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } /** TODO Diverge */ export interface CursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** 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). */ cursors?: Cursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } export interface Cursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; } export interface ListRecurringEventInstancesHistoryRequest { /** * The ID of the recurring event. * Required, unless `cursorPaging` is provided. */ recurringEventId?: string | null; /** * The revision of the recurring event. * Required, unless `cursorPaging` is provided. */ revision?: string | null; /** * Inclusive start date for which events are returned, in ISO-8601 format. * Events that begin at or after the `fromDate` are included in the results. * Required, unless `cursorPaging` is provided. */ fromDate?: Date | null; /** * Exclusive end date for which events are returned, in ISO-8601 format. * Events that begin before the `toDate` are included in the results. * Required, unless `cursorPaging` is provided. */ toDate?: Date | null; /** Optional cursor pointing to the next page of events. */ cursorPaging?: CursorPaging; } export interface ListRecurringEventInstancesHistoryResponse { /** The recurring event instances. */ recurringEventInstances?: Event[]; /** Paging metadata. */ pagingMetadata?: CursorPagingMetadata; } export interface CreateEventRequest { /** Event to create. */ event: Event; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; /** * Idempotency key guaranteeing that you don't create the same event more * than once. */ idempotencyKey?: string | null; } export interface CreateEventResponse { /** Created event. */ event?: Event; } export interface BulkCreateEventRequest { /** Events to create. */ events: MaskedEvent[]; /** * Whether to return created events. * * Default: `false`. */ returnEntity?: boolean | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface MaskedEvent { /** Event to create. */ event?: Event; } export interface BulkCreateEventResponse { /** The result for each event, containing the event and whether the action was successful. */ results?: BulkEventResult[]; /** Total successes and failures. */ bulkActionMetadata?: BulkActionMetadata; } export interface BulkEventResult { /** Whether the requested action was successful. */ itemMetadata?: ItemMetadata; /** The event. */ item?: Event; } export interface ItemMetadata { /** * Event ID. * Should always be available, unless it's impossible (for example, when failing to create an event). */ _id?: string | null; /** Index of the item within the request array, for correlation between request and response items. */ originalIndex?: number; /** * Whether the requested action was successful for this event. * When `false`, the `error` field is populated. */ success?: boolean; /** Details about the error in case of failure. */ error?: ApplicationError; } export interface ApplicationError { /** Error code. */ code?: string; /** Description of the error. */ description?: string; /** Data related to the error. */ data?: Record | null; } export interface BulkActionMetadata { /** Number of events that were successfully processed. */ totalSuccesses?: number; /** Number of events that couldn't be processed. */ totalFailures?: number; } export interface UpdateEventRequest { /** Event to update. */ event: Event; /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface ParticipantNotification { /** * Whether to notify the participants about changes made to the schedule or event. * * Default: `false` */ notifyParticipants?: boolean | null; /** * Message to send. * * Min: 1 character * Max: 5000 characters */ message?: string | null; } export interface UpdateEventResponse { /** Updated event. */ event?: Event; } /** `PRIVATE` until we'll have standard events metadata from Infra. */ export interface EventUpdatedWithMetadata { /** The updated event. */ event?: Event; /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; } export interface BulkUpdateEventRequest { /** * Events to update. * * Min: 1 event * Max: 50 events */ events: BulkUpdateEventRequestMaskedEvent[]; /** * Whether to return the updated events. * * Default: `false` */ returnEntity?: boolean | null; /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface BulkUpdateEventRequestMaskedEvent { /** Event to update. */ event?: Event; } export interface BulkUpdateEventResponse { /** The result for each event, containing the event and whether the action was successful. */ results?: BulkEventResult[]; /** Total successes and failures. */ bulkActionMetadata?: BulkActionMetadata; } export interface UpdateEventParticipantsRequest { /** * ID of the event to update. * * Min: 36 characters * Max: 250 characters */ eventId?: string | null; /** The participants to update. */ participants?: Participants; } export interface UpdateEventParticipantsResponse { /** Updated event. */ event?: Event; } export interface RestoreEventDefaultsRequest { /** ID of the event for which to restore default values. */ eventId: string | null; /** * Fields for which to restore default values. * * `TIME` restores default values for `start` and `end`. * * Min: 1 field */ fields: Field[]; /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface RestoreEventDefaultsResponse { /** Updated event. */ event?: Event; } export interface SplitRecurringEventRequest { /** ID of the `MASTER` event to split. */ recurringEventId: string | null; /** * Local date and time at which the `MASTER` event is split in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2025-03-11T09:00:00`. * Must be a future date that's after the `start` date of the next `INSTANCE` or * `EXCEPTION` event in the series. Additionally, there must be another * `INSTANCE` or `EXCEPTION` event following this next event, as the changes * wouldn't affect any event without a subsequent occurrence. */ splitLocalDate: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface SplitRecurringEventResponse { /** Original `MASTER` event that was shortened. */ updatedRecurringEventEndingBeforeSplit?: Event; /** New `MASTER` event starting with the first event after the split date. */ newRecurringEventStartingFromSplit?: Event; } export interface RecurringEventSplit { /** Original `MASTER` event that was shortened. */ updatedRecurringEventEndingBeforeSplit?: Event; /** New `MASTER` event starting with the first event after the split date. */ newRecurringEventStartingFromSplit?: Event; } export interface CancelEventRequest { /** ID of the event to cancel. */ eventId: string | null; /** * Information about whether participants of the canceled event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface CancelEventResponse { /** Canceled event. */ event?: Event; } export interface EventCancelled { /** Canceled event. */ event?: Event; } export interface BulkCancelEventRequest { /** IDs of the events to cancel. */ eventIds: string[]; /** * Whether to return the canceled events. * * Default: `false` */ returnEntity?: boolean | null; /** * Information about whether participants of the canceled events are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } export interface BulkCancelEventResponse { /** The result for each event, containing the event and whether the action was successful. */ results?: BulkEventResult[]; /** Total successes and failures. */ bulkActionMetadata?: BulkActionMetadata; } export interface DomainEvent extends DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } /** @oneof */ export interface DomainEventBodyOneOf { createdEvent?: EntityCreatedEvent; updatedEvent?: EntityUpdatedEvent; deletedEvent?: EntityDeletedEvent; actionEvent?: ActionEvent; } export interface EntityCreatedEvent { entity?: string; } export interface RestoreInfo { deletedDate?: Date | null; } export interface EntityUpdatedEvent { /** * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff. * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects. * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it. */ currentEntity?: string; } export interface EntityDeletedEvent { /** Entity that was deleted */ deletedEntity?: string | null; } export interface ActionEvent { body?: string; } export interface MessageEnvelope { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; /** Stringify payload. */ data?: string; } export interface IdentificationData extends IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; /** @readonly */ identityType?: WebhookIdentityType; } /** @oneof */ export interface IdentificationDataIdOneOf { /** ID of a site visitor that has not logged in to the site. */ anonymousVisitorId?: string; /** ID of a site visitor that has logged in to the site. */ memberId?: string; /** ID of a Wix user (site owner, contributor, etc.). */ wixUserId?: string; /** ID of an app. */ appId?: string; } export declare enum WebhookIdentityType { UNKNOWN = "UNKNOWN", ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR", MEMBER = "MEMBER", WIX_USER = "WIX_USER", APP = "APP" } /** Encapsulates all details written to the Greyhound topic when a site's properties are updated. */ export interface SitePropertiesNotification { /** The site ID for which this update notification applies. */ metasiteId?: string; /** The actual update event. */ event?: SitePropertiesEvent; /** A convenience set of mappings from the MetaSite ID to its constituent services. */ translations?: Translation[]; /** Context of the notification */ changeContext?: ChangeContext; } /** The actual update event for a particular notification. */ export interface SitePropertiesEvent { /** Version of the site's properties represented by this update. */ version?: number; /** Set of properties that were updated - corresponds to the fields in "properties". */ fields?: string[]; /** Updated properties. */ properties?: Properties; } export interface Properties { /** Site categories. */ categories?: Categories; /** Site locale. */ locale?: Locale; /** * Site language. * * Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ language?: string | null; /** * Site currency format used to bill customers. * * Three-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format. */ paymentCurrency?: string | null; /** Timezone in `America/New_York` format. */ timeZone?: string | null; /** Email address. */ email?: string | null; /** Phone number. */ phone?: string | null; /** Fax number. */ fax?: string | null; /** Address. */ address?: Address; /** Site display name. */ siteDisplayName?: string | null; /** Business name. */ businessName?: string | null; /** Path to the site's logo in Wix Media (without Wix Media base URL). */ logo?: string | null; /** Site description. */ description?: string | null; /** * Business schedule. Regular and exceptional time periods when the business is open or the service is available. * * __Note:__ Not supported by Wix Bookings. */ businessSchedule?: BusinessSchedule; /** Supported languages of a site and the primary language. */ multilingual?: Multilingual; /** Cookie policy the Wix user defined for their site (before the site visitor interacts with/limits it). */ consentPolicy?: ConsentPolicy; /** * Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`. * * Site business type. */ businessConfig?: string | null; /** External site URL that uses Wix as its headless business solution. */ externalSiteUrl?: string | null; /** Track clicks analytics. */ trackClicksAnalytics?: boolean; } export interface Categories { /** Primary site category. */ primary?: string; /** Secondary site category. */ secondary?: string[]; /** Business Term Id */ businessTermId?: string | null; } export interface Locale { /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ languageCode?: string; /** Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format. */ country?: string; } export interface Address { /** Street name. */ street?: string; /** City name. */ city?: string; /** Two-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */ country?: string; /** State. */ state?: string; /** Zip or postal code. */ zip?: string; /** Extra information to be displayed in the address. */ hint?: AddressHint; /** Whether this address represents a physical location. */ isPhysical?: boolean; /** Google-formatted version of this address. */ googleFormattedAddress?: string; /** Street number. */ streetNumber?: string; /** Apartment number. */ apartmentNumber?: string; /** Geographic coordinates of location. */ coordinates?: GeoCoordinates; } /** * Extra information on displayed addresses. * This is used for display purposes. Used to add additional data about the address, such as "In the passage". * Free text. In addition, the user can state where to display the additional description - before, after, or instead of the address string. */ export interface AddressHint { /** Extra text displayed next to, or instead of, the actual address. */ text?: string; /** Where the extra text should be displayed. */ placement?: PlacementType; } /** Where the extra text should be displayed: before, after or instead of the actual address. */ export declare enum PlacementType { BEFORE = "BEFORE", AFTER = "AFTER", REPLACE = "REPLACE" } /** Geocoordinates for a particular address. */ export interface GeoCoordinates { /** Latitude of the location. Must be between -90 and 90. */ latitude?: number; /** Longitude of the location. Must be between -180 and 180. */ longitude?: number; } /** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */ export interface BusinessSchedule { /** Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. */ periods?: TimePeriod[]; /** Exceptions to the business's regular hours. The business can be open or closed during the exception. */ specialHourPeriod?: SpecialHourPeriod[]; } /** Weekly recurring time periods when the business is regularly open or the service is available. */ export interface TimePeriod { /** Day of the week the period starts on. */ openDay?: DayOfWeek; /** * 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 * midnight at the end of the specified day. */ openTime?: string; /** Day of the week the period ends on. */ closeDay?: DayOfWeek; /** * 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 * midnight at the end of the specified day. * * __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`. */ closeTime?: string; } /** Enumerates the days of the week. */ export declare enum DayOfWeek { MONDAY = "MONDAY", TUESDAY = "TUESDAY", WEDNESDAY = "WEDNESDAY", THURSDAY = "THURSDAY", FRIDAY = "FRIDAY", SATURDAY = "SATURDAY", SUNDAY = "SUNDAY" } /** Exception to the business's regular hours. The business can be open or closed during the exception. */ export interface SpecialHourPeriod { /** 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). */ startDate?: string; /** 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). */ endDate?: string; /** * Whether the business is closed (or the service is not available) during the exception. * * Default: `true`. */ isClosed?: boolean; /** Additional info about the exception. For example, "We close earlier on New Year's Eve." */ comment?: string; } export interface Multilingual { /** Supported languages list. */ supportedLanguages?: SupportedLanguage[]; /** Whether to redirect to user language. */ autoRedirect?: boolean; } export interface SupportedLanguage { /** Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format. */ languageCode?: string; /** Locale. */ locale?: Locale; /** Whether the supported language is the primary language for the site. */ isPrimary?: boolean; /** Language icon. */ countryCode?: string; /** How the language will be resolved. For internal use. */ resolutionMethod?: ResolutionMethod; } export declare enum ResolutionMethod { QUERY_PARAM = "QUERY_PARAM", SUBDOMAIN = "SUBDOMAIN", SUBDIRECTORY = "SUBDIRECTORY" } export interface ConsentPolicy { /** Whether the site uses cookies that are essential to site operation. Always `true`. */ essential?: boolean | null; /** Whether the site uses cookies that affect site performance and other functional measurements. */ functional?: boolean | null; /** Whether the site uses cookies that collect analytics about how the site is used (in order to improve it). */ analytics?: boolean | null; /** Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor. */ advertising?: boolean | null; /** CCPA compliance flag. */ dataToThirdParty?: boolean | null; } /** A single mapping from the MetaSite ID to a particular service. */ export interface Translation { /** The service type. */ serviceType?: string; /** The application definition ID; this only applies to services of type ThirdPartyApps. */ appDefId?: string; /** The instance ID of the service. */ instanceId?: string; } export interface ChangeContext extends ChangeContextPayloadOneOf { /** Properties were updated. */ propertiesChange?: PropertiesChange; /** Default properties were created on site creation. */ siteCreated?: SiteCreated; /** Properties were cloned on site cloning. */ siteCloned?: SiteCloned; } /** @oneof */ export interface ChangeContextPayloadOneOf { /** Properties were updated. */ propertiesChange?: PropertiesChange; /** Default properties were created on site creation. */ siteCreated?: SiteCreated; /** Properties were cloned on site cloning. */ siteCloned?: SiteCloned; } export interface PropertiesChange { } export interface SiteCreated { /** Origin template site id. */ originTemplateId?: string | null; } export interface SiteCloned { /** Origin site id. */ originMetaSiteId?: string; } export interface Empty { } export interface ListEventsByContactIdRequest { /** * ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object) * to retrieve events for. Required, unless you provide `cursorPaging`. */ contactId: string | null; /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate`. */ fromLocalDate?: string | null; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Can't be more than a full year after * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate`. */ toLocalDate?: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) * to filter events by. */ appId?: string | null; /** Cursor to retrieve the next page of the results. */ cursorPaging?: CommonCursorPaging; } /** TODO Diverge */ export interface CommonCursorPaging { /** * Number of events to return. * Defaults to `50`. Maximum `100`. */ limit?: number | null; /** * Pointer to the next or previous page in the list of results. * * You can get the relevant cursor token * from the `pagingMetadata` object in the previous call's response. * Not relevant for the first request. */ cursor?: string | null; } export interface ListEventsByContactIdResponse { /** Retrieved events. */ events?: Event[]; /** Paging metadata. */ pagingMetadata?: CommonCursorPagingMetadata; } /** TODO Diverge */ export interface CommonCursorPagingMetadata { /** Number of items returned in the response. */ count?: number | null; /** 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). */ cursors?: CommonCursors; /** * Indicates if there are more results after the current page. * If `true`, another page of results can be retrieved. * If `false`, this is the last page. */ hasNext?: boolean | null; } export interface CommonCursors { /** Cursor pointing to next page in the list of results. */ next?: string | null; } export interface ListEventsByMemberIdRequest { /** * ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object) * to retrieve events for. Required, unless you provide `cursorPaging`. * Provide `me` to retrieve events for the currently logged-in member. * You must have the `Read Calendars - Including PI` * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app) * to retrieve events for members who aren't the currently logged in member. */ memberId: string | null; /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate`. */ fromLocalDate?: string | null; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Can't be more than a full year after * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate`. */ toLocalDate?: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) * to filter events by. */ appId?: string | null; /** Cursor to retrieve the next page of the results. */ cursorPaging?: CommonCursorPaging; /** * IDs of the events to retrieve. * If you provide a list of IDs, all other filters are ignored. * * Max: 100 `eventId`s */ eventIds?: string[]; } export interface ListEventsByMemberIdResponse { /** Retrieved events. */ events?: Event[]; /** Paging metadata. */ pagingMetadata?: CommonCursorPagingMetadata; } interface RecurrenceRuleNonNullableFields { frequency: Frequency; days: Day[]; } interface LocationNonNullableFields { type: LocationType; } interface ResourceNonNullableFields { transparency: Transparency; permissionRole: Role; } interface ParticipantsNonNullableFields { status: ParticipantsStatus; } interface ConferencingDetailsNonNullableFields { type: Type; } interface CommonIdentificationDataNonNullableFields { wixUserId: string; identityType: IdentityType; } interface PermissionNonNullableFields { identity?: CommonIdentificationDataNonNullableFields; role: Role; } export interface EventNonNullableFields { status: Status; recurrenceType: RecurrenceType; recurrenceRule?: RecurrenceRuleNonNullableFields; transparency: Transparency; location?: LocationNonNullableFields; resources: ResourceNonNullableFields[]; participants?: ParticipantsNonNullableFields; conferencingDetails?: ConferencingDetailsNonNullableFields; inheritedFields: Field[]; permissions: PermissionNonNullableFields[]; } export interface GetEventResponseNonNullableFields { event?: EventNonNullableFields; } export interface ListEventsResponseNonNullableFields { events: EventNonNullableFields[]; } export interface QueryEventsResponseNonNullableFields { events: EventNonNullableFields[]; } export interface CreateEventResponseNonNullableFields { event?: EventNonNullableFields; } interface ApplicationErrorNonNullableFields { code: string; description: string; } interface ItemMetadataNonNullableFields { originalIndex: number; success: boolean; error?: ApplicationErrorNonNullableFields; } interface BulkEventResultNonNullableFields { itemMetadata?: ItemMetadataNonNullableFields; item?: EventNonNullableFields; } interface BulkActionMetadataNonNullableFields { totalSuccesses: number; totalFailures: number; } export interface BulkCreateEventResponseNonNullableFields { results: BulkEventResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface UpdateEventResponseNonNullableFields { event?: EventNonNullableFields; } export interface BulkUpdateEventResponseNonNullableFields { results: BulkEventResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface RestoreEventDefaultsResponseNonNullableFields { event?: EventNonNullableFields; } export interface SplitRecurringEventResponseNonNullableFields { updatedRecurringEventEndingBeforeSplit?: EventNonNullableFields; newRecurringEventStartingFromSplit?: EventNonNullableFields; } export interface CancelEventResponseNonNullableFields { event?: EventNonNullableFields; } export interface BulkCancelEventResponseNonNullableFields { results: BulkEventResultNonNullableFields[]; bulkActionMetadata?: BulkActionMetadataNonNullableFields; } export interface ListEventsByContactIdResponseNonNullableFields { events: EventNonNullableFields[]; } export interface ListEventsByMemberIdResponseNonNullableFields { events: EventNonNullableFields[]; } export interface BaseEventMetadata { /** App instance ID. */ instanceId?: string | null; /** Event type. */ eventType?: string; /** The identification type and identity data. */ identity?: IdentificationData; } export interface EventMetadata extends BaseEventMetadata { /** * Unique event ID. * Allows clients to ignore duplicate webhooks. */ _id?: string; /** * Assumes actions are also always typed to an entity_type * Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction */ entityFqdn?: string; /** * This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug) * This is although the created/updated/deleted notion is duplication of the oneof types * Example: created/updated/deleted/started/completed/email_opened */ slug?: string; /** ID of the entity associated with the event. */ entityId?: string; /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */ eventTime?: Date | null; /** * Whether the event was triggered as a result of a privacy regulation application * (for example, GDPR). */ triggeredByAnonymizeRequest?: boolean | null; /** If present, indicates the action that triggered the event. */ originatedFrom?: string | null; /** * A sequence number defining the order of updates to the underlying entity. * For example, given that some entity was updated at 16:00 and than again at 16:01, * it is guaranteed that the sequence number of the second update is strictly higher than the first. * As the consumer, you can use this value to ensure that you handle messages in the correct order. * To do so, you will need to persist this number on your end, and compare the sequence number from the * message against the one you have stored. Given that the stored number is higher, you should ignore the message. */ entityEventSequence?: string | null; } export interface EventCancelledEnvelope { data: EventCancelled; metadata: EventMetadata; } /** * Triggered when an event is canceled. * * Not triggered when `INSTANCE` events are canceled. You can use the * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction) * to get notified about `INSTANCE` events. * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionId CALENDAR.EVENT_READ_PI * @webhook * @eventType wix.calendar.v3.event_cancelled * @documentationMaturity preview */ export declare function onEventCancelled(handler: (event: EventCancelledEnvelope) => void | Promise): void; export interface EventCreatedEnvelope { entity: Event; metadata: EventMetadata; } /** * Triggered when an event is created, including when an existing `MASTER` * event is split. * * Not triggered when `INSTANCE` events are created. You can use the * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction) * to get notified about `INSTANCE` events. * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionId CALENDAR.EVENT_READ_PI * @webhook * @eventType wix.calendar.v3.event_created * @documentationMaturity preview */ export declare function onEventCreated(handler: (event: EventCreatedEnvelope) => void | Promise): void; export interface EventRecurringSplitEnvelope { data: RecurringEventSplit; metadata: EventMetadata; } /** * Triggered when a `MASTER` event is split. * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionId CALENDAR.EVENT_READ_PI * @webhook * @eventType wix.calendar.v3.event_recurring_split * @documentationMaturity preview */ export declare function onEventRecurringSplit(handler: (event: EventRecurringSplitEnvelope) => void | Promise): void; export interface EventUpdatedEnvelope { entity: Event; metadata: EventMetadata; } /** * Triggered when an event is updated, including when it's canceled. * * Not triggered when `INSTANCE` events are updated. You can use the * [Events View API](https://dev.wix.com/docs/rest/business-management/calendar/event-views-v3/introduction) * to get notified about `INSTANCE` events. * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionId CALENDAR.EVENT_READ_PI * @webhook * @eventType wix.calendar.v3.event_updated * @documentationMaturity preview */ export declare function onEventUpdated(handler: (event: EventUpdatedEnvelope) => void | Promise): void; /** * Retrieves an event. * @param eventId - ID of the event to retrieve. * * Min: 36 characters * Max: 250 characters * @public * @documentationMaturity preview * @requiredField eventId * @permissionId CALENDAR.EVENT_READ * @permissionId CALENDAR.EVENT_READ_PI * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Read Bookings Calendar Availability * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR * @permissionScope Read Calendar * @permissionScopeId SCOPE.DC-CALENDAR.READ-PUBLIC * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionScope Read Bookings Calendar * @permissionScopeId SCOPE.DC-BOOKINGS.SESSIONS-RESOURCES * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @applicableIdentity APP * @applicableIdentity VISITOR * @returns Retrieved event. * @fqn wix.calendar.events.v3.EventsService.GetEvent */ export declare function getEvent(eventId: string | null, options?: GetEventOptions): Promise; export interface GetEventOptions { /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[]; } /** * Retrieves a list of events by their IDs. * @param eventIds - IDs of the events to retrieve. * * Min: 1 event ID * Min: 100 event IDs * @public * @documentationMaturity preview * @requiredField eventIds * @permissionId CALENDAR.EVENT_READ * @permissionId CALENDAR.EVENT_READ_PI * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Read Bookings Calendar Availability * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR * @permissionScope Read Calendar * @permissionScopeId SCOPE.DC-CALENDAR.READ-PUBLIC * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionScope Read Bookings Calendar * @permissionScopeId SCOPE.DC-BOOKINGS.SESSIONS-RESOURCES * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.calendar.events.v3.EventsService.ListEvents */ export declare function listEvents(eventIds: string[], options?: ListEventsOptions): Promise; export interface ListEventsOptions { /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[]; } /** * Creates a query to retrieve a list of events. * * The `queryEvents()` function builds a query to retrieve a list of events and returns an `EventsQueryBuilder` object. * * 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. * * 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. * * `queryEvents()` runs with the following `EventsQueryBuilder` default that you can override: * * + `limit` is `50`. * + Sorted by `event.start` in ascending order. * * The functions that are chained to `queryEvents()` are applied in the order they are called. * * 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`. * * @public * @documentationMaturity preview * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Read Bookings Calendar Availability * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR * @permissionScope Read Calendar * @permissionScopeId SCOPE.DC-CALENDAR.READ-PUBLIC * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionScope Read Bookings Calendar * @permissionScopeId SCOPE.DC-BOOKINGS.SESSIONS-RESOURCES * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionId CALENDAR.EVENT_READ * @permissionId CALENDAR.EVENT_READ_PI * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.calendar.events.v3.EventsService.QueryEvents */ export declare function queryEvents(options?: QueryEventsOptions): EventsQueryBuilder; export interface QueryEventsOptions { /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate` unless the sort order is * descending. */ fromLocalDate?: string | null | undefined; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate` unless the sort order is * descending. */ toLocalDate?: string | null | undefined; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null | undefined; /** * Filters events based on their `recurrenceType`. * * Max: 5 recurrence types can be specified. * Default: Events with `recurrenceType` of `NONE`, `INSTANCE`, and `EXCEPTION` are returned. */ recurrenceType?: RecurrenceType[] | undefined; /** * Information about which fields containing personal data to return. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions) * for more information. * * Supported values: * + `PI_FIELDS`: Returns all fields with personal data. Your app must have `Read Calendars - Including PI` or `Manage Calendars` permission scope. * + `OWN_PI_FIELDS`: Returns only fields containing your own personal data. * * Max: 1 field * Default: No personal data is returned. */ fields?: RequestedFields[] | undefined; } interface QueryCursorResult { cursors: Cursors; hasNext: () => boolean; hasPrev: () => boolean; length: number; pageSize: number; } export interface EventsQueryResult extends QueryCursorResult { items: Event[]; query: EventsQueryBuilder; next: () => Promise; prev: () => Promise; } export interface EventsQueryBuilder { /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ eq: (propertyName: 'scheduleId' | 'externalScheduleId' | 'type' | 'recurringEventId' | 'transparency' | 'location.id' | 'location.type' | 'totalCapacity' | 'remainingCapacity' | 'participants.total' | 'appId', value: any) => EventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ne: (propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total', value: any) => EventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ ge: (propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total', value: any) => EventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ gt: (propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total', value: any) => EventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ le: (propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total', value: any) => EventsQueryBuilder; /** @param propertyName - Property whose value is compared with `value`. * @param value - Value to compare against. * @documentationMaturity preview */ lt: (propertyName: 'totalCapacity' | 'remainingCapacity' | 'participants.total', value: any) => EventsQueryBuilder; /** @documentationMaturity preview */ in: (propertyName: 'scheduleId' | 'externalScheduleId' | 'type' | 'recurringEventId' | 'location.id' | 'location.type' | 'appId', value: any) => EventsQueryBuilder; /** @documentationMaturity preview */ exists: (propertyName: 'location' | 'totalCapacity' | 'conferencingDetails', value: boolean) => EventsQueryBuilder; /** @param limit - Number of items to return, which is also the `pageSize` of the results object. * @documentationMaturity preview */ limit: (limit: number) => EventsQueryBuilder; /** @param cursor - A pointer to specific record * @documentationMaturity preview */ skipTo: (cursor: string) => EventsQueryBuilder; /** @documentationMaturity preview */ find: () => Promise; } /** * Creates an event. * * * 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. * * 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`. * @param event - Event to create. * @public * @documentationMaturity preview * @requiredField event * @requiredField event.conferencingDetails.guestUrl * @requiredField event.conferencingDetails.hostUrl * @requiredField event.conferencingDetails.type * @requiredField event.end * @requiredField event.end.localDate * @requiredField event.location.type * @requiredField event.participants.list.name * @requiredField event.recurrenceRule.days * @requiredField event.recurrenceRule.frequency * @requiredField event.recurrenceRule.until.localDate * @requiredField event.resources._id * @requiredField event.scheduleId * @requiredField event.start * @requiredField event.start.localDate * @permissionId CALENDAR.EVENT_CREATE_OWN * @permissionId CALENDAR.EVENT_CREATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @returns Created event. * @fqn wix.calendar.events.v3.EventsService.CreateEvent */ export declare function createEvent(event: Event, options?: CreateEventOptions): Promise; export interface CreateEventOptions { /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; /** * Idempotency key guaranteeing that you don't create the same event more * than once. */ idempotencyKey?: string | null; } /** * Creates multiple events in bulk. * * * 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. * * 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`. * @param events - Events to create. * @public * @documentationMaturity preview * @requiredField events * @requiredField events.event * @requiredField events.event.conferencingDetails.guestUrl * @requiredField events.event.conferencingDetails.hostUrl * @requiredField events.event.conferencingDetails.type * @requiredField events.event.end * @requiredField events.event.end.localDate * @requiredField events.event.location.type * @requiredField events.event.participants.list.name * @requiredField events.event.recurrenceRule.days * @requiredField events.event.recurrenceRule.frequency * @requiredField events.event.recurrenceRule.until.localDate * @requiredField events.event.resources._id * @requiredField events.event.scheduleId * @requiredField events.event.start * @requiredField events.event.start.localDate * @permissionId CALENDAR.EVENT_CREATE_OWN * @permissionId CALENDAR.EVENT_CREATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.BulkCreateEvent */ export declare function bulkCreateEvent(events: MaskedEvent[], options?: BulkCreateEventOptions): Promise; export interface BulkCreateEventOptions { /** * Whether to return created events. * * Default: `false`. */ returnEntity?: boolean | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Updates an event. * * * When updating an event with `{"recurrenceType": "INSTANCE"}`, the * `recurrenceType` automatically changes to `EXCEPTION`. * * When updating an event with `{"recurrenceType": "MASTER"}`: * + Past `INSTANCE` and `EXCEPTION` events remain unchanged. * + For future `INSTANCE` events, all relevant fields are updated. * + For future `EXCEPTION` events, only changes to the `inheritedFields` are * applied, while other fields remain unchanged. * @param _id - Event ID. * @public * @documentationMaturity preview * @requiredField _id * @requiredField event * @requiredField event.conferencingDetails.guestUrl * @requiredField event.conferencingDetails.hostUrl * @requiredField event.conferencingDetails.type * @requiredField event.end.localDate * @requiredField event.location.type * @requiredField event.participants.list.name * @requiredField event.recurrenceRule.days * @requiredField event.recurrenceRule.frequency * @requiredField event.recurrenceRule.until.localDate * @requiredField event.resources._id * @requiredField event.revision * @requiredField event.start.localDate * @permissionId CALENDAR.EVENT_UPDATE_OWN * @permissionId CALENDAR.EVENT_UPDATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @returns Updated event. * @fqn wix.calendar.events.v3.EventsService.UpdateEvent */ export declare function updateEvent(_id: string | null, event: UpdateEvent, options?: UpdateEventOptions): Promise; export interface UpdateEvent { /** * Event ID. * @readonly */ _id?: string | null; /** * ID of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) * the event belongs to. * After creating an event, you can't assign it to a different schedule. */ scheduleId?: string | null; /** * ID of the external schedule the event belongs to. * * 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). * @readonly */ externalScheduleId?: string | null; /** * Schedule name. * @readonly */ scheduleName?: string | null; /** * Event type. You can set the event type but you can't update it. * * Supported values: * + `DEFAULT`: A standard event that's not further specified. * + `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). * * Additional supported values, if Wix Bookings is installed: * + `APPOINTMENT`: Bookings appointment event. * + `CLASS`: Bookings class event. * + `COURSE`: Bookings course event. */ type?: string | null; /** * Event status. * * Supported values: * + `CONFIRMED`: Event is scheduled to happen or has happened. * + `CANCELLED`: Event has been canceled. * * Default: `CONFIRMED` * @readonly */ status?: Status; /** * Event title. * * Min: 1 character * Max: 200 characters */ title?: string | null; /** Information about when the event starts. */ start?: ZonedDate; /** * Information about when the event ends. * * Maximum allowed date: Year 2100, or up to 100 years from the event's start date (whichever comes first). */ end?: ZonedDate; /** * Information about when the event starts adjusted to the `timeZone` of the * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties) * or a different `timeZone` you provide in the call's request. * @readonly */ adjustedStart?: ZonedDate; /** * Information about when the event ends adjusted to the `timeZone` of the * business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties) * or a different `timeZone` you provide in the call's request. * @readonly */ adjustedEnd?: ZonedDate; /** * Time zone the event is associated with in * [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database). * Only regional time zones and UTC are supported. * For example, `America/New_York` or `UTC`. * * Default: `timeZone` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction). */ timeZone?: string | null; /** * Information about whether the event is a single occurrence or part of a * recurring series. * * Supported values: * + `NONE`: The event occurs only once and doesn't repeat. * + `MASTER`: Defines the recurrence pattern for a series of recurring events. * + `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`. * + `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. * * Default: `NONE` * @readonly */ recurrenceType?: RecurrenceType; /** * Recurrence pattern for a series of events. This field is required when * creating a `MASTER` event and isn't available for non-recurring events. * You can't update the recurrence rule for `INSTANCE` or `EXCEPTION` events. * * For example, an event that repeats every second Monday until January 7, 2026, * at 8:00 AM has the following `recurrenceRule`: * - `frequency = WEEKLY` * - `interval = 2` * - `days = [MONDAY]` * - `until = 20260107T08:00:00Z` */ recurrenceRule?: RecurrenceRule; /** * ID of the `MASTER` event the event belongs to. Available only for `INSTANCE` * and `EXCEPTION` events. * @readonly */ recurringEventId?: string | null; /** * Specifies whether the event blocks time in the schedule it belongs to. * * Supported values: * + `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. * + `TRANSPARENT`: The schedule remains open during the event, allowing other events to be scheduled concurrently. * * Default: `OPAQUE` */ transparency?: Transparency; /** * Event location. * * Default: `defaultLocation` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to */ location?: Location; /** * List of [Wix Bookings resources](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/introduction) * affected by the event. This could include, for example, the * [Wix Bookings staff member](https://dev.wix.com/docs/sdk/backend-modules/bookings/staff-members/introduction) * providing the service or the room where the appointment takes place. * * Max: 100 resources */ resources?: Resource[]; /** * Maximum number of participants who can participate in the event. * * Default: `defaultCapacity` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to. */ totalCapacity?: number | null; /** * Number of participants who can still be added to the event. * @readonly */ remainingCapacity?: number | null; /** * Information about the event's participants. * 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). * @readonly */ participants?: Participants; /** * Information about the event's online conferencing. * 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). * * Default: `defaultConferencingDetails` of the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) the event belongs to. */ conferencingDetails?: ConferencingDetails; /** * Additional notes about the event. * 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). * * Min: 1 character * Max: 5000 characters */ notes?: string | null; /** * List of fields whose values are inherited. * + For single-occurrence events, values are inherited from the [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction). * + For `INSTANCE` and `EXCEPTION` events, values are inherited from the related `MASTER` event. * @readonly */ inheritedFields?: Field[]; /** * ID of the app that owns the event. Identical to `appId` of the * [schedule](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) * to which the event belongs. * @readonly */ appId?: string | null; /** * List of permissions associated with the event. Refer to the * [permissions article](https://dev.wix.com/docs/sdk/backend-modules/calendar/permissions#roles) * for more information. * @readonly */ permissions?: Permission[]; /** Extensions enabling applications or users to save custom data related to the event. */ extendedFields?: ExtendedFields; /** * Revision number, which increments each time the event is updated. * To prevent conflicting changes, the current revision must be passed when updating the event. * Ignored when creating an event. * @readonly */ revision?: string | null; /** * Date the event was created in `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _createdDate?: Date | null; /** * Date the event was last updated in `YYYY-MM-DDThh:mm:ss.sssZ` format. * @readonly */ _updatedDate?: Date | null; } export interface UpdateEventOptions { /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Updates multiple events in bulk. * * * When updating an event with `{"recurrenceType": "INSTANCE"}`, the * `recurrenceType` automatically changes to `EXCEPTION`. * * When updating an event with `{"recurrenceType": "MASTER"}`: * + Past `INSTANCE` and `EXCEPTION` events remain unchanged. * + For future `INSTANCE` events, all relevant fields are updated. * + For future `EXCEPTION` events, only changes to the `inheritedFields` are * applied, while other fields remain unchanged. * @param events - Events to update. * * Min: 1 event * Max: 50 events * @public * @documentationMaturity preview * @requiredField events * @requiredField events.event * @requiredField events.event._id * @requiredField events.event.conferencingDetails.guestUrl * @requiredField events.event.conferencingDetails.hostUrl * @requiredField events.event.conferencingDetails.type * @requiredField events.event.end.localDate * @requiredField events.event.location.type * @requiredField events.event.participants.list.name * @requiredField events.event.recurrenceRule.days * @requiredField events.event.recurrenceRule.frequency * @requiredField events.event.recurrenceRule.until.localDate * @requiredField events.event.resources._id * @requiredField events.event.revision * @requiredField events.event.start.localDate * @permissionId CALENDAR.EVENT_UPDATE_OWN * @permissionId CALENDAR.EVENT_UPDATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.BulkUpdateEvent */ export declare function bulkUpdateEvent(events: BulkUpdateEventRequestMaskedEvent[], options?: BulkUpdateEventOptions): Promise; export interface BulkUpdateEventOptions { /** * Whether to return the updated events. * * Default: `false` */ returnEntity?: boolean | null; /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Restores the event's default values from the relevant schedule or `MASTER` * event. * * * You must provide `fields` to specify which `inheritedFields` are restored. * * For example, if you've created an event that takes place in a non-default * location with a custom title and capacity, but you want to reset only title * and capacity to default values without affecting the location, provide the * event ID and set `fields` to `["TITLE", "CAPACITY"]`. * * Refer to the [default values article](https://dev.wix.com/docs/sdk/backend-modules/calendar/default-values) * for more information. * @param eventId - ID of the event for which to restore default values. * @param fields - Fields for which to restore default values. * * `TIME` restores default values for `start` and `end`. * * Min: 1 field * @public * @documentationMaturity preview * @requiredField eventId * @requiredField fields * @permissionId CALENDAR.EVENT_UPDATE_OWN * @permissionId CALENDAR.EVENT_UPDATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.RestoreEventDefaults */ export declare function restoreEventDefaults(eventId: string | null, fields: Field[], options?: RestoreEventDefaultsOptions): Promise; export interface RestoreEventDefaultsOptions { /** * Information about whether participants of the updated event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Splits a recurring `MASTER` event into 2 separate `MASTER` events. * * * You must provide a `splitLocalDate` that's in the future and after the `start` * date of the next `INSTANCE` or `EXCEPTION` event in the series. Additionally, * there must be another `INSTANCE` or `EXCEPTION` event following this next event, * as the changes wouldn't affect any event without a subsequent occurrence. * * If you want to modify a `MASTER` event with the changes already applying to * the very next event, use * [updateEvent()](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/update-event) * instead, as this preserves past events and only modifies future events. * * The main consequences are: * - **The original `MASTER` event is shortened**. Its `recurrenceRule.until.localDate` * is updated to `end.localDate` of the latest `INSTANCE` or `EXCEPTION` * event starting before `splitLocalDate`. If an `INSTANCE` or `EXCEPTION` event * starts before but ends after `splitLocalDate`, `until.localDate` is set * to value that's later than `splitLocalDate`. * - **A new `MASTER` event is created**, starting from the first event that * begins after `splitLocalDate`. * - **Existing `INSTANCE` and `EXCEPTION` events that occur after the split are updated**. * Their `recurringEventId` is set to the ID of the newly created `MASTER` event. * @param recurringEventId - ID of the `MASTER` event to split. * @param splitLocalDate - Local date and time at which the `MASTER` event is split in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2025-03-11T09:00:00`. * Must be a future date that's after the `start` date of the next `INSTANCE` or * `EXCEPTION` event in the series. Additionally, there must be another * `INSTANCE` or `EXCEPTION` event following this next event, as the changes * wouldn't affect any event without a subsequent occurrence. * @public * @documentationMaturity preview * @requiredField recurringEventId * @requiredField splitLocalDate * @permissionId CALENDAR.EVENT_UPDATE_OWN * @permissionId CALENDAR.EVENT_UPDATE * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.SplitRecurringEvent */ export declare function splitRecurringEvent(recurringEventId: string | null, splitLocalDate: string | null, options?: SplitRecurringEventOptions): Promise; export interface SplitRecurringEventOptions { /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Cancels an event. * @param eventId - ID of the event to cancel. * @public * @documentationMaturity preview * @requiredField eventId * @permissionId CALENDAR.EVENT_CANCEL_OWN * @permissionId CALENDAR.EVENT_CANCEL * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.CancelEvent */ export declare function cancelEvent(eventId: string | null, options?: CancelEventOptions): Promise; export interface CancelEventOptions { /** * Information about whether participants of the canceled event are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Cancels multiple events in bulk. * @param eventIds - IDs of the events to cancel. * @public * @documentationMaturity preview * @requiredField eventIds * @permissionId CALENDAR.EVENT_CANCEL_OWN * @permissionId CALENDAR.EVENT_CANCEL * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @applicableIdentity APP * @fqn wix.calendar.events.v3.EventsService.BulkCancelEvent */ export declare function bulkCancelEvent(eventIds: string[], options?: BulkCancelEventOptions): Promise; export interface BulkCancelEventOptions { /** * Whether to return the canceled events. * * Default: `false` */ returnEntity?: boolean | null; /** * Information about whether participants of the canceled events are notified and * the message they receive. */ participantNotification?: ParticipantNotification; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for calculating `adjustedStart` and `adjustedEnd`. For example, * `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/sdk/backend-modules/business-tools/site-properties/get-site-properties). */ timeZone?: string | null; } /** * Retrieves a list of events filtered by the participant's * [contact](https://dev.wix.com/docs/sdk/backend-modules/crm/contacts/introduction) * ID. * * * You can't set `toLocalDate` to a value that's more than a full year after * `fromLocalDate`. * @param contactId - ID of the [contact](https://dev.wix.com/docs/rest/crm/members-contacts/contacts/contacts/contact-v4/contact-object) * to retrieve events for. Required, unless you provide `cursorPaging`. * @public * @documentationMaturity preview * @requiredField contactId * @permissionId CALENDAR.EVENT_READ_PI * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @applicableIdentity APP * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByContactId */ export declare function listEventsByContactId(contactId: string | null, options?: ListEventsByContactIdOptions): Promise; export interface ListEventsByContactIdOptions { /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate`. */ fromLocalDate?: string | null; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Can't be more than a full year after * `2024-01-30T13:30:00`. Required if `cursorPaging` isn't provided. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate`. */ toLocalDate?: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) * to filter events by. */ appId?: string | null; /** Cursor to retrieve the next page of the results. */ cursorPaging?: CommonCursorPaging; } /** * Retrieves a list of events filtered by the participant's * [member](https://dev.wix.com/docs/sdk/backend-modules/members/members/introduction) * ID. * * * You can't set `toLocalDate` to a value that's more than a full year after * `fromLocalDate`. * @param memberId - ID of the [member](https://dev.wix.com/docs/rest/crm/members-contacts/members/members/member-object) * to retrieve events for. Required, unless you provide `cursorPaging`. * Provide `me` to retrieve events for the currently logged-in member. * You must have the `Read Calendars - Including PI` * [permission scope](https://dev.wix.com/docs/build-apps/develop-your-app/access/authorization/configure-permissions-for-your-app) * to retrieve events for members who aren't the currently logged in member. * @public * @documentationMaturity preview * @requiredField memberId * @permissionId CALENDAR.EVENT_READ * @permissionId CALENDAR.EVENT_READ_PI * @permissionScope Read Bookings - Public Data * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read Bookings - all read permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS * @permissionScope Read Bookings Calendar Availability * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR * @permissionScope Read Calendar * @permissionScopeId SCOPE.DC-CALENDAR.READ-PUBLIC * @permissionScope Manage Bookings - all permissions * @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @permissionScope Read Bookings Calendar * @permissionScopeId SCOPE.DC-BOOKINGS.SESSIONS-RESOURCES * @permissionScope Read Calendar - Including PI * @permissionScopeId SCOPE.DC-CALENDAR.READ-PI * @permissionScope Manage Calendars * @permissionScopeId SCOPE.DC-CALENDAR.MANAGE * @permissionScope Manage Bookings * @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS * @permissionScope Read Bookings - Including Participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE * @permissionScope Read bookings calendar - including participants * @permissionScopeId SCOPE.DC-BOOKINGS.READ-CALENDAR-WITH-PARTICIPANTS * @applicableIdentity APP * @applicableIdentity VISITOR * @fqn wix.calendar.participantevents.v3.ParticipantEventsService.ListEventsByMemberId */ export declare function listEventsByMemberId(memberId: string | null, options?: ListEventsByMemberIdOptions): Promise; export interface ListEventsByMemberIdOptions { /** * Local start date and time from which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array. * * Events that start before the `fromLocalDate` but end after it are included in * the results. Must be earlier than `toLocalDate`. */ fromLocalDate?: string | null; /** * Local end date and time up to which events are returned in * [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format. For example, * `2024-01-30T13:30:00`. Can't be more than a full year after * `fromLocalDate`. Required if neither `cursorPaging` is provided nor a non-empty `eventIds` array. * * Events that start before `toLocalDate` but end after it are included in the * results. Must be later than `fromLocalDate`. */ toLocalDate?: string | null; /** * Time zone in [IANA tz database format](https://en.wikipedia.org/wiki/Tz_database) * for `fromLocalDate`, `toLocalDate`, and for calculating `adjustedStart` and * `adjustedEnd`. For example, `America/New_York` or `UTC`. * * Default: `timeZone` specified in the business [site properties](https://dev.wix.com/docs/rest/business-management/site-properties/properties/get-site-properties). */ timeZone?: string | null; /** * [App ID](https://dev.wix.com/docs/rest/articles/getting-started/wix-business-solutions) * to filter events by. */ appId?: string | null; /** Cursor to retrieve the next page of the results. */ cursorPaging?: CommonCursorPaging; /** * IDs of the events to retrieve. * If you provide a list of IDs, all other filters are ignored. * * Max: 100 `eventId`s */ eventIds?: string[]; } export {};