diff --git a/wix-bookings-v2/wix-bookings-v2.service.json b/wix-bookings-v2/wix-bookings-v2.service.json index 8b8fb192a3..07e3a20d26 100644 --- a/wix-bookings-v2/wix-bookings-v2.service.json +++ b/wix-bookings-v2/wix-bookings-v2.service.json @@ -8,6 +8,21 @@ "docs": {}, "relatedGuides": [], "properties": [ + { + "name": "attendance", + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "availabilityCalendar", "type": [ @@ -23,6 +38,21 @@ }, "hidden": true }, + { + "name": "availabilityTimeSlots", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "bookings", "type": [ @@ -38,6 +68,21 @@ }, "hidden": true }, + { + "name": "eventTimeSlots", + "type": [ + { + "referenceType": "wix-bookings-v2.EventTimeSlots" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "extendedBookings", "type": [ @@ -68,6 +113,21 @@ }, "hidden": true }, + { + "name": "multiServiceAvailabilityTimeSlots", + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "pricing", "type": [ @@ -83,6 +143,36 @@ }, "hidden": true }, + { + "name": "serviceAvailability", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, + { + "name": "serviceOptionsAndVariants", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants" + } + ], + "docs": { + "summary": "", + "links": [], + "examples": [], + "extra": {} + }, + "hidden": true + }, { "name": "services", "type": [ @@ -99,10 +189,10 @@ "hidden": true }, { - "name": "sessions", + "name": "staffMembers", "type": [ { - "referenceType": "wix-bookings-v2.Sessions" + "referenceType": "wix-bookings-v2.StaffMembers" } ], "docs": { diff --git a/wix-bookings-v2/wix-bookings-v2/Attendance.service.json b/wix-bookings-v2/wix-bookings-v2/Attendance.service.json index c26911f1bd..8568fad77e 100644 --- a/wix-bookings-v2/wix-bookings-v2/Attendance.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Attendance.service.json @@ -49,18 +49,38 @@ "title": "getAttendance example", "body": [ "import { attendance } from 'wix-bookings.v2';", - " ", - " async function getAttendance(attendanceId) {", - " try {", - " const result = await attendance.getAttendance(attendanceId);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function getAttendance(attendanceId) {", + " try {", + " const result = await attendance.getAttendance(attendanceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "getAttendance example for exporting from backend code", + "body": [ + "import { attendance } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const getAttendance = webMethod(", + " Permissions.Anyone,", + " async (attendanceId) => {", + " try {", + " const result = await attendance.getAttendance(attendanceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -106,33 +126,56 @@ "- `id` sorted in `ASC` order", "- `cursorPaging.limit` is `50`", "", - "For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters).", + "For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).", "", "> __Notes__:", - "> + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` set to `true`.", + "> + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceDetails` as `true`.", "> + Up to 100 results can be returned per request.", "> + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.", "", "To learn about working with query endpoints, see", "[API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).", + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`_id`|[`eq()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ascending)|", - "|`bookingId`|[`eq()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ascending)|", - "|`sessionId`|[`eq()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ascending)|", - "|`status`|[`eq()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ascending)|", - "|`numberOfAttendees`|[`eq()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#in),[`lt()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#lt),[`le()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#le),[`gt()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#gt),[`ge()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ge),[`ascending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#ascending),[`descending()`](wix-bookings-v2.Attendances.AttendancesQueryBuilder#descending)|" + "|`_id`|[`eq()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ascending)|", + "|`bookingId`|[`eq()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ascending)|", + "|`sessionId`|[`eq()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ascending)|", + "|`status`|[`eq()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#in),[`ascending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ascending)|", + "|`numberOfAttendees`|[`eq()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ne),[`in()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#in),[`lt()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#lt),[`le()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#le),[`gt()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#gt),[`ge()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ge),[`ascending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#ascending),[`descending()`](wix-bookings-v2.Attendance.AttendancesQueryBuilder#descending)|" ], "examples": [ { "title": "queryAttendance example", "body": [ "import { attendance } from 'wix-bookings.v2';", - " ", - " async function queryAttendance() {", - " const { items } = attendance.queryAttendance().find();", - " }", - " " + "", + "async function queryAttendance() {", + " const { items } = attendance.queryAttendance().find();", + "}", + "" + ] + }, + { + "title": "queryAttendance example for exporting from backend code", + "body": [ + "import { attendance } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const queryAttendance = webMethod(", + " Permissions.Anyone,", + " async (query) => {", + " try {", + " const result = await attendance.queryAttendance(query);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -157,12 +200,21 @@ ], "doc": "The attendance information for a booked session that you want to create or update.", "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.SetAttendanceOptions" + } + ], + "doc": "", + "required": false } ], "requiredFields": [ "attendance", "attendance.bookingId", - "attendance.sessionId", "attendance.status" ], "ret": { @@ -187,21 +239,44 @@ ], "examples": [ { - "title": "setAttendance example", + "title": "setAttendance example for dashboard page code", + "body": [ + "import { attendance } from 'wix-bookings.v2';", + "", + "async function setAttendance(attendance, options) {", + " try {", + " const result = await attendance.setAttendance(attendance, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "setAttendance example for exporting from backend code", "body": [ "import { attendance } from 'wix-bookings.v2';", - " ", - " async function setAttendance(attendance) {", - " try {", - " const result = await attendance.setAttendance(attendance);", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "const elevatedSetAttendance = elevate(attendance.setAttendance);", + "", + "export const setAttendance = webMethod(", + " Permissions.Anyone,", + " async (attendance, options) => {", + " try {", + " const result = await elevatedSetAttendance(attendance, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -217,6 +292,66 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ApplicationError", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Error code." + }, + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Data related to the error." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Attendance", "members": [ @@ -269,7 +404,7 @@ "nativeType": "string" } ], - "doc": "Status indicating if any particpants attended the session:\n\n+ `NOT_SET`: There is no available attendance information.\n+ `ATTENDED`: At least a single participant attended the session.\n+ `NOT_ATTENDED`: No participants attended the session.\n" + "doc": "Status indicating if any participants attended the session:\n\n+ `NOT_SET`: There is no available attendance information.\n+ `ATTENDED`: At least a single participant attended the session.\n+ `NOT_ATTENDED`: No participants attended the session.\n" } ], "docs": { @@ -279,27 +414,27 @@ } }, { - "name": "CursorPaging", + "name": "AttendanceDetails", "members": [ { - "name": "cursor", + "name": "attendance", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Attendance.Attendance" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\n\nNot relevant for the first request.\n" + "doc": "The created or updated attendance information for the booked session." }, { - "name": "limit", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Attendance.ParticipantNotification" } ], - "doc": "Number of `Attendance` objects to return.\n\nDefault: `50`\nMaximum: `1000`\n" + "doc": "Information about whether to send a message to a customer after their attendance was set." } ], "docs": { @@ -309,76 +444,67 @@ } }, { - "name": "CursorPagingMetadata", + "name": "AttendanceMarkedAsNotAttended", "members": [ { - "name": "cursors", + "name": "attendance", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Attendance.Cursors" + "referenceType": "wix-bookings-v2.Attendance.Attendance" } ], - "doc": "Use these cursors to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)." + "doc": "The attendance information for a booked session that you want to create or update." }, { - "name": "hasNext", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Attendance.ParticipantNotification" } ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + "doc": "Information about whether to send a message to a customer after their attendance was set." } ], "docs": { "description": [ - "This is the preferred message for cursor-paging enabled services" + "" ] } }, { - "name": "Cursors", + "name": "BulkActionMetadata", "members": [ { - "name": "next", + "name": "totalFailures", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Number of items that couldn't be processed." }, { - "name": "prev", + "name": "totalSuccesses", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetAttendanceRequest", - "members": [ + "doc": "Number of items that were successfully processed." + }, { - "name": "attendanceId", + "name": "undetailedFailures", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of the object that contains the attendance information that you want to retrieve." + "doc": "Number of failures without details because detailed failure threshold was exceeded." } ], "docs": { @@ -388,17 +514,27 @@ } }, { - "name": "GetAttendanceResponse", + "name": "BulkAttendanceResult", "members": [ { - "name": "attendance", + "name": "item", "optional": true, "type": [ { "referenceType": "wix-bookings-v2.Attendance.Attendance" } ], - "doc": "The retrieved attendance information for the booked session." + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ItemMetadata" + } + ], + "doc": "" } ], "docs": { @@ -408,46 +544,52 @@ } }, { - "name": "Paging", + "name": "BulkSetAttendanceOptions", "members": [ { - "name": "limit", + "name": "attendanceDetails", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Attendance.AttendanceDetails" + } + ] + } } ], - "doc": "Number of items to load." + "doc": "The attendance information for a booked sessions that you want to create or update. Min size 1." }, { - "name": "offset", + "name": "attendanceList", + "readOnly": false, "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Attendance.Attendance" + } + ] + } } ], - "doc": "Number of items to skip in the current sort order." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryAttendanceRequest", - "members": [ + "doc": "The attendance information for a booked sessions that you want to create or update. Min size 1.\nDeprecated. use `attendance_details`." + }, { - "name": "query", + "name": "returnFullEntity", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Attendance.QueryV2" + "nativeType": "boolean" } ], - "doc": "Query options." + "doc": "" } ], "docs": { @@ -457,10 +599,28 @@ } }, { - "name": "QueryAttendanceResponse", + "name": "BulkSetAttendanceRequest", "members": [ { - "name": "attendances", + "name": "attendanceDetails", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Attendance.AttendanceDetails" + } + ] + } + } + ], + "doc": "The attendance information for a booked sessions that you want to create or update. Min size 1." + }, + { + "name": "attendanceList", + "readOnly": false, "optional": true, "type": [ { @@ -474,50 +634,40 @@ } } ], - "doc": "List of objects that contain attendance information for a booked session." + "doc": "The attendance information for a booked sessions that you want to create or update. Min size 1.\nDeprecated. use `attendance_details`." }, { - "name": "pagingMetadata", + "name": "returnFullEntity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Attendance.CursorPagingMetadata" + "nativeType": "boolean" } ], - "doc": "Details on the paged set of results returned." + "doc": "" } ], "docs": { "description": [ - "List of objects that contain attendance information." + "" ] } }, { - "name": "QueryV2", + "name": "BulkSetAttendanceResponse", "members": [ { - "name": "cursorPaging", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Attendance.CursorPaging" - } - ], - "doc": "Cursors to navigate through the result pages using `next` and `prev`." - }, - { - "name": "filter", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-bookings-v2.Attendance.BulkActionMetadata" } ], - "doc": "Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n\nFor a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).\n\nMax: 1 filter\n" + "doc": "Total successes and failures of the bulk set attendance action." }, { - "name": "sort", + "name": "results", "optional": true, "type": [ { @@ -525,26 +675,15 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Attendance.Sorting" + "referenceType": "wix-bookings-v2.Attendance.BulkAttendanceResult" } ] } } ], - "doc": "Sort object in the following format:\n`[ {\"fieldName\":\"sortField1\",\"order\":\"ASC\"}, {\"fieldName\":\"sortField2\",\"order\":\"DESC\"} ]`\n\nFor details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).\n" + "doc": "The created or updated attendance information for the booked sessions." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfQueryV2PagingMethodOneOf", - "members": [ - "cursorPaging", - "paging" - ] - } - ] - }, "docs": { "description": [ "" @@ -552,17 +691,27 @@ } }, { - "name": "QueryV2PagingMethodOneOf", + "name": "CursorPaging", "members": [ { - "name": "cursorPaging", + "name": "cursor", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Attendance.CursorPaging" + "nativeType": "string" } ], - "doc": "Cursors to navigate through the result pages using `next` and `prev`." + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\n\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of `Attendance` objects to return.\n\nDefault: `50`\nMaximum: `1000`\n" } ], "docs": { @@ -572,16 +721,816 @@ } }, { - "name": "SetAttendanceRequest", + "name": "CursorPagingMetadata", "members": [ { - "name": "attendance", + "name": "cursors", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Attendance.Attendance" + "referenceType": "wix-bookings-v2.Attendance.Cursors" } ], - "doc": "The attendance information for a booked session that you want to create or update." + "doc": "Use these cursors to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging)." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "This is the preferred message for cursor-paging enabled services" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEvent", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, + { + "name": "entityFqdn", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DomainEventBodyOneOf", + "members": [ + { + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAttendanceRequest", + "members": [ + { + "name": "attendanceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the object that contains the attendance information that you want to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAttendanceResponse", + "members": [ + { + "name": "attendance", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.Attendance" + } + ], + "doc": "The retrieved attendance information for the booked session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "identityType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ItemMetadata", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + }, + { + "name": "error", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ApplicationError" + } + ], + "doc": "Details about the error in case of failure." + }, + { + "name": "originalIndex", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MessageEnvelope", + "members": [ + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Stringify payload." + }, + { + "name": "eventType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event type." + }, + { + "name": "identity", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.IdentificationData" + } + ], + "doc": "The identification type and identity data." + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App instance ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Paging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ParticipantNotification", + "members": [ + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Optional custom message to send to the participants about the changes to the booking." + }, + { + "name": "notifyParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send the message about the changes to the customer.\nDefault is false." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryAttendanceRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.QueryV2" + } + ], + "doc": "Query options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryAttendanceResponse", + "members": [ + { + "name": "attendances", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Attendance.Attendance" + } + ] + } + } + ], + "doc": "List of objects that contain attendance information for a booked session." + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.CursorPagingMetadata" + } + ], + "doc": "Details on the paged set of results returned." + } + ], + "docs": { + "description": [ + "List of objects that contain attendance information." + ] + } + }, + { + "name": "QueryV2", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.CursorPaging" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.\n\nFor a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).\n\nMax: 1 filter\n" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Attendance.Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[ {\"fieldName\":\"sortField1\",\"order\":\"ASC\"}, {\"fieldName\":\"sortField2\",\"order\":\"DESC\"} ]`\n\nFor details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).\n" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2PagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.CursorPaging" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SetAttendanceOptions", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ParticipantNotification" + } + ], + "doc": "Information about whether to send a message to a customer after their attendance was set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "SetAttendanceRequest", + "members": [ + { + "name": "attendance", + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.Attendance" + } + ], + "doc": "The attendance information for a booked session that you want to create or update." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Attendance.ParticipantNotification" + } + ], + "doc": "Information about whether to send a message to a customer after their attendance was set." } ], "docs": { diff --git a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar.service.json b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar.service.json index 2f4d96761a..27e96eede5 100644 --- a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar.service.json +++ b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar.service.json @@ -29,7 +29,7 @@ "referenceType": "wix-bookings-v2.AvailabilityCalendar.QueryAvailabilityOptions" } ], - "doc": "Additional options for performing the query.\n", + "doc": "Additional options for performing the query.", "required": false } ], @@ -55,25 +55,110 @@ "docs": { "summary": "Retrieves the availability for sessions\nthat match the provided query criteria (paging, filtering, and sorting).", "description": [ - "The Availability Calendar APIs calculate the availability of sessions for\nappointments and classes, but not\nfor courses.\n\nThe entire list of slots is returned in case you want to display both\navailable and non-available slots in the calendar for your customers.\nUsing the `bookable` property, you can limit the display to available\nslots only.\n\nWhen querying, you must enter a start date and an end date. This avoids very large\nresults that can impact performance.\n\n#### Calculating availability\n\nThe availability is determined\nby checking:\n+ **The sessions' open slots**. A slot is considered open if the session's\ncapacity is greater than number of participants.\n+ **Booking policies**. Policies that affect whether a slot is considered\navailable include `tooEarlyToBook`, `tooLateToBook`, and `bookOnlineDisabled`.\n\nLocked sessions do not impact session availability and `bookable` can\nbe `true` even if `locked` is `true`. For example, if a session has a waitlist and a\nplace frees up, the slot is offered to the customers on the waitlist, one by one. The\nsession remains locked because there is still a waitlist, but for a period of time\nthere is availability, until a customer on the waitlist takes the slot. Locking\nprevents customers who are not yet on the waitlist from grabbing the slot.\n\n#### Handling Daylight Savings Time (DST) for local time zones\n\nBecause of DST, there are cases where certain times either do not exist\nor exist twice for a local time zone.\nFor example, the tine `00:05` on September 5th 2021 might not exist in Santiago, Chile,\nbecause at `00:00` the clock moved\n1 hour forward to `01:00`.\n\nIn this case, the Availability Calendar APIs take this\ninto account and mediate the time gaps automatically. The non-existent local time is\nautomatically moved forward 1 hour to match local DST. Local times that exist do not change.\nSo if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`\nand an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query\ninstead. The start time shifts one hour forward and the end time remains the same.\n\nThis function is not a universal function and runs only on the backend." + "The Availability Calendar APIs calculate the availability of sessions for\nappointments and classes, but not\nfor courses.\n\nThe entire list of slots is returned in case you want to display both\navailable and non-available slots in the calendar for your customers.\nUsing the `bookable` property, you can limit the display to available\nslots only.\n\nWhen querying, you must enter a start date and an end date. This avoids very large\nresults that can impact performance.\n\n#### Calculating availability\n\nThe availability is determined\nby checking:\n+ **The sessions' open slots**. A slot is considered open if the session's\ncapacity is greater than number of participants.\n+ **Booking policies**. Policies that affect whether a slot is considered\navailable include `tooEarlyToBook`, `tooLateToBook`, and `bookOnlineDisabled`.\n\nLocked sessions do not impact session availability and `bookable` can\nbe `true` even if `locked` is `true`. For example, if a session has a waitlist and a\nplace frees up, the slot is offered to the customers on the waitlist, one by one. The\nsession remains locked because there is still a waitlist, but for a period of time\nthere is availability, until a customer on the waitlist takes the slot. Locking\nprevents customers who are not yet on the waitlist from grabbing the slot.\n\n#### Handling Daylight Savings Time (DST) for local time zones\n\nBecause of DST, there are cases where certain times either do not exist\nor exist twice for a local time zone.\nFor example, the tine `00:05` on September 5th 2021 might not exist in Santiago, Chile,\nbecause at `00:00` the clock moved\n1 hour forward to `01:00`.\n\nIn this case, the Availability Calendar APIs take this\ninto account and mediate the time gaps automatically. The non-existent local time is\nautomatically moved forward 1 hour to match local DST. Local times that exist do not change.\nSo if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`\nand an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query\ninstead. The start time shifts one hour forward and the end time remains the same." ], "examples": [ { - "title": "queryAvailability example", + "title": "Retrieve available slots for an appointment service.", "body": [ - "import { availabilityCalendar } from 'wix-bookings.v2';", - " ", - " async function queryAvailability(query, options) {", - " try {", - " const result = await availabilityCalendar.queryAvailability(query, options);", + "/*****************************************", + " * Backend code - my-backend-file.web.js *", + " ****************************************/", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", + " import { availabilityCalendar } from 'wix-bookings.v2';", + " import { webMethod, Permissions } from 'wix-web-module';", + " ", + " export const myQueryAvailability = webMethod(", + " Permissions.Anyone,", + " async (query, options) => {", + " try {", + " const availableSlots = await availabilityCalendar.queryAvailability(query, options);", + " return availableSlots;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", " }", - " }", - " " + " );", + "", + "/*************", + " * Page code *", + " ************/", + "", + " import { myQueryAvailability } from 'backend/my-backend-file.web.js';", + "", + " $w.onReady(() => {", + " // set query time range to 1 week from now", + " const today = new Date();", + " const endRange = new Date();", + " endRange.setDate(today.getDate() + 7);", + " ", + " const query = {", + " \"filter\" : { ", + " \"serviceId\": \"036d51c9-d9fd-4459-be7a-a05e882f3e93\",", + " \"startDate\": today.toISOString(),", + " \"endDate\": endRange.toISOString()", + " }", + " };", + " const options = {", + " \"slotsPerDay\" : \"1\"", + " }", + " ", + " $w('#submitButton').onClick(async () => {", + " try {", + " const availability = await myQueryAvailability(query, options);", + " // Handle the fulfilled response", + " console.log('Availability', availability)", + " } catch (error) {", + " // Handle the error", + " console.error(error); ", + " }", + " });", + " });", + "", + "/* Promise resolves to:", + " *{", + " * \"availabilityEntries\": [", + " * {", + " * \"slot\": {", + " * \"sessionId\": \"193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1UZAV13fLX2gNLq4sCQwIdZIpxI6tDJxatWo81RhW6mQLgcnnO6ONJkvJH5ZYZEwHOIPMbmhqD5t41JnX3cUcIi0QOtrQjuZmfUCJFaA6fTnI97I4b9OD9AbOfkGsYnZW5UL0Yoc0amYhtACJPhRRe3qJSC5Qxp0aHl0j0ExBDV5ZTajTM1L6QktIUelYWU4Fq45KPYFvqc1UXeLTURzcOG4wsATMD47b5XfFqC9Myj02MJFRmz5nBS47v7586qsxgmQTYw6MVp\",", + " * \"serviceId\": \"036d51c9-d9fd-4459-be7a-a05e882f3e93\",", + " * \"scheduleId\": \"c0cf791e-fbc0-44e7-8db3-4c2eb7aa9253\",", + " * \"startDate\": \"2024-04-11T12:30:00.000Z\",", + " * \"endDate\": \"2024-04-11T13:30:00.000Z\",", + " * \"timezone\": \"UTC\",", + " * \"resource\": {", + " * \"name\": \"Barber Simon\",", + " * \"scheduleId\": \"f0212cd6-8437-4f2f-bdb0-019bc407bd84\",", + " * \"_id\": \"76570209-101f-409b-af97-b445bdb63125\"", + " * },", + " * \"location\": {", + " * \"name\": \"East 45th Street\",", + " * \"formattedAddress\": \"United Nations Headquarters, East 45th Street, New York, NY, USA\",", + " * \"locationType\": \"OWNER_BUSINESS\",", + " * \"_id\": \"03b3ef52-5700-406d-aa70-1b7f0bc5b067\"", + " * }", + " * },", + " * \"bookable\": true,", + " * \"totalSpots\": 5,", + " * \"openSpots\": 5,", + " * \"waitingList\": {},", + " * \"bookingPolicyViolations\": {", + " * \"tooEarlyToBook\": false,", + " * \"tooLateToBook\": false,", + " * \"bookOnlineDisabled\": false", + " * },", + " * \"locked\": false,", + " * \"isFromV2\": false,", + " * \"nestedSlots\": []", + " * }", + " * ],", + " * \"pagingMetadata\": {", + " * \"count\": 1,", + " * \"cursors\": {}", + " * }", + " *}", + " */" ] } ] @@ -89,6 +174,54 @@ } ], "messages": [ + { + "name": "AvailableResources", + "members": [ + { + "name": "hasMoreAvailableResources", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more available resources for the slot that are not listed in `resources` due to size limitations." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + }, + { + "name": "resources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Resource" + } + ] + } + } + ], + "doc": "Available resources for the time slot.\n\n+ When returned from `ListAvailabilityTimeSlots`, empty by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains __up__ to 10 available resources out of those provided.\n\n+ When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains all of the available resources out of those provided.\n\n\n> + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains __up__ to 10 available resources out of those provided.\n\n> + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains all of the available resources out of those provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "BookingPolicySettings", "members": [ @@ -150,145 +283,104 @@ } }, { - "name": "CursorPaging", + "name": "CalculateMultiSlotAvailabilityOptions", "members": [ { - "name": "cursor", + "name": "bookable", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" }, { - "name": "limit", + "name": "bookingPolicyViolations", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicyViolations" } ], - "doc": "Number of items to load." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cursors", - "members": [ + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, { - "name": "next", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.CursorPaging" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "" }, { - "name": "prev", + "name": "from", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetScheduleAvailabilityOptions", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetScheduleAvailabilityRequest", - "members": [ + "doc": "" + }, { - "name": "scheduleId", + "name": "location", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Location" } ], - "doc": "The schedule ID for which availability is being checked." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetScheduleAvailabilityResponse", - "members": [ + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored\nmust be set, and must have locationType. If locationType is `OWNER_BUSINESS`, must have location_id" + }, { - "name": "availability", + "name": "slots", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.ScheduleAvailability" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.RuleBasedConstraints" + } + ] + } } ], "doc": "" }, { - "name": "bookingPolicySettings", + "name": "slotsPerDay", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicySettings" + "nativeType": "number" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetSlotAvailabilityOptions", - "members": [ + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, { - "name": "slot", + "name": "timeZone", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.Slot" + "nativeType": "string" } ], - "doc": "The slot for which the availability is checked." + "doc": "" }, { - "name": "timezone", + "name": "to", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + "doc": "" } ], "docs": { @@ -298,107 +390,104 @@ } }, { - "name": "GetSlotAvailabilityRequest", + "name": "CalculateMultiSlotAvailabilityRequest", "members": [ { - "name": "slot", + "name": "bookable", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.Slot" + "nativeType": "boolean" } ], - "doc": "The slot for which the availability is checked." + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" }, { - "name": "timezone", + "name": "bookingPolicyViolations", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicyViolations" } ], - "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "GetSlotAvailabilityResponse", - "members": [ + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, { - "name": "availability", + "name": "cursorPaging", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotAvailability" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.CursorPaging" } ], "doc": "" }, { - "name": "bookingPolicySettings", + "name": "from", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicySettings" + "nativeType": "string" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Location", - "members": [ + }, { - "name": "_id", + "name": "location", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Location" } ], - "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored\nmust be set, and must have locationType. If locationType is `OWNER_BUSINESS`, must have location_id" }, { - "name": "formattedAddress", + "name": "slots", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.RuleBasedConstraints" + } + ] + } } ], - "doc": "The full address of this location." + "doc": "" }, { - "name": "locationType", + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" + "doc": "" }, { - "name": "name", + "name": "to", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location name." + "doc": "" } ], "docs": { @@ -408,47 +497,692 @@ } }, { - "name": "PagingMetadataV2", + "name": "CalculateMultiSlotAvailabilityResponse", "members": [ { - "name": "count", + "name": "cursorPagingMetadata", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.CursorPagingMetadata" } ], - "doc": "Number of items returned in the response." + "doc": "" }, { - "name": "cursors", + "name": "slots", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.Cursors" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotAvailability" + } + ] + } } ], - "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ { - "name": "offset", + "name": "cursor", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Offset that was requested." + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { - "name": "tooManyToCount", + "name": "limit", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Flag that indicates the server failed to calculate the `total` field." + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Cursors" + } + ], + "doc": "Cursor strings that point to the next page, previous page, or both." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomerChoices", + "members": [ + { + "name": "durationInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The selected customer duration in minutes.\nMin: `1 minute`\nMax: `44639 minutes` (30 days, 23 hours, and 59 minutes)" + } + ], + "docs": { + "description": [ + "Selected customer choices.\nThese choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties." + ] + } + }, + { + "name": "EventInfo", + "members": [], + "docs": { + "description": [ + "relevant for event based slots, and not for availability based slots" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotOptions", + "members": [ + { + "name": "fromV2", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.TimeSlotLocation" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotRequest", + "members": [ + { + "name": "fromV2", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.TimeSlotLocation" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`." + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetScheduleAvailabilityOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetScheduleAvailabilityRequest", + "members": [ + { + "name": "scheduleId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The schedule ID for which availability is being checked." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetScheduleAvailabilityResponse", + "members": [ + { + "name": "availability", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.ScheduleAvailability" + } + ], + "doc": "" + }, + { + "name": "bookingPolicySettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicySettings" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSlotAvailabilityOptions", + "members": [ + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Slot" + } + ], + "doc": "The slot for which the availability is checked." + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSlotAvailabilityRequest", + "members": [ + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Slot" + } + ], + "doc": "The slot for which the availability is checked." + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSlotAvailabilityResponse", + "members": [ + { + "name": "availability", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotAvailability" + } + ], + "doc": "" + }, + { + "name": "bookingPolicySettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicySettings" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Location", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The full address of this location." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedTimeSlot", + "members": [ + { + "name": "end", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "resource", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotResource" + } + ], + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "start", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PagingMetadataV2", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." }, { "name": "total", @@ -481,14 +1215,263 @@ "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" }, { - "name": "timezone", + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryAvailabilityRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.QueryV2" + } + ], + "doc": "Query options." + }, + { + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timezone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryAvailabilityResponse", + "members": [ + { + "name": "availabilityEntries", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotAvailability" + } + ] + } + } + ], + "doc": "List of slots that potentially can be booked." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2", + "members": [ + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object. You must include `serviceId`, `startDate` and `endDate` in the filter. This avoids large results that can impact performance." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Sorting" + } + ] + } + } + ], + "doc": "Currently, only sorting by `startDate` is supported." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2PagingMethodOneOf", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Resource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ResourcesFilter", + "members": [ + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RuleBasedConstraints", + "members": [ + { + "name": "resourcesFilter", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.ResourcesFilter" + } + ], + "doc": "" + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ScheduleAvailability", + "members": [ + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicyViolations" + } + ], + "doc": "Booking policy violations for the schedule." + }, + { + "name": "openSpots", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of open spots defined for the schedule." + }, + { + "name": "totalSpots", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + "doc": "The total number of spots defined for the schedule, including\nboth open and non-available spots." } ], "docs": { @@ -498,36 +1481,37 @@ } }, { - "name": "QueryAvailabilityRequest", + "name": "Service_availabilityBookingPolicyViolations", "members": [ { - "name": "query", + "name": "bookOnlineDisabled", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.QueryV2" + "nativeType": "boolean" } ], - "doc": "Query options." + "doc": "Bookings policy violation. Online booking is disabled for the `TimeSlot` service." }, { - "name": "slotsPerDay", + "name": "tooEarlyToBook", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + "doc": "Bookings policy violation. Too early to book this slot." }, { - "name": "timezone", + "name": "tooLateToBook", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The timezone for which slot availability is to be calculated. If specified,\ndates are based on the local date/time, meaning that the timezone offset\nin the date's format is ignored." + "doc": "Bookings policy violation. Too late to book this slot." } ], "docs": { @@ -537,10 +1521,10 @@ } }, { - "name": "QueryAvailabilityResponse", + "name": "Service_availabilityNestedTimeSlot", "members": [ { - "name": "availabilityEntries", + "name": "availableResources", "optional": true, "type": [ { @@ -548,88 +1532,45 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.SlotAvailability" + "referenceType": "wix-bookings-v2.AvailabilityCalendar.AvailableResources" } ] } } ], - "doc": "List of slots that potentially can be booked." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryV2", - "members": [ + "doc": "List of `AvailableResources` for the nested time slot.\nEach `AvailableResources` contains information about available resources of the same type." + }, { - "name": "fields", + "name": "localEndDate", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "List of projected fields to return. All fields are supported." + "doc": "Local end date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." }, { - "name": "filter", + "name": "localStartDate", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Filter object. You must include the `startDate` and `endDate` in the filter. This avoids large results that can impact performance." + "doc": "Local start date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." }, { - "name": "sort", + "name": "serviceId", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.Sorting" - } - ] - } + "nativeType": "string" } ], - "doc": "Currently, only sorting by `startDate` is supported." + "doc": "Service ID of the nested time slot." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfQueryV2PagingMethodOneOf", - "members": [ - "cursorPaging" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryV2PagingMethodOneOf", - "members": [], "docs": { "description": [ "" @@ -637,37 +1578,27 @@ } }, { - "name": "ScheduleAvailability", + "name": "Service_availabilityWaitingList", "members": [ { - "name": "bookingPolicyViolations", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.AvailabilityCalendar.BookingPolicyViolations" - } - ], - "doc": "Booking policy violations for the schedule." - }, - { - "name": "openSpots", + "name": "remainingCapacity", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "The number of open spots defined for the schedule." + "doc": "Number of remaining spots for this wait list.\nFor example, a Yoga event with 10 waitList spots and 3 registered\non the waitList has 10 `total_capacity` and 7 `remaining_capacity`." }, { - "name": "totalSpots", + "name": "totalCapacity", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "The total number of spots defined for the schedule, including\nboth open and non-available spots." + "doc": "Total number of spots in this wait list." } ], "docs": { @@ -789,6 +1720,16 @@ ], "doc": "Booking policy violations for the slot." }, + { + "name": "isFromV2", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "" + }, { "name": "locked", "optional": true, @@ -907,6 +1848,180 @@ ] } }, + { + "name": "TimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the time slot.\nEach `AvailableResources` contains information about available resources of the same type.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own available resources.\n" + }, + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot is bookable according to the service's booking policies.\n\nIf booking this time slot does not violates any of the service's booking policies,\nthe returned value is `true`. Otherwise, returns `false`.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Service_availabilityBookingPolicyViolations" + } + ], + "doc": "Indicators for booking policy violations for the slot.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.TimeSlotLocation" + } + ], + "doc": "The geographic location of the slot." + }, + { + "name": "nestedTimeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityCalendar.Service_availabilityNestedTimeSlot" + } + ] + } + } + ], + "doc": "> Nested time slots.\n> Returned only from `MultiServiceAvailabilityTimeSlots` API calls." + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Remaining number of spots for the slot.\nFor example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own serviceId.\n" + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots for the slot." + } + ], + "docs": { + "description": [ + "The `TimeSlot` object represents the availability information\nfor an `Appointment` service's specific slot, including:" + ] + } + }, + { + "name": "TimeSlotLocation", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Location ID. Present only if the location is a business location." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representation for the full address of the location." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n- `CUSTOMER`: The location is determined by the customer and is not set up beforehand." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "WaitingList", "members": [ diff --git a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md index e95e53df1f..93e034f8e3 100644 --- a/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md +++ b/wix-bookings-v2/wix-bookings-v2/AvailabilityCalendar/guides/Supported Filters and Sorting.md @@ -26,26 +26,24 @@ Specify the `filter` object in the following format: The following table shows field support for filtering with the `slotAvailability` object: -| Field | Required | Filterable | Sortable | Notes | -| -------------------- | ------------ | ------------- | -------- | ----- | -| `slot` | | Not filterable | | | -| `slot.startDate` | Required | Not filterable | Sortable | Returns slots that start at, or after, this date. If `timezone` is specified, the `slot.startDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | -| `slot.endDate` | Required | | | Returns slots that end at, or before, this date. If the `timezone` is specified, the `slot.endDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | -| `slot.serviceId` | | | | Supports multiple values. Returned if `slot` is provided. | -| `slot.resourceId` | | | | | -| `slot.scheduleId` | | Not filterable | | Returned if `slot` is provided. | -| `slot.sessionId` | | Not filterable | | | -| `slot.timezone` | | Not filterable | | | -| `slot.resource` | | Not filterable | | | -| `slot.location` | | Not filterable | | | -| `bookable` | | | | When filtered by `true`, returns only available slots. Otherwise, returns both available and non-available slots. This field is always returned. | -| `bookingPolicyViolations.tooEarlyToBook` | | | | -| `bookingPolicyViolations.tooLateToBook` | | | | -| `location.businessLocation.id` | | | Supports multiple values. | -| `openSpots` | | | Returns slots with at least this number of open spots. | -| `totalSpots` | | Not filterable | | | -| `waitingList` | | Not filterable | | | -| `bookingPolicyViolations` | | Not filterable | | | +| Field | Required | Filterable | Sortable | Notes | +| -------------------------------------- | -------- | -------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `startDate` | Required | Not filterable | Sortable | Returns slots that start at, or after, this date. If `timezone` is specified, the `startDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | +| `endDate` | Required | | | Returns slots that end at, or before, this date. If the `timezone` is specified, the `endDate` for the query is according to the local date and time, which means that the timezone offset in the format is ignored. | +| `serviceId` | | | | Supports multiple values, returned if slot is provided. | +| `resourceId` | | | | | +| `scheduleId` | | Not filterable | | Returned if `slot` is provided. | +| `sessionId` | | Not filterable | | | +| `timezone` | | Not filterable | | | +| `resource` | | Not filterable | | | +| `bookable` | | | | When filtered by `true`, returns only available slots. Otherwise, returns both available and non-available slots. This field is always returned. | +| `bookingPolicyViolations.tooEarlyToBook` | | | | | +| `bookingPolicyViolations.tooLateToBook` | | | | | +| `location.businessLocation.id` | | | | Supports multiple values. | +| `openSpots` | | | | Returns slots with at least this number of open spots. | +| `totalSpots` | | Not filterable | | | +| `waitingList` | | Not filterable | | | +| `bookingPolicyViolations` | | Not filterable | | | ## Sorting diff --git a/wix-bookings-v2/wix-bookings-v2/AvailabilityTimeSlots.service.json b/wix-bookings-v2/wix-bookings-v2/AvailabilityTimeSlots.service.json new file mode 100644 index 0000000000..e655f790e2 --- /dev/null +++ b/wix-bookings-v2/wix-bookings-v2/AvailabilityTimeSlots.service.json @@ -0,0 +1,2073 @@ +{ + "name": "AvailabilityTimeSlots", + "memberOf": "wix-bookings-v2", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-bookings.v2-time_slot-availabilityTimeSlots", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "getAvailabilityTimeSlot", + "params": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`.", + "required": true + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".", + "required": true + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".", + "required": true + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.", + "required": true + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.GetAvailabilityTimeSlotOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "localEndDate", + "localStartDate", + "location", + "serviceId", + "timeZone" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.GetAvailabilityTimeSlotResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves an available `TimeSlot` that match the provided filters.", + "description": [ + "Throws `SlotNotFound` if there is no such available time slot.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n\nBy default,\nif you don't provide `includeResourceTypeIds` or `resourceIds` in request,\nwe return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide\nthe service within the time slot.\n\nIf you specify `includeResourceTypeIds` or `resourceIds` in request,\nthe returned `TimeSlot` will contain only `AvailableResources` with at least one available resource\nwhich match the given resources filters,\neach contains all available resources out of those requested.\n\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n" + ], + "examples": [ + { + "title": "GetAvailabilityTimeSlot ", + "body": [ + "import {availabilityTimeSlots} from 'wix-bookings.v2';", + "", + "async function getAvailabilityTimeSlot() {", + " let serviceId = \"c9390064-c0ee-4f4e-89db-9f59a8f49928\"", + " let localStartDate = \"2023-12-27T11:00:00.00\"", + " let localEndDate = \"2023-12-27T12:00:00.00\"", + " let timeZone = \"Europe/Dublin\"", + " let location = {", + " locationId: \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " locationType: availabilityTimeSlots.LocationType.BUSINESS", + " }", + "", + " try {", + " const result = await availabilityTimeSlots.getAvailabilityTimeSlot(serviceId, localStartDate, localEndDate, timeZone, location, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "Get the availability of a specific `TimeSlot`, for a specific service, location and time." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getAvailabilityTimeSlot" + }, + { + "name": "listAvailabilityTimeSlots", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.ListAvailabilityTimeSlotsOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.ListAvailabilityTimeSlotsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a list of `TimeSlot`s that match the provided filters.", + "description": [ + "Tip:
\n
\nUse this API in order to get the availability of a specificTimeSlotout of those returned fromListAvailabilityTimeSlotsAPI.
\n\n\nThe request body __must__ include either:\n+ All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.\nYou may add additional filters as you wish.\n+ A `cursorPaging` with a valid `cursor` from previous response.\n\n\nEach [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response\nrepresents the availability of the service in a specific location,\nand has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.\nThe `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.\n\nBy default,\nthe response contains at most 1000 results.\nIf there are more than 1000 results, we return a `cursorPagingMetadata` with\na cursor for the next page of results, regardless of whether a `cursorPaging`\nwas provided in request.\n\n### AvailableResources in response\nThe `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service\nwithin the time slot. Each `AvailableResources` contains information about available resources of the same type.\n\nImportant:\nCurrently supported only for services of type
\nAPPOINTMENT.
\n\n\nIf you wish to get a list of available resources for each `TimeSlot` you should either:\n+ provide `resourceIds` in request.\n+ provide `includeResourceTypeIds` in request.\n\n__Notes:__\n+ In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.\nEach `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.\n+ If an `AvailableResources` has more available resources which are not listed within it,\nwe return `AvailableResources`.`hasMoreAvailableResources` as true.\n> __Note:__\n> If you wish to get the full available resources list for a specific `TimeSlot`,\n> you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).\n\n\n### Availability VS Bookability\nAn `available` time slot is not necessarily `bookable`.\nThe `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,\nat a specific period of time.\nRead more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/introduction#all-apis_wix-service-availability_service-availability-time-slots_introduction_availability-vs-bookability).\n\nBy default,\n+ The response does not contains `unavailable` TimeSlots.\nFor example,\nif there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,\nwe don't return TimeSlots with `localStartDate` within this range.\n+ The response contains both `bookable` and `un-bookable` TimeSlots.\nFor example,\nif the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,\nwe return TimeSlots with the violating `localStartDate` with `bookable` as false.\nIf you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.\n\nImportant:
\n
\nBy default,\nif you don't specifyincludeResourceTypeIds\norresourceIdsfilters in request,\nwe return TimeSlots with an emptyAvailableResources.\n
Note:
Not specifying resources filters can be handy in case you want to avoid large response in flows that only\ninterested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-the-selected-service-is-available-for)\nis an example for such flow.\n
\n\n\n\n### ListAvailabilityTimeSlots runs with the following defaults\n+ `localStartDate` is sorted in `ASC` order\n+ `cursorPaging`.`limit` is `1000`" + ], + "examples": [ + { + "title": "List Available, bookable `TimeSlots` ", + "body": [ + "import {availabilityTimeSlots} from 'wix-bookings.v2';", + " ", + "async function listAvailabilityTimeSlots() {", + " let options = {", + " \"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\",", + " \"fromLocalDate\": \"2024-12-27T11:00:00.000\",", + " \"toLocalDate\": \"2024-12-27T16:00:00.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"bookable\": true,", + " \"locations\": [", + " {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": availabilityTimeSlots.LocationType.BUSINESS", + " }", + " ]", + " }", + " try {", + " const result = await", + " availabilityTimeSlots.listAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available slots for a given service within a given range of time, which does not violates any of the service's booking policies." + } + }, + { + "title": "List Available Time Slots with `cursorPaging` ", + "body": [ + "import {availabilityTimeSlots} from 'wix-bookings.v2';", + "", + "async function listAvailabilityTimeSlots() {", + " let cursorPaging = {", + " \"limit\": 10, ", + " \"cursor\": ", + "\"JWE.eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiSGp3NWZDbWcifQ.lwg3prEu2td7rzWGWb3bFCWANd2WcvHPvTFL_5zn9eXjESIfk6UD7A.Tsk0-1CITKFgLGFtkIdIsQ.quqmsGQ9aqYKfL_nVLs5irscqoUK-3d31O82FA2iJKZp8Jq9UnUhj6mFPDJVrnbZktOTjvKGm_bSOZvdpu3_6KiaR9_lZ8sMaHPfBSIAmB0RPv7WDtOdK_MIvqCmq8KRxcyG8sFr-mrW03FFuVhGmChOzLmhZOO9DnNVtg9-zhoIxIx70S_EbHckCexySiqWfCe5bTZL6XYvzdF-LXjol2A9H0C-afG8Ws0l7KXZjhGxbzhoh8PwapwlPzoKDUL4Eyy9bt7KhqA0BTRCgWJAXLJ4fA92S4DE1YLkZcigVVKfr2xWsC4d2tUtNDPvfCXFdGUs_xWK0GEPgpgZ-awOyT851KoJuXJXlA_XaQHVpawR5eg8H8p7VhuXokGsfu1SYOl90aLWU-15wwMgKor5KmwxoKzxaGpE6tOf81TZ8nc.ixEsiI_PvSXUkeUmrbQprw\"}", + "", + " let options = {", + " \"cursorPaging\": cursorPaging", + " }", + "", + " try {", + " const result = await availabilityTimeSlots.listAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available `TimeSlots` of the next page of results with the returned `cursorPagingMetadata`.`cursors`.`next` of previous call." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "listAvailabilityTimeSlots" + } + ], + "messages": [ + { + "name": "AvailableResources", + "members": [ + { + "name": "hasMoreAvailableResources", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more available resources for the slot that are not listed in `resources` due to size limitations." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + }, + { + "name": "resources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Resource" + } + ] + } + } + ], + "doc": "Available resources for the time slot.\n\n+ When returned from `ListAvailabilityTimeSlots`, empty by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains __up__ to 10 available resources out of those provided.\n\n+ When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains all of the available resources out of those provided.\n\n\n> + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains __up__ to 10 available resources out of those provided.\n\n> + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains all of the available resources out of those provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingPolicyViolations", + "members": [ + { + "name": "bookOnlineDisabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Online booking is disabled for the `TimeSlot` service." + }, + { + "name": "tooEarlyToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too early to book this slot." + }, + { + "name": "tooLateToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too late to book this slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006\nTODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)\nAliza's suggestion to consider locks in bookable" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "from", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "openSpots", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with openSpots >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "to", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "slots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of results to load.\n\nDefault: `1000`.\nMax: `1000`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPagingMetadata", + "members": [ + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Cursors" + } + ], + "doc": "Cursor strings that point to the next page, previous page, or both." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomerChoices", + "members": [ + { + "name": "durationInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The selected customer duration in minutes.\nMin: `1 minute`\nMax: `44639 minutes` (30 days, 23 hours, and 59 minutes)" + } + ], + "docs": { + "description": [ + "Selected customer choices.\nThese choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties." + ] + } + }, + { + "name": "EventInfo", + "members": [], + "docs": { + "description": [ + "relevant for event based slots, and not for availability based slots" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotOptions", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotRequest", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nImportant:\nBecause of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.\nRead more about DST Handling
\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`." + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotRequest", + "members": [ + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "services", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService TimeSlots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: 2.\nMaxSize: 8.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to the service's booking policies.\n\nIf booking this `TimeSlot` does not violates any of the service's booking policies,\nreturns as `true`. Otherwise, returns as `false`.\n\n> __Note:__\n> A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n> while a time slot with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch results in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\na `cursorPaging`.`limit`.\nNo need to specify any additional parameters.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains __up__ to 10 available resources of this type.\n" + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "Locations to include in response.\n\nBy default,\nif no locations are provided,\nthe response contains TimeSlots for all locations where the service is available.\n\nYou can specify locations or location types for which the time slots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n" + }, + { + "name": "resourceIds", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\nOtherwise, the returned TimeSlots returns with an empty `AvailableResources`." + }, + { + "name": "resourceTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.ResourceType" + } + ] + } + } + ], + "doc": "resources filter\nIf specified, only time slots with these resources will be returned." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID for which the time slots are being returned for.\nCurrently supported only for services of type `APPOINTMENT`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to the service's booking policies.\n\nIf booking this `TimeSlot` does not violates any of the service's booking policies,\nreturns as `true`. Otherwise, returns as `false`.\n\n> __Note:__\n> A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n> while a time slot with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch results in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\na `cursorPaging`.`limit`.\nNo need to specify any additional parameters.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains __up__ to 10 available resources of this type.\n" + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "Locations to include in response.\n\nBy default,\nif no locations are provided,\nthe response contains TimeSlots for all locations where the service is available.\n\nYou can specify locations or location types for which the time slots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n" + }, + { + "name": "resourceIds", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\nOtherwise, the returned TimeSlots returns with an empty `AvailableResources`." + }, + { + "name": "resourceTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.ResourceType" + } + ] + } + } + ], + "doc": "resources filter\nIf specified, only time slots with these resources will be returned." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID for which the time slots are being returned for.\nCurrently supported only for services of type `APPOINTMENT`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "fromLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with remainingCapacity >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default?" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The services for which the time slots are being returned." + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format.\nDefault is the Wix Business time zone." + }, + { + "name": "toLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "TODO: maxsize" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to all of the services booking policies.\n\nIf booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\nreturns as `false`. Otherwise, returns as `true`.\n\n> __Note:__\n> A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n> while a `TimeSlot` with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\nhas a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\nthe other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n\nEach nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch TimeSlots in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\nthe `cursorPaging`.`limit`. You may pass a different `limit`.\nNo need to specify any additional parameters.\n\nImportant:
\n
\ncountis not supported.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ], + "doc": "Location for which the multiService TimeSlots are being returned for.\n\nYou can specify location or location type for which the TimeSlots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService time slots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: `2`.\nMaxSize: `8`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Location", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Location ID. Present only if the location is a business location." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representation for the full address of the location." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n- `CUSTOMER`: The location is determined by the customer and is not set up beforehand." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedTimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the nested time slot.\nEach `AvailableResources` contains information about available resources of the same type." + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the nested time slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Resource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ResourceType", + "members": [ + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource IDs.\nThe response will contain only slots that have at least one of the specified resources." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Service", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The resource type ID's to include in returned time slots.\nThis is in addition to the specifically requested resources.\n\nImportant:
\n
\ncountis not supported.
\nCurrently supported only for Staff Member resource type.\nStaff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the time slot.\nEach `AvailableResources` contains information about available resources of the same type.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own available resources.\n" + }, + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot is bookable according to the service's booking policies.\n\nIf booking this time slot does not violates any of the service's booking policies,\nthe returned value is `true`. Otherwise, returns `false`.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for booking policy violations for the slot.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.Location" + } + ], + "doc": "The geographic location of the slot." + }, + { + "name": "nestedTimeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.AvailabilityTimeSlots.NestedTimeSlot" + } + ] + } + } + ], + "doc": "> Nested time slots.\n> Returned only from `MultiServiceAvailabilityTimeSlots` API calls." + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Remaining number of spots for the slot.\nFor example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own serviceId.\n" + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots for the slot." + } + ], + "docs": { + "description": [ + "The `TimeSlot` object represents the availability information\nfor an `Appointment` service's specific slot, including:" + ] + } + }, + { + "name": "WaitingList", + "members": [ + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of remaining spots for this wait list.\nFor example, a Yoga event with 10 waitList spots and 3 registered\non the waitList has 10 `total_capacity` and 7 `remaining_capacity`." + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots in this wait list." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-bookings-v2/wix-bookings-v2/Bookings.service.json b/wix-bookings-v2/wix-bookings-v2/Bookings.service.json index a3f1d8ccf1..462da4f356 100644 --- a/wix-bookings-v2/wix-bookings-v2/Bookings.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Bookings.service.json @@ -71,18 +71,38 @@ "title": "bulkCreateBooking example", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function bulkCreateBooking(createBookingsInfo, options) {", - " try {", - " const result = await bookings.bulkCreateBooking(createBookingsInfo, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function bulkCreateBooking(createBookingsInfo, options) {", + " try {", + " const result = await bookings.bulkCreateBooking(createBookingsInfo, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "bulkCreateBooking example for exporting from backend code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const bulkCreateBooking = webMethod(", + " Permissions.Anyone,", + " async (createBookingsInfo, options) => {", + " try {", + " const result = await bookings.bulkCreateBooking(createBookingsInfo, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -115,13 +135,12 @@ "referenceType": "wix-bookings-v2.Bookings.CancelBookingOptions" } ], - "doc": "An object representing the available options for canceling a booking.\n", - "required": true + "doc": "An object representing the available options for canceling a booking.", + "required": false } ], "requiredFields": [ "bookingId", - "options", "options.revision" ], "ret": { @@ -142,25 +161,45 @@ "docs": { "summary": "Cancels a booking.", "description": [ - "The booking status changes to `CANCELED`.\n\nIf the booking was for an appointment, the corresponding session is\ndeleted from the business calendar.\n\nIf the booking was for a class or course, the participants are removed\nfrom the class session or the course. But the course or class session\nremains on the business calendar.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe cancelation. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nIn case you want to cancel a booking on behalf of a customer, we recommend\nto pass `flowControlSettings.ignoreCancellationPolicy` as `false`. This\nensures that the cancelation is validated against the service's cancelation\npolicy.\n\nThis function is not a universal function and runs only on the backend." + "The booking status changes to `CANCELED`.\n\nIf the booking was for an appointment, the corresponding session is\ndeleted from the business calendar.\n\nIf the booking was for a class or course, the participants are removed\nfrom the class session or the course. But the course or class session\nremains on the business calendar.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe cancelation. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nIn case you want to cancel a booking on behalf of a customer, we recommend\nto pass `flowControlSettings.ignoreCancellationPolicy` as `false`. This\nensures that the cancelation is validated against the service's cancelation\npolicy." ], "examples": [ { "title": "cancelBooking example", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function cancelBooking(bookingId, options) {", - " try {", - " const result = await bookings.cancelBooking(bookingId, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function cancelBooking(bookingId, options) {", + " try {", + " const result = await bookings.cancelBooking(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "cancelBooking example for exporting from backend code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const cancelBooking = webMethod(", + " Permissions.Anyone,", + " async (bookingId, options) => {", + " try {", + " const result = await bookings.cancelBooking(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -204,7 +243,7 @@ "referenceType": "wix-bookings-v2.Bookings.ConfirmBookingOptions" } ], - "doc": "An object representing the available options for canceling a booking.\n", + "doc": "An object representing the available options for canceling a booking.", "required": false } ], @@ -230,25 +269,48 @@ "docs": { "summary": "Confirms a booking request and changes the booking status to `CONFIRMED`.", "description": [ - "Calling this method doesn't check whether a slot or schedule is still\navailable at this time.\n\nYou can only confirm bookings for services that require the owner's manual\napproval for bookings and that have a status of `PENDING`.\n\nFor appointment services the slot may become unavailable, depending on the\n[service's](https://support.wix.com/en/article/creating-the-right-booking-service-for-your-business)\n`policy.bookingApprovalPolicy.requestsAffectsAvailability`.\n\nCalling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`participants.approvalStatus` to `APPROVED`.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe confirmation. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nBookings are automatically confirmed when the\nservice is configured to automatically confirm\nbookings and the [eCommerce order](https://www.wix.com/velo/reference/wix-ecom-backend/orders)\nhas been approved. The slot's or schedule's availability is checked just\nbefore confirming the booking as part of the automatic flow.\n\nThis function is not a universal function and runs only on the backend." + "Calling this method doesn't check whether a slot or schedule is still\navailable at this time.\n\nYou can only confirm bookings for services that require the owner's manual\napproval for bookings and that have a status of `PENDING`.\n\nFor appointment services the slot may become unavailable, depending on the\n[service's](https://support.wix.com/en/article/creating-the-right-booking-service-for-your-business)\n`policy.bookingApprovalPolicy.requestsAffectsAvailability`.\n\nCalling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`participants.approvalStatus` to `APPROVED`.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe confirmation. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nBookings are automatically confirmed when the\nservice is configured to automatically confirm\nbookings and the [eCommerce order](https://www.wix.com/velo/reference/wix-ecom-backend/orders)\nhas been approved. The slot's or schedule's availability is checked just\nbefore confirming the booking as part of the automatic flow." ], "examples": [ { - "title": "confirmBooking example", + "title": "confirmBooking example for dashboard page code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "", + "async function confirmBooking(bookingId, revision, options) {", + " try {", + " const result = await bookings.confirmBooking(bookingId, revision, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "confirmBooking example for exporting from backend code", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function confirmBooking(bookingId, revision, options) {", - " try {", - " const result = await bookings.confirmBooking(bookingId, revision, options);", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedConfirmBooking = elevate(bookings.confirmBooking);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "export const confirmBooking = webMethod(", + " Permissions.Anyone,", + " async (bookingId, revision, options) => {", + " try {", + " const result = await elevatedConfirmBooking(bookingId, revision, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -311,21 +373,44 @@ ], "examples": [ { - "title": "confirmOrDeclineBooking example", + "title": "confirmOrDeclineBooking example for dashboard page code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "", + "async function confirmOrDeclineBooking(bookingId, options) {", + " try {", + " const result = await bookings.confirmOrDeclineBooking(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "confirmOrDeclineBooking example for exporting from backend code", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function confirmOrDeclineBooking(bookingId, options) {", - " try {", - " const result = await bookings.confirmOrDeclineBooking(bookingId, options);", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "const elevatedConfirmOrDeclineBooking = elevate(bookings.confirmOrDeclineBooking);", + "", + "export const confirmOrDeclineBooking = webMethod(", + " Permissions.Anyone,", + " async (bookingId, options) => {", + " try {", + " const result = await elevatedConfirmOrDeclineBooking(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -386,25 +471,100 @@ "docs": { "summary": "Creates a booking.", "description": [ - "To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.\n\nTo create a booking for the entire course, pass a booking with the relevant `schedule`.\nYou can use the [Query Availability](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability) endpoint to check the availability beforehand.\n\nIf you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.\nThen, any specified slot details are calculated.\n\nIf you create a booking for a new session, we recommend to call\n[Query Availability](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability)\nfirst.\nThen, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.\n\nBookings are created with a status of `CREATED`.\n`CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.\n\nTo create a booking with a given status, pass a booking with the wanted status.\nThis is only permitted for site Owners.\n\nYou can pass a `participantNotification.message` to notify the customer of the booking with a message.\nIt's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.\n\nYou can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.\n\nWhen creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the\nprovided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.\n\nWhen creating a booking, you can pass `selectedPaymentOption`.\nThis specifies which payment method the customer plans to use.\nBut it's possible for them to later use another supported payment method.\n\nYou can skip the checkout and payment flow if you call [Confirm Or Decline Booking ](https://dev.wix.com/api/rest/wix-bookings/confirmation/confirm-or-decline-booking) otherwise, after you create the booking, you can use the\nWix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout." + "To create a booking for an appointment or a session of a class, pass a booking with the relevant `slot`.\n\nTo create a booking for the entire course, pass a booking with the relevant `schedule`.\nYou can use Query Availability to check the availability beforehand.\n\nIf you create a booking for an existing session, we recommend that you only pass `slot.sessionId`.\nThen, any specified slot details are calculated.\n\nIf you create a booking for a new session, we recommend to call Query Availability first.\nThen, pass the retrieved `availability.slot` object as the BookedEntity.Slot of the booking in the request.\n\nBookings are created with a status of `CREATED`.\n`CREATED` bookings don't appear on the business calendar and don't affect a related schedule's availability.\n\nTo create a booking with a given status, pass a booking with the wanted status.\nThis is only permitted for site Owners.\n\nYou can pass a `participantNotification.message` to notify the customer of the booking with a message.\nIt's also necessary to pass `participantNotification.notifyParticipants`as `true` to send the message.\n\nYou can pass `sendSmsReminder` as `true`, if you want an SMS reminder to be sent to the phone number specified in the ContactDetails, 24 hours before the session starts.\n\nWhen creating a booking you must pass either `participantsChoices` or `totalParticipants`. If you pass `participantsChoices`, all the\nprovided choices must exist for the service, otherwise the call returns an `INVALID_SERVICE_CHOICES` error.\n\nWhen creating a booking, you can pass `selectedPaymentOption`.\nThis specifies which payment method the customer plans to use.\nBut it's possible for them to later use another supported payment method.\n\nYou can skip the checkout and payment flow if you call Confirm Or Decline Booking otherwise, after you create the booking, you can use the\nWix eCommerce APIs (coming soon) for the checkout and payment flow or use a different service for checkout." ], "examples": [ { - "title": "createBooking example", + "title": "Create a booking for a class session. ", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function createBooking(booking, options) {", - " try {", - " const result = await bookings.createBooking(booking, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "/* Sample booking value:", + " * {", + " * totalParticipants: 1,", + " * contactDetails: {", + " * firstName: 'Aditi',", + " * lastName: 'Naidu',", + " * email: 'aditi.naidu765@example.com'", + " * },", + " * bookedEntity: {", + " * slot: {", + " *\t\t sessionId: '193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1UZAV13fLX2gNLq4sCQwIdZIpxI6tDJxatWo81RhW6mQLgcnnO6ONJkvJH5ZYZEwHOIPMbmhqD5t41JnX3cUcIi0QOtrQjuZmfUCJFaA6fTnI97I4b9OD9AbOfkGsYnZW5UL0Yoc0amYhtACJPhRRe3qJSC5Qxp0aHl0j0ExBDV5ZTajTM1L6QktIUelYWU4Fq45KPYFvqc1UXeLTURzcOG4wsATMD47b5XfFqC9Myj02MJFRmz5nBS47v7586qsxgmQTYw6MVp'", + " * }", + " * }", + " * }", + " */", + "", + "bookings.createBooking(booking, options)", + " .then((newSessionBooking) => {", + " const id = newSessionBooking._id;", + " const status = newSessionBooking.status;", + " console.log('Success! Created a new booking:', newSessionBooking);", + " return newSessionBooking;", + "", + " .catch((error) => {", + " console.error(error);", + " // Handle the error", + " });", + "", + "/* Promise resolves to:", + " * {", + " * \"bookedEntity\": {", + " * \"slot\": {", + " * \"sessionId\": \"193ZPR9ppP9emJUCLevcLf6orynNEIDt5nc0520xjGQILnPPaF5s62yK3BWz7ExgIRM1UZAV13fLX2gNLq4sCQwIdZIpxI6tDJxatWo81RhW6mQLgcnnO6ONJkvJH5ZYZEwHOIPMbmhqD5t41JnX3cUcIi0QOtrQjuZmfUCJFaA6fTnI97I4b9OD9AbOfkGsYnZW5UL0Yoc0amYhtACJPhRRe3qJSC5Qxp0aHl0j0ExBDV5ZTajTM1L6QktIUelYWU4Fq45KPYFvqc1UXeLTURzcOG4wsATMD47b5XfFqC9Myj02MJFRmz5nBS47v7586qsxgmQTYw6MVp\",", + " * \"serviceId\": \"036d51c9-d9fd-4459-be7a-a05e882f3e93\",", + " * \"scheduleId\": \"c0cf791e-fbc0-44e7-8db3-4c2eb7aa9253\",", + " * \"eventId\": \"11bhnkliQkhMrXr0AM2tX25A7AobX7raOYBkACbOPXIaluO3YHF3CH2Lge0zoU8BZOWKrWh8POSBCjnlWYlbHRIaiVY6X73ys6EnBfO5NOmQi9FxjIApGtM\",", + " * \"startDate\": \"2024-04-11T13:30:00.000+01:00\",", + " * \"endDate\": \"2024-04-11T14:30:00.000+01:00\",", + " * \"timezone\": \"Europe/Madrid\",", + " * \"resource\": {", + " * \"name\": \"Sandra\",", + " * \"email\": \"info@mysite.com\",", + " * \"scheduleId\": \"f0212cd6-8437-4f2f-bdb0-019bc407bd84\",", + " * \"explicitlyRequested\": true,", + " * \"_id\": \"76570209-101f-409b-af97-b445bdb63125\"", + " * },", + " * \"location\": {", + " * \"locationType\": \"OWNER_BUSINESS\"", + " * }", + " * },", + " * \"title\": \"Crossfit Beginners\",", + " * \"tags\": [", + " * \"GROUP\"", + " * ]", + " * },", + " * \"contactDetails\": {", + " * \"firstName\": \"Aditi\",", + " * \"lastName\": \"Naidu\",", + " * \"email\": \"aditi.naidu765@example.com\"", + " * },", + " * \"additionalFields\": [],", + " * \"numberOfParticipants\": 1,", + " * \"status\": \"CREATED\",", + " * \"paymentStatus\": \"UNDEFINED\",", + " * \"selectedPaymentOption\": \"UNDEFINED\",", + " * \"revision\": \"1\",", + " * \"createdBy\": {", + " * \"identityType\": \"UNKNOWN\",", + " * \"memberId\": \"c0e1854d-efd1-4c10-a079-bcb922dea639\"", + " * },", + " * \"startDate\": \"2024-04-11T12:30:00.000Z\",", + " * \"endDate\": \"2024-04-11T13:30:00.000Z\",", + " * \"flowControlSettings\": {", + " * \"ignoreBookingWindow\": false,", + " * \"skipAvailabilityValidation\": false,", + " * \"skipBusinessConfirmation\": false,", + " * \"skipSelectedPaymentOptionValidation\": false,", + " * \"withRefund\": false", + " * },", + " * \"totalParticipants\": 1,", + " * \"v2Availability\": false,", + " * \"_id\": \"df846146-51e7-4bcb-b09c-04c4b0f787f4\",", + " * \"_createdDate\": \"2024-02-18T14:35:31.987Z\",", + " * \"_updatedDate\": \"2024-02-18T14:35:31.987Z\"", + " * }", + " */" ] } ] @@ -447,7 +607,7 @@ "referenceType": "wix-bookings-v2.Bookings.DeclineBookingOptions" } ], - "doc": "An object representing the available options for declining a booking.\n", + "doc": "An object representing the available options for declining a booking.", "required": false } ], @@ -473,25 +633,48 @@ "docs": { "summary": "Declines a `PENDING` booking request and changes the booking status to\n`DECLINED`.", "description": [ - "Calling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`participants.approvalStatus` to `DECLINED`.\n\nYou can only decline bookings for services that require the owner's manual\napproval for bookings and that have a status of `PENDING`.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe decline. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nThis function is not a universal function and runs only on the backend." + "Calling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`participants.approvalStatus` to `DECLINED`.\n\nYou can only decline bookings for services that require the owner's manual\napproval for bookings and that have a status of `PENDING`.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe decline. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message." ], "examples": [ { - "title": "declineBooking example", + "title": "declineBooking example for dashboard page code", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function declineBooking(bookingId, revision, options) {", - " try {", - " const result = await bookings.declineBooking(bookingId, revision, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function declineBooking(bookingId, revision, options) {", + " try {", + " const result = await bookings.declineBooking(bookingId, revision, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "declineBooking example for exporting from backend code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedDeclineBooking = elevate(bookings.declineBooking);", + "", + "export const declineBooking = webMethod(", + " Permissions.Anyone,", + " async (bookingId, revision, options) => {", + " try {", + " const result = await elevatedDeclineBooking(bookingId, revision, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -535,13 +718,12 @@ "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingOptions" } ], - "doc": "An object representing the available options for rescheduling a booking.\n", - "required": true + "doc": "An object representing the available options for rescheduling a booking.", + "required": false } ], "requiredFields": [ "bookingId", - "options", "options.revision", "slot" ], @@ -563,25 +745,45 @@ "docs": { "summary": "Reschedules a booking to a different slot or session.", "description": [ - "You can only reschedule bookings for appointments or classes, you can't\nreschedule course bookings.\n\nThe old session is removed from the calendar and the new session is\nadded.\n\nIf you reschedule a booking for a class session the new session must be an\nexisting session for the same class.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe rescheduling. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nIn case the service has\nvariants, you can call this endpoint to update the booking's `totalParticipants` or `participantsChoices`.\nIf you provide `participantsChoices`, all of the provided choices must exist for\nthe service. Otherwise, the call returns an `INVALID_SERVICE_CHOICES` error.\nIf you omit `participantsChoices` in the request, the existing choices are\nkept and not replaced with an empty object.\n\n\n\nIn case you want to reschedule a booking on behalf of a customer, we recommend\nto pass `flowControlSettings.ignoreReschedulePolicy` as `false`. This\nensures that the rescheduling is validated against the service's rescheduling\npolicy.\n\nThis function is not a universal function and runs only on the backend." + "You can only reschedule bookings for appointments or classes, you can't\nreschedule course bookings.\n\nThe old session is removed from the calendar and the new session is\nadded.\n\nIf you reschedule a booking for a class session the new session must be an\nexisting session for the same class.\n\nYou can pass a `participantNotification.message` to notify the customer of\nthe rescheduling. You also need to pass `participantNotification.notifyParticipants`\nas `true` to actually send the message.\n\nIn case the service has\nvariants, you can call this endpoint to update the booking's `totalParticipants` or `participantsChoices`.\nIf you provide `participantsChoices`, all of the provided choices must exist for\nthe service. Otherwise, the call returns an `INVALID_SERVICE_CHOICES` error.\nIf you omit `participantsChoices` in the request, the existing choices are\nkept and not replaced with an empty object.\n\n\n\nIn case you want to reschedule a booking on behalf of a customer, we recommend\nto pass `flowControlSettings.ignoreReschedulePolicy` as `false`. This\nensures that the rescheduling is validated against the service's rescheduling\npolicy." ], "examples": [ { "title": "rescheduleBooking example", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function rescheduleBooking(bookingId, slot, options) {", - " try {", - " const result = await bookings.rescheduleBooking(bookingId, slot, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function rescheduleBooking(bookingId, slot, options) {", + " try {", + " const result = await bookings.rescheduleBooking(bookingId, slot, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "rescheduleBooking example for exporting from backend code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const rescheduleBooking = webMethod(", + " Permissions.Anyone,", + " async (bookingId, slot, options) => {", + " try {", + " const result = await bookings.rescheduleBooking(bookingId, slot, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -595,6 +797,119 @@ "syntaxName": "rescheduleBooking", "isAdminMethod": true }, + { + "name": "updateExtendedFields", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity to update.", + "required": true + }, + { + "name": "namespace", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Identifier for the app whose extended fields are being updated.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.UpdateExtendedFieldsOptions" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "namespace", + "options", + "options.namespaceData" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.UpdateExtendedFieldsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates the extended fields for a booking.", + "description": [ + "Extended fields must first be configured in the Wix Developers Center.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields)." + ], + "examples": [ + { + "title": "updateExtendedFields example for dashboard page code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "", + "async function updateExtendedFields(id, namespace, options) {", + " try {", + " const result = await bookings.updateExtendedFields(id, namespace, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "updateExtendedFields example for exporting from backend code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedUpdateExtendedFields = elevate(bookings.updateExtendedFields);", + "", + "export const updateExtendedFields = webMethod(", + " Permissions.Anyone,", + " async (id, namespace, options) => {", + " try {", + " const result = await elevatedUpdateExtendedFields(id, namespace, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateExtendedFields", + "isAdminMethod": true + }, { "name": "updateNumberOfParticipants", "params": [ @@ -616,12 +931,11 @@ } ], "doc": "", - "required": true + "required": false } ], "requiredFields": [ "bookingId", - "options", "options.revision" ], "ret": { @@ -642,25 +956,48 @@ "docs": { "summary": "Updates the number of participants for a booking.", "description": [ - "You can only update the number of participants for class and course\nbookings, you can't update it for appointment bookings.\n\nCalling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`totalNumberOfParticipants`.\n\nWhen updating the number of participants for a booking you must pass either\n`participantsChoices` or `totalParticipants`. If you pass `participantsChoices`\nfor services that have variants,\nall of the provided choices must exist for the service. Otherwise, the\ncall returns an `INVALID_SERVICE_CHOICES` error.\n\nThis function is not a universal function and runs only on the backend." + "You can only update the number of participants for class and course\nbookings, you can't update it for appointment bookings.\n\nCalling this method also changes the\n[session's](https://www.wix.com/velo/reference/wix-bookings-backend/sessions/getsession)\n`totalNumberOfParticipants`.\n\nWhen updating the number of participants for a booking you must pass either\n`participantsChoices` or `totalParticipants`. If you pass `participantsChoices`\nfor services that have variants,\nall of the provided choices must exist for the service. Otherwise, the\ncall returns an `INVALID_SERVICE_CHOICES` error." ], "examples": [ { - "title": "updateNumberOfParticipants example", + "title": "updateNumberOfParticipants example for dashboard page code", + "body": [ + "import { bookings } from 'wix-bookings.v2';", + "", + "async function updateNumberOfParticipants(bookingId, options) {", + " try {", + " const result = await bookings.updateNumberOfParticipants(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "updateNumberOfParticipants example for exporting from backend code", "body": [ "import { bookings } from 'wix-bookings.v2';", - " ", - " async function updateNumberOfParticipants(bookingId, options) {", - " try {", - " const result = await bookings.updateNumberOfParticipants(bookingId, options);", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedUpdateNumberOfParticipants = elevate(bookings.updateNumberOfParticipants);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "export const updateNumberOfParticipants = webMethod(", + " Permissions.Anyone,", + " async (bookingId, options) => {", + " try {", + " const result = await elevatedUpdateNumberOfParticipants(bookingId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -676,6 +1013,134 @@ } ], "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddBookingsToMultiServiceBookingOptions", + "members": [ + { + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingIdAndRevision" + } + ] + } + } + ], + "doc": "List of bookings ids and their revisions to add to the multi service booking." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddBookingsToMultiServiceBookingRequest", + "members": [ + { + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingIdAndRevision" + } + ] + } + } + ], + "doc": "List of bookings ids and their revisions to add to the multi service booking." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AddBookingsToMultiServiceBookingResponse", + "members": [ + { + "name": "bookings", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingResult" + } + ] + } + } + ], + "doc": "The bookings that were added to the multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Address", "members": [ @@ -955,14 +1420,51 @@ } }, { - "name": "BookedEntity", + "name": "AvailableResources", "members": [ { - "name": "schedule", + "name": "resourceIds", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BookedSchedule" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Available resources for the slot.\nmaxSize defined by 135 staff members + 3 resource types and 50 resources per type.\nAvailability-2 currently have no maxSize defined." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookedEntity", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookedSchedule" } ], "doc": "The booked schedule. The booking is automatically assigned to the schedule's sessions." @@ -996,13 +1498,14 @@ }, { "name": "title", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Session title at the time of booking." + "doc": "Session title at the time of booking.\nIf session doesn't exist at the time of the booking, service name is used." } ], "extra": { @@ -1188,6 +1691,16 @@ ], "doc": "The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." }, + { + "name": "eventId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Calendar 3 event ID\nIf not empty, on all write flows (create / update) gets priority over session_id.\nso if both session_id and event_id are provided, the session_id that will be set on the booking will be based on the event_id.\nOtherwise, if event_id is empty on write flow," + }, { "name": "location", "optional": true, @@ -1206,7 +1719,7 @@ "referenceType": "wix-bookings-v2.Bookings.BookedResource" } ], - "doc": "The resource assigned to the slot." + "doc": "The enriched resource assigned to the slot, can be either the requested resource or the resource chosen by the system.\nWhen populated, the given resource will be booked according to it's availability.\nWhen empty, If `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation,\notherwise one of the service resources will be assigned to the slot randomly upon confirmation.\nThis resource is the slot primary resource." }, { "name": "scheduleId", @@ -1379,7 +1892,7 @@ "referenceType": "wix-bookings-v2.Bookings.ExtendedFields" } ], - "doc": "Additional custom fields. This includes fields managed by Wix, by 3rd-party apps, and by the site.\n\nEmpty fields are not returned.\n" + "doc": "Custom field data for this object. Extended fields must be configured in the Wix Dev Center before they can be accessed with API calls." }, { "name": "externalUserId", @@ -1481,26 +1994,6 @@ ] } }, - { - "name": "BookingAlreadySetPayload", - "members": [ - { - "name": "currentBookingStatus", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Supported values:\n- `'CANCELED'`\n- `'CONFIRMED'`\n- `'CREATED'`\n- `'DECLINED'`\n- `'PENDING'`\n- `'WAITING_LIST'`" - } - ], - "docs": { - "description": [ - "" - ] - } - }, { "name": "BookingCanceled", "members": [ @@ -1515,24 +2008,24 @@ "doc": "The canceled booking object." }, { - "name": "canceledBy", + "name": "flowControlSettings", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.IdentificationData" + "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" } ], - "doc": "ID of the cancelation initiator." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." }, { - "name": "flowControlSettings", + "name": "initiatedBy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + "doc": "ID of the cancelation initiator." }, { "name": "participantNotification", @@ -1605,24 +2098,24 @@ "doc": "The confirmed booking object." }, { - "name": "confirmedBy", + "name": "doubleBooked", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.IdentificationData" + "nativeType": "boolean" } ], - "doc": "ID of the confirmation initiator." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "doubleBooked", + "name": "initiatedBy", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" } ], - "doc": "Whether this booking overlaps another existing confirmed booking." + "doc": "ID of the confirmation initiator." }, { "name": "participantNotification", @@ -1644,6 +2137,16 @@ ], "doc": "The previous payment status of the booking." }, + { + "name": "previousStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The previous status of the booking." + }, { "name": "sendSmsReminder", "optional": true, @@ -1662,27 +2165,67 @@ } }, { - "name": "BookingDetails", + "name": "BookingDeclined", "members": [ { - "name": "_id", + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "The declined booking object." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "initiatedBy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" + } + ], + "doc": "ID of the decline initiator." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and the message to send." + }, + { + "name": "previousPaymentStatus", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the bookings to be updated." + "doc": "The previous payment status of the booking." }, { - "name": "revision", + "name": "previousStatus", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "The previous status of the booking." } ], "docs": { @@ -1692,27 +2235,27 @@ } }, { - "name": "BookingParticipantsInfoOneOf", + "name": "BookingDetails", "members": [ { - "name": "participantsChoices", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" + "nativeType": "string" } ], - "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + "doc": "ID of the bookings to be updated." }, { - "name": "totalParticipants", + "name": "revision", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Total number of participants. Available only when the booking includes a single service variant." + "doc": "" } ], "docs": { @@ -1722,17 +2265,27 @@ } }, { - "name": "BookingPolicySettings", + "name": "BookingIdAndRevision", "members": [ { - "name": "maxParticipantsPerBooking", + "name": "bookingId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Booking policy settings for a given Slot/Schedule" + "doc": "ID of the booking." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." } ], "docs": { @@ -1742,37 +2295,37 @@ } }, { - "name": "BookingPolicyViolations", + "name": "BookingInfo", "members": [ { - "name": "bookOnlineDisabled", + "name": "bookingId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Bookings policy violation. Online booking is disabled for this slot." + "doc": "ID of the booking." }, { - "name": "tooEarlyToBook", + "name": "paymentStatus", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Bookings policy violation. Too early to book this slot." + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." }, { - "name": "tooLateToBook", + "name": "revision", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Bookings policy violation. Too late to book this slot." + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." } ], "docs": { @@ -1782,7 +2335,7 @@ } }, { - "name": "BookingRescheduled", + "name": "BookingMarkedAsPending", "members": [ { "name": "booking", @@ -1792,57 +2345,47 @@ "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "The rescheduled booking object." - }, - { - "name": "flowControlSettings", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" - } - ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." + "doc": "The booking object that was marked as pending." }, { - "name": "participantNotification", + "name": "doubleBooked", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the rescheduling and the message to send." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "previousBookedEntity", + "name": "initiatedBy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BookedEntity" + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" } ], - "doc": "An object describing the previous slot or schedule of the booking." + "doc": "ID of the mark as pending initiator." }, { - "name": "previousEndDate", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." + "doc": "Information about whether to notify the customer upon manual confirmation of the pending booking and the message to send." }, { - "name": "previousStartDate", + "name": "previousPaymentStatus", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." + "doc": "The previous payment status of the booking." }, { "name": "previousStatus", @@ -1855,14 +2398,14 @@ "doc": "The previous status of the booking." }, { - "name": "rescheduledBy", + "name": "sendSmsReminder", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.IdentificationData" + "nativeType": "boolean" } ], - "doc": "ID of the rescheduling initiator." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -1872,49 +2415,47 @@ } }, { - "name": "BookingSource", + "name": "BookingParticipantsInfoOneOf", "members": [ { - "name": "actor", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Actor that created this booking.\n" - }, - { - "name": "appDefId", - "readOnly": true, + "name": "participantsChoices", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "Wix site ID of the application that created the booking." + "doc": "Information about the booked service choices and participants.\nAvailable only when the booking includes multiple service variants." }, { - "name": "appName", - "readOnly": true, + "name": "totalParticipants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Name of the application that created the booking, as saved in Wix Developers Center at the time of booking." - }, + "doc": "Total number of participants. Available only when the booking includes a single service variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingPolicySettings", + "members": [ { - "name": "platform", + "name": "maxParticipantsPerBooking", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Platform from which a booking was created\n" + "doc": "Booking policy settings for a given Slot/Schedule" } ], "docs": { @@ -1924,46 +2465,37 @@ } }, { - "name": "BookingsGatewayCancelBookingOptions", + "name": "BookingPolicyViolations", "members": [ { - "name": "participantNotification", + "name": "bookOnlineDisabled", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + "doc": "Bookings policy violation. Online booking is disabled for this slot." }, { - "name": "revision", + "name": "tooEarlyToBook", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BookingsGatewayConfirmBookingOptions", - "members": [ + "doc": "Bookings policy violation. Too early to book this slot." + }, { - "name": "participantNotification", + "name": "tooLateToBook", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + "doc": "Bookings policy violation. Too late to book this slot." } ], "docs": { @@ -1973,160 +2505,116 @@ } }, { - "name": "BookingsGatewayCreateBookingOptions", + "name": "BookingRescheduled", "members": [ { - "name": "additionalFields", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.CustomFormField" - } - ] - } - } - ], - "doc": "Additional custom fields of the booking form. The customer must provide\ninformation for each field when booking the service. For example, that they\nbring their own towels or whether they use a wheelchair.\n\nMax: 100 fields\n" - }, - { - "name": "bookingSource", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.BookingSource" - } - ], - "doc": "Identifies the source (platform, actor and app) that created this booking.\nThis property of the booking cannot be changed.\nThe app_def_id and app_name will be resolved automatically.\nTODO GAP See if we need this - might be able to get this data from the headers?" - }, - { - "name": "contactDetails", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.ContactDetails" - } - ], - "doc": "Contact details of the customer booking the service." - }, - { - "name": "externalUserId", + "name": "booking", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "A user identifier of an external application user that initiated the book request.\nAllows an external application to later identify its own bookings and correlate to its own internal users" + "doc": "The rescheduled booking object." }, { "name": "flowControlSettings", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CreateBookingRequestFlowControlSettings" + "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." }, { - "name": "internalBusinessNote", + "name": "initiatedBy", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" } ], - "doc": "Internal business note. Not visible to the customer.\n\nMax: 200 characters\n" + "doc": "ID of the rescheduling initiator." }, { - "name": "numberOfParticipants", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Total number of participants. Available only when the service doesn't have\n[variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).\n\nMax: `20`\n" + "doc": "Information about whether to notify the customer about the rescheduling and the message to send." }, { - "name": "participantNotification", + "name": "previousBookedEntity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.BookedEntity" } ], - "doc": "Information about a message to send to the customer." + "doc": "An object describing the previous slot or schedule of the booking." }, { - "name": "schedule", + "name": "previousEndDate", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BookedSchedule" + "nativeType": "Date" } ], - "doc": "Information about the schedule to create a booking for." + "doc": "The previous end date of the booking. For a slot, this is the end date of the slot. For a schedule, this is the end date of the last session." }, { - "name": "selectedPaymentOption", + "name": "previousParticipantsChoices", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "Payment option the customer intends to use.\nMust be one of the payment options defined for the service, unless\nyou pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`." + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." }, { - "name": "sendSmsReminder", + "name": "previousStartDate", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Date" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\n\nDefault: `true`.\n" + "doc": "The previous start date of the booking. For a slot, this is the start date of the slot. For a schedule, this is the start date of the first session." }, { - "name": "slot", + "name": "previousStatus", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Slot" + "nativeType": "string" } ], - "doc": "Information about the slot to create a booking for.\nIf you set `slot.location.locationType` to `CUSTOM`, the created slot's\nlocation is set to `slot.location.formattedAddress` when provided.\nOtherwise it's set to `contactDetails.fullAddress.formattedAddress`." + "doc": "The previous status of the booking." }, { - "name": "status", + "name": "previousTotalParticipants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Booking status.\nOne of:\n- `\"CREATED\"` - The booking was created.\n- `\"UPDATED\"` - The booking was updated.\n- `\"CONFIRMED\"` - The booking has been confirmed and appears on the bookings calendar.\nBooking can be manually confirmed using the Set As Confirmed endpoint.\nBooking can be automatically confirmed when the following requirements are met:\n+ The service is configured as automatically confirmed.\n+ Invoking eCommerce checkout API and an order has been created.\n- `\"CANCELED\"` - The booking has been canceled and synced to bookings calendar.\nThe booking can be canceled using cancel API.\n- `\"PENDING\"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.\nBookings can be manually set as pending using setAsPending API, requires manage booking status permissions.\nBooking can be automatically set as pending when the following requirements are met:\n+ The Service is configured as manually confirmed.\n+ Invoking the eCommerce checkout API and an order has been created.\n- `\"WAITING_LIST\"` - The booking is pending on a waiting list.\nBooking can be created with this status when invoking waiting list join API.\n- `\"DECLINED\"` - The booking was declined by the owner and synced to bookings calendar.\nBooking can be manually declined using decline API and requires manage booking permissions.\nBooking can be automatically declined when the following requirements are met:\n+ Invoking eCommerce checkout API and the order declined event has been sent.\n+ Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking." + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfV2CreateBookingRequestBookableItemOneOf", - "members": [ - "schedule", - "slot" - ] - }, - { - "name": "oneOfV2CreateBookingRequestParticipantsInfoOneOf", + "name": "oneOfBookingRescheduledPreviousParticipantsInfoOneOf", "members": [ - "participantsChoices", - "totalParticipants" + "previousParticipantsChoices", + "previousTotalParticipants" ] } ] @@ -2138,17 +2626,27 @@ } }, { - "name": "BookingsGatewayDeclineBookingOptions", + "name": "BookingRescheduledPreviousParticipantsInfoOneOf", "members": [ { - "name": "participantNotification", + "name": "previousParticipantsChoices", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." + }, + { + "name": "previousTotalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." } ], "docs": { @@ -2158,39 +2656,29 @@ } }, { - "name": "BookingsGatewayRescheduleBookingOptions", + "name": "BookingResult", "members": [ { - "name": "participantNotification", + "name": "booking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." + "doc": "Booking entity." }, { - "name": "revision", + "name": "bookingId", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + "doc": "Booking ID." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfV2RescheduleBookingRequestParticipantsInfoOneOf", - "members": [ - "participantsChoices", - "totalParticipants" - ] - } - ] - }, "docs": { "description": [ "" @@ -2198,77 +2686,49 @@ } }, { - "name": "BookingsGatewayUpdateNumberOfParticipantsOptions", + "name": "BookingSource", "members": [ { - "name": "numberOfParticipants", + "name": "actor", "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Updated number of participants." - }, - { - "name": "revision", "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfV2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf", - "members": [ - "participantsChoices", - "totalParticipants" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkActionMetadata", - "members": [ + "doc": "Actor that created this booking." + }, { - "name": "totalFailures", + "name": "appDefId", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that couldn't be processed." + "doc": "Wix site ID of the application that created the booking." }, { - "name": "totalSuccesses", + "name": "appName", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that were successfully processed." + "doc": "Name of the application that created the booking, as saved in Wix Developers Center at the time of booking." }, { - "name": "undetailedFailures", + "name": "platform", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of failures without details because detailed failure threshold was exceeded." + "doc": "Platform from which a booking was created" } ], "docs": { @@ -2278,27 +2738,26 @@ } }, { - "name": "BulkBookingResult", + "name": "BookingsGatewayCancelBookingOptions", "members": [ { - "name": "item", + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "" + "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." }, { - "name": "itemMetadata", - "optional": true, + "name": "revision", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + "nativeType": "string" } ], - "doc": "" + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." } ], "docs": { @@ -2308,23 +2767,17 @@ } }, { - "name": "BulkCalculateAllowedActionsRequest", + "name": "BookingsGatewayConfirmBookingOptions", "members": [ { - "name": "bookingIds", + "name": "participantNotification", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "The booking id's that we want to calculate the allowedActions for" + "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." } ], "docs": { @@ -2334,34 +2787,2502 @@ } }, { - "name": "BulkCalculateAllowedActionsResponse", + "name": "BookingsGatewayCreateBookingOptions", "members": [ { - "name": "bulkActionMetadata", + "name": "additionalFields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.CustomFormField" + } + ] + } + } + ], + "doc": "Additional custom fields of the booking form. The customer must provide\ninformation for each field when booking the service. For example, that they\nbring their own towels or whether they use a wheelchair.\n\nMax: 100 fields\n" + }, + { + "name": "bookingSource", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingSource" + } + ], + "doc": "Identifies the source (platform, actor and app) that created this booking.\nThis property of the booking cannot be changed.\nThe app_def_id and app_name will be resolved automatically.\nTODO GAP See if we need this - might be able to get this data from the headers?" + }, + { + "name": "contactDetails", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ContactDetails" + } + ], + "doc": "Contact details of the customer booking the service." + }, + { + "name": "externalUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A user identifier of an external application user that initiated the book request.\nAllows an external application to later identify its own bookings and correlate to its own internal users" + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingRequestFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "internalBusinessNote", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Internal business note. Not visible to the customer.\n\nMax: 200 characters\n" + }, + { + "name": "numberOfParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only when the service doesn't have\n[variants](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/introduction).\n\nMax: `20`\n" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookedSchedule" + } + ], + "doc": "Information about the schedule to create a booking for." + }, + { + "name": "selectedPaymentOption", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment option the customer intends to use.\nMust be one of the payment options defined for the service, unless\nyou pass `flowControlSettings.skipSelectedPaymentOptionValidation` as `true`." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\n\nDefault: `true`.\n" + }, + { + "name": "slot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Slot" + } + ], + "doc": "Information about the slot to create a booking for.\nIf you set `slot.location.locationType` to `CUSTOM`, the created slot's\nlocation is set to `slot.location.formattedAddress` when provided.\nOtherwise it's set to `contactDetails.fullAddress.formattedAddress`." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Booking status.\nOne of:\n- `\"CREATED\"` - The booking was created.\n- `\"UPDATED\"` - The booking was updated.\n- `\"CONFIRMED\"` - The booking has been confirmed and appears on the bookings calendar.\nBooking can be manually confirmed using the Set As Confirmed endpoint.\nBooking can be automatically confirmed when the following requirements are met:\n+ The service is configured as automatically confirmed.\n+ Invoking eCommerce checkout API and an order has been created.\n- `\"CANCELED\"` - The booking has been canceled and synced to bookings calendar.\nThe booking can be canceled using cancel API.\n- `\"PENDING\"` - The booking waiting to be confirmed or declined buy the owner and is synced to bookings calendar.\nBookings can be manually set as pending using setAsPending API, requires manage booking status permissions.\nBooking can be automatically set as pending when the following requirements are met:\n+ The Service is configured as manually confirmed.\n+ Invoking the eCommerce checkout API and an order has been created.\n- `\"WAITING_LIST\"` - The booking is pending on a waiting list.\nBooking can be created with this status when invoking waiting list join API.\n- `\"DECLINED\"` - The booking was declined by the owner and synced to bookings calendar.\nBooking can be manually declined using decline API and requires manage booking permissions.\nBooking can be automatically declined when the following requirements are met:\n+ Invoking eCommerce checkout API and the order declined event has been sent.\n+ Invoking eCommerce checkout API and order approved event has been sent, but the booking is offline and the booking causes a double booking." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfV2CreateBookingRequestBookableItemOneOf", + "members": [ + "schedule", + "slot" + ] + }, + { + "name": "oneOfV2CreateBookingRequestParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingsGatewayDeclineBookingOptions", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingsGatewayRescheduleBookingOptions", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfV2RescheduleBookingRequestParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingsGatewayUpdateNumberOfParticipantsOptions", + "members": [ + { + "name": "numberOfParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Updated number of participants." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfV2UpdateNumberOfParticipantsRequestParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkActionMetadata", + "members": [ + { + "name": "totalFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that couldn't be processed." + }, + { + "name": "totalSuccesses", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items that were successfully processed." + }, + { + "name": "undetailedFailures", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkBookingResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCalculateAllowedActionsRequest", + "members": [ + { + "name": "bookingIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The booking id's that we want to calculate the allowedActions for" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCalculateAllowedActionsResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkCalculateAllowedActionsResult" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCalculateAllowedActionsResult", + "members": [ + { + "name": "item", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.AllowedActions" + } + ], + "doc": "" + }, + { + "name": "itemMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + } + ], + "doc": "(id, indexInGivenSeq, isSuccessful, error)" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkConfirmOrDeclineBookingOptions", + "members": [ + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the confirmed or declined bookings entities.\nNot supported yet, currently the entity is not returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkConfirmOrDeclineBookingRequest", + "members": [ + { + "name": "details", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkConfirmOrDeclineBookingRequestBookingDetails" + } + ] + } + } + ], + "doc": "The bookings to confirm or decline." + }, + { + "name": "returnEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the confirmed or declined bookings entities.\nNot supported yet, currently the entity is not returned." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkConfirmOrDeclineBookingRequestBookingDetails", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to confirm or decline." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current payment status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkConfirmOrDeclineBookingResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "Total successes and failures of the bulk confirm or decline action." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkBookingResult" + } + ] + } + } + ], + "doc": "The bulk confirm or decline results.\nFor each booking, the results contain the metadata of the confirm or decline action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateBookingOptions", + "members": [ + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the created bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateBookingRequest", + "members": [ + { + "name": "createBookingsInfo", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingInfo" + } + ] + } + } + ], + "doc": "Bookings to create.\nMax: 8 bookings." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the created bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateBookingResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "Total successes and failures of the bulk create booking action." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkBookingResult" + } + ] + } + } + ], + "doc": "Bulk create booking results.\nWhether it successfully created each booking, providing the corresponding error message if a failure occurred, and includes the created booking entity if the `returnFullEntity` is `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetMultiServiceBookingAllowedActionsRequest", + "members": [ + { + "name": "multiServiceBookingIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The multi service booking ids to get the allowedActions for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkGetMultiServiceBookingAllowedActionsResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkCalculateAllowedActionsResult" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRescheduleBookingOptions", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRescheduleBookingRequest", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "slotsBookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.SlotBookings" + } + ] + } + } + ], + "doc": "Reschedule multiple bookings to multiple slots." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRescheduleBookingRequestBooking", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the bookings to be rescheduled." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkRescheduleBookingResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "Total successes and failures of the bulk reschedule action." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + } + ] + } + } + ], + "doc": "The bulk reschedule results. For each booking, the results contain the metadata of the reschedule action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateBookedScheduleOptions", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "scheduleId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the schedule to be updated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateBookedScheduleRequest", + "members": [ + { + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingDetails" + } + ] + } + } + ], + "doc": "The bookings whose booked schedule is to be updated to the given schedule." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message." + }, + { + "name": "scheduleId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the schedule to be updated." + } + ], + "docs": { + "description": [ + "Update the booked schedule of multiple bookings to the given schedule." + ] + } + }, + { + "name": "BulkUpdateBookedScheduleResponse", + "members": [ + { + "name": "bulkActionMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + } + ], + "doc": "Total successes and failures of the bulk update action." + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + } + ] + } + } + ], + "doc": "The bulk update results. For each booking, the results contain the metadata of the update action." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateBookingRequest", + "members": [ + { + "name": "bookings", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.MaskedBooking" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "The `fieldMask` for each booking should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results\nin an error. `participantsInfo` is preferred over `numberOfParticipants`." + ] + } + }, + { + "name": "BulkUpdateBookingResponse", + "members": [ + { + "name": "bulkActionMetadata", "optional": true, "type": [ { "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" } ], - "doc": "" + "doc": "" + }, + { + "name": "results", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateAllowedActionsRequest", + "members": [ + { + "name": "bookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The booking id that we want to calculate the allowedActions for" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateAllowedActionsResponse", + "members": [ + { + "name": "allowedActions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.AllowedActions" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelBookingFlowControlSettings", + "members": [ + { + "name": "ignoreCancellationPolicy", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it.\nDefault: `false`." + }, + { + "name": "withRefund", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\nDefault: `false`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelBookingOptions", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelBookingRequest", + "members": [ + { + "name": "bookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to cancel." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelBookingResponse", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "Canceled booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelMultiServiceBookingOptions", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the cancelation and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the canceled bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelMultiServiceBookingRequest", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to cancel it's related bookings." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the cancelation and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the canceled bookings entities." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CancelMultiServiceBookingResponse", + "members": [ + { + "name": "multiServiceBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" + } + ], + "doc": "Canceled multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Clash", + "members": [ + { + "name": "bookingId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "contactName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "msid", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "resourceName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "sessionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonIdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCommonIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonIdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmBookingFlowControlSettings", + "members": [ + { + "name": "checkAvailabilityValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "todo: docs any-resource flow behavior\nWhether the availability is checked before confirming the booking.\nWhen passing `false` a booking is only being updated with status CONFIRMED\nDefault: `false`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmBookingOptions", + "members": [ + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ConfirmBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmBookingRequest", + "members": [ + { + "name": "bookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to confirm." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ConfirmBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmBookingResponse", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmMultiServiceBookingOptions", + "members": [ + { + "name": "confirmBookingsInfo", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" + } + ] + } + } + ], + "doc": "Bookings to confirm." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ConfirmBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\nconfirmation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the confirmation and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the confirmed bookings entities." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmMultiServiceBookingRequest", + "members": [ + { + "name": "confirmBookingsInfo", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" + } + ] + } + } + ], + "doc": "Bookings to confirm." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ConfirmBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\nconfirmation flow are changed. For example, whether the availability is\nchecked before confirming the booking." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to confirm it's related bookings." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the confirmation and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the confirmed bookings entities." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmMultiServiceBookingResponse", + "members": [ + { + "name": "multiServiceBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" + } + ], + "doc": "Confirmed multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmOrDeclineBookingOptions", + "members": [ + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current payment status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmOrDeclineBookingRequest", + "members": [ + { + "name": "bookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to confirm or decline." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Current payment status of the booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmOrDeclineBookingResponse", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmRequest", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to be confirmed." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Whether to notify the participants about the booking confirmation, and an optional custom message." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConfirmResponse", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "Confirmed booking." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConsistentQueryBookingsRequest", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.QueryV2" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConsistentQueryBookingsResponse", + "members": [ + { + "name": "bookings", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.PagingMetadataV2" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ConsistentQueryOptions", + "members": [ + { + "name": "query", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.QueryV2" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ContactDetails", + "members": [ + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's ID." + }, + { + "name": "countryCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's email, used to create a new contact or get existing one from the [Contacts API](https://www.wix.com/velo/reference/wix-crm/contacts/introduction). Used to validate coupon usage limitations per contact. If not passed, the coupon usage limitation will not be enforced. (Coupon usage limitation validation is not supported yet)." + }, + { + "name": "firstName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field." + }, + { + "name": "fullAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Address" + } + ], + "doc": "Contact's full address." + }, + { + "name": "lastName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's last name." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's phone number." + }, + { + "name": "timeZone", + "readOnly": false, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact's time zone." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingFlowControlSettings", + "members": [ + { + "name": "skipAvailabilityValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable.\nDefault: `false`." + }, + { + "name": "skipBusinessConfirmation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\nDefault: `false`." + }, + { + "name": "skipSelectedPaymentOptionValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\nDefault: `false`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingInfo", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "The booking to create" + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingOptions", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingRequest", + "members": [ + { + "name": "booking", + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "The booking to create." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingRequestFlowControlSettings", + "members": [ + { + "name": "skipAvailabilityValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`\npermission scope when passing `true`.\n\nDefault: `false`.\n" + }, + { + "name": "skipBusinessConfirmation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\n\nDefault: `false`.\n" + }, + { + "name": "skipSelectedPaymentOptionValidation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\n\nDefault: `false`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateBookingResponse", + "members": [ + { + "name": "booking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "Created booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateMultiServiceBookingOptions", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "multiServiceBookingType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the created bookings entities." }, { - "name": "results", - "optional": true, + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateMultiServiceBookingRequest", + "members": [ + { + "name": "bookings", "type": [ { "complexType": { "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Bookings.BulkCalculateAllowedActionsResult" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ] } } ], - "doc": "" + "doc": "The bookings to create as multi service booking." + }, + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + } + ], + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + }, + { + "name": "multiServiceBookingType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about a message to send to the customer." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the created bookings entities." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." } ], "docs": { @@ -2371,27 +5292,226 @@ } }, { - "name": "BulkCalculateAllowedActionsResult", + "name": "CreateMultiServiceBookingResponse", "members": [ { - "name": "item", + "name": "multiServiceBooking", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" + } + ], + "doc": "Created multi service booking.\nContains the booking results on the same order as passed on the request." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomFormField", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form field as defined in the form." + }, + { + "name": "label", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Form field's label at the time of submission." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Value that was submitted for this field." + }, + { + "name": "valueType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'CHECK_BOX'`\n- `'LONG_TEXT'`\n- `'SHORT_TEXT'`" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeclineBookingOptions", + "members": [ + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status to set on the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeclineBookingRequest", + "members": [ + { + "name": "bookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the booking to decline." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + }, + { + "name": "paymentStatus", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.AllowedActions" + "nativeType": "string" } ], - "doc": "" + "doc": "Payment status to set on the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." }, { - "name": "itemMetadata", - "optional": true, + "name": "revision", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" + "nativeType": "string" } ], - "doc": "(id, indexInGivenSeq, isSuccessful, error)" + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." } ], "docs": { @@ -2401,17 +5521,17 @@ } }, { - "name": "BulkCreateBookingOptions", + "name": "DeclineBookingResponse", "members": [ { - "name": "returnFullEntity", + "name": "booking", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "Whether to return the created bookings entities." + "doc": "eclined booking" } ], "docs": { @@ -2421,23 +5541,44 @@ } }, { - "name": "BulkCreateBookingRequest", + "name": "DeclineMultiServiceBookingOptions", "members": [ { - "name": "createBookingsInfo", + "name": "declineBookingsInfo", + "optional": true, "type": [ { "complexType": { "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Bookings.CreateBookingInfo" + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" } ] } } ], - "doc": "Bookings to create.\nMax: 8 bookings." + "doc": "Bookings to decline." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and the message to send." }, { "name": "returnFullEntity", @@ -2447,7 +5588,7 @@ "nativeType": "boolean" } ], - "doc": "Whether to return the created bookings entities." + "doc": "Whether to return the declined bookings entities." } ], "docs": { @@ -2457,20 +5598,10 @@ } }, { - "name": "BulkCreateBookingResponse", + "name": "DeclineMultiServiceBookingRequest", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" - } - ], - "doc": "Total successes and failures of the bulk create booking action." - }, - { - "name": "results", + "name": "declineBookingsInfo", "optional": true, "type": [ { @@ -2478,13 +5609,52 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Bookings.BulkBookingResult" + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" } ] } } ], - "doc": "Bulk create booking results.\nWhether it successfully created each booking, providing the corresponding error message if a failure occurred, and includes the created booking entity if the `returnFullEntity` is `true`." + "doc": "Bookings to decline." + }, + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, + { + "name": "multiServiceBookingId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the multi service booking to decline it's related bookings." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer about the decline and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the declined bookings entities." } ], "docs": { @@ -2494,17 +5664,17 @@ } }, { - "name": "BulkRescheduleBookingOptions", + "name": "DeclineMultiServiceBookingResponse", "members": [ { - "name": "participantNotification", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "Declined multi service booking." } ], "docs": { @@ -2514,211 +5684,190 @@ } }, { - "name": "BulkRescheduleBookingRequest", + "name": "DomainEvent", "members": [ { - "name": "participantNotification", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { - "name": "slotsBookings", + "name": "actionEvent", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.SlotBookings" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.ActionEvent" } ], - "doc": "Reschedule multiple bookings to multiple slots." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkRescheduleBookingRequestBooking", - "members": [ + "doc": "" + }, { - "name": "_id", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.EntityCreatedEvent" } ], - "doc": "ID of the bookings to be rescheduled." + "doc": "" }, { - "name": "revision", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.EntityDeletedEvent" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkRescheduleBookingResponse", - "members": [ + }, { - "name": "bulkActionMetadata", + "name": "entityEventSequence", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + "nativeType": "string" } ], - "doc": "Total successes and failures of the bulk reschedule action." + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "results", + "name": "entityFqdn", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" - } - ] - } + "nativeType": "string" } ], - "doc": "The bulk reschedule results. For each booking contains the metadata of the reschedule action." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateBookedScheduleOptions", - "members": [ + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, { - "name": "participantNotification", + "name": "entityId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "ID of the entity associated with the event." }, { - "name": "scheduleId", + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The ID of the schedule to be updated." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateBookedScheduleRequest", - "members": [ + "doc": "If present, indicates the action that triggered the event." + }, { - "name": "bookings", + "name": "slug", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.BookingDetails" - } - ] - } + "nativeType": "string" } ], - "doc": "The bookings whose booked schedule is to be updated to the given schedule." + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "participantNotification", + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "scheduleId", + "name": "updatedEvent", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.EntityUpdatedEvent" } ], - "doc": "The id of the schedule to which the bookings booked schedule is to be updated." + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, "docs": { "description": [ - "Update the booked schedule of multiple bookings to the given schedule." + "" ] } }, { - "name": "BulkUpdateBookedScheduleResponse", + "name": "DomainEventBodyOneOf", "members": [ { - "name": "bulkActionMetadata", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" + "referenceType": "wix-bookings-v2.Bookings.ActionEvent" } ], - "doc": "Total successes and failures of the bulk update action." + "doc": "" }, { - "name": "results", + "name": "createdEvent", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.EntityUpdatedEvent" } ], - "doc": "The bulk update results. For each booking contains the metadata of the update action." + "doc": "" } ], "docs": { @@ -2728,20 +5877,14 @@ } }, { - "name": "BulkUpdateBookingRequest", + "name": "EntityCreatedEvent", "members": [ { - "name": "bookings", + "name": "entityAsJson", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.MaskedBooking" - } - ] - } + "nativeType": "string" } ], "doc": "" @@ -2749,39 +5892,22 @@ ], "docs": { "description": [ - "The fieldMask for each booking should not include both the \"numberOfParticipants\" and \"participantsInfo\" paths, doing so will result\nin an error. \"participantsInfo\" should be preferred over \"numberOfParticipants\"" + "" ] } }, { - "name": "BulkUpdateBookingResponse", + "name": "EntityDeletedEvent", "members": [ { - "name": "bulkActionMetadata", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.BulkActionMetadata" - } - ], - "doc": "" - }, - { - "name": "results", + "name": "deletedEntityAsJson", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.ItemMetadata" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Entity that was deleted" } ], "docs": { @@ -2791,16 +5917,17 @@ } }, { - "name": "CalculateAllowedActionsRequest", + "name": "EntityUpdatedEvent", "members": [ { - "name": "bookingId", + "name": "currentEntityAsJson", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The booking id that we want to calculate the allowedActions for" + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -2810,17 +5937,27 @@ } }, { - "name": "CalculateAllowedActionsResponse", + "name": "ExtendedFields", "members": [ { - "name": "allowedActions", + "name": "namespaces", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.AllowedActions" + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "Object" + } + ] + } } ], - "doc": "" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -2830,66 +5967,66 @@ } }, { - "name": "CancelBookingFlowControlSettings", + "name": "FlowControlSettings", "members": [ { - "name": "ignoreCancellationPolicy", + "name": "skipAvailabilityValidation", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it.\nDefault: `false`.\n" + "doc": "When true, skips availability checking and allows booking.\nRequires BOOKINGS.OVERRIDE_AVAILABILITY permissions." }, { - "name": "withRefund", + "name": "skipBusinessConfirmation", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to issue a refund when canceling the booking.\nThe refund will be issued only if the booking is refundable.\nCurrently, booking is considered refundable when it was paid by membership.\nIf passing `true`, the booking flow control settings will be set with refund,\notherwise, either if `false` is passed or the field remains empty,\nthe booking flow control settings will be set with no refund.\nDefault: `false`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CancelBookingOptions", - "members": [ + "doc": "When true, allows booking a confirmation-required service without requiring confirmation.\nRequires BOOKINGS.IGNORE_BOOKING_POLICY permissions." + }, { - "name": "flowControlSettings", + "name": "skipSelectedPaymentOptionValidation", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + "nativeType": "boolean" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + "doc": "When true, skips selected payment option checking as defined in `selectedPaymentOption` field\nand allows booking.\nRequires BOOKINGS.MANAGE_PAYMENTS permissions." }, { - "name": "participantNotification", + "name": "withRefund", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." - }, + "doc": "When true, refunds the booking's payment when the booking is canceled." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceBookingAvailabilityRequest", + "members": [ { - "name": "revision", + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." + "doc": "" } ], "docs": { @@ -2899,45 +6036,74 @@ } }, { - "name": "CancelBookingRequest", + "name": "GetMultiServiceBookingAvailabilityResponse", "members": [ { - "name": "bookingId", + "name": "bookable", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the booking to cancel." + "doc": "Whether these bookings are bookable." }, { - "name": "flowControlSettings", + "name": "multiServiceBookingInfo", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CancelBookingFlowControlSettings" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.GetMultiServiceBookingAvailabilityResponseBookingInfo" + } + ] + } } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncancelation flow are changed. For example, whether the you can cancel\na booking even though the cancelation policy doesn't allow it or whether\nto issue a refund." + "doc": "Info of the bookings this availability was calculated for." }, { - "name": "participantNotification", + "name": "policySettings", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.BookingPolicySettings" } ], - "doc": "Information about whether to notify the customer about the cancelation and\nthe message to send." + "doc": "Multi service booking policy settings" }, { - "name": "revision", + "name": "policyViolations", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.BookingPolicyViolations" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when managing the booking." + "doc": "Indicators for policy violations of the multi service booking." + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of open spots for this availability." + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots for this availability." } ], "docs": { @@ -2947,17 +6113,17 @@ } }, { - "name": "CancelBookingResponse", + "name": "GetMultiServiceBookingAvailabilityResponseBookingInfo", "members": [ { - "name": "booking", + "name": "bookingId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], - "doc": "Canceled booking." + "doc": "Booking id" } ], "docs": { @@ -2967,72 +6133,97 @@ } }, { - "name": "CommonIdentificationData", + "name": "GetMultiServiceBookingRequest", "members": [ { - "name": "anonymousVisitorId", - "optional": true, + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "ID of a site visitor that has not logged in to the site." - }, + "doc": "Multi service booking ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceBookingResponse", + "members": [ { - "name": "appId", + "name": "metadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBookingMetadata" } ], - "doc": "ID of an app." + "doc": "" }, { - "name": "contactId", + "name": "multiServiceBooking", "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" + } + ], + "doc": "Multi service booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetScheduleAvailabilityRequest", + "members": [ + { + "name": "scheduleId", "type": [ { "nativeType": "string" } ], - "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." - }, + "doc": "The schedule ID for which availability is checked." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetScheduleAvailabilityResponse", + "members": [ { - "name": "memberId", + "name": "availability", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ScheduleAvailability" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "" }, { - "name": "wixUserId", + "name": "bookingPolicySettings", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.BookingPolicySettings" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonIdentificationDataIdOneOf", - "members": [ - "anonymousVisitorId", - "appId", - "memberId", - "wixUserId" - ] - } - ] - }, "docs": { "description": [ "" @@ -3040,47 +6231,57 @@ } }, { - "name": "CommonIdentificationDataIdOneOf", + "name": "GetSlotAvailabilityOptions", "members": [ { - "name": "anonymousVisitorId", + "name": "slot", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.V2Slot" } ], - "doc": "ID of a site visitor that has not logged in to the site." + "doc": "The slot for which the availability is checked." }, { - "name": "appId", + "name": "timezone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of an app." - }, + "doc": "The timezone for which availability is to be calculated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetSlotAvailabilityRequest", + "members": [ { - "name": "memberId", + "name": "slot", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.V2Slot" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "The slot for which the availability is checked." }, { - "name": "wixUserId", + "name": "timezone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "The timezone for which availability is to be calculated." } ], "docs": { @@ -3090,17 +6291,27 @@ } }, { - "name": "ConfirmBookingOptions", + "name": "GetSlotAvailabilityResponse", "members": [ { - "name": "participantNotification", + "name": "availability", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.SlotAvailability" } ], - "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + "doc": "" + }, + { + "name": "bookingPolicySettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingPolicySettings" + } + ], + "doc": "" } ], "docs": { @@ -3110,77 +6321,73 @@ } }, { - "name": "ConfirmBookingRequest", + "name": "IdentificationData", "members": [ { - "name": "bookingId", + "name": "anonymousVisitorId", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the booking to confirm." + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "participantNotification", + "name": "appId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Information about whether to notify the customer about the confirmation and\nthe message to send." + "doc": "ID of an app." }, { - "name": "revision", + "name": "contactId", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConfirmBookingResponse", - "members": [ + "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + }, { - "name": "booking", + "name": "memberId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConfirmOrDeclineBookingOptions", - "members": [ + "doc": "ID of a site visitor that has logged in to the site." + }, { - "name": "paymentStatus", + "name": "wixUserId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Current payment status of the booking." + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, "docs": { "description": [ "" @@ -3188,46 +6395,47 @@ } }, { - "name": "ConfirmOrDeclineBookingRequest", + "name": "IdentificationDataIdOneOf", "members": [ { - "name": "bookingId", + "name": "anonymousVisitorId", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the booking to confirm or decline." + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "paymentStatus", + "name": "appId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Current payment status of the booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConfirmOrDeclineBookingResponse", - "members": [ + "doc": "ID of an app." + }, { - "name": "booking", + "name": "memberId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], "docs": { @@ -3237,7 +6445,7 @@ } }, { - "name": "ConfirmRequest", + "name": "ItemMetadata", "members": [ { "name": "_id", @@ -3247,57 +6455,37 @@ "nativeType": "string" } ], - "doc": "ID of the booking to be confirmed." + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." }, { - "name": "participantNotification", + "name": "error", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.ApplicationError" } ], - "doc": "Whether to notify the participants about the booking confirmation, and an optional custom message." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConfirmResponse", - "members": [ + "doc": "Details about the error in case of failure." + }, { - "name": "booking", + "name": "originalIndex", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "number" } ], - "doc": "Confirmed booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ConsistentQueryBookingsRequest", - "members": [ + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, { - "name": "query", + "name": "success", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.QueryV2" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." } ], "docs": { @@ -3307,31 +6495,13 @@ } }, { - "name": "ConsistentQueryBookingsResponse", + "name": "LegacyCreateBookingRequest", "members": [ { - "name": "bookings", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.Booking" - } - ] - } - } - ], - "doc": "" - }, - { - "name": "pagingMetadata", - "optional": true, + "name": "booking", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.PagingMetadataV2" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], "doc": "" @@ -3344,14 +6514,14 @@ } }, { - "name": "ConsistentQueryOptions", + "name": "LegacyCreateBookingResponse", "members": [ { - "name": "query", + "name": "booking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.QueryV2" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], "doc": "" @@ -3364,87 +6534,47 @@ } }, { - "name": "ContactDetails", + "name": "Location", "members": [ { - "name": "contactId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's ID." - }, - { - "name": "countryCode", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's country in [ISO 3166-1 alpha-2 code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." - }, - { - "name": "email", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Contact's email, used to create a new contact or get existing one from the [Contacts API](https://www.wix.com/velo/reference/wix-crm/contacts/introduction). Used to validate coupon usage limitations per contact. If not passed, the coupon usage limitation will not be enforced. (Coupon usage limitation validation is not supported yet)." - }, - { - "name": "firstName", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contact's first name. When populated from a standard booking form, this property corresponds to the **Name** field." - }, - { - "name": "fullAddress", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.Address" - } - ], - "doc": "Contact's full address." + "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." }, { - "name": "lastName", + "name": "formattedAddress", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contact's last name." + "doc": "The full address of this location." }, { - "name": "phone", + "name": "locationType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contact's phone number." + "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" }, { - "name": "timeZone", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Contact's time zone." + "doc": "Location name." } ], "docs": { @@ -3454,37 +6584,53 @@ } }, { - "name": "CreateBookingFlowControlSettings", + "name": "MarkAsMultiServiceBookingOptions", "members": [ { - "name": "skipAvailabilityValidation", + "name": "multiServiceBookingType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable.\nDefault: `false`." - }, + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MarkAsMultiServiceBookingRequest", + "members": [ { - "name": "skipBusinessConfirmation", - "optional": true, + "name": "bookingIds", "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\nDefault: `false`." + "doc": "IDs of the bookings to mark as multi service booking." }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "multiServiceBookingType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\nDefault: `false`." + "doc": "Multi service booking type.\nOne of:\n- `\"SEQUENTIAL_BOOKINGS\"` Multi service booking will be considered available if its bookings are available as returned from ListMultiServiceAvailabilityTimeSlots API.\n- `\"SEPARATE_BOOKINGS\"` Not supported yet.\n- `\"PARALLEL_BOOKINGS\"` Not supported yet." } ], "docs": { @@ -3494,47 +6640,47 @@ } }, { - "name": "CreateBookingInfo", + "name": "MarkAsMultiServiceBookingResponse", "members": [ { - "name": "booking", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.Booking" - } - ], - "doc": "The booking to create" - }, - { - "name": "flowControlSettings", + "name": "multiServiceBookingId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + "nativeType": "string" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." - }, + "doc": "Multi service booking ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MarkBookingAsPendingFlowControlSettings", + "members": [ { - "name": "participantNotification", + "name": "checkAvailabilityValidation", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about a message to send to the customer." + "doc": "Whether should check for double bookings before updating the booking as pending.\nWhen passing `false` a booking is only being updated with status PENDING\nDefault: `false`." }, { - "name": "sendSmsReminder", + "name": "skipPendingApprovalServiceValidation", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + "doc": "Whether should validate that the given booking to be marked as pending, has a booking.slot.serviceId\nof a pending approval service.\nDefault: `false`." } ], "docs": { @@ -3544,17 +6690,27 @@ } }, { - "name": "CreateBookingOptions", + "name": "MarkBookingAsPendingOptions", "members": [ + { + "name": "doubleBooked", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this booking overlaps with another existing confirmed booking." + }, { "name": "flowControlSettings", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + "referenceType": "wix-bookings-v2.Bookings.MarkBookingAsPendingFlowControlSettings" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking's status." }, { "name": "participantNotification", @@ -3564,7 +6720,17 @@ "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Information about a message to send to the customer." + "doc": "Information about whether to notify the customer and\nthe message to send." + }, + { + "name": "paymentStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." }, { "name": "sendSmsReminder", @@ -3574,7 +6740,7 @@ "nativeType": "boolean" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -3584,86 +6750,75 @@ } }, { - "name": "CreateBookingRequest", + "name": "MarkBookingAsPendingRequest", "members": [ { - "name": "booking", + "name": "bookingId", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], - "doc": "The booking to create." + "doc": "ID of the booking to mark as PENDING." }, { - "name": "flowControlSettings", + "name": "doubleBooked", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CreateBookingFlowControlSettings" + "nativeType": "boolean" } ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before creating the booking or if additional payment options are\naccepted." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "participantNotification", + "name": "flowControlSettings", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "referenceType": "wix-bookings-v2.Bookings.MarkBookingAsPendingFlowControlSettings" } ], - "doc": "Information about a message to send to the customer." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking's status." }, { - "name": "sendSmsReminder", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`.\nDefault: `true`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateBookingRequestFlowControlSettings", - "members": [ + "doc": "Information about whether to notify the customer and\nthe message to send." + }, { - "name": "skipAvailabilityValidation", + "name": "paymentStatus", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the availability is checked before creating the booking. When\npassing `false` a booking is only created when the slot or schedule is\navailable. Your app must have the `BOOKINGS.OVERRIDE_AVAILABILITY`\npermission scope when passing `true`.\n\nDefault: `false`.\n" + "doc": "Payment status to set for the booking.\nOne of:\n- `\"NOT_PAID\"` The booking is not paid for.\n- `\"PAID\"` The booking is fully paid.\n- `\"PARTIALLY_PAID\"` The booking is partially paid.\n- `\"REFUNDED\"` The booking is refunded.\n- `\"EXEMPT\"` The booking is free of charge." }, { - "name": "skipBusinessConfirmation", - "optional": true, + "name": "revision", "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether `PENDING` bookings are automatically set to `CONFIRMED` for\nservices that normally require the owner's manual confirmation. Your\napp must have the `BOOKINGS.OVERRIDE_AVAILABILITY` permission scope\nwhen passing `true`.\n\nDefault: `false`.\n" + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "sendSmsReminder", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether customers can pay using a payment method that isn't supported\nfor the service, but that's supported for other services. Your app\nmust have the `BOOKINGS.MANAGE_PAYMENTS` permission scope when passing\n`true`.\n\nDefault: `false`.\n" + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -3673,7 +6828,7 @@ } }, { - "name": "CreateBookingResponse", + "name": "MarkBookingAsPendingResponse", "members": [ { "name": "booking", @@ -3683,7 +6838,7 @@ "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "Created booking." + "doc": "The updated booking" } ], "docs": { @@ -3693,57 +6848,74 @@ } }, { - "name": "CursorPaging", + "name": "MarkMultiServiceBookingAsPendingOptions", "members": [ { - "name": "cursor", + "name": "doubleBooked", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "limit", + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Bookings.MarkBookingAsPendingFlowControlSettings" } ], - "doc": "Number of items to load." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cursors", - "members": [ + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking." + }, { - "name": "next", + "name": "markAsPendingBookingsInfo", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" + } + ] + } } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Bookings to mark as pending." }, { - "name": "prev", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + } + ], + "doc": "Information about whether to notify the customer upon manual confirmation and the message to send." + }, + { + "name": "returnFullEntity", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to return the pending bookings entities." + }, + { + "name": "sendSmsReminder", + "optional": true, + "type": [ + { + "nativeType": "boolean" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -3753,59 +6925,54 @@ } }, { - "name": "CustomFormField", + "name": "MarkMultiServiceBookingAsPendingRequest", "members": [ { - "name": "_id", + "name": "doubleBooked", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the form field as defined in the form." + "doc": "Whether this booking overlaps with another existing confirmed booking." }, { - "name": "label", - "readOnly": true, + "name": "flowControlSettings", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.MarkBookingAsPendingFlowControlSettings" } ], - "doc": "Form field's label at the time of submission." + "doc": "Information about whether specific procedures of the standard Wix Bookings\ncreation flow are changed. For example, whether the availability is\nchecked before updating the booking." }, { - "name": "value", + "name": "markAsPendingBookingsInfo", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingInfo" + } + ] + } } ], - "doc": "Value that was submitted for this field." + "doc": "Bookings to mark as pending." }, { - "name": "valueType", - "optional": true, + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "One of:\n- `\"SHORT_TEXT\"`\n- `\"LONG_TEXT\"`\n- `\"CHECK_BOX\"`" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeclineBookingOptions", - "members": [ + "doc": "ID of the multi service booking to mark as pending it's related bookings." + }, { "name": "participantNotification", "optional": true, @@ -3814,45 +6981,27 @@ "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Information about whether to notify the customer about the decline and\nthe message to send." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeclineBookingRequest", - "members": [ - { - "name": "bookingId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the booking to decline." + "doc": "Information about whether to notify the customer upon manual confirmation and the message to send." }, { - "name": "participantNotification", + "name": "returnFullEntity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Information about whether to notify the customer about the decline and\nthe message to send." + "doc": "Whether to return the pending bookings entities." }, { - "name": "revision", + "name": "sendSmsReminder", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + "doc": "Whether to send an SMS reminder to the customer 24 hours before the\nsession starts. The phone number is taken from `contactDetails.phone`." } ], "docs": { @@ -3862,17 +7011,17 @@ } }, { - "name": "DeclineBookingResponse", + "name": "MarkMultiServiceBookingAsPendingResponse", "members": [ { - "name": "booking", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" } ], - "doc": "eclined booking" + "doc": "Pending multi service booking." } ], "docs": { @@ -3882,27 +7031,17 @@ } }, { - "name": "ExtendedFields", + "name": "MaskedBooking", "members": [ { - "name": "namespaces", + "name": "booking", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "Object" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "Data Extensions extended fields\nKey: Namespace\nValue: extended fields data in Struct format" + "doc": "" } ], "docs": { @@ -3912,47 +7051,47 @@ } }, { - "name": "FlowControlSettings", + "name": "MessageEnvelope", "members": [ { - "name": "skipAvailabilityValidation", + "name": "data", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, skips availability checking and allows booking.\nRequires BOOKINGS.OVERRIDE_AVAILABILITY permissions." + "doc": "Stringify payload." }, { - "name": "skipBusinessConfirmation", + "name": "eventType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, allows booking a confirmation-required service without requiring confirmation.\nRequires BOOKINGS.IGNORE_BOOKING_POLICY permissions." + "doc": "Event type." }, { - "name": "skipSelectedPaymentOptionValidation", + "name": "identity", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.WebhooksIdentificationData" } ], - "doc": "When true, skips selected payment option checking as defined in `selectedPaymentOption` field\nand allows booking.\nRequires BOOKINGS.MANAGE_PAYMENTS permissions." + "doc": "The identification type and identity data." }, { - "name": "withRefund", + "name": "instanceId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "When true, refunds the booking's payment when the booking is canceled." + "doc": "App instance ID." } ], "docs": { @@ -3962,16 +7101,24 @@ } }, { - "name": "GetScheduleAvailabilityRequest", + "name": "MigrationCheckIfClashesWithBlockedTimeRequest", "members": [ { - "name": "scheduleId", + "name": "msidAndBookingIds", + "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.MsidAndBookingId" + } + ] + } } ], - "doc": "The schedule ID for which availability is checked." + "doc": "" } ], "docs": { @@ -3981,24 +7128,21 @@ } }, { - "name": "GetScheduleAvailabilityResponse", + "name": "MigrationCheckIfClashesWithBlockedTimeResponse", "members": [ { - "name": "availability", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.ScheduleAvailability" - } - ], - "doc": "" - }, - { - "name": "bookingPolicySettings", + "name": "clashes", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BookingPolicySettings" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.Clash" + } + ] + } } ], "doc": "" @@ -4011,27 +7155,27 @@ } }, { - "name": "GetSlotAvailabilityOptions", + "name": "MsidAndBookingId", "members": [ { - "name": "slot", + "name": "bookingId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.V2Slot" + "nativeType": "string" } ], - "doc": "The slot for which the availability is checked." + "doc": "" }, { - "name": "timezone", + "name": "msid", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The timezone for which availability is to be calculated." + "doc": "" } ], "docs": { @@ -4041,27 +7185,34 @@ } }, { - "name": "GetSlotAvailabilityRequest", + "name": "MultiServiceBooking", "members": [ { - "name": "slot", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.V2Slot" + "nativeType": "string" } ], - "doc": "The slot for which the availability is checked." + "doc": "Multi service booking ID." }, { - "name": "timezone", + "name": "bookings", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingResult" + } + ] + } } ], - "doc": "The timezone for which availability is to be calculated." + "doc": "The created bookings which are part of the multi service booking" } ], "docs": { @@ -4071,27 +7222,28 @@ } }, { - "name": "GetSlotAvailabilityResponse", + "name": "MultiServiceBookingInfo", "members": [ { - "name": "availability", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.SlotAvailability" + "nativeType": "string" } ], - "doc": "" + "doc": "Multi service booking ID." }, { - "name": "bookingPolicySettings", + "name": "type", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.BookingPolicySettings" + "nativeType": "string" } ], - "doc": "" + "doc": "Multi service booking type." } ], "docs": { @@ -4101,69 +7253,76 @@ } }, { - "name": "IdentificationData", + "name": "MultiServiceBookingMetadata", "members": [ { - "name": "anonymousVisitorId", + "name": "totalNumberOfScheduledBookings", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of a site visitor that has not logged in to the site." - }, + "doc": "Total number of the scheduled bookings within the multi service booking, including bookings which were not retrieved due to lack of read permissions.\nScheduled bookings are bookings with status CONFIRMED or PENDING." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NumberOfParticipantsUpdated", + "members": [ { - "name": "appId", + "name": "booking", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.Booking" } ], - "doc": "ID of an app." + "doc": "The updated booking object." }, { - "name": "contactId", - "readOnly": true, + "name": "initiatedBy", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.IdentificationData" } ], - "doc": "ID of of a contact in the site's [CRM by Ascend](https://www.wix.com/ascend/crm) system." + "doc": "ID of the participant number update initiator." }, { - "name": "memberId", + "name": "previousParticipantsChoices", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." }, { - "name": "wixUserId", + "name": "previousTotalParticipants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfIdentificationDataIdOneOf", + "name": "oneOfNumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf", "members": [ - "anonymousVisitorId", - "appId", - "memberId", - "wixUserId" + "previousParticipantsChoices", + "previousTotalParticipants" ] } ] @@ -4175,47 +7334,57 @@ } }, { - "name": "IdentificationDataIdOneOf", + "name": "NumberOfParticipantsUpdatedPreviousParticipantsInfoOneOf", "members": [ { - "name": "anonymousVisitorId", + "name": "previousParticipantsChoices", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "ID of a site visitor that has not logged in to the site." + "doc": "Information about the previous booked service choices and participants.\nAvailable only when the booking includes multiple service variants." }, { - "name": "appId", + "name": "previousTotalParticipants", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of an app." - }, + "doc": "The previous total number of participants. Available only when the booking includes a single service variant." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Paging", + "members": [ { - "name": "memberId", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of a site visitor that has logged in to the site." + "doc": "Number of items to load." }, { - "name": "wixUserId", + "name": "offset", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of a Wix user (site owner, contributor, etc.)." + "doc": "Number of items to skip in the current sort order." } ], "docs": { @@ -4225,47 +7394,114 @@ } }, { - "name": "ItemMetadata", + "name": "PagingMetadataV2", "members": [ { - "name": "_id", + "name": "count", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + "doc": "Number of items returned in the response." }, { - "name": "error", + "name": "cursors", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ApplicationError" + "referenceType": "wix-bookings-v2.Bookings.Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ParticipantChoices", + "members": [ + { + "name": "serviceChoices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.ServiceChoices" + } + ] + } } ], - "doc": "Details about the error in case of failure." - }, + "doc": "Information about the booked service choices. Includes the number of participants." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ParticipantNotification", + "members": [ { - "name": "originalIndex", + "name": "message", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Index of the item within the request array. Allows for correlation between request and response items." + "doc": "Custom message to send to the participants about the changes to the booking." }, { - "name": "success", + "name": "notifyParticipants", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" } ], "docs": { @@ -4275,38 +7511,40 @@ } }, { - "name": "LegacyCreateBookingRequest", + "name": "PartySizeOptions", "members": [ { - "name": "booking", + "name": "scheduleId", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "LegacyCreateBookingResponse", - "members": [ + }, { - "name": "booking", + "name": "sessionId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "string" } ], "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPartySizeRequestPartySizeForOneOf", + "members": [ + "scheduleId", + "sessionId" + ] + } + ] + }, "docs": { "description": [ "" @@ -4314,47 +7552,68 @@ } }, { - "name": "Location", + "name": "PartySizeRequest", "members": [ { - "name": "_id", + "name": "scheduleId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Business location ID. Available only for locations that are business locations,\nmeaning the `location_type` is `\"OWNER_BUSINESS\"`." + "doc": "" }, { - "name": "formattedAddress", + "name": "sessionId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The full address of this location." - }, + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfPartySizeRequestPartySizeForOneOf", + "members": [ + "scheduleId", + "sessionId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "PartySizeRequestPartySizeForOneOf", + "members": [ { - "name": "locationType", + "name": "scheduleId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location type.\n\n- `\"OWNER_BUSINESS\"`: The business address, as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"`: The address as set when creating the service.\n- `\"CUSTOM\"`: The address as set for the individual session.\n" + "doc": "" }, { - "name": "name", + "name": "sessionId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location name." + "doc": "" } ], "docs": { @@ -4364,31 +7623,33 @@ } }, { - "name": "MaskedBooking", + "name": "PartySizeResponse", "members": [ { - "name": "booking", + "name": "partySize", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "nativeType": "number" } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryBookingsRequest", + "members": [ { - "name": "mask", - "optional": true, + "name": "query", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.QueryV2" } ], "doc": "" @@ -4401,27 +7662,34 @@ } }, { - "name": "Paging", + "name": "QueryBookingsResponse", "members": [ { - "name": "limit", + "name": "bookings", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ] + } } ], - "doc": "Number of items to load." + "doc": "" }, { - "name": "offset", + "name": "pagingMetadata", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Bookings.PagingMetadataV2" } ], - "doc": "Number of items to skip in the current sort order." + "doc": "" } ], "docs": { @@ -4431,59 +7699,110 @@ } }, { - "name": "PagingMetadataV2", + "name": "QueryOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "QueryV2", "members": [ { - "name": "count", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Bookings.CursorPaging" } ], - "doc": "Number of items returned in the response." + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." }, { - "name": "cursors", + "name": "fields", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Cursors" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + "doc": "Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned." }, { - "name": "offset", + "name": "fieldsets", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Offset that was requested." + "doc": "Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned." }, { - "name": "tooManyToCount", + "name": "filter", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Object" } ], - "doc": "Flag that indicates the server failed to calculate the `total` field." + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" }, { - "name": "total", + "name": "paging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Bookings.Paging" } ], - "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + "doc": "Paging options to limit and skip the number of items." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, "docs": { "description": [ "" @@ -4491,24 +7810,27 @@ } }, { - "name": "ParticipantChoices", + "name": "QueryV2PagingMethodOneOf", "members": [ { - "name": "serviceChoices", + "name": "cursorPaging", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.ServiceChoices" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.Paging" } ], - "doc": "Information about the booked service choices. Includes the number of participants." + "doc": "Paging options to limit and skip the number of items." } ], "docs": { @@ -4518,27 +7840,34 @@ } }, { - "name": "ParticipantNotification", + "name": "RemoveBookingsFromMultiServiceBookingOptions", "members": [ { - "name": "message", + "name": "bookings", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingIdAndRevision" + } + ] + } } ], - "doc": "Custom message to send to the participants about the changes to the booking." + "doc": "List of bookings ids and their revisions to remove from the multi service booking." }, { - "name": "notifyParticipants", + "name": "returnFullEntity", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + "doc": "Whether to return the bookings entities." } ], "docs": { @@ -4548,40 +7877,45 @@ } }, { - "name": "PartySizeOptions", + "name": "RemoveBookingsFromMultiServiceBookingRequest", "members": [ { - "name": "scheduleId", + "name": "bookings", "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingIdAndRevision" + } + ] + } + } + ], + "doc": "List of bookings ids and their revisions to remove from the multi service booking." + }, + { + "name": "multiServiceBookingId", "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "ID of the multi service booking." }, { - "name": "sessionId", + "name": "returnFullEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether to return the bookings entities." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPartySizeRequestPartySizeForOneOf", - "members": [ - "scheduleId", - "sessionId" - ] - } - ] - }, "docs": { "description": [ "" @@ -4589,40 +7923,26 @@ } }, { - "name": "PartySizeRequest", + "name": "RemoveBookingsFromMultiServiceBookingResponse", "members": [ { - "name": "scheduleId", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "sessionId", + "name": "bookings", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.BookingResult" + } + ] + } } ], - "doc": "" + "doc": "The bookings that were removed from the multi service booking." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPartySizeRequestPartySizeForOneOf", - "members": [ - "scheduleId", - "sessionId" - ] - } - ] - }, "docs": { "description": [ "" @@ -4630,47 +7950,37 @@ } }, { - "name": "PartySizeRequestPartySizeForOneOf", + "name": "RescheduleBookingFlowControlSettings", "members": [ { - "name": "scheduleId", + "name": "ignoreReschedulePolicy", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the rescheduling policy applies when rescheduling the booking.\nWhen passing `false` you can only cancel a booking if the rescheduling\npolicy allows it.\nDefault: `false`." }, { - "name": "sessionId", + "name": "skipAvailabilityValidation", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "PartySizeResponse", - "members": [ + "doc": "Whether the availability is checked before rescheduling the booking.\nWhen passing `false` a booking is only created when the slot or\nschedule is available.\nDefault: `false`." + }, { - "name": "partySize", + "name": "skipBusinessConfirmation", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the rescheduled booking's status is automatically set to\n`CONFIRMED` for services that normally require the owner's manual\nconfirmation.\nDefault: `false`." } ], "docs": { @@ -4680,64 +7990,69 @@ } }, { - "name": "QueryBookingsRequest", + "name": "RescheduleBookingOptions", "members": [ { - "name": "query", + "name": "flowControlSettings", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.QueryV2" + "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryBookingsResponse", - "members": [ + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." + }, { - "name": "bookings", + "name": "participantNotification", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.Booking" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "" + "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." }, { - "name": "pagingMetadata", + "name": "participantsChoices", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.PagingMetadataV2" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "" + "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." + }, + { + "name": "revision", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." } ], - "docs": { - "description": [ - "" + "extra": { + "oneOfGroups": [ + { + "name": "oneOfRescheduleBookingRequestParticipantsInfoOneOf", + "members": [ + "participantsChoices", + "totalParticipants" + ] + } ] - } - }, - { - "name": "QueryOptions", - "members": [], + }, "docs": { "description": [ "" @@ -4745,97 +8060,83 @@ } }, { - "name": "QueryV2", + "name": "RescheduleBookingRequest", "members": [ { - "name": "cursorPaging", - "optional": true, + "name": "bookingId", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CursorPaging" + "nativeType": "string" } ], - "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + "doc": "ID of the booking to reschedule." }, { - "name": "fields", + "name": "flowControlSettings", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" } ], - "doc": "Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned." + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." }, { - "name": "fieldsets", + "name": "participantNotification", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned." + "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." }, { - "name": "filter", + "name": "participantsChoices", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." }, { - "name": "paging", - "optional": true, + "name": "revision", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Paging" + "nativeType": "string" } ], - "doc": "Paging options to limit and skip the number of items." + "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." }, { - "name": "sort", - "optional": true, + "name": "slot", "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Bookings.Sorting" - } - ] - } + "referenceType": "wix-bookings-v2.Bookings.V2Slot" + } + ], + "doc": "Information about the new slot." + }, + { + "name": "totalParticipants", + "optional": true, + "type": [ + { + "nativeType": "number" } ], - "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfQueryV2PagingMethodOneOf", + "name": "oneOfRescheduleBookingRequestParticipantsInfoOneOf", "members": [ - "cursorPaging", - "paging" + "participantsChoices", + "totalParticipants" ] } ] @@ -4847,27 +8148,27 @@ } }, { - "name": "QueryV2PagingMethodOneOf", + "name": "RescheduleBookingRequestParticipantsInfoOneOf", "members": [ { - "name": "cursorPaging", + "name": "participantsChoices", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.CursorPaging" + "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" } ], - "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." }, { - "name": "paging", + "name": "totalParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Paging" + "nativeType": "number" } ], - "doc": "Paging options to limit and skip the number of items." + "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." } ], "docs": { @@ -4877,37 +8178,57 @@ } }, { - "name": "RescheduleBookingFlowControlSettings", + "name": "RescheduleBookingResponse", "members": [ { - "name": "ignoreReschedulePolicy", + "name": "booking", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.Booking" + } + ], + "doc": "Rescheduled booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "RescheduleMultiServiceBookingOptions", + "members": [ + { + "name": "flowControlSettings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" } ], - "doc": "Whether the rescheduling policy applies when rescheduling the booking.\nWhen passing `false` you can only cancel a booking if the rescheduling\npolicy allows it.\nDefault: `false`.\n" + "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." }, { - "name": "skipAvailabilityValidation", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Whether the availability is checked before rescheduling the booking.\nWhen passing `false` a booking is only created when the slot or\nschedule is available.\nDefault: `false`." + "doc": "Information about whether to notify the customer about the rescheduling and the message to send." }, { - "name": "skipBusinessConfirmation", + "name": "returnFullEntity", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether the rescheduled booking's status is automatically set to\n`CONFIRMED` for services that normally require the owner's manual\nconfirmation.\nDefault: `false`." + "doc": "Whether to return the rescheduled bookings entities." } ], "docs": { @@ -4917,7 +8238,7 @@ } }, { - "name": "RescheduleBookingOptions", + "name": "RescheduleMultiServiceBookingRequest", "members": [ { "name": "flowControlSettings", @@ -4930,56 +8251,51 @@ "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." }, { - "name": "participantNotification", - "optional": true, + "name": "multiServiceBookingId", "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." + "doc": "ID of the multi service booking to reschedule it's related bookings." }, { - "name": "participantsChoices", + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.ParticipantChoices" + "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" } ], - "doc": "Information about the service choices to book. Available only for services with\nvariants.\nPass when not all participants book the same variant." + "doc": "Information about whether to notify the customer about the rescheduling and the message to send." }, { - "name": "revision", + "name": "rescheduleBookingsInfo", "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Bookings.RescheduleMultiServiceBookingRequestRescheduleBookingInfo" + } + ] + } } ], - "doc": "Revision number, which increments by 1 each time the booking is updated.\nTo prevent conflicting changes, the current revision must be passed when\nmanaging the booking." + "doc": "Bookings to reschedule." }, { - "name": "totalParticipants", + "name": "returnFullEntity", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Total number of participants. Available only for services with\nvariants.\nPass when all participants book the same variant." + "doc": "Whether to return the rescheduled bookings entities." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfRescheduleBookingRequestParticipantsInfoOneOf", - "members": [ - "participantsChoices", - "totalParticipants" - ] - } - ] - }, "docs": { "description": [ "" @@ -4987,10 +8303,11 @@ } }, { - "name": "RescheduleBookingRequest", + "name": "RescheduleMultiServiceBookingRequestRescheduleBookingInfo", "members": [ { "name": "bookingId", + "optional": true, "type": [ { "nativeType": "string" @@ -4998,26 +8315,6 @@ ], "doc": "ID of the booking to reschedule." }, - { - "name": "flowControlSettings", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.RescheduleBookingFlowControlSettings" - } - ], - "doc": "Information about whether specific procedures of the standard Wix Bookings\nrescheduling flow are changed. For example, whether the availability of\nthe new slot is checked before rescheduling the booking or if you can\nreschedule the booking even though the rescheduling policy doesn't allow it." - }, - { - "name": "participantNotification", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Bookings.ParticipantNotification" - } - ], - "doc": "Information about whether to notify the customer about the rescheduling and\nthe message to send." - }, { "name": "participantsChoices", "optional": true, @@ -5030,6 +8327,7 @@ }, { "name": "revision", + "optional": true, "type": [ { "nativeType": "string" @@ -5039,6 +8337,7 @@ }, { "name": "slot", + "optional": true, "type": [ { "referenceType": "wix-bookings-v2.Bookings.V2Slot" @@ -5060,7 +8359,7 @@ "extra": { "oneOfGroups": [ { - "name": "oneOfRescheduleBookingRequestParticipantsInfoOneOf", + "name": "oneOfRescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf", "members": [ "participantsChoices", "totalParticipants" @@ -5075,7 +8374,7 @@ } }, { - "name": "RescheduleBookingRequestParticipantsInfoOneOf", + "name": "RescheduleMultiServiceBookingRequestRescheduleBookingInfoParticipantsInfoOneOf", "members": [ { "name": "participantsChoices", @@ -5105,17 +8404,17 @@ } }, { - "name": "RescheduleBookingResponse", + "name": "RescheduleMultiServiceBookingResponse", "members": [ { - "name": "booking", + "name": "multiServiceBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Bookings.Booking" + "referenceType": "wix-bookings-v2.Bookings.MultiServiceBooking" } ], - "doc": "Rescheduled booking." + "doc": "Rescheduled multi service booking." } ], "docs": { @@ -5528,7 +8827,7 @@ "referenceType": "wix-bookings-v2.Bookings.BookedSlot" } ], - "doc": "The slot to which the bookings was rescheduled\nThis bookings will automatically be assigned to the session if given, or will create a new one if not." + "doc": "The slot to which the bookings were rescheduled.\nThis bookings are automatically assigned to the session, if given. Otherwise, a new session is created." } ], "docs": { @@ -5863,7 +9162,7 @@ "referenceType": "wix-bookings-v2.Bookings.ExtendedFields" } ], - "doc": "Additional custom fields. This includes fields managed by Wix, by 3rd-party apps, and by the site.\n\nEmpty fields are not returned.\n" + "doc": "Custom field data for this object. Extended fields must be configured in the Wix Dev Center before they can be accessed with API calls." }, { "name": "externalUserId", @@ -5978,7 +9277,7 @@ ], "docs": { "description": [ - "The fieldMask should not include both the \"numberOfParticipants\" and \"participantsInfo\" paths, doing so will result\nin an error. \"participantsInfo\" should be preferred over \"numberOfParticipants\"" + "The `fieldMask` should not include both the `numberOfParticipants` and `participantsInfo` paths. Including both results\nin an error. `participantsInfo` is preferred over `numberOfParticipants`." ] } }, @@ -6012,7 +9311,7 @@ "nativeType": "Object" } ], - "doc": "" + "doc": "Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured." } ], "docs": { @@ -6031,7 +9330,7 @@ "nativeType": "string" } ], - "doc": "entity_id" + "doc": "ID of the entity to update." }, { "name": "namespace", @@ -6040,7 +9339,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Identifier for the app whose extended fields are being updated." }, { "name": "namespaceData", @@ -6049,7 +9348,7 @@ "nativeType": "Object" } ], - "doc": "" + "doc": "Data to update. Structured according to the [schema](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields#json-schema-for-extended-fields) defined when the extended fields were configured." } ], "docs": { @@ -6069,7 +9368,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Identifier for the app whose extended field data was updated." }, { "name": "namespaceData", @@ -6079,7 +9378,7 @@ "nativeType": "Object" } ], - "doc": "only data from UpdateExtendedFieldsRequest namespace_data" + "doc": "Updated data." } ], "docs": { @@ -6296,7 +9595,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n\n\n" + "doc": "Whether the cancelation policy applies when canceling the booking. When\npassing `false` you can only cancel a booking if the cancelation policy\nallows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n" }, { "name": "withRefund", @@ -6744,7 +10043,7 @@ "nativeType": "boolean" } ], - "doc": "Whether the rescheduling policy applies when rescheduling the booking.\nWhen passing `false` you can only cancel a booking if the rescheduling\npolicy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n\n\n" + "doc": "Whether the rescheduling policy applies when rescheduling the booking.\nWhen passing `false` you can only cancel a booking if the rescheduling\npolicy allows it. Your app must have the `BOOKINGS.IGNORE_BOOKING_POLICY `\npermission scope when passing `true`.\n\nDefault: `false`.\n" }, { "name": "skipAvailabilityValidation", @@ -6813,7 +10112,7 @@ "nativeType": "string" } ], - "doc": "The end time of this Slot (formatted according to RFC3339). Required." + "doc": "The end time of this Slot (formatted according to RFC3339)." }, { "name": "location", @@ -6833,7 +10132,7 @@ "referenceType": "wix-bookings-v2.Bookings.SlotSlotResource" } ], - "doc": "The resource required for this slot. Currently, in Bookings, this is the relevant staff. Required." + "doc": "The resource required for this slot.\nWhen populated, the given resource will be assigned to the slot upon confirmation according to it's availability.\nWhen empty, If `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation,\notherwise one of the service resources will be assigned to the slot randomly upon confirmation." }, { "name": "scheduleId", @@ -6863,7 +10162,7 @@ "nativeType": "string" } ], - "doc": "Identifier for underlying session when session is a single session or generated from a recurring session. Required." + "doc": "Identifier for underlying session when session is a single session or generated from a recurring session." }, { "name": "startDate", @@ -6873,7 +10172,7 @@ "nativeType": "string" } ], - "doc": "The start time of this Slot (formatted according to RFC3339). Required." + "doc": "The start time of this Slot (formatted according to RFC3339)." }, { "name": "timezone", @@ -6999,6 +10298,130 @@ "" ] } + }, + { + "name": "WebhooksIdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "identityType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfWebhooksIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "WebhooksIdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } } ] } diff --git a/wix-bookings-v2/wix-bookings-v2/Categories.service.json b/wix-bookings-v2/wix-bookings-v2/Categories.service.json new file mode 100644 index 0000000000..110544d728 --- /dev/null +++ b/wix-bookings-v2/wix-bookings-v2/Categories.service.json @@ -0,0 +1,802 @@ +{ + "name": "Categories", + "memberOf": "wix-bookings-v2", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-bookings.v2-category", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "create", + "params": [ + { + "name": "category", + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "Category information.", + "required": true + } + ], + "requiredFields": [ + "category", + "category.name" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.CreateCategoryResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Creates a new category.", + "description": [], + "examples": [ + { + "title": "create example", + "body": [ + "import { categories } from 'wix-bookings.v2';", + " ", + " async function create(category) {", + " try {", + " const result = await categories.create(category);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "create" + }, + { + "name": "delete", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.DeleteOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "_id" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.DeleteCategoryResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a category.", + "description": [], + "examples": [ + { + "title": "delete example", + "body": [ + "import { categories } from 'wix-bookings.v2';", + " ", + " async function delete(id, options) {", + " try {", + " const result = await categories.delete(id, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "delete" + }, + { + "name": "list", + "params": [], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.ListCategoryResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Lists all categories.", + "description": [ + "> **Permissions**\n> This endpoint requires the Read Bookings - Public Data or the Read Bookings - Including Participants permissions scope" + ], + "examples": [ + { + "title": "list example", + "body": [ + "import { categories } from 'wix-bookings.v2';", + " ", + " async function list(options) {", + " try {", + " const result = await categories.list(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "list" + }, + { + "name": "update", + "params": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID. Read-only.", + "required": true + }, + { + "name": "category", + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.UpdateCategory" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "category" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.UpdateCategoryResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Updates an existing category.", + "description": [], + "examples": [ + { + "title": "update example", + "body": [ + "import { categories } from 'wix-bookings.v2';", + " ", + " async function update(id, category) {", + " try {", + " const result = await categories.update(id, category);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "update" + } + ], + "messages": [ + { + "name": "BatchCreateCategoryRequest", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchCreateCategoryResponse", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchCreateOptions", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchDeleteCategoryRequest", + "members": [ + { + "name": "ids", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Category ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchDeleteCategoryResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchUpdateCategoryRequest", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "List of categories to be updated." + }, + { + "name": "fieldMask", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Field mask of fields to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchUpdateCategoryResponse", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BatchUpdateOptions", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "List of categories to be updated." + }, + { + "name": "fieldMask", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Field mask of fields to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Category", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID. Read-only." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category name." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category status Read-only." + } + ], + "docs": { + "description": [ + "Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI." + ] + } + }, + { + "name": "CategoryNotification", + "members": [ + { + "name": "category", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "" + }, + { + "name": "event", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'Created'`\n- `'Deleted'`\n- `'Updated'`" + } + ], + "docs": { + "description": [ + "An event sent every time a category entity is changed." + ] + } + }, + { + "name": "CreateCategoryRequest", + "members": [ + { + "name": "category", + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CreateCategoryResponse", + "members": [ + { + "name": "category", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteCategoryRequest", + "members": [ + { + "name": "_id", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID." + }, + { + "name": "deleteServices", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Cascade delete all the services in this category. Defaults to false (when false, the services will still exist but will not be accessible in the Wix Business Manager)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteCategoryResponse", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Deleted Category ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteOptions", + "members": [ + { + "name": "deleteServices", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Cascade delete all the services in this category. Defaults to false (when false, the services will still exist but will not be accessible in the Wix Business Manager)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListCategoryRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListCategoryResponse", + "members": [ + { + "name": "categories", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ] + } + } + ], + "doc": "Category information." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateCategory", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category ID. Read-only." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category name." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Category status Read-only." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateCategoryRequest", + "members": [ + { + "name": "category", + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "UpdateCategoryResponse", + "members": [ + { + "name": "category", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Categories.Category" + } + ], + "doc": "The updated category." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-bookings-v2/wix-bookings-v2/Events.service.json b/wix-bookings-v2/wix-bookings-v2/Events.service.json index bee35e4362..43d0669bf8 100644 --- a/wix-bookings-v2/wix-bookings-v2/Events.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Events.service.json @@ -20,7 +20,7 @@ "displayName": "BookingCanceledEvent" } ], - "doc": "", + "doc": "Information about the booking that was canceled and metadata for the event.\n", "required": false } ], @@ -34,14 +34,16 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is canceled.", - "description": [], + "summary": "An event that's triggered when a booking is canceled.", + "description": [ + "The `onBookingCanceled()` event handler runs when a booking is canceled. The received `BookingCanceledEvent` object contains information about the booking that was canceled and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingCanceled example", "body": [ "", - " export function wixBookings_onBookingCanceled(event) {", + " export function wixBookingsV2_onBookingCanceled(event) {", " const eventId = event.metadata.id", " const entityId = event.data.booking._id;", " }", @@ -57,7 +59,7 @@ "id": "maturity-beta" } ], - "syntaxName": "wixBookings_onBookingCanceled" + "syntaxName": "wixBookingsV2_onBookingCanceled" }, { "name": "onBookingConfirmed", @@ -70,7 +72,7 @@ "displayName": "BookingConfirmedEvent" } ], - "doc": "", + "doc": "Information about the booking that was confirmed and metadata for the event.\n", "required": false } ], @@ -84,14 +86,16 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is confirmed.", - "description": [], + "summary": "An event that's triggered when a booking is confirmed.", + "description": [ + "The `onBookingConfirmed()` event handler runs when a booking is confirmed. The received `BookingConfirmedEvent` object contains information about the booking that was confirmed and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingConfirmed example", "body": [ "", - " export function wixBookings_onBookingConfirmed(event) {", + " export function wixBookingsV2_onBookingConfirmed(event) {", " const eventId = event.metadata.id", " const entityId = event.data.booking._id;", " }", @@ -107,7 +111,7 @@ "id": "maturity-beta" } ], - "syntaxName": "wixBookings_onBookingConfirmed" + "syntaxName": "wixBookingsV2_onBookingConfirmed" }, { "name": "onBookingCreated", @@ -120,7 +124,7 @@ "displayName": "BookingCreated" } ], - "doc": "", + "doc": "Information about the booking that was created and metadata for the event.\n", "required": false } ], @@ -134,8 +138,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is created.", - "description": [], + "summary": "An event that's triggered when a booking is created.", + "description": [ + "The `onBookingCreated()` event handler runs when a booking is created. The received `BookingCreatedEvent` object contains information about the booking that was created and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingCreated example", @@ -170,7 +176,7 @@ "displayName": "BookingDeclinedEvent" } ], - "doc": "", + "doc": "Information about the booking that was declined and metadata for the event.\n", "required": false } ], @@ -184,14 +190,16 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is declined.", - "description": [], + "summary": "An event that's triggered when a booking is declined.", + "description": [ + "The `onBookingDeclined()` event handler runs when a booking is declined. The received `BookingDeclinedEvent` object contains information about the booking that was declined and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingDeclined example", "body": [ "", - " export function wixBookings_onBookingDeclined(event) {", + " export function wixBookingsV2_onBookingDeclined(event) {", " const eventId = event.metadata.id", " const entityId = event.data.booking._id;", " }", @@ -207,7 +215,7 @@ "id": "maturity-beta" } ], - "syntaxName": "wixBookings_onBookingDeclined" + "syntaxName": "wixBookingsV2_onBookingDeclined" }, { "name": "onBookingNumberOfParticipantsUpdated", @@ -220,7 +228,7 @@ "displayName": "BookingNumberOfParticipantsUpdated" } ], - "doc": "", + "doc": "Information about the booking whose number of participants was updated and metadata for the event.\n", "required": false } ], @@ -234,8 +242,10 @@ "doc": null }, "docs": { - "summary": "Triggered when the number of participants is updated.", - "description": [], + "summary": "An event that's triggered when the number of participants for a booking is updated.", + "description": [ + "The `onBookingNumberOfParticipantsUpdated()` event handler runs when the number of participants for a booking is updated. The received `BookingNumberOfParticipantsUpdatedEvent` object contains information about the booking whose number of participants were updated and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingNumberOfParticipantsUpdated example", @@ -270,7 +280,7 @@ "displayName": "BookingRescheduledEvent" } ], - "doc": "", + "doc": "Information about the booking that was rescheduled and metadata for the event.\n", "required": false } ], @@ -284,8 +294,10 @@ "doc": null }, "docs": { - "summary": "Triggered when a booking is rescheduled.", - "description": [], + "summary": "An event that's triggered when a booking is rescheduled.", + "description": [ + "The `onBookingRescheduled()` event handler runs when a booking is rescheduled. The received `BookingRescheduledEvent` object contains information about the booking that was rescheduled and metadata for the event.\n\n> **Note:** Backend events don't work when previewing your site." + ], "examples": [ { "title": "onBookingRescheduled example", @@ -309,6 +321,153 @@ ], "syntaxName": "wixBookings_onBookingRescheduled" }, + { + "name": "onBookingUpdated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsV2BookingBookingUpdated", + "displayName": "BookingUpdated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onBookingUpdated example", + "body": [ + "", + " export function wixBookingsV2_onBookingUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsV2_onBookingUpdated" + }, + { + "name": "onServiceCreated", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceCreated", + "displayName": "ServiceCreated" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceCreated example", + "body": [ + "", + " export function wixBookingsServices_onServiceCreated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceCreated" + }, + { + "name": "onServiceDeleted", + "params": [ + { + "name": "event", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceDeleted", + "displayName": "ServiceDeleted" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceDeleted example", + "body": [ + "", + " export function wixBookingsServices_onServiceDeleted(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceDeleted" + }, { "name": "onServiceOptionsAndVariantsCreated", "params": [ @@ -334,7 +493,7 @@ "doc": null }, "docs": { - "summary": "Triggered when a `serviceOptionsAndVariants` object is created.", + "summary": "Triggered when a `serviceOptionsAndVariants` object is created by cloning from the source object.", "description": [], "examples": [ { @@ -458,54 +617,222 @@ } ], "syntaxName": "wixBookingsCatalog_onServiceOptionsAndVariantsUpdated" - } - ], - "messages": [ + }, { - "name": "bookingsCalendarV2SessionViewAddress", - "members": [ + "name": "onServiceUpdated", + "params": [ { - "name": "addressLine", - "optional": true, + "name": "event", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsServicesV2ServiceServiceUpdated", + "displayName": "ServiceUpdated" } ], - "doc": "Main address line, usually street and number, as free text." - }, + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "onServiceUpdated example", + "body": [ + "", + " export function wixBookingsServices_onServiceUpdated(event) {", + " const eventId = event.metadata.id", + " const entityId = event.entity._id;", + " }", + "", + " " + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ { - "name": "addressLine2", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." - }, + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsServices_onServiceUpdated" + }, + { + "name": "onSessionViewExtended", + "params": [ { - "name": "city", - "optional": true, + "name": "event", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewExtendedEvent", + "displayName": "SessionViewExtendedEvent" } ], - "doc": "City name." - }, + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "Event that occurs when the session view is extended", + "body": [ + "export function wixBookingsCalendar_onSessionViewExtended(event) {", + " const {extendedSessionViewEndDate} = event.data", + " console.log('extendedSessionViewEndDate', extendedSessionViewEndDate)", + "}" + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ { - "name": "country", - "optional": true, + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsCalendar_onSessionViewExtended" + }, + { + "name": "onSessionViewUpdated", + "params": [ + { + "name": "event", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewUpdatedEvent", + "displayName": "SessionViewUpdatedEvent" } ], - "doc": "Country code." - }, - { - "name": "countryFullname", + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "nativeType": "void" + } + ], + "doc": null + }, + "docs": { + "description": [], + "examples": [ + { + "title": "Event that occurs when a session is added, updated or removed from the view", + "body": [ + "export function wixBookingsCalendar_onSessionViewUpdated(event) {", + " const sessionAddedOrUpdated = event.data.sessionAddedOrUpdated", + " if (sessionAddedOrUpdated) {", + " console.log('sessionAddedOrUpdated', sessionAddedOrUpdated)", + " }", + "", + " const sessionRemoved = event.data.sessionRemoved", + " if (sessionRemoved) {", + " console.log('sessionRemoved', sessionRemoved)", + " }", + "}" + ] + } + ] + }, + "isVeloEvent": true, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "wixBookingsCalendar_onSessionViewUpdated" + } + ], + "messages": [ + { + "name": "bookingsCalendarV2SessionViewActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewAddress", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number, as free text." + }, + { + "name": "addressLine2", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + }, + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Country code." + }, + { + "name": "countryFullname", "optional": true, "type": [ { @@ -1106,151 +1433,142 @@ } }, { - "name": "bookingsCalendarV2SessionViewEmpty", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExtendSessionViewRequest", + "name": "bookingsCalendarV2SessionViewDomainEvent", "members": [ { - "name": "futureDurationInDays", + "name": "_id", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The number of days the view lasts into the future.\nMust be greater than the current value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExtendSessionViewResponse", - "members": [ + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, { - "name": "sessionView", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionView", - "displayName": "SessionView" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewActionEvent", + "displayName": "ActionEvent" } ], - "doc": "The updated sessions view." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExternalCalendarInfo", - "members": [ + "doc": "" + }, { - "name": "calendarType", + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewExternalCalendarOverrides", - "members": [ + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, { - "name": "description", + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced description of the external calendar event." + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" }, { - "name": "title", + "name": "entityId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced title of the external calendar event." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewFeedEvent", - "members": [ + "doc": "ID of the entity associated with the event." + }, { - "name": "sessionAddedOrUpdated", + "name": "eventTime", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "nativeType": "Date" } ], - "doc": "Session has been added or updated within the feed window." + "doc": "Event timestamp." }, { - "name": "sessionRemoved", + "name": "originatedFrom", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "nativeType": "string" } ], - "doc": "Session has been removed from the feed." + "doc": "If present, indicates the action that triggered the event." }, { - "name": "windowExtended", + "name": "slug", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", - "displayName": "WindowExtended" + "nativeType": "string" } ], - "doc": "The feed window has been extended." + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" } ], "extra": { "oneOfGroups": [ { - "name": "oneOfFeedEventTypeOneOf", + "name": "oneOfDomainEventBodyOneOf", "members": [ - "sessionAddedOrUpdated", - "sessionRemoved", - "windowExtended", - "windowMoved" + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" ] } ] @@ -1262,40 +1580,51 @@ } }, { - "name": "bookingsCalendarV2SessionViewFeedEventTypeOneOf", + "name": "bookingsCalendarV2SessionViewDomainEventBodyOneOf", "members": [ { - "name": "sessionAddedOrUpdated", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewActionEvent", + "displayName": "ActionEvent" } ], - "doc": "Session has been added or updated within the feed window." + "doc": "" }, { - "name": "sessionRemoved", + "name": "createdEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityCreatedEvent", + "displayName": "EntityCreatedEvent" } ], - "doc": "Session has been removed from the feed." + "doc": "" }, { - "name": "windowExtended", + "name": "deletedEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", - "displayName": "WindowExtended" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityDeletedEvent", + "displayName": "EntityDeletedEvent" } ], - "doc": "The feed window has been extended." + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" } ], "docs": { @@ -1305,21 +1634,19 @@ } }, { - "name": "bookingsCalendarV2SessionViewFeedReplayEvent", + "name": "bookingsCalendarV2SessionViewEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewEntityCreatedEvent", "members": [ { - "name": "replayCompleted", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", - "displayName": "ReplayCompleted" - } - ], - "doc": "Sessions replay completed." - }, - { - "name": "replayId", + "name": "entityAsJson", "optional": true, "type": [ { @@ -1327,30 +1654,8 @@ } ], "doc": "" - }, - { - "name": "sessionAdded", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", - "displayName": "SessionAdded" - } - ], - "doc": "Session has been added within the feed window." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfFeedReplayEventTypeOneOf", - "members": [ - "replayCompleted", - "sessionAdded" - ] - } - ] - }, "docs": { "description": [ "" @@ -1358,29 +1663,17 @@ } }, { - "name": "bookingsCalendarV2SessionViewFeedReplayEventTypeOneOf", + "name": "bookingsCalendarV2SessionViewEntityDeletedEvent", "members": [ { - "name": "replayCompleted", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", - "displayName": "ReplayCompleted" - } - ], - "doc": "Sessions replay completed." - }, - { - "name": "sessionAdded", + "name": "deletedEntityAsJson", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", - "displayName": "SessionAdded" + "nativeType": "string" } ], - "doc": "Session has been added within the feed window." + "doc": "Entity that was deleted" } ], "docs": { @@ -1390,17 +1683,17 @@ } }, { - "name": "bookingsCalendarV2SessionViewFrequency", + "name": "bookingsCalendarV2SessionViewEntityUpdatedEvent", "members": [ { - "name": "repetition", + "name": "currentEntityAsJson", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -1410,8 +1703,19 @@ } }, { - "name": "bookingsCalendarV2SessionViewGetSessionViewRequest", - "members": [], + "name": "bookingsCalendarV2SessionViewExtendSessionViewRequest", + "members": [ + { + "name": "futureDurationInDays", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of days the view lasts into the future.\nMust be greater than the current value." + } + ], "docs": { "description": [ "" @@ -1419,7 +1723,7 @@ } }, { - "name": "bookingsCalendarV2SessionViewGetSessionViewResponse", + "name": "bookingsCalendarV2SessionViewExtendSessionViewResponse", "members": [ { "name": "sessionView", @@ -1430,7 +1734,7 @@ "displayName": "SessionView" } ], - "doc": "The sessions view." + "doc": "The updated sessions view." } ], "docs": { @@ -1440,47 +1744,47 @@ } }, { - "name": "bookingsCalendarV2SessionViewInterval", + "name": "bookingsCalendarV2SessionViewExternalCalendarInfo", "members": [ { - "name": "daysOfWeek", + "name": "calendarType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." - }, - { - "name": "duration", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." - }, + "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewExternalCalendarOverrides", + "members": [ { - "name": "hourOfDay", + "name": "description", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." + "doc": "Synced description of the external calendar event." }, { - "name": "minuteOfHour", + "name": "title", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." + "doc": "Synced title of the external calendar event." } ], "docs": { @@ -1490,57 +1794,55 @@ } }, { - "name": "bookingsCalendarV2SessionViewIntervalSplit", + "name": "bookingsCalendarV2SessionViewFeedEvent", "members": [ { - "name": "intervals", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", - "displayName": "RecurringInterval" - } - ] - } - } - ], - "doc": "" - }, - { - "name": "newScheduleVersion", + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "" + "doc": "Session has been added or updated within the feed window." }, { - "name": "oldScheduleVersion", + "name": "sessionRemoved", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" } ], - "doc": "" + "doc": "Session has been removed from the feed." }, { - "name": "scheduleId", + "name": "windowExtended", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", + "displayName": "WindowExtended" } ], - "doc": "" + "doc": "The feed window has been extended." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFeedEventTypeOneOf", + "members": [ + "sessionAddedOrUpdated", + "sessionRemoved", + "windowExtended", + "windowMoved" + ] + } + ] + }, "docs": { "description": [ "" @@ -1548,38 +1850,40 @@ } }, { - "name": "bookingsCalendarV2SessionViewLinkedSchedule", + "name": "bookingsCalendarV2SessionViewFeedEventTypeOneOf", "members": [ { - "name": "scheduleId", + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "Schedule ID." + "doc": "Session has been added or updated within the feed window." }, { - "name": "scheduleOwnerId", - "readOnly": true, + "name": "sessionRemoved", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" } ], - "doc": "Owner ID, of the linked schedule." + "doc": "Session has been removed from the feed." }, { - "name": "transparency", + "name": "windowExtended", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindowExtended", + "displayName": "WindowExtended" } ], - "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + "doc": "The feed window has been extended." } ], "docs": { @@ -1589,59 +1893,52 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocalDateTime", + "name": "bookingsCalendarV2SessionViewFeedReplayEvent", "members": [ { - "name": "dayOfMonth", + "name": "replayCompleted", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", + "displayName": "ReplayCompleted" } ], - "doc": "Day of the month, from 1-31." + "doc": "Sessions replay completed." }, { - "name": "hourOfDay", + "name": "replayId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Hour of the day in 24-hour format, from 0-23." + "doc": "" }, { - "name": "minutesOfHour", + "name": "sessionAdded", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", + "displayName": "SessionAdded" } ], - "doc": "Minute, from 0-59." - }, - { - "name": "monthOfYear", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Month number, from 1-12." - }, - { - "name": "year", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Year. 4-digit format." + "doc": "Session has been added within the feed window." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfFeedReplayEventTypeOneOf", + "members": [ + "replayCompleted", + "sessionAdded" + ] + } + ] + }, "docs": { "description": [ "" @@ -1649,38 +1946,49 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocation", + "name": "bookingsCalendarV2SessionViewFeedReplayEventTypeOneOf", "members": [ { - "name": "address", + "name": "replayCompleted", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReplayCompleted", + "displayName": "ReplayCompleted" } ], - "doc": "Free text address used when locationType is `OWNER_CUSTOM`." + "doc": "Sessions replay completed." }, { - "name": "customAddress", + "name": "sessionAdded", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAddress", - "displayName": "Address" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAdded", + "displayName": "SessionAdded" } ], - "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." - }, + "doc": "Session has been added within the feed window." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewFrequency", + "members": [ { - "name": "locationType", + "name": "repetition", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." } ], "docs": { @@ -1690,58 +1998,77 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocationsAddress", + "name": "bookingsCalendarV2SessionViewGetSessionViewRequest", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewGetSessionViewResponse", "members": [ { - "name": "city", + "name": "sessionView", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionView", + "displayName": "SessionView" } ], - "doc": "City name." - }, + "doc": "The sessions view." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewInterval", + "members": [ { - "name": "country", + "name": "daysOfWeek", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." }, { - "name": "postalCode", + "name": "duration", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Postal or zip code." + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation." }, { - "name": "streetAddress", + "name": "hourOfDay", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsStreetAddress", - "displayName": "LocationsStreetAddress" + "nativeType": "number" } ], - "doc": "Street address. Includes street name, number, and apartment number in separate fields." + "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." }, { - "name": "subdivision", + "name": "minuteOfHour", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." } ], "docs": { @@ -1751,260 +2078,279 @@ } }, { - "name": "bookingsCalendarV2SessionViewLocationsAddressLocation", + "name": "bookingsCalendarV2SessionViewIntervalSplit", "members": [ { - "name": "latitude", + "name": "intervals", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "newScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Latitude of the location. Must be between -90 and 90." + "doc": "" }, { - "name": "longitude", + "name": "oldScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Longitude of the location. Must be between -180 and 180." + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { "description": [ - "Address Geolocation" + "" ] } }, { - "name": "bookingsCalendarV2SessionViewLocationsLocation", + "name": "bookingsCalendarV2SessionViewLinkedSchedule", "members": [ { - "name": "_id", - "readOnly": true, + "name": "scheduleId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location ID." - }, - { - "name": "address", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddress", - "displayName": "LocationsAddress" - } - ], - "doc": "Address." + "doc": "Schedule ID." }, { - "name": "archived", + "name": "scheduleOwnerId", "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." + "doc": "Owner ID, of the linked schedule." }, { - "name": "businessSchedule", + "name": "transparency", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBusinessSchedule", - "displayName": "BusinessSchedule" + "nativeType": "string" } ], - "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" - }, + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocalDateTime", + "members": [ { - "name": "default", - "readOnly": true, + "name": "dayOfMonth", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + "doc": "Day of the month, from 1-31." }, { - "name": "description", + "name": "hourOfDay", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location description." + "doc": "Hour of the day in 24-hour format, from 0-23." }, { - "name": "email", + "name": "minutesOfHour", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Email address." + "doc": "Minute, from 0-59." }, { - "name": "fax", + "name": "monthOfYear", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Fax number." + "doc": "Month number, from 1-12." }, { - "name": "locationType", + "name": "year", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Location type. **Note:** Currently not supported." - }, + "doc": "Year. 4-digit format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocation", + "members": [ { - "name": "name", + "name": "address", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location name." + "doc": "Free text address used when locationType is `OWNER_CUSTOM`." }, { - "name": "phone", + "name": "customAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAddress", + "displayName": "Address" } ], - "doc": "Phone number." + "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." }, { - "name": "revision", + "name": "locationType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." - }, - { - "name": "status", - "optional": true, + "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewLocationsAddress", + "members": [ + { + "name": "city", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." + "doc": "City name." }, { - "name": "timeZone", + "name": "country", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Timezone in `America/New_York` format." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewLocationsStreetAddress", - "members": [ + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, { - "name": "apt", + "name": "formatted", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Apartment number." + "doc": "Full address of the location." }, { - "name": "name", + "name": "location", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddressLocation", + "displayName": "LocationsAddressLocation" } ], - "doc": "Street name." + "doc": "Geographic coordinates of location." }, { - "name": "number", + "name": "postalCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Street number." - } - ], - "docs": { - "description": [ - "Street address. Includes street name, number, and apartment number in separate fields." - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewMigrationData", - "members": [ + "doc": "Postal or zip code." + }, { - "name": "businessId", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsStreetAddress", + "displayName": "LocationsStreetAddress" } ], - "doc": "" + "doc": "Street address. Includes street name, number, and apartment number in separate fields." }, { - "name": "staffs", + "name": "subdivision", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewStaffData", - "displayName": "StaffData" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." } ], "docs": { @@ -2014,99 +2360,84 @@ } }, { - "name": "bookingsCalendarV2SessionViewMigrationEvent", + "name": "bookingsCalendarV2SessionViewLocationsAddressLocation", "members": [ { - "name": "migrationData", + "name": "latitude", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationData", - "displayName": "MigrationData" + "nativeType": "number" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewMultipleSessionsCreated", - "members": [ + "doc": "Latitude of the location. Must be between -90 and 90." + }, { - "name": "schedulesWithSessions", + "name": "longitude", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleWithSessions", - "displayName": "ScheduleWithSessions" - } - ] - } + "nativeType": "number" } ], - "doc": "" + "doc": "Longitude of the location. Must be between -180 and 180." } ], "docs": { "description": [ - "" + "Address Geolocation" ] } }, { - "name": "bookingsCalendarV2SessionViewParticipant", + "name": "bookingsCalendarV2SessionViewLocationsLocation", "members": [ { "name": "_id", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant ID. Currently represents the booking.id." + "doc": "Location ID." }, { - "name": "approvalStatus", + "name": "address", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocationsAddress", + "displayName": "LocationsAddress" } ], - "doc": "Approval status for the participant.\n\n" + "doc": "Address." }, { - "name": "contactId", + "name": "archived", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Contact ID." + "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." }, { - "name": "email", + "name": "businessSchedule", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBusinessSchedule", + "displayName": "BusinessSchedule" } ], - "doc": "Participant's email address." + "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" }, { - "name": "inherited", + "name": "default", "readOnly": true, "optional": true, "type": [ @@ -2114,148 +2445,114 @@ "nativeType": "boolean" } ], - "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." }, { - "name": "name", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant's name." + "doc": "Location description." }, { - "name": "partySize", + "name": "email", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + "doc": "Email address." }, { - "name": "phone", + "name": "fax", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant's phone number." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewParticipantNotification", - "members": [ + "doc": "Fax number." + }, { - "name": "message", + "name": "locationType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Custom message to send to the participants about the changes to the booking." + "doc": "Location type.\n\n**Note:** Currently not supported.\n" }, { - "name": "notifyParticipants", + "name": "locationTypes", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewPrice", - "members": [ + "doc": "Location types." + }, { - "name": "amount", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Required payment amount." + "doc": "Location name." }, { - "name": "currency", + "name": "phone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Currency in which the amount is quoted." + "doc": "Phone number." }, { - "name": "downPayAmount", + "name": "revision", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Amount of a down payment or deposit as part of the transaction." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewRate", - "members": [ + "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." + }, { - "name": "labeledPriceOptions", + "name": "status", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewPrice", - "displayName": "Price" - } - ] - } + "nativeType": "string" } ], - "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." }, { - "name": "priceText", + "name": "timeZone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Timezone in `America/New_York` format." } ], "docs": { @@ -2265,121 +2562,60 @@ } }, { - "name": "bookingsCalendarV2SessionViewRecurringInterval", + "name": "bookingsCalendarV2SessionViewLocationsStreetAddress", "members": [ { - "name": "_id", - "readOnly": true, + "name": "apt", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The recurring interval identifier." + "doc": "Apartment number." }, { - "name": "affectedSchedules", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", - "displayName": "LinkedSchedule" - } - ] - } - } - ], - "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." - }, - { - "name": "end", - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." - }, - { - "name": "frequency", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewFrequency", - "displayName": "Frequency" - } - ], - "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." - }, - { - "name": "interval", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewInterval", - "displayName": "Interval" - } - ], - "doc": "The interval rules. The day, hour and minutes the interval is recurring." - }, - { - "name": "intervalType", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The type of recurring interval.\n" + "doc": "Street name." }, { - "name": "start", + "name": "number", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The start time of the recurring interval. Required." + "doc": "Street number." } ], "docs": { "description": [ - "" + "Street address. Includes street name, number, and apartment number in separate fields." ] } }, { - "name": "bookingsCalendarV2SessionViewRecurringSessionSplit", + "name": "bookingsCalendarV2SessionViewMigrationData", "members": [ { - "name": "newScheduleVersion", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "" - }, - { - "name": "oldScheduleVersion", + "name": "businessId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], "doc": "" }, { - "name": "recurringSessions", + "name": "staffs", "optional": true, "type": [ { @@ -2387,21 +2623,32 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewStaffData", + "displayName": "StaffData" } ] } } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewMigrationEvent", + "members": [ { - "name": "scheduleId", + "name": "migrationData", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationData", + "displayName": "MigrationData" } ], "doc": "" @@ -2414,28 +2661,10 @@ } }, { - "name": "bookingsCalendarV2SessionViewRecurringSessionsUpdated", + "name": "bookingsCalendarV2SessionViewMultipleSessionsCreated", "members": [ { - "name": "newRecurringSessions", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" - } - ] - } - } - ], - "doc": "New schedule's recurring session list." - }, - { - "name": "oldRecurringSessions", + "name": "schedulesWithSessions", "optional": true, "type": [ { @@ -2443,14 +2672,14 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleWithSessions", + "displayName": "ScheduleWithSessions" } ] } } ], - "doc": "Old schedule's recurring session list." + "doc": "" } ], "docs": { @@ -2460,106 +2689,88 @@ } }, { - "name": "bookingsCalendarV2SessionViewReplayCompleted", + "name": "bookingsCalendarV2SessionViewParticipant", "members": [ { - "name": "totalSessions", + "name": "_id", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The (minimum) number of sessions that were replayed." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReplayRequest", - "members": [ + "doc": "Participant ID. Currently represents the booking.id." + }, { - "name": "affectedScheduleId", + "name": "approvalStatus", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Filter by either `session.schedule_id` or `session.affectedSchedules[*].scheduleId`. Optional." + "doc": "Approval status for the participant.\n\n" }, { - "name": "from", + "name": "contactId", + "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The date to replay sessions from. Required." + "doc": "Contact ID." }, { - "name": "replayId", + "name": "email", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The replay id. Required." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReplayResponse", - "members": [ + "doc": "Participant's email address." + }, { - "name": "window", + "name": "inherited", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindow", - "displayName": "Window" + "nativeType": "boolean" } ], - "doc": "The feed window." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewReschedule", - "members": [ + "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + }, { - "name": "executeAt", + "name": "name", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "" + "doc": "Participant's name." }, { - "name": "payload", + "name": "partySize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + }, + { + "name": "phone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Participant's phone number." } ], "docs": { @@ -2569,133 +2780,132 @@ } }, { - "name": "bookingsCalendarV2SessionViewSchedule", + "name": "bookingsCalendarV2SessionViewParticipantNotification", "members": [ { - "name": "_id", + "name": "message", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Schedule ID." + "doc": "Custom message to send to the participants about the changes to the booking." }, { - "name": "availability", + "name": "notifyParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailability", - "displayName": "Availability" + "nativeType": "boolean" } ], - "doc": "Deprecated and will be removed soon." - }, + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewPrice", + "members": [ { - "name": "calendarConference", + "name": "amount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", - "displayName": "CalendarConference" + "nativeType": "string" } ], - "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + "doc": "Required payment amount." }, { - "name": "capacity", + "name": "currency", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." + "doc": "Currency in which the amount is quoted." }, { - "name": "conferenceProvider", + "name": "downPayAmount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewConferenceProvider", - "displayName": "ConferenceProvider" + "nativeType": "string" } ], - "doc": "Deprecated and will be removed soon." - }, - { - "name": "created", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Schedule creation date." - }, - { - "name": "externalCalendarOverrides", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", - "displayName": "ExternalCalendarOverrides" - } - ], - "doc": "Deprecated and will be removed soon." - }, + "doc": "Amount of a down payment or deposit as part of the transaction." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRate", + "members": [ { - "name": "inheritedFields", - "readOnly": true, + "name": "labeledPriceOptions", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { "nativeType": "string" + }, + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewPrice", + "displayName": "Price" } ] } } ], - "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." + "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." }, { - "name": "intervals", + "name": "priceText", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", - "displayName": "RecurringInterval" - } - ] - } + "nativeType": "string" } ], - "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." - }, + "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRecurringInterval", + "members": [ { - "name": "location", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", - "displayName": "Location" + "nativeType": "string" } ], - "doc": "Default location for the schedule's sessions." + "doc": "The recurring interval identifier." }, { - "name": "participants", - "readOnly": true, + "name": "affectedSchedules", "optional": true, "type": [ { @@ -2703,117 +2913,124 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", - "displayName": "Participant" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", + "displayName": "LinkedSchedule" } ] } } ], - "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." }, { - "name": "rate", + "name": "end", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", - "displayName": "Rate" + "nativeType": "Date" } ], - "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." }, { - "name": "scheduleOwnerId", + "name": "frequency", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewFrequency", + "displayName": "Frequency" } ], - "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." + "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." }, { - "name": "status", - "readOnly": true, + "name": "interval", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewInterval", + "displayName": "Interval" } ], - "doc": "Schedule status." + "doc": "The interval rules. The day, hour and minutes the interval is recurring." }, { - "name": "tags", + "name": "intervalType", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Tags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + "doc": "The type of recurring interval.\n" }, { - "name": "timeZone", - "readOnly": true, + "name": "start", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." - }, + "doc": "The start time of the recurring interval. Required." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewRecurringSessionSplit", + "members": [ { - "name": "title", + "name": "newScheduleVersion", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." + "doc": "" }, { - "name": "totalNumberOfParticipants", - "readOnly": true, + "name": "oldScheduleVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." + "doc": "" }, { - "name": "updated", - "readOnly": true, + "name": "recurringSessions", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "Schedule last update date." + "doc": "" }, { - "name": "version", - "readOnly": true, + "name": "scheduleId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Schedule version number, updated each time the schedule is updated." + "doc": "" } ], "docs": { @@ -2823,40 +3040,43 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleCancelled", + "name": "bookingsCalendarV2SessionViewRecurringSessionsUpdated", "members": [ { - "name": "oldSchedule", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" - } - ], - "doc": "" - }, - { - "name": "participantNotification", + "name": "newRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "New schedule's recurring session list." }, { - "name": "schedule", + "name": "oldRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "" + "doc": "Old schedule's recurring session list." } ], "docs": { @@ -2866,18 +3086,17 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleCreated", + "name": "bookingsCalendarV2SessionViewReplayCompleted", "members": [ { - "name": "schedule", + "name": "totalSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "nativeType": "number" } ], - "doc": "" + "doc": "The (minimum) number of sessions that were replayed." } ], "docs": { @@ -2887,343 +3106,340 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleNotification", + "name": "bookingsCalendarV2SessionViewReplayRequest", "members": [ { - "name": "availabilityPolicyUpdated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", - "displayName": "AvailabilityPolicyUpdated" - } - ], - "doc": "" - }, - { - "name": "instanceId", + "name": "affectedScheduleId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, - { - "name": "intervalSplit", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", - "displayName": "IntervalSplit" - } - ], - "doc": "" + "doc": "Filter by either `session.schedule_id` or `session.affectedSchedules[*].scheduleId`. Optional." }, { - "name": "migrationEvent", - "optional": true, + "name": "from", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationEvent", - "displayName": "MigrationEvent" + "nativeType": "Date" } ], - "doc": "supported only for schedule migration apis." + "doc": "The date to replay sessions from. Required." }, { - "name": "multipleSessionsCreated", - "optional": true, + "name": "replayId", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" + "nativeType": "string" } ], - "doc": "supported only for schedule migration apis." - }, + "doc": "The replay id. Required." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewReplayResponse", + "members": [ { - "name": "notifyParticipants", + "name": "window", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewWindow", + "displayName": "Window" } ], - "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" - }, + "doc": "The feed window." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewReschedule", + "members": [ { - "name": "preserveFutureSessionsWithParticipants", + "name": "executeAt", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Date" } ], "doc": "" }, { - "name": "recurringSessionSplit", + "name": "payload", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", - "displayName": "RecurringSessionSplit" + "nativeType": "string" } ], "doc": "" - }, + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSchedule", + "members": [ { - "name": "scheduleCancelled", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", - "displayName": "ScheduleCancelled" + "nativeType": "string" } ], - "doc": "" + "doc": "Schedule ID." }, { - "name": "scheduleCreated", + "name": "availability", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", - "displayName": "ScheduleCreated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailability", + "displayName": "Availability" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "scheduleUnassignedFromUser", + "name": "calendarConference", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", - "displayName": "ScheduleUnassignedFromUser" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", + "displayName": "CalendarConference" } ], - "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { - "name": "scheduleUpdated", + "name": "capacity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", - "displayName": "ScheduleUpdated" + "nativeType": "number" } ], - "doc": "" + "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." }, { - "name": "sessionCancelled", + "name": "conferenceProvider", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", - "displayName": "SessionCancelled" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewConferenceProvider", + "displayName": "ConferenceProvider" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "sessionCreated", + "name": "created", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", - "displayName": "SessionCreated" + "nativeType": "Date" } ], - "doc": "" + "doc": "Schedule creation date." }, { - "name": "sessionUpdated", + "name": "externalCalendarOverrides", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", - "displayName": "SessionUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "siteProperties", + "name": "inheritedFields", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", - "displayName": "SitePropertiesOnScheduleCreation" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "site properties. Optional. Given in create schedule notification." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfScheduleNotificationEventOneOf", - "members": [ - "availabilityPolicyUpdated", - "intervalSplit", - "migrationEvent", - "multipleSessionsCreated", - "recurringSessionSplit", - "scheduleCancelled", - "scheduleCreated", - "scheduleUnassignedFromUser", - "scheduleUpdated", - "sessionCancelled", - "sessionCreated", - "sessionUpdated" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewScheduleNotificationEventOneOf", - "members": [ + "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." + }, { - "name": "availabilityPolicyUpdated", + "name": "intervals", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", - "displayName": "AvailabilityPolicyUpdated" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } } ], - "doc": "" + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." }, { - "name": "intervalSplit", + "name": "location", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", - "displayName": "IntervalSplit" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", + "displayName": "Location" } ], - "doc": "" + "doc": "Default location for the schedule's sessions." }, { - "name": "migrationEvent", + "name": "participants", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMigrationEvent", - "displayName": "MigrationEvent" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", + "displayName": "Participant" + } + ] + } } ], - "doc": "supported only for schedule migration apis." + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { - "name": "multipleSessionsCreated", + "name": "rate", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewMultipleSessionsCreated", - "displayName": "MultipleSessionsCreated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", + "displayName": "Rate" } ], - "doc": "supported only for schedule migration apis." + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { - "name": "recurringSessionSplit", + "name": "scheduleOwnerId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", - "displayName": "RecurringSessionSplit" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." }, { - "name": "scheduleCancelled", + "name": "status", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", - "displayName": "ScheduleCancelled" + "nativeType": "string" } ], - "doc": "" + "doc": "Schedule status." }, { - "name": "scheduleCreated", + "name": "tags", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", - "displayName": "ScheduleCreated" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "" + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." }, { - "name": "scheduleUnassignedFromUser", + "name": "timeZone", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", - "displayName": "ScheduleUnassignedFromUser" + "nativeType": "string" } ], - "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." }, { - "name": "scheduleUpdated", + "name": "title", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", - "displayName": "ScheduleUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." }, { - "name": "sessionCancelled", + "name": "totalNumberOfParticipants", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", - "displayName": "SessionCancelled" + "nativeType": "number" } ], - "doc": "" + "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." }, { - "name": "sessionCreated", + "name": "updated", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", - "displayName": "SessionCreated" + "nativeType": "Date" } ], - "doc": "" + "doc": "Schedule last update date." }, { - "name": "sessionUpdated", + "name": "version", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", - "displayName": "SessionUpdated" + "nativeType": "number" } ], - "doc": "" + "doc": "Schedule version number, updated each time the schedule is updated." } ], "docs": { @@ -3233,10 +3449,10 @@ } }, { - "name": "bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "name": "bookingsCalendarV2SessionViewScheduleCancelled", "members": [ { - "name": "schedule", + "name": "oldSchedule", "optional": true, "type": [ { @@ -3244,30 +3460,42 @@ "displayName": "Schedule" } ], - "doc": "The schedule that was unassigned from the user." + "doc": "" }, { - "name": "userId", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "The Wix user id." + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" + } + ], + "doc": "" } ], "docs": { "description": [ - "Schedule unassigned from user." + "" ] } }, { - "name": "bookingsCalendarV2SessionViewScheduleUpdated", + "name": "bookingsCalendarV2SessionViewScheduleCreated", "members": [ { - "name": "newSchedule", + "name": "schedule", "optional": true, "type": [ { @@ -3275,416 +3503,404 @@ "displayName": "Schedule" } ], - "doc": "The new schedule after the update." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleNotification", + "members": [ { - "name": "oldSchedule", + "name": "availabilityPolicyUpdated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" } ], - "doc": "The old schedule before the update." + "doc": "" }, { - "name": "participantNotification", + "name": "instanceId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "" }, { - "name": "recurringSessions", + "name": "intervalSplit", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionsUpdated", - "displayName": "RecurringSessionsUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", + "displayName": "IntervalSplit" } ], - "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." + "doc": "" }, { - "name": "triggeredByAnonymizeRequest", + "name": "notifyParticipants", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewScheduleWithSessions", - "members": [ + "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" + }, { - "name": "schedule", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", - "displayName": "Schedule" + "nativeType": "boolean" } ], "doc": "" }, { - "name": "sessions", + "name": "recurringSessionSplit", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", + "displayName": "RecurringSessionSplit" } ], "doc": "" }, { - "name": "siteProperties", + "name": "scheduleCancelled", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", - "displayName": "SitePropertiesOnScheduleCreation" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", + "displayName": "ScheduleCancelled" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSession", - "members": [ + }, { - "name": "_id", - "readOnly": true, + "name": "scheduleCreated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", + "displayName": "ScheduleCreated" } ], - "doc": "Session ID." + "doc": "" }, { - "name": "affectedSchedules", + "name": "scheduleUnassignedFromUser", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", - "displayName": "LinkedSchedule" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" } ], - "doc": "An object specifying a list of schedules and the way each schedule's availability is affected by the session. For example, the schedule of an instructor is affected by sessions of the class that they instruct.\nThe array is inherited from the schedule and can be overridden even if the session is a recurring session." + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." }, { - "name": "calendarConference", + "name": "scheduleUpdated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", - "displayName": "CalendarConference" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", + "displayName": "ScheduleUpdated" } ], - "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + "doc": "" }, { - "name": "capacity", + "name": "sessionCancelled", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", + "displayName": "SessionCancelled" } ], - "doc": "Maximum number of participants that can be added to the session. Defaults to the schedule capacity.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "" }, { - "name": "end", + "name": "sessionCreated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarDateTime", - "displayName": "CalendarDateTime" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", + "displayName": "SessionCreated" } ], - "doc": "An object specifying the end date and time of the session. The `end` time must be after the `start` time and be same type as `start`.\nIf the session is a recurring session, `end` must contain a `localDateTime`." + "doc": "" }, { - "name": "externalCalendarOverrides", + "name": "sessionUpdated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", - "displayName": "ExternalCalendarOverrides" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", + "displayName": "SessionUpdated" } ], - "doc": "Deprecated and will be removed soon." + "doc": "" }, { - "name": "inheritedFields", - "readOnly": true, + "name": "siteProperties", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" } ], - "doc": "A list of properties for which values were inherited from the schedule.\nThis does not include participants that were inherited from the schedule." - }, + "doc": "site properties. Optional. Given in create schedule notification." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfScheduleNotificationEventOneOf", + "members": [ + "availabilityPolicyUpdated", + "intervalSplit", + "migrationEvent", + "multipleSessionsCreated", + "recurringSessionSplit", + "scheduleCancelled", + "scheduleCreated", + "scheduleUnassignedFromUser", + "scheduleUpdated", + "sessionCancelled", + "sessionCreated", + "sessionUpdated" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleNotificationEventOneOf", + "members": [ { - "name": "instanceOfRecurrence", - "readOnly": true, + "name": "availabilityPolicyUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" } ], - "doc": "A string representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern.\nEmpty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty." + "doc": "" }, { - "name": "location", + "name": "intervalSplit", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", - "displayName": "Location" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewIntervalSplit", + "displayName": "IntervalSplit" } ], - "doc": "An object describing the location where the session takes place.\nDefaults to the schedule location.\nFor single sessions, `session.location.businessLocation` can only be provided for locations that are defined in the schedule using `schedule.location` or `schedule.availability.locations`." + "doc": "" }, { - "name": "notes", + "name": "recurringSessionSplit", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionSplit", + "displayName": "RecurringSessionSplit" } ], - "doc": "Additional information about the session.\nNotes are not supported for recurring sessions." + "doc": "" }, { - "name": "originalStart", + "name": "scheduleCancelled", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCancelled", + "displayName": "ScheduleCancelled" } ], - "doc": "Original start date and time of the session in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format." + "doc": "" }, { - "name": "participants", + "name": "scheduleCreated", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", - "displayName": "Participant" - } - ] - } - } - ], - "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." - }, - { - "name": "rate", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", - "displayName": "Rate" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleCreated", + "displayName": "ScheduleCreated" } ], - "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + "doc": "" }, { - "name": "recurrence", + "name": "scheduleUnassignedFromUser", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" } ], - "doc": "A string representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html).\nIf the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will be contain the recurrence rule and this property will be empty.\nThe RRULE defines a rule for repeating a session.\nSupported parameters are:\n\n|Keyword|Description|Supported values|\n|--|--|---|\n|`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`|\n|`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.|\n|`UNTIL`|The UTC end date and time of the recurrence. Optional.|\n|`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`|\n\n\nFor example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM:\n`\"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z\"`\n\n\n" + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." }, { - "name": "recurringIntervalId", - "readOnly": true, + "name": "scheduleUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewScheduleUpdated", + "displayName": "ScheduleUpdated" } ], - "doc": "Recurring interval ID. Defined when a session will be a recurring session. read-only. Optional.\nFor exmaple, when creating a class service with recurring sessions, you add a recurrence rule to create recurring sessions.\nThis field is omitted for single sessions or instances of recurring sessions.\nSpecified when the session was originally generated from a schedule recurring interval.\nDeprecated. Use `recurringSessionId`." + "doc": "" }, { - "name": "recurringSessionId", - "readOnly": true, + "name": "sessionCancelled", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCancelled", + "displayName": "SessionCancelled" } ], - "doc": "The ID of the recurring session if this session is an instance of a recurrence. Use this ID to update the recurrence and all of the instances." + "doc": "" }, { - "name": "scheduleId", + "name": "sessionCreated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionCreated", + "displayName": "SessionCreated" } ], - "doc": "ID of the schedule that the session belongs to." + "doc": "" }, { - "name": "scheduleOwnerId", - "readOnly": true, + "name": "sessionUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionUpdated", + "displayName": "SessionUpdated" } ], - "doc": "ID of the resource or service that the session's schedule belongs to." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleUnassignedFromUser", + "members": [ { - "name": "start", + "name": "schedule", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarDateTime", - "displayName": "CalendarDateTime" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" } ], - "doc": "An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`." + "doc": "The schedule that was unassigned from the user." }, { - "name": "status", - "readOnly": true, + "name": "userId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Session status.\n" - }, - { - "name": "tags", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Tags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." - }, + "doc": "The Wix user id." + } + ], + "docs": { + "description": [ + "Schedule unassigned from user." + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewScheduleUpdated", + "members": [ { - "name": "timeReservedAfter", + "name": "newSchedule", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" } ], - "doc": "Time reserved after the session end time, derived from the schedule availability constraints and the time between slots. Read-only.\nIf the session is a recurring session, this field must be empty." + "doc": "The new schedule after the update." }, { - "name": "title", + "name": "oldSchedule", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" } ], - "doc": "Session title.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "The old schedule before the update." }, { - "name": "totalNumberOfParticipants", - "readOnly": true, + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "The number of participants booked for the session. Read-only.\nCalculated as the sum of the party sizes." + "doc": "Whether to notify participants about the change and an optional custom message" }, { - "name": "type", + "name": "recurringSessions", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRecurringSessionsUpdated", + "displayName": "RecurringSessionsUpdated" } ], - "doc": "Session type.\n" + "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." }, { - "name": "version", - "readOnly": true, + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionVersion", - "displayName": "SessionVersion" + "nativeType": "boolean" } ], - "doc": "The session version.\nComposed by the schedule, session and participants versions." + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" } ], "docs": { @@ -3694,50 +3910,47 @@ } }, { - "name": "bookingsCalendarV2SessionViewSessionAdded", + "name": "bookingsCalendarV2SessionViewScheduleWithSessions", "members": [ { - "name": "session", + "name": "schedule", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSchedule", + "displayName": "Schedule" } ], - "doc": "The session which was added within the feed window." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "members": [ + "doc": "" + }, { - "name": "previousSession", + "name": "sessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" + } + ] + } } ], - "doc": "Optionally, the previous session." + "doc": "" }, { - "name": "session", + "name": "siteProperties", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" } ], - "doc": "The session which was added or updated within the view." + "doc": "" } ], "docs": { @@ -3747,471 +3960,366 @@ } }, { - "name": "bookingsCalendarV2SessionViewSessionCancelled", + "name": "bookingsCalendarV2SessionViewSession", "members": [ { - "name": "participantNotification", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "Session ID." }, { - "name": "session", + "name": "affectedSchedules", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionCreated", - "members": [ + "doc": "An object specifying a list of schedules and the way each schedule's availability is affected by the session. For example, the schedule of an instructor is affected by sessions of the class that they instruct.\nThe array is inherited from the schedule and can be overridden even if the session is a recurring session." + }, { - "name": "session", + "name": "calendarConference", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarConference", + "displayName": "CalendarConference" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionRemoved", - "members": [ + "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + }, { - "name": "previousSession", + "name": "capacity", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "nativeType": "number" } ], - "doc": "Optionally, the previous session." + "doc": "Maximum number of participants that can be added to the session. Defaults to the schedule capacity.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { - "name": "session", + "name": "end", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarDateTime", + "displayName": "CalendarDateTime" } ], - "doc": "The updated session which was removed from the view." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionUpdated", - "members": [ + "doc": "An object specifying the end date and time of the session. The `end` time must be after the `start` time and be same type as `start`.\nIf the session is a recurring session, `end` must contain a `localDateTime`." + }, { - "name": "newSession", + "name": "externalCalendarOverrides", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" } ], - "doc": "" + "doc": "__Deprecated.__" }, { - "name": "oldSession", + "name": "inheritedFields", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", - "displayName": "Session" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "" + "doc": "A list of properties for which values were inherited from the schedule.\nThis does not include participants that were inherited from the schedule." }, { - "name": "participantNotification", + "name": "instanceOfRecurrence", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", - "displayName": "ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "A string representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern.\nEmpty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty." }, { - "name": "triggeredByAnonymizeRequest", + "name": "location", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewLocation", + "displayName": "Location" } ], - "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionVersion", - "members": [ + "doc": "An object describing the location where the session takes place.\nDefaults to the schedule location.\nFor single sessions, `session.location.businessLocation` can only be provided for locations that are defined in the schedule using `schedule.location` or `schedule.availability.locations`." + }, { - "name": "number", + "name": "notes", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Incremental version number, which is updated on each change to the session or on changes affecting the session." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionView", - "members": [ + "doc": "Additional information about the session.\nNotes are not supported for recurring sessions." + }, { - "name": "endDate", - "readOnly": true, + "name": "originalStart", "optional": true, "type": [ { "nativeType": "Date" } ], - "doc": "The view end date." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionViewExtended", - "members": [ + "doc": "Original start date and time of the session in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format." + }, { - "name": "extendedSessionViewEndDate", + "name": "participants", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipant", + "displayName": "Participant" + } + ] + } } ], - "doc": "The extended session view end date." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionViewExtendedEvent", - "members": [ + "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + }, { - "name": "data", + "name": "rate", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewExtended", - "displayName": "SessionViewExtended" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewRate", + "displayName": "Rate" } ], - "doc": "" + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { - "name": "metadata", + "name": "recurrence", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionViewUpdated", - "members": [ + "doc": "A string representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html).\nIf the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will be contain the recurrence rule and this property will be empty.\nThe RRULE defines a rule for repeating a session.\nSupported parameters are:\n\n|Keyword|Description|Supported values|\n|--|--|---|\n|`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`|\n|`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.|\n|`UNTIL`|The UTC end date and time of the recurrence. Optional.|\n|`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`|\n\n\nFor example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM:\n`\"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z\"`\n\n\n" + }, { - "name": "sessionAddedOrUpdated", + "name": "recurringIntervalId", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "nativeType": "string" } ], - "doc": "Session has been added or updated within the view." + "doc": "Recurring interval ID. Defined when a session will be a recurring session. read-only. Optional.\nFor exmaple, when creating a class service with recurring sessions, you add a recurrence rule to create recurring sessions.\nThis field is omitted for single sessions or instances of recurring sessions.\nSpecified when the session was originally generated from a schedule recurring interval.\nDeprecated. Use `recurringSessionId`." }, { - "name": "sessionRemoved", + "name": "recurringSessionId", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "nativeType": "string" } ], - "doc": "Session has been removed from the view." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfSessionViewUpdatedTypeOneOf", - "members": [ - "sessionAddedOrUpdated", - "sessionRemoved" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionViewUpdatedEvent", - "members": [ + "doc": "The ID of the recurring session if this session is an instance of a recurrence. Use this ID to update the recurrence and all of the instances." + }, { - "name": "entity", + "name": "scheduleId", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewUpdated", - "displayName": "SessionViewUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the schedule that the session belongs to." }, { - "name": "metadata", + "name": "scheduleOwnerId", + "readOnly": true, + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBackendEventMetadata", - "displayName": "BackendEventMetadata" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSessionViewUpdatedTypeOneOf", - "members": [ + "doc": "ID of the resource or service that the session's schedule belongs to." + }, { - "name": "sessionAddedOrUpdated", + "name": "start", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", - "displayName": "SessionAddedOrUpdated" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCalendarDateTime", + "displayName": "CalendarDateTime" } ], - "doc": "Session has been added or updated within the view." + "doc": "An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`." }, { - "name": "sessionRemoved", + "name": "status", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", - "displayName": "SessionRemoved" + "nativeType": "string" } ], - "doc": "Session has been removed from the view." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", - "members": [ + "doc": "Session status.\n" + }, { - "name": "timeZone", + "name": "tags", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The global time zone value." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewSpecialHourPeriod", - "members": [ + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, { - "name": "comment", + "name": "timeReservedAfter", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Additional info about the exception. For example, \"We close earlier on New Year's Eve.\"" + "doc": "Time reserved after the session end time, derived from the schedule availability constraints and the time between slots. Read-only.\nIf the session is a recurring session, this field must be empty." }, { - "name": "endDate", + "name": "title", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "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)." + "doc": "Session title.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { - "name": "isClosed", + "name": "totalNumberOfParticipants", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the business is closed (or the service is not available) during the exception.\n\nDefault: `true`.\n" + "doc": "The number of participants booked for the session. Read-only.\nCalculated as the sum of the party sizes." }, { - "name": "startDate", + "name": "type", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "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)." + "doc": "Session type.\n" + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionVersion", + "displayName": "SessionVersion" + } + ], + "doc": "The session version.\nComposed by the schedule, session and participants versions." } ], "docs": { "description": [ - "Exception to the business's regular hours. The business can be open or closed during the exception." + "" ] } }, { - "name": "bookingsCalendarV2SessionViewSplitInterval", + "name": "bookingsCalendarV2SessionViewSessionAdded", "members": [ { - "name": "sameAsDuration", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." - }, - { - "name": "valueInMinutes", + "name": "session", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." + "doc": "The session which was added within the feed window." } ], "docs": { "description": [ - "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." + "" ] } }, { - "name": "bookingsCalendarV2SessionViewStaffData", + "name": "bookingsCalendarV2SessionViewSessionAddedOrUpdated", "members": [ { - "name": "refreshToken", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - }, - { - "name": "resourceId", + "name": "previousSession", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "" + "doc": "Optionally, the previous session." }, { - "name": "syncRequestEmail", + "name": "session", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "" + "doc": "The session which was added or updated within the view." } ], "docs": { @@ -4221,37 +4329,50 @@ } }, { - "name": "bookingsCalendarV2SessionViewStreetAddress", + "name": "bookingsCalendarV2SessionViewSessionCancelled", "members": [ { - "name": "apt", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "Apartment number." + "doc": "Whether to notify participants about the change and an optional custom message" }, { - "name": "name", + "name": "session", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "Street name." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSessionCreated", + "members": [ { - "name": "number", + "name": "session", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "Street number." + "doc": "" } ], "docs": { @@ -4261,27 +4382,29 @@ } }, { - "name": "bookingsCalendarV2SessionViewSubdivision", + "name": "bookingsCalendarV2SessionViewSessionRemoved", "members": [ { - "name": "code", + "name": "previousSession", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + "doc": "Optionally, the previous session." }, { - "name": "name", + "name": "session", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], - "doc": "Subdivision full name." + "doc": "The updated session which was removed from the view." } ], "docs": { @@ -4291,38 +4414,50 @@ } }, { - "name": "bookingsCalendarV2SessionViewTask", + "name": "bookingsCalendarV2SessionViewSessionUpdated", "members": [ { - "name": "executeAt", + "name": "newSession", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], "doc": "" }, { - "name": "key", + "name": "oldSession", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewTaskKey", - "displayName": "TaskKey" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSession", + "displayName": "Session" } ], "doc": "" }, { - "name": "payload", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "" + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" } ], "docs": { @@ -4332,54 +4467,60 @@ } }, { - "name": "bookingsCalendarV2SessionViewTaskAction", + "name": "bookingsCalendarV2SessionViewSessionVersion", "members": [ { - "name": "cancel", + "name": "number", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCancel", - "displayName": "Cancel" + "nativeType": "string" } ], - "doc": "" - }, + "doc": "Incremental version number, which is updated on each change to the session or on changes affecting the session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSessionView", + "members": [ { - "name": "complete", + "name": "endDate", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewComplete", - "displayName": "Complete" + "nativeType": "Date" } ], - "doc": "" - }, + "doc": "The view end date." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSessionViewExtended", + "members": [ { - "name": "reschedule", + "name": "extendedSessionViewEndDate", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReschedule", - "displayName": "Reschedule" + "nativeType": "Date" } ], - "doc": "" + "doc": "The extended session view end date." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfTaskActionActionOneOf", - "members": [ - "cancel", - "complete", - "reschedule" - ] - } - ] - }, "docs": { "description": [ "" @@ -4387,42 +4528,72 @@ } }, { - "name": "bookingsCalendarV2SessionViewTaskActionActionOneOf", + "name": "bookingsCalendarV2SessionViewSessionViewExtendedEvent", "members": [ { - "name": "cancel", - "optional": true, + "name": "data", "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCancel", - "displayName": "Cancel" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewExtended", + "displayName": "SessionViewExtended" } ], - "doc": "" + "doc": "Event data." }, { - "name": "complete", + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSessionViewUpdated", + "members": [ + { + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewComplete", - "displayName": "Complete" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "" + "doc": "Session has been added or updated within the view." }, { - "name": "reschedule", + "name": "sessionRemoved", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReschedule", - "displayName": "Reschedule" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" } ], - "doc": "" + "doc": "Session has been removed from the view." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfSessionViewUpdatedTypeOneOf", + "members": [ + "sessionAddedOrUpdated", + "sessionRemoved" + ] + } + ] + }, "docs": { "description": [ "" @@ -4430,37 +4601,79 @@ } }, { - "name": "bookingsCalendarV2SessionViewTaskKey", + "name": "bookingsCalendarV2SessionViewSessionViewUpdatedEvent", "members": [ { - "name": "appId", - "optional": true, + "name": "entity", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionViewUpdated", + "displayName": "SessionViewUpdated" } ], - "doc": "" + "doc": "Updated session view." }, { - "name": "instanceId", + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSessionViewUpdatedTypeOneOf", + "members": [ + { + "name": "sessionAddedOrUpdated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionAddedOrUpdated", + "displayName": "SessionAddedOrUpdated" } ], - "doc": "" + "doc": "Session has been added or updated within the view." }, { - "name": "subjectId", + "name": "sessionRemoved", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewSessionRemoved", + "displayName": "SessionRemoved" + } + ], + "doc": "Session has been removed from the view." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewSitePropertiesOnScheduleCreation", + "members": [ + { + "name": "timeZone", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "The global time zone value." } ], "docs": { @@ -4470,118 +4683,117 @@ } }, { - "name": "bookingsCalendarV2SessionViewTimePeriod", + "name": "bookingsCalendarV2SessionViewSpecialHourPeriod", "members": [ { - "name": "closeDay", + "name": "comment", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Day of the week the period ends on." + "doc": "Additional info about the exception. For example, \"We close earlier on New Year's Eve.\"" }, { - "name": "closeTime", + "name": "endDate", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "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\nmidnight at the end of the specified day.\n\n__Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n" + "doc": "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)." }, { - "name": "openDay", + "name": "isClosed", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Day of the week the period starts on." + "doc": "Whether the business is closed (or the service is not available) during the exception.\n\nDefault: `true`.\n" }, { - "name": "openTime", + "name": "startDate", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "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\nmidnight at the end of the specified day." + "doc": "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)." } ], "docs": { "description": [ - "Weekly recurring time periods when the business is regularly open or the service is available." + "Exception to the business's regular hours. The business can be open or closed during the exception." ] } }, { - "name": "bookingsCalendarV2SessionViewVersion", + "name": "bookingsCalendarV2SessionViewSplitInterval", "members": [ { - "name": "participantsVersion", + "name": "sameAsDuration", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Participants version number, updated each time the schedule participants are updated." + "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." }, { - "name": "scheduleVersion", + "name": "valueInMinutes", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Schedule version number, updated each time the schedule is updated." + "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." } ], "docs": { "description": [ - "" + "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." ] } }, { - "name": "bookingsCalendarV2SessionViewWindow", + "name": "bookingsCalendarV2SessionViewStaffData", "members": [ { - "name": "endDate", - "readOnly": true, + "name": "refreshToken", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The window end date." + "doc": "" }, { - "name": "futureDurationInDays", + "name": "resourceId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The number of days the window lasts into the future." + "doc": "" }, { - "name": "version", + "name": "syncRequestEmail", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The window version." + "doc": "" } ], "docs": { @@ -4591,67 +4803,67 @@ } }, { - "name": "bookingsCalendarV2SessionViewWindowExtended", + "name": "bookingsCalendarV2SessionViewStreetAddress", "members": [ { - "name": "windowEndDate", + "name": "apt", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The updated window end date." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCalendarV2SessionViewWindowMoved", - "members": [ + "doc": "Apartment number." + }, { - "name": "edge", + "name": "name", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The updated window edge." + "doc": "Street name." }, { - "name": "windowVersion", + "name": "number", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "The window version." + "doc": "Street number." } ], "docs": { "description": [ - "Deprecated. Please use `window_extended` instead." + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", + "name": "bookingsCalendarV2SessionViewSubdivision", "members": [ { - "name": "bodyAsJson", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision full name." } ], "docs": { @@ -4661,239 +4873,256 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddress", + "name": "bookingsCalendarV2SessionViewTask", "members": [ { - "name": "addressLine", + "name": "executeAt", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "" }, { - "name": "addressLine2", + "name": "key", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewTaskKey", + "displayName": "TaskKey" } ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + "doc": "" }, { - "name": "city", + "name": "payload", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "City name." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewTaskAction", + "members": [ { - "name": "country", + "name": "cancel", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCancel", + "displayName": "Cancel" } ], - "doc": "Country code." + "doc": "" }, { - "name": "countryFullname", + "name": "complete", "optional": true, "type": [ { - "nativeType": "string" - } + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewComplete", + "displayName": "Complete" + } ], - "doc": "Country full name." + "doc": "" }, { - "name": "formattedAddress", + "name": "reschedule", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReschedule", + "displayName": "Reschedule" } ], - "doc": "A string containing the full address of this location." - }, + "doc": "" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfTaskActionActionOneOf", + "members": [ + "cancel", + "complete", + "reschedule" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewTaskActionActionOneOf", + "members": [ { - "name": "geocode", + "name": "cancel", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAddressLocation", - "displayName": "AddressLocation" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewCancel", + "displayName": "Cancel" } ], - "doc": "Coordinates of the physical address." + "doc": "" }, { - "name": "hint", + "name": "complete", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewComplete", + "displayName": "Complete" } ], - "doc": "Free text to help find the address." + "doc": "" }, { - "name": "postalCode", + "name": "reschedule", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCalendarV2SessionViewReschedule", + "displayName": "Reschedule" } ], - "doc": "Zip/postal code." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewTaskKey", + "members": [ { - "name": "streetAddress", + "name": "appId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsStreetAddress", - "displayName": "StreetAddress" + "nativeType": "string" } ], - "doc": "Street name, number and apartment number." + "doc": "" }, { - "name": "subdivision", + "name": "instanceId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + "doc": "" }, { - "name": "subdivisions", + "name": "subjectId", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSubdivision", - "displayName": "Subdivision" - } - ] - } + "nativeType": "string" } ], - "doc": "Multi-level subdivisions from top to bottom." + "doc": "" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, "docs": { "description": [ - "Physical address" + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressHint", + "name": "bookingsCalendarV2SessionViewTimePeriod", "members": [ { - "name": "placement", + "name": "closeDay", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Where the extra text should be displayed." + "doc": "Day of the week the period ends on." }, { - "name": "text", + "name": "closeTime", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Extra text displayed next to, or instead of, the actual address." - } - ], - "docs": { - "description": [ - "Extra information on displayed addresses.\nThis is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\nFree text. In addition the user can state where he wants that additional description - before, after, or instead\nthe address string." - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressLocation", - "members": [ + "doc": "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\nmidnight at the end of the specified day.\n\n__Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.\n" + }, { - "name": "latitude", + "name": "openDay", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Address latitude." + "doc": "Day of the week the period starts on." }, { - "name": "longitude", + "name": "openTime", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Address longitude." + "doc": "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\nmidnight at the end of the specified day." } ], "docs": { "description": [ - "" + "Weekly recurring time periods when the business is regularly open or the service is available." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressStreetOneOf", + "name": "bookingsCalendarV2SessionViewVersion", "members": [ { - "name": "addressLine", + "name": "participantsVersion", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "Participants version number, updated each time the schedule participants are updated." }, { - "name": "streetAddress", + "name": "scheduleVersion", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsStreetAddress", - "displayName": "StreetAddress" + "nativeType": "number" } ], - "doc": "Street name, number and apartment number." + "doc": "Schedule version number, updated each time the schedule is updated." } ], "docs": { @@ -4903,154 +5132,105 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailability", + "name": "bookingsCalendarV2SessionViewWindow", "members": [ { - "name": "constraints", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityConstraints", - "displayName": "AvailabilityConstraints" - } - ], - "doc": "Constraints for calculating the schedule's availability." - }, - { - "name": "end", + "name": "endDate", + "readOnly": true, "optional": true, "type": [ { "nativeType": "Date" } ], - "doc": "Date and time the schedule stops being available for booking. No value indicates no end time." + "doc": "The window end date." }, { - "name": "linkedSchedules", + "name": "futureDurationInDays", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLinkedSchedule", - "displayName": "LinkedSchedule" - } - ] - } + "nativeType": "number" } ], - "doc": "Other schedules that impact the availability calculation. Relevant only when there are availability constraints." + "doc": "The number of days the window lasts into the future." }, { - "name": "start", + "name": "version", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "number" } ], - "doc": "Date and time the schedule starts to be available for booking." + "doc": "The window version." } ], "docs": { "description": [ - "" + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityConstraints", + "name": "bookingsCalendarV2SessionViewWindowExtended", "members": [ { - "name": "slotDurations", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "number" - } - ] - } - } - ], - "doc": "A list of duration options for slots, in minutes. Minimum value for a duration is 1.\nThe availability calculation generates slots with these durations, where there is no conflict with existing sessions or other availability constraints." - }, - { - "name": "slotsSplitInterval", - "readOnly": true, + "name": "windowEndDate", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSplitInterval", - "displayName": "SplitInterval" + "nativeType": "Date" } ], - "doc": "An object defining the time between available slots' start times. For example, a slot with slots_split_interval=5 can start every 5 minutes. The default is the slot duration." - }, + "doc": "The updated window end date." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCalendarV2SessionViewWindowMoved", + "members": [ { - "name": "splitInterval", + "name": "edge", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Date" } ], - "doc": "Specify how to split the slots in intervals of minutes.\nThis value indicates the time between available slots' start time. e.g., from 5 minute slots (3:00, 3:05, 3:15) and 1 hour slots (3:00, 4:00, 5:00).\nOptional. The default is the first duration in slot_durations field.\nDeprecated. Use the `split_slots_interval.value_in_minutes`." + "doc": "The updated window edge." }, { - "name": "timeBetweenSlots", + "name": "windowVersion", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "The number of minutes between the `end` of one slot, and the `start` of the next.\nMinimum value is 0, maximum value is 120." + "doc": "The window version." } ], "docs": { "description": [ - "Describes how to calculate the specific slots that are available for booking." + "Deprecated. Please use `window_extended` instead." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicy", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", "members": [ { - "name": "splitInterval", + "name": "bodyAsJson", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSplitInterval", - "displayName": "SplitInterval" - } - ], - "doc": "Specify how to split the schedule slots in intervals of minutes." - } - ], - "docs": { - "description": [ - "Availability policy applied to all site schedules." - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicyUpdated", - "members": [ - { - "name": "availabilityPolicy", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicy", - "displayName": "AvailabilityPolicy" + "nativeType": "string" } ], "doc": "" @@ -5063,149 +5243,122 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsBackendEventMetadata", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddress", "members": [ { - "name": "entityId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the entity associated with the event." - }, - { - "name": "eventTime", + "name": "addressLine", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Event timestamp." + "doc": "Main address line, usually street and number, as free text." }, { - "name": "id", + "name": "addressLine2", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Event ID." + "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." }, { - "name": "triggeredByAnonymizeRequest", - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsBookingPolicy", - "members": [ - { - "name": "bookUpToXMinutesBefore", + "name": "city", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Minimum number of minutes before the start of a session that a booking can be made. For a schedule, this is relative to the start time of the next session, excluding past sessions. Default value is taken form BusinessServicesPolicy." + "doc": "City name." }, { - "name": "bookingsApprovalPolicy", + "name": "country", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBookingsApprovalPolicy", - "displayName": "BookingsApprovalPolicy" + "nativeType": "string" } ], - "doc": "Bookings approval policy for the service. Empty by default." + "doc": "Country code." }, { - "name": "cancelRescheduleUpToXMinutesBefore", + "name": "countryFullname", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Minimum number of minutes before the start of a session that a booking can be canceled or rescheduled. Default value is taken form BusinessServicesPolicy." + "doc": "Country full name." }, { - "name": "cancellationPolicy", - "readOnly": true, + "name": "formattedAddress", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "User defined cancellation policy message." + "doc": "A string containing the full address of this location." }, { - "name": "futureBookingsPolicy", + "name": "geocode", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", - "displayName": "FutureBookingPolicy" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAddressLocation", + "displayName": "AddressLocation" } ], - "doc": "How far in advance a booking can be made. Default value is taken form BusinessServicesPolicy." + "doc": "Coordinates of the physical address." }, { - "name": "isBookOnlineAllowed", + "name": "hint", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether online booking is available. Defaults to true." + "doc": "Free text to help find the address." }, { - "name": "isCancelAllowed", + "name": "postalCode", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether bookings for the service can be canceled. Defaults to true." + "doc": "Zip/postal code." }, { - "name": "isRescheduleAllowed", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsStreetAddress", + "displayName": "StreetAddress" } ], - "doc": "Whether bookings for the service can be rescheduled. Defaults to true." + "doc": "Street name, number and apartment number." }, { - "name": "maxParticipantsPerBooking", + "name": "subdivision", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Maximum number of participants for a single booking. Defaults to 1." + "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." }, { - "name": "overrideBusinessPolicyFields", + "name": "subdivisions", "optional": true, "type": [ { @@ -5213,54 +5366,85 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSubdivision", + "displayName": "Subdivision" } ] } } ], - "doc": "A list of booking policy field names of fields that override the respective values of the default business booking policy.\nCurrently only 'service.policy.bookUpToXMinutesBefore' field is supported" + "doc": "Multi-level subdivisions from top to bottom." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAddressStreetOneOf", + "members": [ + "addressLine", + "streetAddress" + ] + } + ] + }, + "docs": { + "description": [ + "Physical address" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressHint", + "members": [ + { + "name": "placement", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Where the extra text should be displayed." }, { - "name": "waitingListPolicy", + "name": "text", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsWaitingListPolicy", - "displayName": "WaitingListPolicy" + "nativeType": "string" } ], - "doc": "Waitlist policy for the service. Default value is taken form BusinessServicesPolicy." + "doc": "Extra text displayed next to, or instead of, the actual address." } ], "docs": { "description": [ - "A set of rules defining the policies for booking the service for visitors and members." + "Extra information on displayed addresses.\nThis is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\nFree text. In addition the user can state where he wants that additional description - before, after, or instead\nthe address string." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsBookingsApprovalPolicy", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressLocation", "members": [ { - "name": "isBusinessApprovalRequired", + "name": "latitude", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether bookings to the service require approval." + "doc": "Address latitude." }, { - "name": "requestsAffectsAvailability", + "name": "longitude", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the booking requests affect the session or slot availability. For example, 3 booking requests for a 10-person session will cause the session to have 7 available spots, before the requests are approved." + "doc": "Address longitude." } ], "docs": { @@ -5270,205 +5454,235 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessSchedule", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAddressStreetOneOf", "members": [ { - "name": "periods", + "name": "addressLine", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsTimePeriod", - "displayName": "TimePeriod" - } - ] - } + "nativeType": "string" } ], - "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." + "doc": "Main address line, usually street and number, as free text." }, { - "name": "specialHourPeriod", + "name": "streetAddress", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSpecialHourPeriod", - "displayName": "SpecialHourPeriod" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsStreetAddress", + "displayName": "StreetAddress" } ], - "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." + "doc": "Street name, number and apartment number." } ], "docs": { "description": [ - "Business schedule. Regular and exceptional time periods when the business is open or the service is available." + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessServicesPolicy", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailability", "members": [ { - "name": "bookUpToXMinutesBefore", + "name": "constraints", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityConstraints", + "displayName": "AvailabilityConstraints" } ], - "doc": "Minimum amount of time to make a booking before the start of the booked item. For sessions, this is relative to the start time of the session. For schedules, this is relative to the start time of the first session, excluding past sessions. Defaults to 0." + "doc": "Constraints for calculating the schedule's availability." }, { - "name": "cancelRescheduleUpToXMinutesBefore", + "name": "end", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Date" } ], - "doc": "Minimum time that a booking can be canceled or rescheduled before the session starts. Defaults to 0." + "doc": "Date and time the schedule stops being available for booking. No value indicates no end time." }, { - "name": "cancellationPolicy", + "name": "linkedSchedules", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } } ], - "doc": "User defined cancellation policy message." + "doc": "Other schedules that impact the availability calculation. Relevant only when there are availability constraints." }, { - "name": "futureBookingsPolicy", + "name": "start", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", - "displayName": "FutureBookingPolicy" + "nativeType": "Date" } ], - "doc": "An object specifying how far in advance a booking can be made." - }, - { - "name": "waitingListPolicy", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsWaitingListPolicy", - "displayName": "WaitingListPolicy" - } - ], - "doc": "Waitlist policy for the service. Empty by default." + "doc": "Date and time the schedule starts to be available for booking." } ], "docs": { "description": [ - "Defines the Bookings Policy applied to the business's services. The policy can be overridden for a service when setting the `Service.BookingsPolicy` property.\nUnless overridden, each service inherits the settings in the business policy." + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCalendarConference", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityConstraints", "members": [ { - "name": "_id", + "name": "slotDurations", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } } ], - "doc": "Wix Calendar conference ID." + "doc": "A list of duration options for slots, in minutes. Minimum value for a duration is 1.\nThe availability calculation generates slots with these durations, where there is no conflict with existing sessions or other availability constraints." }, { - "name": "accountOwnerId", + "name": "slotsSplitInterval", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSplitInterval", + "displayName": "SplitInterval" } ], - "doc": "ID of the account owner in the video conferencing service." + "doc": "An object defining the time between available slots' start times. For example, a slot with slots_split_interval=5 can start every 5 minutes. The default is the slot duration." }, { - "name": "conferenceType", + "name": "splitInterval", + "readOnly": false, "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Conference type.\n" + "doc": "Specify how to split the slots in intervals of minutes.\nThis value indicates the time between available slots' start time. e.g., from 5 minute slots (3:00, 3:05, 3:15) and 1 hour slots (3:00, 4:00, 5:00).\nOptional. The default is the first duration in slot_durations field.\nDeprecated. Use the `split_slots_interval.value_in_minutes`." }, { - "name": "description", + "name": "timeBetweenSlots", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Conference description." - }, + "doc": "The number of minutes between the `end` of one slot, and the `start` of the next.\nMinimum value is 0, maximum value is 120." + } + ], + "docs": { + "description": [ + "Describes how to calculate the specific slots that are available for booking." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicy", + "members": [ { - "name": "externalId", + "name": "splitInterval", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSplitInterval", + "displayName": "SplitInterval" } ], - "doc": "Conference meeting ID in the provider's conferencing system." - }, + "doc": "Specify how to split the schedule slots in intervals of minutes." + } + ], + "docs": { + "description": [ + "Availability policy applied to all site schedules." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicyUpdated", + "members": [ { - "name": "guestUrl", + "name": "availabilityPolicy", "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicy", + "displayName": "AvailabilityPolicy" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBackendEventMetadata", + "members": [ + { + "name": "entityId", "type": [ { "nativeType": "string" } ], - "doc": "URL used by a guest to join the conference." + "doc": "ID of the entity associated with the event." }, { - "name": "hostUrl", - "optional": true, + "name": "eventTime", "type": [ { "nativeType": "string" } ], - "doc": "URL used by the host to start the conference." + "doc": "Event timestamp." }, { - "name": "password", - "optional": true, + "name": "id", "type": [ { "nativeType": "string" } ], - "doc": "Password to join the conference." + "doc": "Event ID." }, { - "name": "providerId", - "optional": true, + "name": "triggeredByAnonymizeRequest", "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Conference provider ID." + "doc": "Whether the event was triggered as a result of a privacy regulation application (for example, [GDPR](https://support.wix.com/en/article/gdpr-frequently-asked-questions)). For advanced users." } ], "docs": { @@ -5478,202 +5692,158 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCalendarDateTime", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBookingPolicy", "members": [ { - "name": "localDateTime", + "name": "bookUpToXMinutesBefore", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocalDateTime", - "displayName": "LocalDateTime" + "nativeType": "number" } ], - "doc": "An object containing the local date and time for the business's time zone." + "doc": "Minimum number of minutes before the start of a session that a booking can be made. For a schedule, this is relative to the start time of the next session, excluding past sessions. Default value is taken form BusinessServicesPolicy." }, { - "name": "timeZone", - "readOnly": true, + "name": "bookingsApprovalPolicy", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBookingsApprovalPolicy", + "displayName": "BookingsApprovalPolicy" } ], - "doc": "The time zone. Optional. Derived from the schedule's time zone.\nIn case this field is associated with recurring session, this field is empty." + "doc": "Bookings approval policy for the service. Empty by default." }, { - "name": "timestamp", + "name": "cancelRescheduleUpToXMinutesBefore", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "number" } ], - "doc": "UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a time zone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `\"2021-01-06T23:00:00.000Z\"`.\nRequired if `localDateTime` is not specified.\nIf `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's time zone." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCategories", - "members": [ + "doc": "Minimum number of minutes before the start of a session that a booking can be canceled or rescheduled. Default value is taken form BusinessServicesPolicy." + }, { - "name": "primary", + "name": "cancellationPolicy", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Primary site category." + "doc": "User defined cancellation policy message." }, { - "name": "secondary", + "name": "futureBookingsPolicy", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", + "displayName": "FutureBookingPolicy" } ], - "doc": "Secondary site category." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsChangeContext", - "members": [ + "doc": "How far in advance a booking can be made. Default value is taken form BusinessServicesPolicy." + }, { - "name": "propertiesChange", + "name": "isBookOnlineAllowed", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPropertiesChange", - "displayName": "PropertiesChange" + "nativeType": "boolean" } ], - "doc": "Properties were updated." + "doc": "Whether online booking is available. Defaults to true." }, { - "name": "siteCloned", + "name": "isCancelAllowed", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCloned", - "displayName": "SiteCloned" + "nativeType": "boolean" } ], - "doc": "Properties were cloned on site cloning." + "doc": "Whether bookings for the service can be canceled. Defaults to true." }, { - "name": "siteCreated", + "name": "isRescheduleAllowed", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCreated", - "displayName": "SiteCreated" + "nativeType": "boolean" } ], - "doc": "Default properties were created on site creation." - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfChangeContextPayloadOneOf", - "members": [ - "propertiesChange", - "siteCloned", - "siteCreated" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsChangeContextPayloadOneOf", - "members": [ + "doc": "Whether bookings for the service can be rescheduled. Defaults to true." + }, { - "name": "propertiesChange", + "name": "maxParticipantsPerBooking", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPropertiesChange", - "displayName": "PropertiesChange" + "nativeType": "number" } ], - "doc": "Properties were updated." + "doc": "Maximum number of participants for a single booking. Defaults to 1." }, { - "name": "siteCloned", + "name": "overrideBusinessPolicyFields", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCloned", - "displayName": "SiteCloned" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Properties were cloned on site cloning." + "doc": "A list of booking policy field names of fields that override the respective values of the default business booking policy.\nCurrently only 'service.policy.bookUpToXMinutesBefore' field is supported" }, { - "name": "siteCreated", + "name": "waitingListPolicy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCreated", - "displayName": "SiteCreated" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsWaitingListPolicy", + "displayName": "WaitingListPolicy" } ], - "doc": "Default properties were created on site creation." + "doc": "Waitlist policy for the service. Default value is taken form BusinessServicesPolicy." } ], "docs": { "description": [ - "" + "A set of rules defining the policies for booking the service for visitors and members." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCloneServiceOptionsAndVariantsRequest", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBookingsApprovalPolicy", "members": [ { - "name": "cloneFromId", + "name": "isBusinessApprovalRequired", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the `serviceOptionsAndVariants` object to clone." + "doc": "Whether bookings to the service require approval." }, { - "name": "targetServiceId", + "name": "requestsAffectsAvailability", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the service that will be set for the cloned `serviceOptionsAndVariants`" + "doc": "Whether the booking requests affect the session or slot availability. For example, 3 booking requests for a 10-person session will cause the session to have 7 available spots, before the requests are approved." } ], "docs": { @@ -5683,18 +5853,17 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCloneServiceOptionsAndVariantsResponse", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessLocation", "members": [ { - "name": "serviceOptionsAndVariants", + "name": "locationId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", - "displayName": "ServiceOptionsAndVariants" + "nativeType": "string" } ], - "doc": "The cloned `serviceOptionsAndVariants` object." + "doc": "The ID of the business location. Has to be non-empty" } ], "docs": { @@ -5704,215 +5873,205 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsConferenceProvider", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessSchedule", "members": [ { - "name": "providerId", + "name": "periods", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsTimePeriod", + "displayName": "TimePeriod" + } + ] + } } ], - "doc": "Conferencing provider ID" + "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." + }, + { + "name": "specialHourPeriod", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSpecialHourPeriod", + "displayName": "SpecialHourPeriod" + } + ] + } + } + ], + "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." } ], "docs": { "description": [ - "" + "Business schedule. Regular and exceptional time periods when the business is open or the service is available." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsConsentPolicy", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsBusinessServicesPolicy", "members": [ { - "name": "advertising", + "name": "bookUpToXMinutesBefore", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor." + "doc": "Minimum amount of time to make a booking before the start of the booked item. For sessions, this is relative to the start time of the session. For schedules, this is relative to the start time of the first session, excluding past sessions. Defaults to 0." }, { - "name": "analytics", + "name": "cancelRescheduleUpToXMinutesBefore", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the site uses cookies that collect analytics about how the site is used (in order to improve it)." + "doc": "Minimum time that a booking can be canceled or rescheduled before the session starts. Defaults to 0." }, { - "name": "dataToThirdParty", + "name": "cancellationPolicy", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "CCPA compliance flag." + "doc": "User defined cancellation policy message." }, { - "name": "essential", + "name": "futureBookingsPolicy", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", + "displayName": "FutureBookingPolicy" } ], - "doc": "Whether the site uses cookies that are essential to site operation." + "doc": "An object specifying how far in advance a booking can be made." }, { - "name": "functional", + "name": "waitingListPolicy", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsWaitingListPolicy", + "displayName": "WaitingListPolicy" } ], - "doc": "Whether the site uses cookies that affect site performance and other functional measurements." + "doc": "Waitlist policy for the service. Empty by default." } ], "docs": { "description": [ - "" + "Defines the Bookings Policy applied to the business's services. The policy can be overridden for a service when setting the `Service.BookingsPolicy` property.\nUnless overridden, each service inherits the settings in the business policy." ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCreateServiceOptionsAndVariantsRequest", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCalendarConference", "members": [ { - "name": "serviceOptionsAndVariants", + "name": "_id", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", - "displayName": "ServiceOptionsAndVariants" + "nativeType": "string" } ], - "doc": "Service options and variants to create." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCreateServiceOptionsAndVariantsResponse", - "members": [ + "doc": "Wix Calendar conference ID." + }, { - "name": "serviceOptionsAndVariants", + "name": "accountOwnerId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", - "displayName": "ServiceOptionsAndVariants" + "nativeType": "string" } ], - "doc": "Information about the created service options and variants." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCursorPaging", - "members": [ + "doc": "ID of the account owner in the video conferencing service." + }, { - "name": "cursor", + "name": "conferenceType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Conference type." }, { - "name": "limit", + "name": "description", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items to load." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCursors", - "members": [ + "doc": "Conference description." + }, { - "name": "next", + "name": "externalId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Conference meeting ID in the provider's conferencing system." }, { - "name": "prev", + "name": "guestUrl", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsCustomServiceOption", - "members": [ + "doc": "URL used by a guest to join the conference." + }, { - "name": "choices", + "name": "hostUrl", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Available choices for the service option. For example, `child`, `student`,\n`adult`, and `senior` for a service option named `Age group`. Each value must\nbe unique. The value's case is ignored, meaning `Child` and `child` are\nconsidered to be identical. Currently, only a single choice is supported\nbecause a service can have only a single option.\n\nMax: 1 choice\n" + "doc": "URL used by the host to start the conference." }, { - "name": "name", + "name": "password", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Name of the service option. For example, `Age group`, `Location`, `Equipment`,\nor `Time`." + "doc": "Password to join the conference." + }, + { + "name": "providerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Conference provider ID." } ], "docs": { @@ -5922,28 +6081,39 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteMetadata", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCalendarDateTime", "members": [ { - "name": "participantNotification", + "name": "localDateTime", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", - "displayName": "ParticipantNotification" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocalDateTime", + "displayName": "LocalDateTime" } ], - "doc": "" + "doc": "An object containing the local date and time for the business's time zone." }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "timeZone", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "" + "doc": "The time zone. Optional. Derived from the schedule's time zone.\nIn case this field is associated with recurring session, this field is empty." + }, + { + "name": "timestamp", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a time zone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `\"2021-01-06T23:00:00.000Z\"`.\nRequired if `localDateTime` is not specified.\nIf `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's time zone." } ], "docs": { @@ -5953,26 +6123,44 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteServiceOptionsAndVariantsRequest", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCategories", "members": [ { - "name": "revision", + "name": "businessTermId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision of the `serviceOptionsAndVariants` object to delete." + "doc": "Business Term Id" }, { - "name": "serviceOptionsAndVariantsId", + "name": "primary", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the `serviceOptionsAndVariants` object to delete." + "doc": "Primary site category." + }, + { + "name": "secondary", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Secondary site category." } ], "docs": { @@ -5982,167 +6170,166 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteServiceOptionsAndVariantsResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsDomainEvent", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsChangeContext", "members": [ { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "random GUID so clients can tell if event was already handled" - }, - { - "name": "actionEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", - "displayName": "ActionEvent" - } - ], - "doc": "" - }, - { - "name": "createdEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", - "displayName": "EntityCreatedEvent" - } - ], - "doc": "" - }, - { - "name": "deletedEvent", + "name": "propertiesChange", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", - "displayName": "EntityDeletedEvent" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPropertiesChange", + "displayName": "PropertiesChange" } ], - "doc": "" + "doc": "Properties were updated." }, { - "name": "entityEventSequence", + "name": "siteCloned", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCloned", + "displayName": "SiteCloned" } ], - "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + "doc": "Properties were cloned on site cloning." }, { - "name": "entityFqdn", + "name": "siteCreated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCreated", + "displayName": "SiteCreated" } ], - "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" - }, + "doc": "Default properties were created on site creation." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfChangeContextPayloadOneOf", + "members": [ + "propertiesChange", + "siteCloned", + "siteCreated" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsChangeContextPayloadOneOf", + "members": [ { - "name": "entityId", + "name": "propertiesChange", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPropertiesChange", + "displayName": "PropertiesChange" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "Properties were updated." }, { - "name": "eventTime", + "name": "siteCloned", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCloned", + "displayName": "SiteCloned" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" + "doc": "Properties were cloned on site cloning." }, { - "name": "extendedFieldsUpdatedEvent", + "name": "siteCreated", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", - "displayName": "ExtendedFieldsUpdatedEvent" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSiteCreated", + "displayName": "SiteCreated" } ], - "doc": "" - }, + "doc": "Default properties were created on site creation." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCloneServiceOptionsAndVariantsRequest", + "members": [ { - "name": "originatedFrom", - "optional": true, + "name": "cloneFromId", "type": [ { "nativeType": "string" } ], - "doc": "If present, indicates the action that triggered the event." + "doc": "ID of the `serviceOptionsAndVariants` object to clone." }, { - "name": "slug", - "optional": true, + "name": "targetServiceId", "type": [ { "nativeType": "string" } ], - "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" - }, + "doc": "ID of the service that will be set for the cloned `serviceOptionsAndVariants`" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCloneServiceOptionsAndVariantsResponse", + "members": [ { - "name": "triggeredByAnonymizeRequest", + "name": "serviceOptionsAndVariants", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." - }, + "doc": "The cloned `serviceOptionsAndVariants` object." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsConferenceProvider", + "members": [ { - "name": "updatedEvent", + "name": "providerId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", - "displayName": "EntityUpdatedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Conferencing provider ID" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfDomainEventBodyOneOf", - "members": [ - "actionEvent", - "createdEvent", - "deletedEvent", - "extendedFieldsUpdatedEvent", - "updatedEvent" - ] - } - ] - }, "docs": { "description": [ "" @@ -6150,62 +6337,57 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsDomainEventBodyOneOf", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsConsentPolicy", "members": [ { - "name": "actionEvent", + "name": "advertising", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", - "displayName": "ActionEvent" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor." }, { - "name": "createdEvent", + "name": "analytics", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", - "displayName": "EntityCreatedEvent" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the site uses cookies that collect analytics about how the site is used (in order to improve it)." }, { - "name": "deletedEvent", + "name": "dataToThirdParty", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", - "displayName": "EntityDeletedEvent" + "nativeType": "boolean" } ], - "doc": "" + "doc": "CCPA compliance flag." }, { - "name": "extendedFieldsUpdatedEvent", + "name": "essential", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", - "displayName": "ExtendedFieldsUpdatedEvent" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the site uses cookies that are essential to site operation." }, { - "name": "updatedEvent", + "name": "functional", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", - "displayName": "EntityUpdatedEvent" + "nativeType": "boolean" } ], - "doc": "" + "doc": "Whether the site uses cookies that affect site performance and other functional measurements." } ], "docs": { @@ -6215,26 +6397,17 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsEmpty", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCreateServiceOptionsAndVariantsRequest", "members": [ { - "name": "entityAsJson", - "optional": true, + "name": "serviceOptionsAndVariants", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" } ], - "doc": "" + "doc": "Service options and variants to create." } ], "docs": { @@ -6244,26 +6417,18 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCreateServiceOptionsAndVariantsResponse", "members": [ { - "name": "currentEntityAsJson", + "name": "serviceOptionsAndVariants", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" } ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + "doc": "Information about the created service options and variants." } ], "docs": { @@ -6273,37 +6438,27 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsExtendedFieldsUpdatedEvent", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCursorPaging", "members": [ { - "name": "currentEntityAsJson", + "name": "cursor", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarInfo", - "members": [ + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, { - "name": "calendarType", + "name": "limit", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -6313,27 +6468,27 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarOverrides", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCursors", "members": [ { - "name": "description", + "name": "next", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced description of the external calendar event." + "doc": "Cursor string pointing to the next page in the list of results." }, { - "name": "title", + "name": "prev", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Synced title of the external calendar event." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -6343,17 +6498,34 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsFrequency", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsCustomServiceOption", "members": [ { - "name": "repetition", + "name": "choices", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + "doc": "Available choices for the service option. For example, `child`, `student`,\n`adult`, and `senior` for a service option named `Age group`. Each value must\nbe unique. The value's case is ignored, meaning `Child` and `child` are\nconsidered to be identical. Currently, only a single choice is supported\nbecause a service can have only a single option.\n\nMax: 1 choice\n" + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the service option. For example, `Age group`, `Location`, `Equipment`,\nor `Time`." } ], "docs": { @@ -6363,27 +6535,28 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteMetadata", "members": [ { - "name": "limitXMinutesToTheFuture", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "displayName": "ParticipantNotification" } ], - "doc": "How far in advance, in minutes, a session can be booked. Defaults to 10,080 minutes (3 days)." + "doc": "" }, { - "name": "shouldLimit", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether a limit is imposed on advance bookings." + "doc": "" } ], "docs": { @@ -6393,48 +6566,37 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsGeoCoordinates", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteServiceOptionsAndVariantsRequest", "members": [ { - "name": "latitude", + "name": "revision", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Latitude of the location. Must be between -90 and 90." + "doc": "Revision of the `serviceOptionsAndVariants` object to delete." }, { - "name": "longitude", - "optional": true, + "name": "serviceOptionsAndVariantsId", "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Longitude of the location. Must be between -180 and 180." + "doc": "ID of the `serviceOptionsAndVariants` object to delete." } ], "docs": { "description": [ - "Geocoordinates for a particular address." + "" ] } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsByServiceIdRequest", - "members": [ - { - "name": "serviceId", - "type": [ - { - "nativeType": "string" - } - ], - "doc": "ID of the service to retrieve options and variants for." - } - ], + "name": "bookingsCatalogV1ServiceOptionsAndVariantsDeleteServiceOptionsAndVariantsResponse", + "members": [], "docs": { "description": [ "" @@ -6442,60 +6604,146 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsByServiceIdResponse", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsDomainEvent", "members": [ { - "name": "serviceVariants", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", - "displayName": "ServiceOptionsAndVariants" + "nativeType": "string" } ], - "doc": "Retrieved `serviceOptionsAndVariants` object." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsRequest", - "members": [ + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." + }, { - "name": "serviceOptionsAndVariantsId", + "name": "actionEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", + "displayName": "ActionEvent" + } + ], + "doc": "" + }, + { + "name": "createdEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "entityEventSequence", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the `serviceOptionsAndVariants` object to retrieve." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsResponse", - "members": [ + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + }, { - "name": "serviceOptionsAndVariants", + "name": "entityFqdn", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", - "displayName": "ServiceOptionsAndVariants" + "nativeType": "string" } ], - "doc": "Retrieved `serviceOptionsAndVariants` object." + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + }, + { + "name": "entityId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the entity associated with the event." + }, + { + "name": "eventTime", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Event timestamp." + }, + { + "name": "originatedFrom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "If present, indicates the action that triggered the event." + }, + { + "name": "slug", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, "docs": { "description": [ "" @@ -6503,60 +6751,14911 @@ } }, { - "name": "bookingsCatalogV1ServiceOptionsAndVariantsInterval", + "name": "bookingsCatalogV1ServiceOptionsAndVariantsDomainEventBodyOneOf", "members": [ { - "name": "daysOfWeek", + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsActionEvent", + "displayName": "ActionEvent" } ], - "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." + "doc": "" }, { - "name": "duration", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", + "displayName": "EntityCreatedEvent" + } + ], + "doc": "" + }, + { + "name": "deletedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", + "displayName": "EntityDeletedEvent" + } + ], + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", + "displayName": "EntityUpdatedEvent" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsEmpty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityCreatedEvent", + "members": [ + { + "name": "entityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityDeletedEvent", + "members": [ + { + "name": "deletedEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Entity that was deleted" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsEntityUpdatedEvent", + "members": [ + { + "name": "currentEntityAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarInfo", + "members": [ + { + "name": "calendarType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarOverrides", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Synced description of the external calendar event." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Synced title of the external calendar event." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsFrequency", + "members": [ + { + "name": "repetition", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsFutureBookingPolicy", + "members": [ + { + "name": "limitXMinutesToTheFuture", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "How far in advance, in minutes, a session can be booked. Defaults to 10,080 minutes (3 days)." + }, + { + "name": "shouldLimit", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a limit is imposed on advance bookings." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsGeoCoordinates", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Latitude of the location. Must be between -90 and 90." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Longitude of the location. Must be between -180 and 180." + } + ], + "docs": { + "description": [ + "Geocoordinates for a particular address." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsByServiceIdRequest", + "members": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to retrieve options and variants for." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsByServiceIdResponse", + "members": [ + { + "name": "serviceVariants", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ], + "doc": "Retrieved `serviceOptionsAndVariants` object." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsRequest", + "members": [ + { + "name": "serviceOptionsAndVariantsId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the `serviceOptionsAndVariants` object to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsGetServiceOptionsAndVariantsResponse", + "members": [ + { + "name": "serviceOptionsAndVariants", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ], + "doc": "Retrieved `serviceOptionsAndVariants` object." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsIdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "identityType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsIdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsInterval", + "members": [ + { + "name": "daysOfWeek", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." + }, + { + "name": "duration", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation." + }, + { + "name": "hourOfDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." + }, + { + "name": "minuteOfHour", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsIntervalSplit", + "members": [ + { + "name": "intervals", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "newScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "oldScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsKeyword", + "members": [ + { + "name": "isMain", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the keyword is the main focus keyword." + }, + { + "name": "term", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Keyword value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLinkedSchedule", + "members": [ + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "scheduleOwnerId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Owner ID, of the linked schedule." + }, + { + "name": "transparency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocalDateTime", + "members": [ + { + "name": "dayOfMonth", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Day of the month, from 1-31." + }, + { + "name": "hourOfDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Hour of the day in 24-hour format, from 0-23." + }, + { + "name": "minutesOfHour", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Minute, from 0-59." + }, + { + "name": "monthOfYear", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Month number, from 1-12." + }, + { + "name": "year", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Year. 4-digit format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocale", + "members": [ + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format." + }, + { + "name": "languageCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocation", + "members": [ + { + "name": "address", + "readOnly": false, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Free text address used when locationType is `OWNER_CUSTOM`." + }, + { + "name": "customAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAddress", + "displayName": "Address" + } + ], + "doc": "Custom address, used when locationType is `\"OWNER_CUSTOM\"`. Might be used when locationType is `\"CUSTOM\"` in case the owner sets a custom address for the session which is different from the default." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location type.\nOne of:\n- `\"OWNER_BUSINESS\"` The business address as set in the site’s general settings.\n- `\"OWNER_CUSTOM\"` The address as set when creating the service.\n- `\"CUSTOM\"` The address set for the individual session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocationsAddress", + "members": [ + { + "name": "city", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "City name." + }, + { + "name": "country", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." + }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocationsAddressLocation", + "displayName": "LocationsAddressLocation" + } + ], + "doc": "Geographic coordinates of location." + }, + { + "name": "postalCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Postal or zip code." + }, + { + "name": "streetAddress", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocationsStreetAddress", + "displayName": "LocationsStreetAddress" + } + ], + "doc": "Street address. Includes street name, number, and apartment number in separate fields." + }, + { + "name": "subdivision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocationsAddressLocation", + "members": [ + { + "name": "latitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Latitude of the location. Must be between -90 and 90." + }, + { + "name": "longitude", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Longitude of the location. Must be between -180 and 180." + } + ], + "docs": { + "description": [ + "Address Geolocation" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocationsLocation", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location ID." + }, + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocationsAddress", + "displayName": "LocationsAddress" + } + ], + "doc": "Address." + }, + { + "name": "archived", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." + }, + { + "name": "businessSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBusinessSchedule", + "displayName": "BusinessSchedule" + } + ], + "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" + }, + { + "name": "default", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email address." + }, + { + "name": "fax", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fax number." + }, + { + "name": "locationType", + "readOnly": false, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location type.\n\n**Note:** Currently not supported." + }, + { + "name": "locationTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location name." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone number." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." + }, + { + "name": "status", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Location status. Defaults to `ACTIVE`.\n__Notes:__\n- [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status.\n- `INACTIVE` status is currently not supported." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Timezone in `America/New_York` format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsLocationsStreetAddress", + "members": [ + { + "name": "apt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + } + ], + "docs": { + "description": [ + "Street address. Includes street name, number, and apartment number in separate fields." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMedia", + "members": [ + { + "name": "coverMedia", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Cover image associated with the service." + }, + { + "name": "items", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMediaItem", + "displayName": "MediaItem" + } + ] + } + } + ], + "doc": "Images associated with the service." + }, + { + "name": "mainMedia", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMediaItem", + "displayName": "MediaItem" + } + ], + "doc": "Primary image associated with the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMediaItem", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image metadata." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfMediaItemItemOneOf", + "members": [ + "image" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMediaItemItemOneOf", + "members": [ + { + "name": "image", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Image metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMessageEnvelope", + "members": [ + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Stringify payload." + }, + { + "name": "eventType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event type." + }, + { + "name": "identity", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsIdentificationData", + "displayName": "IdentificationData" + } + ], + "doc": "The identification type and identity data." + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App instance ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMigrationData", + "members": [ + { + "name": "businessId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "staffs", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsStaffData", + "displayName": "StaffData" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMigrationEvent", + "members": [ + { + "name": "migrationData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMigrationData", + "displayName": "MigrationData" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMoney", + "members": [ + { + "name": "currency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency code. Must be valid ISO 4217 currency code (e.g., USD)." + }, + { + "name": "formattedValue", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative." + }, + { + "name": "value", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative." + } + ], + "docs": { + "description": [ + "Money.\nDefault format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMultilingual", + "members": [ + { + "name": "autoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to redirect to user language." + }, + { + "name": "supportedLanguages", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSupportedLanguage", + "displayName": "SupportedLanguage" + } + ] + } + } + ], + "doc": "Supported languages list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsMultipleSessionsCreated", + "members": [ + { + "name": "schedulesWithSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleWithSessions", + "displayName": "ScheduleWithSessions" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsPaging", + "members": [ + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to skip in the current sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsPagingMetadataV2", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCursors", + "displayName": "Cursors" + } + ], + "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." + }, + { + "name": "offset", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "tooManyToCount", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Flag that indicates the server failed to calculate the `total` field." + }, + { + "name": "total", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsParticipant", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant ID. Currently represents the booking.id." + }, + { + "name": "approvalStatus", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Approval status for the participant.\n" + }, + { + "name": "contactId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Contact ID." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's email address." + }, + { + "name": "inherited", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's name." + }, + { + "name": "partySize", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Participant's phone number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "members": [ + { + "name": "message", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Custom message to send to the participants about the changes to the booking." + }, + { + "name": "notifyParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to send the message about the changes to the customer.\n\nDefault: `false`\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsPaymentOptions", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a booking made for the service can be paid in a customized way, defined by the API." + }, + { + "name": "wixPaidPlan", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a booking made for the service can be paid using Wix Pricing Plans." + }, + { + "name": "wixPayInPerson", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a booking made for the service can be paid in person." + }, + { + "name": "wixPayOnline", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a booking made for the service can be paid online through Wix." + } + ], + "docs": { + "description": [ + "Payment options for the service. Multiple payment options can be enabled. For example:\nFor a service to be paid only online using WiX, then set wix_pay_online=true and the rest should be set to false.\nFor a service to accept payment online via Wix or in person, set the wix_pay_online=true & wix_pay_in_person=true." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsPrice", + "members": [ + { + "name": "amount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Required payment amount." + }, + { + "name": "currency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Currency in which the amount is quoted." + }, + { + "name": "downPayAmount", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Amount of a down payment or deposit as part of the transaction." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsProperties", + "members": [ + { + "name": "address", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsV4Address", + "displayName": "V4Address" + } + ], + "doc": "Address." + }, + { + "name": "businessConfig", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values: `FITNESS SERVICE`, `RESTAURANT`, `BLOG`, `STORE`, `EVENT`, `UNKNOWN`.\n\nSite business type.\n" + }, + { + "name": "businessName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business name." + }, + { + "name": "businessSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBusinessSchedule", + "displayName": "BusinessSchedule" + } + ], + "doc": "Business schedule. Regular and exceptional time periods when the business is open or the service is available.\n\n__Note:__ Not supported by Wix Bookings.\n" + }, + { + "name": "categories", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCategories", + "displayName": "Categories" + } + ], + "doc": "Site categories." + }, + { + "name": "consentPolicy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsConsentPolicy", + "displayName": "ConsentPolicy" + } + ], + "doc": "Cookie policy the site owner defined for their site (before the users interacts with/limits it)." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Email address." + }, + { + "name": "externalSiteUrl", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "External site url that uses Wix as its headless business solution" + }, + { + "name": "fax", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Fax number." + }, + { + "name": "language", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site language.\n\nTwo-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format.\n" + }, + { + "name": "locale", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocale", + "displayName": "Locale" + } + ], + "doc": "Site locale." + }, + { + "name": "logo", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Path to the site's logo in Wix Media (without Wix Media base URL)." + }, + { + "name": "multilingual", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMultilingual", + "displayName": "Multilingual" + } + ], + "doc": "Supported languages of a site and the primary language." + }, + { + "name": "paymentCurrency", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site currency format used to bill customers.\n\nThree-letter currency code in [ISO-4217 alphabetic](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) format.\n" + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Phone number." + }, + { + "name": "siteDisplayName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Site display name." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Timezone in `America/New_York` format." + }, + { + "name": "trackClicksAnalytics", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Track clicks analytics" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsPropertiesChange", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsQueryServiceOptionsAndVariantsRequest", + "members": [ + { + "name": "query", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsQueryV2", + "displayName": "QueryV2" + } + ], + "doc": "Information about filters, paging, and returned fields." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsQueryServiceOptionsAndVariantsResponse", + "members": [ + { + "name": "pagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPagingMetadataV2", + "displayName": "PagingMetadataV2" + } + ], + "doc": "Paging metadata." + }, + { + "name": "serviceOptionsAndVariantsList", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ] + } + } + ], + "doc": "Retrieved `serviceOptionsAndVariants` objects." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsQueryV2", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + }, + { + "name": "fields", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "fieldsets", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned." + }, + { + "name": "filter", + "optional": true, + "type": [ + { + "nativeType": "Object" + } + ], + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSorting", + "displayName": "Sorting" + } + ] + } + } + ], + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfQueryV2PagingMethodOneOf", + "members": [ + "cursorPaging", + "paging" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsQueryV2PagingMethodOneOf", + "members": [ + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCursorPaging", + "displayName": "CursorPaging" + } + ], + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + }, + { + "name": "paging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPaging", + "displayName": "Paging" + } + ], + "doc": "Paging options to limit and skip the number of items." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsRate", + "members": [ + { + "name": "labeledPriceOptions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPrice", + "displayName": "Price" + } + ] + } + } + ], + "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + }, + { + "name": "priceText", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsRecurringInterval", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The recurring interval identifier." + }, + { + "name": "affectedSchedules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } + } + ], + "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." + }, + { + "name": "end", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." + }, + { + "name": "frequency", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsFrequency", + "displayName": "Frequency" + } + ], + "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." + }, + { + "name": "interval", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsInterval", + "displayName": "Interval" + } + ], + "doc": "The interval rules. The day, hour and minutes the interval is recurring." + }, + { + "name": "intervalType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of recurring interval." + }, + { + "name": "start", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "The start time of the recurring interval. Required." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionSplit", + "members": [ + { + "name": "newScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "oldScheduleVersion", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "" + }, + { + "name": "recurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionsUpdated", + "members": [ + { + "name": "newRecurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "New schedule's recurring session list." + }, + { + "name": "oldRecurringSessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "Old schedule's recurring session list." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsResource", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource description." + }, + { + "name": "email", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource email address." + }, + { + "name": "images", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource images." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + }, + { + "name": "phone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource phone number." + }, + { + "name": "scheduleIds", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of IDs of schedules owned by this resource." + }, + { + "name": "schedules", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ] + } + } + ], + "doc": "Deprecated. Please use scheduleIds. List of the schedules owned by this resource. Min size 1." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource status." + }, + { + "name": "tag", + "readOnly": false, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Deprecated. Please use tags." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'." + }, + { + "name": "wixUserId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Wix user ID, if the resource is associated with the Wix user.\nA staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsResourceNotification", + "members": [ + { + "name": "event", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event type." + }, + { + "name": "resource", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsResource", + "displayName": "Resource" + } + ], + "doc": "Updated resource entity.\n'resource.schedules' is deprecated and will not be returned. Please use 'resource.scheduleIds' instead." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule ID." + }, + { + "name": "availability", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailability", + "displayName": "Availability" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "calendarConference", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCalendarConference", + "displayName": "CalendarConference" + } + ], + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + }, + { + "name": "capacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of participants that can be added to the schedule's sessions.\nMust be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app." + }, + { + "name": "conferenceProvider", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsConferenceProvider", + "displayName": "ConferenceProvider" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "created", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Schedule creation date." + }, + { + "name": "externalCalendarOverrides", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "inheritedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Fields which were inherited from the Business Info page under Settings in the Dashboard." + }, + { + "name": "intervals", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringInterval", + "displayName": "RecurringInterval" + } + ] + } + } + ], + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocation", + "displayName": "Location" + } + ], + "doc": "Default location for the schedule's sessions." + }, + { + "name": "participants", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipant", + "displayName": "Participant" + } + ] + } + } + ], + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + }, + { + "name": "rate", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRate", + "displayName": "Rate" + } + ], + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + }, + { + "name": "scheduleOwnerId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the schedule's owner entity. This may be a resource ID or a service ID." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule status." + }, + { + "name": "tags", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + }, + { + "name": "timeZone", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Default title for the schedule's sessions. Maximum length: 6000 characters." + }, + { + "name": "totalNumberOfParticipants", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes." + }, + { + "name": "updated", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Schedule last update date." + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Schedule version number, updated each time the schedule is updated." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleCancelled", + "members": [ + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleCreated", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleNotification", + "members": [ + { + "name": "availabilityPolicyUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" + } + ], + "doc": "" + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "intervalSplit", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsIntervalSplit", + "displayName": "IntervalSplit" + } + ], + "doc": "" + }, + { + "name": "notifyParticipants", + "readOnly": false, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" + }, + { + "name": "preserveFutureSessionsWithParticipants", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "" + }, + { + "name": "recurringSessionSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionSplit", + "displayName": "RecurringSessionSplit" + } + ], + "doc": "" + }, + { + "name": "scheduleCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleCancelled", + "displayName": "ScheduleCancelled" + } + ], + "doc": "" + }, + { + "name": "scheduleCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleCreated", + "displayName": "ScheduleCreated" + } + ], + "doc": "" + }, + { + "name": "scheduleUnassignedFromUser", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" + } + ], + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + }, + { + "name": "scheduleUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleUpdated", + "displayName": "ScheduleUpdated" + } + ], + "doc": "" + }, + { + "name": "sessionCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionCancelled", + "displayName": "SessionCancelled" + } + ], + "doc": "" + }, + { + "name": "sessionCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionCreated", + "displayName": "SessionCreated" + } + ], + "doc": "" + }, + { + "name": "sessionUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionUpdated", + "displayName": "SessionUpdated" + } + ], + "doc": "" + }, + { + "name": "siteProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" + } + ], + "doc": "site properties. Optional. Given in create schedule notification." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfScheduleNotificationEventOneOf", + "members": [ + "availabilityPolicyUpdated", + "intervalSplit", + "migrationEvent", + "multipleSessionsCreated", + "recurringSessionSplit", + "scheduleCancelled", + "scheduleCreated", + "scheduleUnassignedFromUser", + "scheduleUpdated", + "sessionCancelled", + "sessionCreated", + "sessionUpdated" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleNotificationEventOneOf", + "members": [ + { + "name": "availabilityPolicyUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsAvailabilityPolicyUpdated", + "displayName": "AvailabilityPolicyUpdated" + } + ], + "doc": "" + }, + { + "name": "intervalSplit", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsIntervalSplit", + "displayName": "IntervalSplit" + } + ], + "doc": "" + }, + { + "name": "recurringSessionSplit", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionSplit", + "displayName": "RecurringSessionSplit" + } + ], + "doc": "" + }, + { + "name": "scheduleCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleCancelled", + "displayName": "ScheduleCancelled" + } + ], + "doc": "" + }, + { + "name": "scheduleCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleCreated", + "displayName": "ScheduleCreated" + } + ], + "doc": "" + }, + { + "name": "scheduleUnassignedFromUser", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleUnassignedFromUser", + "displayName": "ScheduleUnassignedFromUser" + } + ], + "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + }, + { + "name": "scheduleUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsScheduleUpdated", + "displayName": "ScheduleUpdated" + } + ], + "doc": "" + }, + { + "name": "sessionCancelled", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionCancelled", + "displayName": "SessionCancelled" + } + ], + "doc": "" + }, + { + "name": "sessionCreated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionCreated", + "displayName": "SessionCreated" + } + ], + "doc": "" + }, + { + "name": "sessionUpdated", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionUpdated", + "displayName": "SessionUpdated" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleUnassignedFromUser", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "The schedule that was unassigned from the user." + }, + { + "name": "userId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The Wix user id." + } + ], + "docs": { + "description": [ + "Schedule unassigned from user." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleUpdated", + "members": [ + { + "name": "newSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "The new schedule after the update." + }, + { + "name": "oldSchedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "The old schedule before the update." + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "recurringSessions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRecurringSessionsUpdated", + "displayName": "RecurringSessionsUpdated" + } + ], + "doc": "Recurring sessions updated event. If this field is given, the reason for the schedule updated event was\nupdating at least one of the given schedule's recurring sessions.\nThis event is triggered by create/update/delete recurring session apis." + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsScheduleWithSessions", + "members": [ + { + "name": "schedule", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSchedule", + "displayName": "Schedule" + } + ], + "doc": "" + }, + { + "name": "sessions", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "siteProperties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesOnScheduleCreation", + "displayName": "SitePropertiesOnScheduleCreation" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSeoSchema", + "members": [ + { + "name": "settings", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSettings", + "displayName": "Settings" + } + ], + "doc": "SEO general settings." + }, + { + "name": "tags", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsTag", + "displayName": "Tag" + } + ] + } + } + ], + "doc": "SEO tag information." + } + ], + "docs": { + "description": [ + "The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.\nThe search engines use this information for ranking purposes, or to display snippets in the search results.\nThis data will override other sources of tags (for example patterns) and will be included in the section of the HTML document, while not being displayed on the page itself." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsService", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + }, + { + "name": "advancedSeoData", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSeoSchema", + "displayName": "SeoSchema" + } + ], + "doc": "Advanced SEO data" + }, + { + "name": "bookingFormId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the form that visitors fill out when booking the service." + }, + { + "name": "categoryId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the category to which the service belongs." + }, + { + "name": "customProperties", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Record", + "typeParams": [ + { + "nativeType": "string" + }, + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Set of custom properties for the service." + }, + { + "name": "includeConferenceOption", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether a conference is to be generated for the service." + }, + { + "name": "info", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceInfo", + "displayName": "ServiceInfo" + } + ], + "doc": "Information about the service." + }, + { + "name": "paymentOptions", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsPaymentOptions", + "displayName": "PaymentOptions" + } + ], + "doc": "Payment options available for use when booking the service." + }, + { + "name": "policy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBookingPolicy", + "displayName": "BookingPolicy" + } + ], + "doc": "Description of the bookings policy for the service." + }, + { + "name": "scheduleIds", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "List of schedule IDs for the sessions and slots that can be booked for the service.\nThe list can include schedules with any `status` values, however the Bookings application only uses the schedules with a `status` of `\"CREATED\"`. There is only one schedule with a status of `\"CREATED\"` per service. The ID of that schedule must always be the first in the list." + }, + { + "name": "seoData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSeoSchema", + "displayName": "SeoSchema" + } + ], + "doc": "SEO data" + }, + { + "name": "sortOrder", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Sort order of the service within its category." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service status." + } + ], + "docs": { + "description": [ + "A service describes the business offering that a business provides to its customers." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceChoice", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the custom choice." + }, + { + "name": "optionId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service option." + }, + { + "name": "staffMemberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the staff member providing the service. This ID is the equivalent of the `resourceId`\nof the staff member or the `scheduleOwnerId` of the relevant\n[schedule's](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object)\n`availability.linkedSchedules`." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfServiceChoiceChoiceOneOf", + "members": [ + "custom", + "staffMemberId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceChoiceChoiceOneOf", + "members": [ + { + "name": "custom", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the custom choice." + }, + { + "name": "staffMemberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the staff member providing the service. This ID is the equivalent of the `resourceId`\nof the staff member or the `scheduleOwnerId` of the relevant\n[schedule's](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object)\n`availability.linkedSchedules`." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceInfo", + "members": [ + { + "name": "description", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service description." + }, + { + "name": "images", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Images associated with the service. Deprecated." + }, + { + "name": "media", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMedia", + "displayName": "Media" + } + ], + "doc": "Images associated with the service. Optional. Not supported yet." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service name." + }, + { + "name": "tagLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Short service description." + } + ], + "docs": { + "description": [ + "Information describing the service." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceNotification", + "members": [ + { + "name": "deleteMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsDeleteMetadata", + "displayName": "DeleteMetadata" + } + ], + "doc": "" + }, + { + "name": "event", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'Created'`\n- `'Deleted'`\n- `'Unspecified'`\n- `'Updated'`" + }, + { + "name": "policy", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBusinessServicesPolicy", + "displayName": "BusinessServicesPolicy" + } + ], + "doc": "" + }, + { + "name": "service", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsService", + "displayName": "Service" + } + ], + "doc": "Updated service entity." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfServiceNotificationMetadataOneOf", + "members": [ + "deleteMetadata" + ] + } + ] + }, + "docs": { + "description": [ + "An event sent in the system once the service is changed." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceNotificationMetadataOneOf", + "members": [ + { + "name": "deleteMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsDeleteMetadata", + "displayName": "DeleteMetadata" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOption", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service option." + }, + { + "name": "customData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCustomServiceOption", + "displayName": "CustomServiceOption" + } + ], + "doc": "Details about the custom option. Available only for `CUSTOM` options." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Type of the service option." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfServiceOptionOptionSpecificDataOneOf", + "members": [ + "customData" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionOptionSpecificDataOneOf", + "members": [ + { + "name": "customData", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCustomServiceOption", + "displayName": "CustomServiceOption" + } + ], + "doc": "Details about the custom option. Available only for `CUSTOM` options." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptions", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOption", + "displayName": "ServiceOption" + } + ] + } + } + ], + "doc": "Values of the service options.\n\nMax: 1 service option\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the `serviceOptionsAndVariants` object." + }, + { + "name": "maxPrice", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMoney", + "displayName": "Money" + } + ], + "doc": "Price of the most expensive service variant." + }, + { + "name": "minPrice", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMoney", + "displayName": "Money" + } + ], + "doc": "Price of the cheapest service variant." + }, + { + "name": "options", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptions", + "displayName": "ServiceOptions" + } + ], + "doc": "Service options. Note that currently only a single option is supported per service." + }, + { + "name": "revision", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Revision number, which increments by 1 each time the `serviceOptionsAndVariants` object is updated.\nTo prevent conflicting changes,\nthe current revision must be passed when updating and deleting the `serviceOptionsAndVariants` object.\n\nIgnored when creating a `serviceOptionsAndVariants` object.\n" + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service related to these options and variants." + }, + { + "name": "variants", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceVariants", + "displayName": "ServiceVariants" + } + ], + "doc": "Information about the service's variants." + } + ], + "docs": { + "description": [ + "The `serviceOptionsAndVariants` object links a service to its variants.\nYou can use it to offer customers different prices for a service,\ndepending on which choices they book.\nRead more about [service options and variants](https://wix.wixanswers.com/app/kb/article/2e91a25b-b3c2-4cf7-9005-429a4929fc36/en)." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariantsCreated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ], + "doc": "Created service options and variants." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariantsDeleted", + "members": [ + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariantsUpdated", + "members": [ + { + "name": "entity", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceOptionsAndVariants", + "displayName": "ServiceOptionsAndVariants" + } + ], + "doc": "Updated service options and variants." + }, + { + "name": "metadata", + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsBackendEventMetadata", + "displayName": "BackendEventMetadata" + } + ], + "doc": "Event metadata." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceVariant", + "members": [ + { + "name": "choices", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceChoice", + "displayName": "ServiceChoice" + } + ] + } + } + ], + "doc": "Choices for the service option. Currently, only a single choice is supported\nbecause a service can have only a single option.\n\nMax: 1 choice\n" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsMoney", + "displayName": "Money" + } + ], + "doc": "Information about the service variant's price." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsServiceVariants", + "members": [ + { + "name": "values", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsServiceVariant", + "displayName": "ServiceVariant" + } + ] + } + } + ], + "doc": "Values of the service variants." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSession", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session ID." + }, + { + "name": "affectedSchedules", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLinkedSchedule", + "displayName": "LinkedSchedule" + } + ] + } + } + ], + "doc": "An object specifying a list of schedules and the way each schedule's availability is affected by the session. For example, the schedule of an instructor is affected by sessions of the class that they instruct.\nThe array is inherited from the schedule and can be overridden even if the session is a recurring session." + }, + { + "name": "calendarConference", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCalendarConference", + "displayName": "CalendarConference" + } + ], + "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." + }, + { + "name": "capacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of participants that can be added to the session. Defaults to the schedule capacity.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "end", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCalendarDateTime", + "displayName": "CalendarDateTime" + } + ], + "doc": "An object specifying the end date and time of the session. The `end` time must be after the `start` time and be same type as `start`.\nIf the session is a recurring session, `end` must contain a `localDateTime`." + }, + { + "name": "externalCalendarOverrides", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsExternalCalendarOverrides", + "displayName": "ExternalCalendarOverrides" + } + ], + "doc": "__Deprecated.__" + }, + { + "name": "inheritedFields", + "readOnly": true, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "A list of properties for which values were inherited from the schedule.\nThis does not include participants that were inherited from the schedule." + }, + { + "name": "instanceOfRecurrence", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representing a recurrence rule (RRULE) if the session is an instance of a recurrence pattern.\nEmpty when the session is not an instance of a recurrence rule, or if the session defines a recurrence pattern, and `recurrence` is not empty." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocation", + "displayName": "Location" + } + ], + "doc": "An object describing the location where the session takes place.\nDefaults to the schedule location.\nFor single sessions, `session.location.businessLocation` can only be provided for locations that are defined in the schedule using `schedule.location` or `schedule.availability.locations`." + }, + { + "name": "notes", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Additional information about the session.\nNotes are not supported for recurring sessions." + }, + { + "name": "originalStart", + "optional": true, + "type": [ + { + "nativeType": "Date" + } + ], + "doc": "Original start date and time of the session in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format." + }, + { + "name": "participants", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipant", + "displayName": "Participant" + } + ] + } + } + ], + "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." + }, + { + "name": "rate", + "readOnly": false, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsRate", + "displayName": "Rate" + } + ], + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." + }, + { + "name": "recurrence", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representing a recurrence rule (RRULE) for a recurring session, as defined in [iCalendar RFC 5545](https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html).\nIf the session is an instance of a recurrence pattern, the `instanceOfRecurrence` property will be contain the recurrence rule and this property will be empty.\nThe RRULE defines a rule for repeating a session.\nSupported parameters are:\n\n|Keyword|Description|Supported values|\n|--|--|---|\n|`FREQ`|The frequency at which the session is recurs. Required.|`WEEKLY`|\n|`INTERVAL`|How often, in terms of `FREQ`, the session recurs. Default is 1. Optional.|\n|`UNTIL`|The UTC end date and time of the recurrence. Optional.|\n|`BYDAY`|Day of the week when the event should recur. Required.|One of: `MO`, `TU`, `WE`, `TH`, `FR`, `SA`, `SU`|\n\n\nFor example, a session that repeats every second week on a Monday until January 7, 2022 at 8 AM:\n`\"FREQ=WEEKLY;INTERVAL=2;BYDAY=MO;UNTIL=20220107T080000Z\"`\n\n\n" + }, + { + "name": "recurringIntervalId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Recurring interval ID. Defined when a session will be a recurring session. read-only. Optional.\nFor exmaple, when creating a class service with recurring sessions, you add a recurrence rule to create recurring sessions.\nThis field is omitted for single sessions or instances of recurring sessions.\nSpecified when the session was originally generated from a schedule recurring interval.\nDeprecated. Use `recurringSessionId`." + }, + { + "name": "recurringSessionId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the recurring session if this session is an instance of a recurrence. Use this ID to update the recurrence and all of the instances." + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the schedule that the session belongs to." + }, + { + "name": "scheduleOwnerId", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the resource or service that the session's schedule belongs to." + }, + { + "name": "start", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsCalendarDateTime", + "displayName": "CalendarDateTime" + } + ], + "doc": "An object specifying the start date and time of the session. If the session is a recurring session, `start` must contain a `localDateTime`." + }, + { + "name": "status", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session status." + }, + { + "name": "tags", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "timeReservedAfter", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Time reserved after the session end time, derived from the schedule availability constraints and the time between slots. Read-only.\nIf the session is a recurring session, this field must be empty." + }, + { + "name": "title", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session title.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + }, + { + "name": "totalNumberOfParticipants", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of participants booked for the session. Read-only.\nCalculated as the sum of the party sizes." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Session type." + }, + { + "name": "version", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSessionVersion", + "displayName": "SessionVersion" + } + ], + "doc": "The session version.\nComposed by the schedule, session and participants versions." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSessionCancelled", + "members": [ + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "session", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSessionCreated", + "members": [ + { + "name": "session", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSessionUpdated", + "members": [ + { + "name": "newSession", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ], + "doc": "" + }, + { + "name": "oldSession", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSession", + "displayName": "Session" + } + ], + "doc": "" + }, + { + "name": "participantNotification", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsParticipantNotification", + "displayName": "ParticipantNotification" + } + ], + "doc": "Whether to notify participants about the change and an optional custom message" + }, + { + "name": "triggeredByAnonymizeRequest", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether this notification was created as a result of an anonymization request, such as GDPR.\nAn anonymized participant will have the following details:\nname = \"deleted\"\nphone = \"deleted\"\nemail = \"deleted@deleted.com\"" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSessionVersion", + "members": [ + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Incremental version number, which is updated on each change to the session or on changes affecting the session." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSettings", + "members": [ + { + "name": "keywords", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsKeyword", + "displayName": "Keyword" + } + ] + } + } + ], + "doc": "User-selected keyword terms for a specific page." + }, + { + "name": "preventAutoRedirect", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the Auto Redirect feature, which creates `301 redirects` on a slug change, is enabled.\n\nDefault: `false` (Auto Redirect is enabled.)\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSiteCloned", + "members": [ + { + "name": "originMetaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin site id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSiteCreated", + "members": [ + { + "name": "originTemplateId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Origin template site id." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesEvent", + "members": [ + { + "name": "properties", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsProperties", + "displayName": "Properties" + } + ], + "doc": "Updated properties." + }, + { + "name": "version", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Version of the site's properties represented by this update." + } + ], + "docs": { + "description": [ + "The actual update event for a particular notification." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesNotification", + "members": [ + { + "name": "changeContext", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsChangeContext", + "displayName": "ChangeContext" + } + ], + "doc": "Context of the notification" + }, + { + "name": "event", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesEvent", + "displayName": "SitePropertiesEvent" + } + ], + "doc": "The actual update event." + }, + { + "name": "metasiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The site ID for which this update notification applies." + }, + { + "name": "translations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsTranslation", + "displayName": "Translation" + } + ] + } + } + ], + "doc": "A convenience set of mappings from the MetaSite ID to its constituent services." + } + ], + "docs": { + "description": [ + "Encapsulates all details written to the Greyhound topic when a site's properties are updated." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSitePropertiesOnScheduleCreation", + "members": [ + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The global time zone value." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSorting", + "members": [ + { + "name": "fieldName", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Name of the field to sort by." + }, + { + "name": "order", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Sort order." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSpecialHourPeriod", + "members": [ + { + "name": "comment", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Additional info about the exception. For example, \"We close earlier on New Year's Eve.\"" + }, + { + "name": "endDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "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)." + }, + { + "name": "isClosed", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the business is closed (or the service is not available) during the exception.\n\nDefault: `true`.\n" + }, + { + "name": "startDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "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)." + } + ], + "docs": { + "description": [ + "Exception to the business's regular hours. The business can be open or closed during the exception." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSplitInterval", + "members": [ + { + "name": "sameAsDuration", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot duration is used as the split interval value.\nIf `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in\n`schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field." + }, + { + "name": "valueInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of minutes between available slots' start times when `same_as_duration` is `false`." + } + ], + "docs": { + "description": [ + "The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc." + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsStaffData", + "members": [ + { + "name": "refreshToken", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "resourceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "syncRequestEmail", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsStreetAddress", + "members": [ + { + "name": "apt", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Apartment number." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street name." + }, + { + "name": "number", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Street number." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSubdivision", + "members": [ + { + "name": "code", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Subdivision full name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsSupportedLanguage", + "members": [ + { + "name": "countryCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Language icon." + }, + { + "name": "isPrimary", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the supported language is the primary language for the site." + }, + { + "name": "languageCode", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format." + }, + { + "name": "locale", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Events.bookingsCatalogV1ServiceOptionsAndVariantsLocale", + "displayName": "Locale" + } + ], + "doc": "Locale." + }, + { + "name": "resolutionMethod", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "How the language will be resolved. For internal use." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "bookingsCatalogV1ServiceOptionsAndVariantsTag", + "members": [ + { + "name": "children", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "SEO tag inner content. For example, `
\n", + "required": true + } + ], + "requiredFields": [ + "localEndDate", + "localStartDate", + "location", + "location.locationType", + "services", + "services.serviceId", + "timeZone" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.GetMultiServiceAvailabilityTimeSlotResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves an available multiService `TimeSlot` that match the provided filters.", + "description": [ + "Throws `SlotNotFound` if there is no such available time slot.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n\nBy default,\nif you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,\nwe return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide\nthe corresponding service within the time slot.\n\nIf you specify `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,\nthe returned `TimeSlot`.`NestedTimeSlot` for this service will contain only `AvailableResources` with at least one available resource\nwhich match the given resources filters,\neach contains all available resources out of those requested.\n\n+ Notes:\n+ All nested time slots share the same location.\n+ You can pass up to 8 services.\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n" + ], + "examples": [ + { + "title": "GetMultiServiceAvailabilityTimeSlot ", + "body": [ + "import {multiServiceAvailabilityTimeSlots} from 'wix-bookings.v2';", + "", + "async function getMultiServiceAvailabilityTimeSlot() {", + " let services = [{\"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\"},", + " {\"serviceId\": \"239b6880-12ef-46ca-abdb-b502d4af11a9\"}", + " ]", + " let localStartDate = \"2023-12-27T11:00:00.000\"", + " let localEndDate = \"2023-12-27T13:00:00.000\"", + " let timeZone = \"Europe/Dublin\"", + " let location = {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": multiServiceAvailabilityTimeSlots.LocationType.BUSINESS", + " }", + "", + " try {", + " const result = await multiServiceAvailabilityTimeSlots.getMultiServiceAvailabilityTimeSlot(services, localStartDate, localEndDate, timeZone, location);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ], + "extra": { + "description": "Get the availability of a specific `TimeSlot` for a specific services. location, and time." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getMultiServiceAvailabilityTimeSlot" + }, + { + "name": "listMultiServiceAvailabilityTimeSlots", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlotsOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.ListMultiServiceAvailabilityTimeSlotsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a list of multiService `TimeSlot`s that match the provided filters.", + "description": [ + "Tip:
\n
\nUse this API in order to get the availability of a specificTimeSlotout of those returned fromListMultiServiceAvailabilityTimeSlotsAPI.
\n\n\nThe request body __must__ include either:\n+ All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.\n+ A `cursorPaging` with a valid `cursor` from previous response.\n\n\nEach [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response\nrepresents the availability of the given sequence of services in a specific order, location, and within a given range of time.\n\nEach `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order\nof the given services in request.\nThe first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,\nand each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.\n\nBy default,\nthe response contains at most 1000 results.\nIf there are more than 1000 results, we return a `cursorPagingMetadata` with\na cursor for the next page of results, regardless of whether a `cursorPaging`\nwas provided in request.\n\n> __Notes:__\n> + All nested time slots share the same location.\n> + You can pass up to 8 services in request.\n\n### AvailableResources in response:\nThe `TimeSlot`.`NestedTimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service\nwithin the `NestedTimeSlot` range of time. Each `AvailableResources` contains information about available resources of the same type.\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n\n\n\nIf you wish to get a list of available resources for a `TimeSlot`.`NestedTimeSlot` you should either:\n+ provide `service`.`resourceIds` in request.\n+ provide `service`.`includeResourceTypeIds` in request.\n\n__Notes:__\n+ In both cases the returned `TimeSlot`.`NestedTimeSlot` contains __up__ to 10 `AvailableResources` that match the provided filters. Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.\n+ If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.\n+ If you wish to get the full available resources list for all `NestedTimeSlot` of a specific `TimeSlot`, you should call [GetMultiServiceAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/get-multi-service-availability-time-slot).\n\n\n### Availability VS Bookability\nAn `available` time slot is not necessarily `bookable`.\nThe `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,\nat a specific period of time.\nRead more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_availability-vs-bookability).\n\nBy default,\n+ The response does not contains `unavailable` TimeSlots.For example, if there are no available resources to provide one of the services from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`, we don't return TimeSlots with `NestedTimeSlot`.`localStartDate` within this range for this service.\n+ The response contains both `bookable` and `un-bookable` TimeSlots.For example, if one of the services has a booking policy which enforces booking the service up to 10 minutes before the session starts, we return TimeSlots with the violating `NestedTimeSlot`.`localStartDate`, with `bookable` as `false`. If you want to list only __bookable__ TimeSlots you should pass `bookable` as `true`.\n+ If booking one of the `NestedTimeSlot`s violates one of the corresponding service's booking policies, the `TimeSlot` returns with `bookable` as false. There is no indication which service's policy was violated.\n\nImportant:
\n
\nBy default,\nif you don't specifyservice.includeResourceTypeIds\norservice.resourceIdsfilters in request,\nwe return TimeSlots withNestedTimeSlots with an emptyAvailableResources.\n
Note:
Not specifying resources filters can be handy in case you want to avoid large response in flows that only\ninterested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/multi-service-availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_multi-service-availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-all-selected-services-are-available-for)\nis an example for such flow.\n
\n\n\n### ListAvailabilityTimeSlots runs with the following defaults:\n+ `localStartDate` is sorted in `ASC` order.\n+ `cursorPaging`.`limit` is `1000`." + ], + "examples": [ + { + "title": "List Available, bookable `TimeSlots` for a sequence. of services ", + "body": [ + "import {multiServiceAvailabilityTimeSlots} from 'wix-bookings.v2';", + "", + "async function listMultiServiceAvailabilityTimeSlots() {", + " let options = {", + " \"services\": [", + " {", + " \"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\",", + " \"includeResourceTypeIds\": [\"1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\"]", + " },", + " {", + " \"serviceId\": \"239b6880-12ef-46ca-abdb-b502d4af11a9\"", + " }", + " ],", + " \"fromLocalDate\": \"2023-12-27T00:00:00.000\",", + " \"toLocalDate\": \"2023-12-27T23:59:59.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"bookable\": true,", + " \"location\": {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": multiServiceAvailabilityTimeSlots.LocationType.BUSINESS", + " }", + " }", + "", + " try {", + " const result = await multiServiceAvailabilityTimeSlots.listMultiServiceAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available TimeSlots for a specific service within a specific range of time, which does not violate any of the services booking policies." + } + }, + { + "title": "List Available `TimeSlots` for a sequence of services with `cursorPaging` ", + "body": [ + "import {multiServiceAvailabilityTimeSlots} from 'wix-bookings.v2';", + "", + "async function listMultiServiceAvailabilityTimeSlots() {", + " let cursorPaging = {", + " \"limit\": 10, ", + " \"cursor\": ", + "\"JWE.eyJhbGciOiJBMTI4S1ciLCJlbmMiOiJBMTI4Q0JDLUhTMjU2Iiwia2lkIjoiSGp3NWZDbWcifQ.VSu8sFPjWcbV0zOFOuGXvoniVJKlSsgHZCrGKoPSWR-2pv4hj_AbMg.A1Lk9xa7VQNlKdd60r8lCQ.sFiJV11yaBozO_LiWjqbeWqtzSkOGU_IjT_gTjvglwKQqsFxh2SaOvFfJVtUVkycUpZm7QKEGwGCku3RtY951dMpEwc3gE9HmVkIwWSJy5CVwV5jhixCLU1L0gkuG0n-UUOPfYHN1XJzFKF4BTnxJtp9pbq0ogKtsG_xexYbnKdVfWw1uD_DnZA60xb4LgH14Px-_1nz9K0jUIY1vzTKstv5wdhvjMt9zUFdrKFgUv8HwK_1IMmg9oLIGwJw8PCznJ5fx0ZeQ9GvPdAq6PCgkpyJhNbGbqtioRGb9OWFB6r_ZvPt-78U-44Rq0c0yOqZO3SncOTpyIchqG6h__HJAGJqZCb_p-DllMek5V0AKarLSHM6c8c-E_YnswXWsE-AkxCBQjK8X13ly2R0FepyxKK4Ha7RiZwSAPRPk9nTH_U0F_T7QFXWtVDdNdTGUvxjGmZ-4e11TBARb6ZbX_O2-gWeLFJUEbttt4WLtO_p-D3QVeFTCO3GdVNGteaJ6JdLsSd9nbnGGxZoVmKDoyaLEH6Y5vxIALCYlDJNvgOYgynzl2E5kJXTns2Y8TnO4WI6YeDLfxCL9y4Lc3zV9ZFlpA1TCwkQ3KoD68SVFQz0J2S_5Z6FRIs_S_p8LUzf-Lwzcj3R7DUOkpORL914urXo7k5ttfmIX9FcpTJezPP4oS0.ium2vX2wwZYTOkfK_nKaEw\"}", + "", + " let options = {", + " \"cursorPaging\": cursorPaging", + " }", + "", + " try {", + " const result = await multiServiceAvailabilityTimeSlots.listMultiServiceAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available `TimeSlots` of the next page of results with the returned `cursorPagingMetadata`.`cursors`.`next` of previous call." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "listMultiServiceAvailabilityTimeSlots" + } + ], + "messages": [ + { + "name": "AvailableResources", + "members": [ + { + "name": "hasMoreAvailableResources", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more available resources for the slot that are not listed in `resources` due to size limitations." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + }, + { + "name": "resources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Resource" + } + ] + } + } + ], + "doc": "Available resources for the time slot.\n\n+ When returned from `ListAvailabilityTimeSlots`, empty by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains __up__ to 10 available resources out of those provided.\n\n+ When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains all of the available resources out of those provided.\n\n\n> + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains __up__ to 10 available resources out of those provided.\n\n> + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains all of the available resources out of those provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingPolicyViolations", + "members": [ + { + "name": "bookOnlineDisabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Online booking is disabled for the `TimeSlot` service." + }, + { + "name": "tooEarlyToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too early to book this slot." + }, + { + "name": "tooLateToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too late to book this slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006\nTODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)\nAliza's suggestion to consider locks in bookable" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "from", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "openSpots", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with openSpots >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "to", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "slots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of results to load.\n\nDefault: `1000`.\nMax: `1000`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPagingMetadata", + "members": [ + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of items to return in the results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Cursors" + } + ], + "doc": "Cursor strings that point to the next page, previous page, or both." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more pages to retrieve following the current page.\n\n+ `true`: Another page of results can be retrieved.\n+ `false`: This is the last page.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor string pointing to the next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to the previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomerChoices", + "members": [ + { + "name": "durationInMinutes", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The selected customer duration in minutes.\nMin: `1 minute`\nMax: `44639 minutes` (30 days, 23 hours, and 59 minutes)" + } + ], + "docs": { + "description": [ + "Selected customer choices.\nThese choices are selected by the customer during the booking flow and can be utilized to calculate the corresponding service's configuration properties." + ] + } + }, + { + "name": "EventInfo", + "members": [], + "docs": { + "description": [ + "relevant for event based slots, and not for availability based slots" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotRequest", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nImportant:\nBecause of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.\nRead more about DST Handling
\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`." + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotRequest", + "members": [ + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "services", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService TimeSlots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: 2.\nMaxSize: 8.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to the service's booking policies.\n\nIf booking this `TimeSlot` does not violates any of the service's booking policies,\nreturns as `true`. Otherwise, returns as `false`.\n\n> __Note:__\n> A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n> while a time slot with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch results in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\na `cursorPaging`.`limit`.\nNo need to specify any additional parameters.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains __up__ to 10 available resources of this type.\n" + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "Locations to include in response.\n\nBy default,\nif no locations are provided,\nthe response contains TimeSlots for all locations where the service is available.\n\nYou can specify locations or location types for which the time slots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n" + }, + { + "name": "resourceIds", + "readOnly": false, + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\nOtherwise, the returned TimeSlots returns with an empty `AvailableResources`." + }, + { + "name": "resourceTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.ResourceType" + } + ] + } + } + ], + "doc": "resources filter\nIf specified, only time slots with these resources will be returned." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID for which the time slots are being returned for.\nCurrently supported only for services of type `APPOINTMENT`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "fromLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with remainingCapacity >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default?" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The services for which the time slots are being returned." + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format.\nDefault is the Wix Business time zone." + }, + { + "name": "toLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "TODO: maxsize" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to all of the services booking policies.\n\nIf booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\nreturns as `false`. Otherwise, returns as `true`.\n\n> __Note:__\n> A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n> while a `TimeSlot` with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\nhas a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\nthe other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n\nEach nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch TimeSlots in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\nthe `cursorPaging`.`limit`. You may pass a different `limit`.\nNo need to specify any additional parameters.\n\nImportant:
\n
\ncountis not supported.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ], + "doc": "Location for which the multiService TimeSlots are being returned for.\n\nYou can specify location or location type for which the TimeSlots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService time slots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: `2`.\nMaxSize: `8`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to all of the services booking policies.\n\nIf booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\nreturns as `false`. Otherwise, returns as `true`.\n\n> __Note:__\n> A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n> while a `TimeSlot` with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\nhas a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\nthe other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n\nEach nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch TimeSlots in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\nthe `cursorPaging`.`limit`. You may pass a different `limit`.\nNo need to specify any additional parameters.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ], + "doc": "Location for which the multiService TimeSlots are being returned for.\n\nYou can specify location or location type for which the TimeSlots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService time slots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: `2`.\nMaxSize: `8`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Location", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Location ID. Present only if the location is a business location." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representation for the full address of the location." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n- `CUSTOMER`: The location is determined by the customer and is not set up beforehand." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedTimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the nested time slot.\nEach `AvailableResources` contains information about available resources of the same type." + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the nested time slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Resource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ResourceType", + "members": [ + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource IDs.\nThe response will contain only slots that have at least one of the specified resources." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Service", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The resource type ID's to include in returned time slots.\nThis is in addition to the specifically requested resources.\n\nImportant:
\n
\ncountis not supported.
\nCurrently supported only for Staff Member resource type.\nStaff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the time slot.\nEach `AvailableResources` contains information about available resources of the same type.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own available resources.\n" + }, + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot is bookable according to the service's booking policies.\n\nIf booking this time slot does not violates any of the service's booking policies,\nthe returned value is `true`. Otherwise, returns `false`.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.BookingPolicyViolations" + } + ], + "doc": "Indicators for booking policy violations for the slot.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.Location" + } + ], + "doc": "The geographic location of the slot." + }, + { + "name": "nestedTimeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.MultiServiceAvailabilityTimeSlots.NestedTimeSlot" + } + ] + } + } + ], + "doc": "> Nested time slots.\n> Returned only from `MultiServiceAvailabilityTimeSlots` API calls." + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Remaining number of spots for the slot.\nFor example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own serviceId.\n" + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots for the slot." + } + ], + "docs": { + "description": [ + "The `TimeSlot` object represents the availability information\nfor an `Appointment` service's specific slot, including:" + ] + } + }, + { + "name": "WaitingList", + "members": [ + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of remaining spots for this wait list.\nFor example, a Yoga event with 10 waitList spots and 3 registered\non the waitList has 10 `total_capacity` and 7 `remaining_capacity`." + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots in this wait list." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-bookings-v2/wix-bookings-v2/Pricing.service.json b/wix-bookings-v2/wix-bookings-v2/Pricing.service.json index 72176af143..a82cf30bc6 100644 --- a/wix-bookings-v2/wix-bookings-v2/Pricing.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Pricing.service.json @@ -44,25 +44,45 @@ "docs": { "summary": "Calculates the base price of a booking.", "description": [ - "You can call [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) after a booking is created. The returned calculated price includes information about each line\nitem's price and the booking's total price.\n\nYou can use [`previewPrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/previewprice) to get the base price\nbefore a booking is created.\n\nThe calculated price is the base price that will be used as a basis for charging the customer.\nDuring checkout, additional taxes\nand fees might be added to this base price.\n\n## Calculating the price\n\nWix Bookings has its own default pricing logic for calculating the price. When\nusing Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`\nor `schedule` object to [`calculatePrice()`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice).\n\nAlternatively you can customize the pricing logic using the\n[Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-integration-spi).\nIf you integrate with a pricing provider, the customized pricing logic becomes\nthe default logic. This means that, if the Pricing Integration SPI is implemented,\nwhen calling `calculatePrice()`,\nthe customized logic is used instead." + "You can call `calculatePrice()` after a booking is created. The returned calculated price includes information about each line\nitem's price and the booking's total price.\n\nYou can use `previewPrice()` to get the base price\nbefore a booking is created.\n\nThe calculated price is the base price that will be used as a basis for charging the customer.\nDuring checkout, additional taxes\nand fees might be added to this base price.\n\n## Calculating the price\n\nWix Bookings has its own default pricing logic for calculating the price. When\nusing Wix Bookings' default pricing logic, you must pass the `serviceId` in the `slot`\nor `schedule` object to `calculatePrice()`.\n\nAlternatively you can customize the pricing logic using the\n[BookingsCustomPricing](https://dev.wix.com/docs/velo/api-reference/wix-bookings-v2/service-plugins-spis/bookings-custom-pricing/introduction) service plugin.\nIf you integrate with a pricing provider, the customized pricing logic becomes\nthe default logic. This means that, if the Custom Pricing service plugin is implemented,\nwhen calling `calculatePrice()`,\nthe customized logic is used instead." ], "examples": [ { "title": "calculatePrice example", "body": [ "import { pricing } from 'wix-bookings.v2';", - " ", - " async function calculatePrice(booking) {", - " try {", - " const result = await pricing.calculatePrice(booking);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function calculatePrice(booking) {", + " try {", + " const result = await pricing.calculatePrice(booking);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "calculatePrice example for exporting from backend code", + "body": [ + "import { pricing } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const calculatePrice = webMethod(", + " Permissions.Anyone,", + " async (booking) => {", + " try {", + " const result = await pricing.calculatePrice(booking);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -117,25 +137,45 @@ "docs": { "summary": "Previews the base price for a set of line items belonging to the same service\nbefore a potential booking is actually created.", "description": [ - "The returned price preview information about each line\nitem's price and sums up each line item's price.\n\nThe previewed price is not the actual price that will be used to charge the customer.\n`Preview Price` only estimates the base price by adding up the price\nof each line item before\nthe booking is actually created.\n\nUse [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price\nafter the booking is created.\n\nPassing line items that belong to different services results in an error.\n\n## Calculating the previewed price\n\nWix Bookings has its own default pricing logic for previewing the price. You must\npass the `serviceId` in the `slot`\nor `schedule` object to [`previewPrice()`].\n\nYou cannot call `previewPrice()` if you have customized Bookings pricing logic using the\n[Bookings Pricing Integration REST SPI](https://dev.wix.com/api/rest/wix-bookings/pricing-integration-spi). Calling `previewPrice` if custom pricing\nlogic has been implemented for the site results in an error." + "The returned price preview information about each line\nitem's price and sums up each line item's price.\n\nThe previewed price is not the actual price that will be used to charge the customer.\n`Preview Price` only estimates the base price by adding up the price\nof each line item before\nthe booking is actually created.\n\nUse [`Calculate Price`](https://www.wix.com/velo/reference/wix-bookings-v2/pricing/calculateprice) to get the base price\nafter the booking is created.\n\nPassing line items that belong to different services results in an error.\n\n## Calculating the previewed price\n\nWix Bookings has its own default pricing logic for previewing the price. You must\npass the `serviceId` in the `slot`\nor `schedule` object to `previewPrice()`.\n\nYou cannot call `previewPrice()` if you have customized Bookings pricing logic using the\n[BookingsCustomPricing](https://dev.wix.com/docs/velo/api-reference/wix-bookings-v2/service-plugins-spis/bookings-custom-pricing/introduction) service plugin. Calling `previewPrice` if custom pricing\nlogic has been implemented for the site results in an error." ], "examples": [ { "title": "previewPrice example", "body": [ "import { pricing } from 'wix-bookings.v2';", - " ", - " async function previewPrice(bookingLineItems) {", - " try {", - " const result = await pricing.previewPrice(bookingLineItems);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function previewPrice(bookingLineItems) {", + " try {", + " const result = await pricing.previewPrice(bookingLineItems);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "previewPrice example for exporting from backend code", + "body": [ + "import { pricing } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const previewPrice = webMethod(", + " Permissions.Anyone,", + " async (bookingLineItems) => {", + " try {", + " const result = await pricing.previewPrice(bookingLineItems);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -400,13 +440,14 @@ }, { "name": "title", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Session title at the time of booking." + "doc": "Session title at the time of booking.\nIf session doesn't exist at the time of the booking, service name is used." } ], "extra": { @@ -592,6 +633,16 @@ ], "doc": "The end time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)\nformat." }, + { + "name": "eventId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Calendar 3 event ID\nIf not empty, on all write flows (create / update) gets priority over session_id.\nso if both session_id and event_id are provided, the session_id that will be set on the booking will be based on the event_id.\nOtherwise, if event_id is empty on write flow," + }, { "name": "location", "optional": true, @@ -610,7 +661,7 @@ "referenceType": "wix-bookings-v2.Pricing.BookedResource" } ], - "doc": "The resource assigned to the slot." + "doc": "The enriched resource assigned to the slot, can be either the requested resource or the resource chosen by the system.\nWhen populated, the given resource will be booked according to it's availability.\nWhen empty, If `skip_availability_validation` is `false`, a random available resource will be assigned to the slot upon confirmation,\notherwise one of the service resources will be assigned to the slot randomly upon confirmation.\nThis resource is the slot primary resource." }, { "name": "scheduleId", @@ -783,7 +834,7 @@ "referenceType": "wix-bookings-v2.Pricing.ExtendedFields" } ], - "doc": "Additional custom fields. This includes fields managed by Wix, by 3rd-party apps, and by the site.\n\nEmpty fields are not returned.\n" + "doc": "Custom field data for this object. Extended fields must be configured in the Wix Dev Center before they can be accessed with API calls." }, { "name": "externalUserId", @@ -994,7 +1045,7 @@ "nativeType": "string" } ], - "doc": "Actor that created this booking.\n" + "doc": "Actor that created this booking." }, { "name": "appDefId", @@ -1026,7 +1077,7 @@ "nativeType": "string" } ], - "doc": "Platform from which a booking was created\n" + "doc": "Platform from which a booking was created" } ], "docs": { @@ -1149,6 +1200,7 @@ }, { "name": "timeZone", + "readOnly": false, "optional": true, "type": [ { @@ -1468,6 +1520,37 @@ ] } }, + { + "name": "MultiServiceBookingInfo", + "members": [ + { + "name": "_id", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking ID." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Multi service booking type." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "ParticipantChoices", "members": [ diff --git a/wix-bookings-v2/wix-bookings-v2/ServiceAvailability.service.json b/wix-bookings-v2/wix-bookings-v2/ServiceAvailability.service.json new file mode 100644 index 0000000000..52fa1b952e --- /dev/null +++ b/wix-bookings-v2/wix-bookings-v2/ServiceAvailability.service.json @@ -0,0 +1,2531 @@ +{ + "name": "ServiceAvailability", + "memberOf": "wix-bookings-v2", + "mixes": [], + "callbacks": [], + "extra": {}, + "clientId": "wix-bookings.v2-time_slot", + "docs": {}, + "relatedGuides": [], + "properties": [], + "operations": [ + { + "name": "getAvailabilityTimeSlot", + "params": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.GetAvailabilityTimeSlotOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [ + "options.localEndDate", + "options.localStartDate", + "options.location", + "options.timeZone", + "serviceId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.GetAvailabilityTimeSlotResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves an available `TimeSlot` that match the provided filters.", + "description": [ + "Throws `SlotNotFound` if there is no such available time slot.\n\n
\n\n\nBy default,\nif you don't provide `includeResourceTypeIds` or `resourceIds` in request,\nwe return all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide\nthe service within the time slot.\n\nIf you specify `includeResourceTypeIds` or `resourceIds` in request,\nthe returned `TimeSlot` will contain only `AvailableResources` with at least one available resource\nwhich match the given resources filters,\neach contains all available resources out of those requested.\n\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n" + ], + "examples": [ + { + "title": "GetAvailabilityTimeSlot ", + "body": [ + "import {serviceAvailability} from 'wix-bookings.v2';", + "", + "async function getAvailabilityTimeSlot() {", + " let serviceId = \"c9390064-c0ee-4f4e-89db-9f59a8f49928\"", + " let options = {", + " \"localStartDate\": \"2023-12-27T11:00:00.000\",", + " \"localEndDate\": \"2023-12-27T12:00:00.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"location\": {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": serviceAvailability.LocationType.BUSINESS", + " }", + " }", + "", + " try {", + " const result = await serviceAvailability.getAvailabilityTimeSlot(serviceId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }" + ], + "extra": { + "description": "Get the availability of a service within a specific time slot." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getAvailabilityTimeSlot" + }, + { + "name": "getMultiServiceAvailabilityTimeSlot", + "params": [ + { + "name": "services", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService TimeSlots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: 2.\nMaxSize: 8.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.GetMultiServiceAvailabilityTimeSlotOptions" + } + ], + "doc": "", + "required": true + } + ], + "requiredFields": [ + "options", + "options.localEndDate", + "options.localStartDate", + "options.location", + "options.location.locationType", + "options.timeZone", + "services", + "services.serviceId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.GetMultiServiceAvailabilityTimeSlotResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves an available multiService `TimeSlot` that match the provided filters.", + "description": [ + "Throws `SlotNotFound` if there is no such available time slot.\n\nTip:
\n
\nUse this API in order to get the availability of a specificTimeSlotout of those returned fromListAvailabilityTimeSlotsAPI.
\n\n\nBy default,\nif you don't provide a `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,\nwe return for each `TimeSlot`.`NestedTimeSlot` all `AvailableResources` with all `AvailableResources`.`resources` which are available to provide\nthe corresponding service within the time slot.\n\nIf you specify `service`.`includeResourceTypeIds` or `service`.`resourceIds` in request,\nthe returned `TimeSlot`.`NestedTimeSlot` for this service will contain only `AvailableResources` with at least one available resource\nwhich match the given resources filters,\neach contains all available resources out of those requested.\n\n+ Notes:\n+ All nested time slots share the same location.\n+ You can pass up to 8 services.\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n" + ], + "examples": [ + { + "title": "GetMultiServiceAvailabilityTimeSlots ", + "body": [ + "import {serviceAvailability} from 'wix-bookings.v2';", + "", + "async function getMultiServiceAvailabilityTimeSlot() {", + " let services = [{\"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\"},", + " {\"serviceId\": \"239b6880-12ef-46ca-abdb-b502d4af11a9\"}", + " ]", + " let options = {", + " \"localStartDate\": \"2023-12-27T11:00:00.000\",", + " \"localEndDate\": \"2023-12-27T13:00:00.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"location\": {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": serviceAvailability.LocationType.BUSINESS", + " }", + " }", + "", + " try {", + " const result = await serviceAvailability.getMultiServiceAvailabilityTimeSlot(services, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "Get the availability of a specific TimeSlot for a specific list of services." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "getMultiServiceAvailabilityTimeSlot" + }, + { + "name": "listAvailabilityTimeSlots", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.ListAvailabilityTimeSlotsOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.ListAvailabilityTimeSlotsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a list of `TimeSlot`s that match the provided filters.", + "description": [ + "Tip:
\n
\nUse this API in order to get the availability of a specificTimeSlotout of those returned fromListMultiServiceAvailabilityTimeSlotsAPI.
\n\n\nThe request body __must__ include either:\n+ All of the following filters: `serviceId`, `fromLocalDate`, `toLocalDate`, and `timeZone`.\nYou may add additional filters as you wish.\n+ A `cursorPaging` with a valid `cursor` from previous response.\n\n\nEach [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response\nrepresents the availability of the service in a specific location,\nand has a `localStartDate` within the range of the provided `fromLocalDate` and `toLocalDate` exclusive.\nThe `localEndDate` of a `TimeSlot` is calculated as the sum of the `TimeSlot`'s `localStartDate` and the duration of the service.\n\nBy default,\nthe response contains at most 1000 results.\nIf there are more than 1000 results, we return a `cursorPagingMetadata` with\na cursor for the next page of results, regardless of whether a `cursorPaging`\nwas provided in request.\n\n### AvailableResources in response\nThe `TimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service\nwithin the time slot. Each `AvailableResources` contains information about available resources of the same type.\n\nImportant:\nCurrently supported only for services of type
\nAPPOINTMENT.
\n\n\nIf you wish to get a list of available resources for each `TimeSlot` you should either:\n+ provide `resourceIds` in request.\n+ provide `includeResourceTypeIds` in request.\n\n__Notes:__\n+ In both cases the returned TimeSlots contains __up__ to 10 `AvailableResources` that match the provided filters.\nEach `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.\n+ If an `AvailableResources` has more available resources which are not listed within it,\nwe return `AvailableResources`.`hasMoreAvailableResources` as true.\n> __Note:__\n> If you wish to get the full available resources list for a specific `TimeSlot`,\n> you should call [GetAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/get-availability-time-slot).\n\n\n### Availability VS Bookability\nAn `available` time slot is not necessarily `bookable`.\nThe `bookable` field of a `TimeSlot` indicates whether a customer can book the service within the given time slot,\nat a specific period of time.\nRead more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/service-availability-time-slots/introduction#all-apis_wix-service-availability_service-availability-time-slots_introduction_availability-vs-bookability).\n\nBy default,\n+ The response does not contains `unavailable` TimeSlots.\nFor example,\nif there are no available resources to provide the service from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`,\nwe don't return TimeSlots with `localStartDate` within this range.\n+ The response contains both `bookable` and `un-bookable` TimeSlots.\nFor example,\nif the service has a booking policy which enforces booking the service up to 10 minutes before the session starts,\nwe return TimeSlots with the violating `localStartDate` with `bookable` as false.\nIf you wish to list only available __bookable__ TimeSlots you should pass `bookable` filter as true.\n\nImportant:
\n
\nBy default,\nif you don't specifyincludeResourceTypeIds\norresourceIdsfilters in request,\nwe return TimeSlots with an emptyAvailableResources.\n
Note:
Not specifying resources filters can be handy in case you want to avoid large response in flows that only\ninterested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-the-selected-service-is-available-for)\nis an example for such flow.\n
\n\n\n\n### ListAvailabilityTimeSlots runs with the following defaults\n+ `localStartDate` is sorted in `ASC` order\n+ `cursorPaging`.`limit` is `1000`" + ], + "examples": [ + { + "title": "ListAvailabilityTimeSlots ", + "body": [ + "import {serviceAvailability} from 'wix-bookings.v2';", + "", + "async function listAvailabilityTimeSlots() {", + " let options = {", + " \"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\",", + " \"fromLocalDate\": \"2024-12-27T11:00:00.000\",", + " \"toLocalDate\": \"2024-12-27T16:00:00.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"bookable\": true,", + " \"locations\": [", + " {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": serviceAvailability.LocationType.BUSINESS", + " }", + " ]", + " }", + " try {", + " const result = await", + " serviceAvailability.listAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available, bookable TimeSlots for a specific service within a specific range of time." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "listAvailabilityTimeSlots" + }, + { + "name": "listMultiServiceAvailabilityTimeSlots", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.ListMultiServiceAvailabilityTimeSlotsOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.ListMultiServiceAvailabilityTimeSlotsResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves a list of multiService `TimeSlot`s that match the provided filters.", + "description": [ + "Important:\nBecause of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.\nRead more about DST Handling
\n
\n\n\nThe request body __must__ include either:\n+ All of the following filters: `service`.`serviceId`, `fromLocalDate`, `toLocalDate`, `location`, and `timeZone`. You may add additional filters as you wish.\n+ A `cursorPaging` with a valid `cursor` from previous response.\n\n\nEach [TimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/availability-time-slots/time-slot-object) in response\nrepresents the availability of the given sequence of services in a specific order, location, and within a given range of time.\n\nEach `TimeSlot`.`NestedTimeSlot` represents a single service from the given list. The order of the `NestedTimeSlots` is the same as the order\nof the given services in request.\nThe first `NestedTimeSlot` has `localStartDate` within the given `fromLocalDate` and `toLocalDate` exclusive,\nand each following `NestedTimeSlot` has a `localStartDate` that equals to the previous `NestedTimeSlot`'s `localEndDate`.\n\nBy default,\nthe response contains at most 1000 results.\nIf there are more than 1000 results, we return a `cursorPagingMetadata` with\na cursor for the next page of results, regardless of whether a `cursorPaging`\nwas provided in request.\n\n> __Notes:__\n> + All nested time slots share the same location.\n> + You can pass up to 8 services in request.\n\n### AvailableResources in response:\nThe `TimeSlot`.`NestedTimeSlot`'s `AvailableResources` contains information about the resources that are available to provide the service\nwithin the `NestedTimeSlot` range of time. Each `AvailableResources` contains information about available resources of the same type.\n\nImportant:
\n
\nCurrently supported only for services of typeAPPOINTMENT.
\n\n\n\nIf you wish to get a list of available resources for a `TimeSlot`.`NestedTimeSlot` you should either:\n+ provide `service`.`resourceIds` in request.\n+ provide `service`.`includeResourceTypeIds` in request.\n\n__Notes:__\n+ In both cases the returned `TimeSlot`.`NestedTimeSlot` contains __up__ to 10 `AvailableResources` that match the provided filters. Each `AvailableResources` contains __up__ to 10 available `resources` of the same type that match the provided filters.\n+ If an `AvailableResources` has more available resources which are not listed within it, we return `AvailableResources`.`hasMoreAvailableResources` as true.\n+ If you wish to get the full available resources list for all `NestedTimeSlot` of a specific `TimeSlot`, you should call [GetMultiServiceAvailabilityTimeSlot](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/get-multi-service-availability-time-slot).\n\n\n### Availability VS Bookability\nAn `available` time slot is not necessarily `bookable`.\nThe `bookable` field of a `TimeSlot` indicates whether the customer can book all of the of the services within the given time slot,\nat a specific period of time.\nRead more about [Availability VS Bookability](https://bo.wix.com/wix-docs/rest/all-apis/wix-service-availability/multi-service-availability-time-slots/introduction#all-apis_wix-service-availability_multi-service-availability-time-slots_introduction_availability-vs-bookability).\n\nBy default,\n+ The response does not contains `unavailable` TimeSlots.For example, if there are no available resources to provide one of the services from `2024-01-30T14:30:00` to `2024-01-30T15:30:00`, we don't return TimeSlots with `NestedTimeSlot`.`localStartDate` within this range for this service.\n+ The response contains both `bookable` and `un-bookable` TimeSlots.For example, if one of the services has a booking policy which enforces booking the service up to 10 minutes before the session starts, we return TimeSlots with the violating `NestedTimeSlot`.`localStartDate`, with `bookable` as `false`. If you want to list only __bookable__ TimeSlots you should pass `bookable` as `true`.\n+ If booking one of the `NestedTimeSlot`s violates one of the corresponding service's booking policies, the `TimeSlot` returns with `bookable` as false. There is no indication which service's policy was violated.\n\nImportant:
\n
\nBy default,\nif you don't specifyservice.includeResourceTypeIds\norservice.resourceIdsfilters in request,\nwe return TimeSlots withNestedTimeSlots with an emptyAvailableResources.\n
Note:
Not specifying resources filters can be handy in case you want to avoid large response in flows that only\ninterested of whether the time slots are available. [Finding the next available slot within the next 3 months](https://bo.wix.com/wix-docs/rest/all-apis/service-availability/multi-service-availability-time-slots/sample-flows?localViewerId=inbari#all-apis_service-availability_multi-service-availability-time-slots_sample-flows_find-the-first-date-within-the-next-3-months-that-all-selected-services-are-available-for)\nis an example for such flow.\n
\n\n\n### ListAvailabilityTimeSlots runs with the following defaults:\n+ `localStartDate` is sorted in `ASC` order.\n+ `cursorPaging`.`limit` is `1000`." + ], + "examples": [ + { + "title": "ListMultiServiceAvailabilityTimeSlots ", + "body": [ + "import {serviceAvailability} from 'wix-bookings.v2';", + "", + "async function listMultiServiceAvailabilityTimeSlots() {", + " let options = {", + " \"services\": [", + " {", + " \"serviceId\": \"c9390064-c0ee-4f4e-89db-9f59a8f49928\",", + " \"includeResourceTypeIds\": \"1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\"", + " },", + " {\"serviceId\": \"239b6880-12ef-46ca-abdb-b502d4af11a9\"}", + " ],", + " \"fromLocalDate\": \"2023-12-27T11:00:00.000\",", + " \"toLocalDate\": \"2023-12-27T14:00:00.000\",", + " \"timeZone\": \"Europe/Dublin\",", + " \"bookable\": true,", + " \"location\": {", + " \"locationId\": \"b4698671-3412-49b5-bff1-f50d4d0fe3b3\",", + " \"locationType\": serviceAvailability.LocationType.BUSINESS", + " }", + " }", + " try {", + " const result = await serviceAvailability.listMultiServiceAvailabilityTimeSlots(options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}" + ], + "extra": { + "description": "List all available, bookable TimeSlots for a specific list of services within a given range of time." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "listMultiServiceAvailabilityTimeSlots" + } + ], + "messages": [ + { + "name": "AvailableResources", + "members": [ + { + "name": "hasMoreAvailableResources", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more available resources for the slot that are not listed in `resources` due to size limitations." + }, + { + "name": "resourceTypeId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource type ID." + }, + { + "name": "resources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Resource" + } + ] + } + } + ], + "doc": "Available resources for the time slot.\n\n+ When returned from `ListAvailabilityTimeSlots`, empty by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains __up__ to 10 available resources out of those provided.\n\n+ When returned from `GetAvailabilityTimeSlots`, contains all available resources by default.\n+ + If you provided `includeResourceTypeIds` or `resourceIds` in request,\ncontains all of the available resources out of those provided.\n\n\n> + When returned from `ListMultiServiceAvailabilityTimeSlots`, empty by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains __up__ to 10 available resources out of those provided.\n\n> + When returned from `GetMultiServiceAvailabilityTimeSlots`, contains all available resources by default.\n> + + If you provided `includeResourceTypeIds` or `resourceIds` in request,\n> contains all of the available resources out of those provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BookingPolicyViolations", + "members": [ + { + "name": "bookOnlineDisabled", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Online booking is disabled for the `TimeSlot` service." + }, + { + "name": "tooEarlyToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too early to book this slot." + }, + { + "name": "tooLateToBook", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Bookings policy violation. Too late to book this slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006\nTODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)\nAliza's suggestion to consider locks in bookable" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "from", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "openSpots", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with openSpots >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "to", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006\nTODO: Locks are not taken into account. // Class is not supported yet. (relevant only for classes with waiting list)\nAliza's suggestion to consider locks in bookable" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "from", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "openSpots", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with openSpots >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "" + }, + { + "name": "slotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + }, + { + "name": "to", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalculateEventBasedAvailabilityResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "slots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ] + } + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of results to load.\n\nDefault: `1000`.\nMax: `1000`.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursorPagingMetadata", + "members": [ + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonCursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPaging", + "members": [ + { + "name": "cursor", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CursorPagingMetadata", + "members": [ + { + "name": "count", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items returned in the response." + }, + { + "name": "cursors", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Cursors" + } + ], + "doc": "Offset that was requested." + }, + { + "name": "hasNext", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Cursors", + "members": [ + { + "name": "next", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to next page in the list of results." + }, + { + "name": "prev", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Cursor pointing to previous page in the list of results." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EventInfo", + "members": [], + "docs": { + "description": [ + "relevant for event based slots, and not for availability based slots" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotOptions", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nImportant:\nBecause of DST, there are edge cases where certain times either do not exist or exist twice for a local time zone.\nRead more about DST Handling
\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotRequest", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type IDs to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned `TimeSlot` contains only the `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains all the available resources of this type.\n" + }, + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned `TimeSlot` contains only the available resources out of provided list.\nOtherwise, the returned `TimeSlot` returned with all possible `AvailableResources`.\n" + }, + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the time slot.\nCurrently supported only for services of type `APPOINTMENT`." + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotOptions", + "members": [ + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotRequest", + "members": [ + { + "name": "localEndDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "The location of the time slot.\n\nYou must provide a specific `locationType`.\nIf locationType is `BUSINESS`, you __must__ also provide a `locationId`.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "services", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService TimeSlots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: 2.\nMaxSize: 8.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetMultiServiceAvailabilityTimeSlotResponse", + "members": [ + { + "name": "timeSlot", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ], + "doc": "Time slot." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to the service's booking policies.\n\nIf booking this `TimeSlot` does not violates any of the service's booking policies,\nreturns as `true`. Otherwise, returns as `false`.\n\n> __Note:__\n> A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n> while a time slot with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch results in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\na `cursorPaging`.`limit`.\nNo need to specify any additional parameters.\n\nSupports filtering by location type, or by location ID.\nOther fields like
\nnameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains __up__ to 10 available resources of this type.\n" + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "Locations to include in response.\n\nBy default,\nif no locations are provided,\nthe response contains TimeSlots for all locations where the service is available.\n\nYou can specify locations or location types for which the time slots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\nOtherwise, the returned TimeSlots returns with an empty `AvailableResources`.\n" + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID for which the time slots are being returned for.\nCurrently supported only for services of type `APPOINTMENT`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to the service's booking policies.\n\nIf booking this `TimeSlot` does not violates any of the service's booking policies,\nreturns as `true`. Otherwise, returns as `false`.\n\n> __Note:__\n> A time slot that doesn't meet the service's bookings policies will be returned with `bookable` = false,\n> while a time slot with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch results in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass `cursorPaging`.`cursor` with the returned cursor from previous call, and\na `cursorPaging`.`limit`.\nNo need to specify any additional parameters.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resource type ID's to include in response, this is in addition to the requested `resourceIds`.\n\nIf specified in request, the returned TimeSlots will contain __up__ to 10 `AvailableResources` with `ResourceTypeId`\nout of those specified, each contains __up__ to 10 available resources of this type.\n" + }, + { + "name": "locations", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "Locations to include in response.\n\nBy default,\nif no locations are provided,\nthe response contains TimeSlots for all locations where the service is available.\n\nYou can specify locations or location types for which the time slots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response.\n\nIf specified,\nthe returned TimeSlots will contain __up__ to 10 available resources out of the provided list.\nOtherwise, the returned TimeSlots returns with an empty `AvailableResources`.\n" + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID for which the time slots are being returned for.\nCurrently supported only for services of type `APPOINTMENT`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "fromLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with remainingCapacity >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default?" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format.\nDefault is the Wix Business time zone." + }, + { + "name": "toLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "TODO good definition of what bookable means https://github.com/wix-private/scheduler/pull/18267/files?file-filters%5B%5D=.proto&show-viewed-files=true#r1199809006" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "each nested field is checked on its own. i.e. if `too_early_to_book` is defined and `too_late_to_book` is not defined\nwe will return slots for which `too_early_to_book` is same as on the request, regardless of `too_late_to_book`." + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPaging" + } + ], + "doc": "" + }, + { + "name": "fromLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ] + } + } + ], + "doc": "support filtering by location type, or by locationId. Other fields like `name` are ignored" + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "if not empty, return slots with remainingCapacity >= X" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "TODO: maxsize && do we need include_resource_type_id here? also is the behavior is the same as availabilityTimeSlots, we won't return resources by default?" + }, + { + "name": "serviceIds", + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The services for which the time slots are being returned." + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,\nat most 3 available slots are returned for each day in the date range specified in the query's\n`filter`.\n\nWhen a day has both bookable and non-bookable slots, bookable slots are returned first.\nNon-bookable slots are returned according to the specified filters, after all\nbookable slots are already included.\n" + }, + { + "name": "timeZone", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format.\nDefault is the Wix Business time zone." + }, + { + "name": "toLocalDate", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date for which event time slots are returned, in ISO-8601 format.\nE.g, \"2024-01-30T13:30:00\".\nRequired, unless `cursorPaging` is provided." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListEventTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CursorPagingMetadata" + } + ], + "doc": "" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ] + } + } + ], + "doc": "TODO: maxsize" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The time zone, in IANA time zone format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsOptions", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to all of the services booking policies.\n\nIf booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\nreturns as `false`. Otherwise, returns as `true`.\n\n> __Note:__\n> A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n> while a `TimeSlot` with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\nhas a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\nthe other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n\nEach nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch TimeSlots in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\nthe `cursorPaging`.`limit`. You may pass a different `limit`.\nNo need to specify any additional parameters.\n\nImportant:
\n
\ncountis not supported.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "Location for which the multiService TimeSlots are being returned for.\n\nYou can specify location or location type for which the TimeSlots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService time slots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: `2`.\nMaxSize: `8`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsRequest", + "members": [ + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the `TimeSlot` is bookable according to all of the services booking policies.\n\nIf booking any of the `TimeSlot`.`NestedTimeSlot`s violates any of its services bookings policies,\nreturns as `false`. Otherwise, returns as `true`.\n\n> __Note:__\n> A `TimeSlot` with a `NestedTimeSlot` that doesn't meet its service's bookings policies will be returned with `bookable` = false,\n> while a `TimeSlot` with no available resources will not be returned at all.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "Indicators for service's booking policy violations for booking the `TimeSlot`.\n\nA bookable time slot must not violate any policy,\ntherefor, this filter is only relevant when `bookable` filter is false.\n\nEach nested field is checked on all `NestedTimeSlot`s. For example, if only one of the `NestedTimeSlot`'s\nhas a service with `tooEarlyToBook` same as in the request, we return the `TimeSlot` regardless of whether\nthe other `NestedTimeSlots` has the same `tooEarlyToBook` as in request.\n\nEach nested field is checked on its own. For example, if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe return slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "cursorPaging", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPaging" + } + ], + "doc": "CursorPaging.\n\nEnables you to fetch TimeSlots in smaller, more manageable chunks\nby setting a limit on the number of results returned in response.\nThis is useful in order to enhance efficiency of data retrieval and reduce load on both the client and server.\n\nIf there are more results than the specified limit, the response will contain a `cursorPagingMetaData`\nwith a cursor pointing to next page of results. In order to fetch the next page of results, you should pass the\nreturned cursor to the next call as `cursorPaging`.`cursor`.\n\nFor the first call, you should only specify the `limit` for the results page.\nFor each following call, you should only pass the previous returned cursor as `cursorPaging`.`cursor`\nthe `cursorPaging`.`limit`. You may pass a different `limit`.\nNo need to specify any additional parameters.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "fromLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Lower boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "Location for which the multiService TimeSlots are being returned for.\n\nYou can specify location or location type for which the TimeSlots will be returned for.\nIf locationType is `BUSINESS`, you __must__ provide a locationId.\n\nImportant:
\n
\nIf you only provide acursorPaging.cursor,\nthe response will contain the default size of results which is `1000`.\n
\n\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "services", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Service" + } + ] + } + } + ], + "doc": "Services for which the multiService time slots are being returned for.\nEach service contains its own resources filters within.\n\nMinSize: `2`.\nMaxSize: `8`.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "timeSlotsPerDay", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Maximum number of slots to load for each day. For example, if `timeSlotsPerDay` is set to `3`,\nwe return at most 3 available TimeSlots for each day within the date range specified in request.\n\nBy default,\nif `bookable` filter was not specified,\nand a day has both `bookable` and `un-bookable` slots, `bookable` slots are returned first.\n\nIf the number of `bookable` slots is less than the requested `timeSlotsPerDay`,\n`un-bookable` slots will be returned according to the specified filters.\n" + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + }, + { + "name": "toLocalDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Upper boundary for `localStartDate` to include in response, in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\".\n\nEach returned `TimeSlot` in response has a `localStartDate`\nwithin the provided `fromLocalDate` and `toLocalDate` exclusive.\n\nRequired, unless `cursorPaging`.`cursor` is provided.\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ListMultiServiceAvailabilityTimeSlotsResponse", + "members": [ + { + "name": "cursorPagingMetadata", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.CommonCursorPagingMetadata" + } + ], + "doc": "CursorPagingMetaData.\nContains information about the next page of results.\n\nBy default,\nif there are more than 1000 results,\nthe response will contain a `cursorPagingMetaData` with a cursor to the next page of results.\n\nwarning:
\n
\nSupports filtering by location type, or by location ID. \nOther fields likenameare ignored.
\n\n" + }, + { + "name": "timeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.TimeSlot" + } + ] + } + } + ], + "doc": "Time slots." + }, + { + "name": "timeZone", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Time zone, in IANA time zone format.\nShared for all TimeSlots in response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Location", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Location ID. Present only if the location is a business location." + }, + { + "name": "formattedAddress", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "A string representation for the full address of the location." + }, + { + "name": "locationType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, either the default business address, or locations defined for the business by the Business Info.\n- `CUSTOMER`: The location is determined by the customer and is not set up beforehand." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The location name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "NestedTimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the nested time slot.\nEach `AvailableResources` contains information about available resources of the same type." + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the nested time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID of the nested time slot." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Resource", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource ID." + }, + { + "name": "name", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Resource name." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Service", + "members": [ + { + "name": "includeResourceTypeIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "The resource type ID's to include in returned time slots.\nThis is in addition to the specifically requested resources.\n\nImportant:
\n
\ncountis not supported.
\nCurrently supported only for Staff Member resource type.\nStaff Member type ID: 1cd44cf8-756f-41c3-bd90-3e2ffcaf1155\n\n" + }, + { + "name": "resourceIds", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Resources to include in response." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "TimeSlot", + "members": [ + { + "name": "availableResources", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.AvailableResources" + } + ] + } + } + ], + "doc": "List of `AvailableResources` for the time slot.\nEach `AvailableResources` contains information about available resources of the same type.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own available resources.\n" + }, + { + "name": "bookable", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the slot is bookable according to the service's booking policies.\n\nIf booking this time slot does not violates any of the service's booking policies,\nthe returned value is `true`. Otherwise, returns `false`.\n" + }, + { + "name": "bookingPolicyViolations", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.BookingPolicyViolations" + } + ], + "doc": "Indicators for booking policy violations for the slot.\n\nEach nested field is checked on its own. i.e. if `tooEarlyToBook` is defined and `bookOnlineDisabled` is not defined\nwe will return also slots for which `tooEarlyToBook` is same as on the request, regardless of `bookOnlineDisabled`.\n" + }, + { + "name": "localEndDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local end date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T14:30:00\"." + }, + { + "name": "localStartDate", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Local start date of the time slot in ISO-8601 format.\nFor example, \"2024-01-30T13:30:00\"." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.Location" + } + ], + "doc": "The geographic location of the slot." + }, + { + "name": "nestedTimeSlots", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.ServiceAvailability.NestedTimeSlot" + } + ] + } + } + ], + "doc": "> Nested time slots.\n> Returned only from `MultiServiceAvailabilityTimeSlots` API calls." + }, + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Remaining number of spots for the slot.\nFor example, for an appointment service with total capacity of 1 spot and one booked spot, the remaining capacity will be 0." + }, + { + "name": "serviceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Service ID.\n\n> Not returned from `MultiServiceAvailabilityTimeSlots` API calls.\n> Instead, each nested time slot has its own serviceId.\n" + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots for the slot." + } + ], + "docs": { + "description": [ + "The `TimeSlot` object represents the availability information\nfor an `Appointment` service's specific slot, including:" + ] + } + }, + { + "name": "WaitingList", + "members": [ + { + "name": "remainingCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of remaining spots for this wait list.\nFor example, a Yoga event with 10 waitList spots and 3 registered\non the waitList has 10 `total_capacity` and 7 `remaining_capacity`." + }, + { + "name": "totalCapacity", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Total number of spots in this wait list." + } + ], + "docs": { + "description": [ + "" + ] + } + } + ] +} diff --git a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants.service.json b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants.service.json index f005aa98e5..ff1fbce8d2 100644 --- a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants.service.json +++ b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants.service.json @@ -53,27 +53,50 @@ "doc": null }, "docs": { - "summary": "Clones a `serviceOptionsAndVariants` object. This endpoint can be called, for example, to duplicate a service.\nThe cloned service contains all the original service options and variants.", + "summary": "Clones a `serviceOptionsAndVariants` object. This function can be called, for example, to duplicate a service.\nThe cloned service contains the original service options and variants.", "description": [ "Each option\nin the cloned service has a newly-generated ID that is copied to all choices of the variants in the\nclone. The cloned service references the service provided in the request by `target_service_id`." ], "examples": [ { - "title": "cloneServiceOptionsAndVariants example", + "title": "cloneServiceOptionsAndVariants example for dashboard page code", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function cloneServiceOptionsAndVariants(cloneFromId, targetServiceId) {", - " try {", - " const result = await serviceOptionsAndVariants.cloneServiceOptionsAndVariants(cloneFromId, targetServiceId);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function cloneServiceOptionsAndVariants(cloneFromId, targetServiceId) {", + " try {", + " const result = await serviceOptionsAndVariants.cloneServiceOptionsAndVariants(cloneFromId, targetServiceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "cloneServiceOptionsAndVariants example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedCloneServiceOptionsAndVariants = elevate(serviceOptionsAndVariants.cloneServiceOptionsAndVariants);", + "", + "export const cloneServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (cloneFromId, targetServiceId) => {", + " try {", + " const result = await elevatedCloneServiceOptionsAndVariants(cloneFromId, targetServiceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -114,13 +137,13 @@ "nativeType": "Promise", "typeParams": [ { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.CreateServiceOptionsAndVariantsResponse" + "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariants" } ] } } ], - "doc": null + "doc": "Information about the created service options and variants.\n" }, "docs": { "summary": "Creates options and variants for a service.", @@ -129,21 +152,44 @@ ], "examples": [ { - "title": "createServiceOptionsAndVariants example", + "title": "createServiceOptionsAndVariants example for dashboard page code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "", + "async function createServiceOptionsAndVariants(serviceOptionsAndVariants) {", + " try {", + " const result = await serviceOptionsAndVariants.createServiceOptionsAndVariants(serviceOptionsAndVariants);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "createServiceOptionsAndVariants example for exporting from backend code", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function createServiceOptionsAndVariants(serviceOptionsAndVariants) {", - " try {", - " const result = await serviceOptionsAndVariants.createServiceOptionsAndVariants(serviceOptionsAndVariants);", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedCreateServiceOptionsAndVariants = elevate(serviceOptionsAndVariants.createServiceOptionsAndVariants);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "export const createServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (serviceOptionsAndVariants) => {", + " try {", + " const result = await elevatedCreateServiceOptionsAndVariants(serviceOptionsAndVariants);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -177,7 +223,7 @@ "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.DeleteServiceOptionsAndVariantsOptions" } ], - "doc": "", + "doc": "Options for deleting the service options and variants.", "required": false } ], @@ -206,21 +252,44 @@ ], "examples": [ { - "title": "deleteServiceOptionsAndVariants example", + "title": "deleteServiceOptionsAndVariants example for dashboard page code", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options) {", - " try {", - " const result = await serviceOptionsAndVariants.deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options) {", + " try {", + " const result = await serviceOptionsAndVariants.deleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "deleteServiceOptionsAndVariants example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedDeleteServiceOptionsAndVariants = elevate(serviceOptionsAndVariants.deleteServiceOptionsAndVariants);", + "", + "export const deleteServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (serviceOptionsAndVariantsId, options) => {", + " try {", + " const result = await elevatedDeleteServiceOptionsAndVariants(serviceOptionsAndVariantsId, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -274,18 +343,38 @@ "title": "getServiceOptionsAndVariants example", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function getServiceOptionsAndVariants(serviceOptionsAndVariantsId) {", - " try {", - " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariants(serviceOptionsAndVariantsId);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function getServiceOptionsAndVariants(serviceOptionsAndVariantsId) {", + " try {", + " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariants(serviceOptionsAndVariantsId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "getServiceOptionsAndVariants example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const getServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (serviceOptionsAndVariantsId) => {", + " try {", + " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariants(serviceOptionsAndVariantsId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -295,7 +384,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "getServiceOptionsAndVariants" }, { "name": "getServiceOptionsAndVariantsByServiceId", @@ -337,18 +427,38 @@ "title": "getServiceOptionsAndVariantsByServiceId example", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function getServiceOptionsAndVariantsByServiceId(serviceId) {", - " try {", - " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariantsByServiceId(serviceId);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function getServiceOptionsAndVariantsByServiceId(serviceId) {", + " try {", + " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariantsByServiceId(serviceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "getServiceOptionsAndVariantsByServiceId example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const getServiceOptionsAndVariantsByServiceId = webMethod(", + " Permissions.Anyone,", + " async (serviceId) => {", + " try {", + " const result = await serviceOptionsAndVariants.getServiceOptionsAndVariantsByServiceId(serviceId);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -358,7 +468,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "getServiceOptionsAndVariantsByServiceId" }, { "name": "queryServiceOptionsAndVariants", @@ -376,38 +487,55 @@ "summary": "Retrieves a list of `serviceOptionsAndVariants`, given the provided paging, filtering, and sorting.", "description": [ "", - "Query Service Options And Variants runs with these defaults, which you can override:", + "queryServiceOptionsAndVariants() runs with these defaults, which you can override:", "", "- `id` is sorted in `ASC` order", "- `cursorPaging.limit` is `100`", "", "For a detailed list of supported filtering operations see", - "[supported filters](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/supported-filters).", + "[supported filters](https://www.wix.com/velo/reference/wix-bookings-v2/serviceoptionsandvariants/filters).", + "", "", - "To learn about working with _Query_ endpoints, see", - "[API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),", - "[Sorting and Paging](https://dev.wix.com/api/rest/getting-started/pagination),", - "and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", - "|`id`|[`eq()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#eq),[`in()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#in),[`ne()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#ne)|", - "|`serviceId`|[`eq()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#eq),[`in()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#in),[`ne()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#ne)|", - "|`options.values`|[`exists()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#exists)|", - "|`options.values.id`|[`eq()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#eq),[`in()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#in),[`ne()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#ne)|", - "|`variants.values`|[`exists()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#exists)|", - "|`variants.values.choices.optionId`|[`hasSome()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#hasSome)|", - "|`variants.values.price`|[`hasSome()`](wix-bookings.v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantssQueryBuilder#hasSome)|" + "|`_id`|[`eq()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#eq),[`in()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#in),[`ne()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#ne)|", + "|`serviceId`|[`eq()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#eq),[`in()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#in),[`ne()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#ne)|", + "|`options.values`|[`exists()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#exists)|", + "|`variants.values`|[`exists()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#exists)|", + "|`variants.values.choices.optionId`|[`hasSome()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#hasSome)|", + "|`variants.values.price`|[`hasSome()`](wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder#hasSome)|" ], "examples": [ { "title": "queryServiceOptionsAndVariants example", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function queryServiceOptionsAndVariants() {", - " const { items } = serviceOptionsAndVariants.queryServiceOptionsAndVariants().find();", - " }", - " " + "", + "async function queryServiceOptionsAndVariants() {", + " const { items } = serviceOptionsAndVariants.queryServiceOptionsAndVariants().find();", + "}", + "" + ] + }, + { + "title": "queryServiceOptionsAndVariants example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "", + "export const queryServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (query) => {", + " try {", + " const result = await serviceOptionsAndVariants.queryServiceOptionsAndVariants(query);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -417,7 +545,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "queryServiceOptionsAndVariants" }, { "name": "updateServiceOptionsAndVariants", @@ -466,25 +595,48 @@ "docs": { "summary": "Updates the specified fields of the `serviceOptionsAndVariants` object.", "description": [ - "Currently, only a single option is supported per `serviceOptionsAndVariants` object.\n\nIf you want to update `variants`, you must pass the full list of supported variants.\n\nIf you want to update `options`, you must pass the full list of supported options.\n\nFor a list of error messages, see [Update Service Options and Variants Errors](https://dev.wix.com/api/rest/wix-bookings/service-options-and-variants/error-messages#service-options-and-variants_error-messages_update-service-options-and-variants-errors)." + "Currently, only a single option is supported per `serviceOptionsAndVariants` object.\n\nIf you want to update `variants`, you must pass the full list of supported variants.\n\nIf you want to update `options`, you must pass the full list of supported options." ], "examples": [ { - "title": "updateServiceOptionsAndVariants example", + "title": "updateServiceOptionsAndVariants example for dashboard page code", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", - " ", - " async function updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options) {", - " try {", - " const result = await serviceOptionsAndVariants.updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options);", "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - " }", - " " + "async function updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options) {", + " try {", + " const result = await serviceOptionsAndVariants.updateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + "}", + "" + ] + }, + { + "title": "updateServiceOptionsAndVariants example for exporting from backend code", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "import { webMethod, Permissions } from 'wix-web-module';", + "import { elevate } from 'wix-auth';", + "", + "const elevatedUpdateServiceOptionsAndVariants = elevate(serviceOptionsAndVariants.updateServiceOptionsAndVariants);", + "", + "export const updateServiceOptionsAndVariants = webMethod(", + " Permissions.Anyone,", + " async (id, serviceOptionsAndVariants, options) => {", + " try {", + " const result = await elevatedUpdateServiceOptionsAndVariants(id, serviceOptionsAndVariants, options);", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + ");", + "" ] } ] @@ -848,6 +1000,7 @@ }, { "name": "splitInterval", + "readOnly": false, "optional": true, "type": [ { @@ -1071,6 +1224,26 @@ ] } }, + { + "name": "BusinessLocation", + "members": [ + { + "name": "locationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the business location. Has to be non-empty" + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "BusinessSchedule", "members": [ @@ -1206,7 +1379,7 @@ "nativeType": "string" } ], - "doc": "Conference type.\n" + "doc": "Conference type." }, { "name": "description", @@ -1319,6 +1492,16 @@ { "name": "Categories", "members": [ + { + "name": "businessTermId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business Term Id" + }, { "name": "primary", "optional": true, @@ -1623,7 +1806,7 @@ "nativeType": "string" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Pointer to the next or previous page in the list of results.\n\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" }, { "name": "limit", @@ -1633,7 +1816,7 @@ "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Maximum number of items to return in the results." } ], "docs": { @@ -1653,7 +1836,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Cursor string pointing to the next page in the list of results." }, { "name": "prev", @@ -1663,7 +1846,7 @@ "nativeType": "string" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Cursor pointing to the previous page in the list of results." } ], "docs": { @@ -1808,7 +1991,7 @@ "nativeType": "string" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { "name": "actionEvent", @@ -1868,7 +2051,7 @@ "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "ID of the entity associated with the event." }, { "name": "eventTime", @@ -1878,17 +2061,7 @@ "nativeType": "Date" } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" - }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" + "doc": "Event timestamp." }, { "name": "originatedFrom", @@ -1918,7 +2091,7 @@ "nativeType": "boolean" } ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { "name": "updatedEvent", @@ -1939,7 +2112,6 @@ "actionEvent", "createdEvent", "deletedEvent", - "extendedFieldsUpdatedEvent", "updatedEvent" ] } @@ -1984,16 +2156,6 @@ ], "doc": "" }, - { - "name": "extendedFieldsUpdatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ExtendedFieldsUpdatedEvent" - } - ], - "doc": "" - }, { "name": "updatedEvent", "optional": true, @@ -2042,25 +2204,16 @@ }, { "name": "EntityDeletedEvent", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EntityUpdatedEvent", "members": [ { - "name": "currentEntityAsJson", + "name": "deletedEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + "doc": "Entity that was deleted" } ], "docs": { @@ -2070,7 +2223,7 @@ } }, { - "name": "ExtendedFieldsUpdatedEvent", + "name": "EntityUpdatedEvent", "members": [ { "name": "currentEntityAsJson", @@ -2080,7 +2233,7 @@ "nativeType": "string" } ], - "doc": "" + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." } ], "docs": { @@ -2297,6 +2450,130 @@ ] } }, + { + "name": "IdentificationData", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "identityType", + "readOnly": true, + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "IdentificationDataIdOneOf", + "members": [ + { + "name": "anonymousVisitorId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has not logged in to the site." + }, + { + "name": "appId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of an app." + }, + { + "name": "memberId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "Interval", "members": [ @@ -2318,7 +2595,7 @@ "nativeType": "number" } ], - "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation." }, { "name": "hourOfDay", @@ -2466,7 +2743,7 @@ "nativeType": "string" } ], - "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions." } ], "docs": { @@ -2570,6 +2847,7 @@ "members": [ { "name": "address", + "readOnly": false, "optional": true, "type": [ { @@ -2578,16 +2856,6 @@ ], "doc": "Free text address used when locationType is `OWNER_CUSTOM`." }, - { - "name": "businessLocation", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.LocationsLocation" - } - ], - "doc": "Valid when `locationType` is `OWNER_BUSINESS`. Defaults to the business's location.\n\n`businessSchedule` is not supported by Wix Bookings\n" - }, { "name": "customAddress", "optional": true, @@ -2638,6 +2906,26 @@ ], "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, + { + "name": "location", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.LocationsAddressLocation" + } + ], + "doc": "Geographic coordinates of location." + }, { "name": "postalCode", "optional": true, @@ -2793,13 +3081,31 @@ }, { "name": "locationType", + "readOnly": false, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location type. **Note:** Currently not supported." + "doc": "Location type.\n\n**Note:** Currently not supported." + }, + { + "name": "locationTypes", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } + } + ], + "doc": "Location types." }, { "name": "name", @@ -2839,7 +3145,7 @@ "nativeType": "string" } ], - "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." + "doc": "Location status. Defaults to `ACTIVE`.\n__Notes:__\n- [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status.\n- `INACTIVE` status is currently not supported." }, { "name": "timeZone", @@ -2995,6 +3301,56 @@ ] } }, + { + "name": "MessageEnvelope", + "members": [ + { + "name": "data", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Stringify payload." + }, + { + "name": "eventType", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Event type." + }, + { + "name": "identity", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.IdentificationData" + } + ], + "doc": "The identification type and identity data." + }, + { + "name": "instanceId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "App instance ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, { "name": "MigrationData", "members": [ @@ -3267,7 +3623,7 @@ "nativeType": "string" } ], - "doc": "Approval status for the participant.\n\n" + "doc": "Approval status for the participant.\n" }, { "name": "contactId", @@ -3639,6 +3995,16 @@ } ], "doc": "Timezone in `America/New_York` format." + }, + { + "name": "trackClicksAnalytics", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Track clicks analytics" } ], "docs": { @@ -3953,7 +4319,7 @@ "nativeType": "string" } ], - "doc": "The type of recurring interval.\n" + "doc": "The type of recurring interval." }, { "name": "start", @@ -4164,6 +4530,7 @@ }, { "name": "schedules", + "readOnly": false, "optional": true, "type": [ { @@ -4188,10 +4555,11 @@ "nativeType": "string" } ], - "doc": "Resource status.\n" + "doc": "Resource status." }, { "name": "tag", + "readOnly": false, "optional": true, "type": [ { @@ -4226,7 +4594,7 @@ "nativeType": "string" } ], - "doc": "Wix user ID, if the resource is associated with the Wix user.\nA staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager.\n" + "doc": "Wix user ID, if the resource is associated with the Wix user.\nA staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager." } ], "docs": { @@ -4280,23 +4648,25 @@ }, { "name": "availability", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.Availability" } ], - "doc": "An object describing how to calculate the schedule's availability.\nAn empty object indicates that the schedule is not available for booking." + "doc": "__Deprecated.__" }, { "name": "calendarConference", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.CalendarConference" } ], - "doc": "A conference created for the schedule. This is used when a participant is added to a schedule." + "doc": "A conference created for the schedule. This is used when a participant is added to a schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { "name": "capacity", @@ -4310,13 +4680,14 @@ }, { "name": "conferenceProvider", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ConferenceProvider" } ], - "doc": "Conferencing Provider. A schedule with a conferencing provider will use to provider information to create a conference on the provider's system when a session is created on the schedule or on one of its linked schedule's." + "doc": "__Deprecated.__" }, { "name": "created", @@ -4331,13 +4702,14 @@ }, { "name": "externalCalendarOverrides", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ExternalCalendarOverrides" } ], - "doc": "Title and description values to override session defaults when syncing to an external calendar.\nLearn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings)." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -4359,6 +4731,7 @@ }, { "name": "intervals", + "readOnly": false, "optional": true, "type": [ { @@ -4372,7 +4745,7 @@ } } ], - "doc": "Specifies the intervals for the sessions calculation. Optional. e.g. when creating class service you can add\npattern for recurring intervals, these intervals can be returned as schedule's sessions or available slots if\nthere are no other availability calculation constraints and the capacity is bigger then the current total number of sessions' participants." + "doc": "Deprecated. Please use the [Sessions API](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/session) instead." }, { "name": "location", @@ -4400,17 +4773,18 @@ } } ], - "doc": "Participants currently registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule." + "doc": "*Partial list** of participants which are registered to sessions in this schedule.\nParticipants who are registered in the schedule are automatically registered to any session that is created for the schedule.\nTo retrieve the full list of schedule participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { "name": "rate", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.Rate" } ], - "doc": "Price options offered when booking this schedule's slots. Default is no rate." + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { "name": "scheduleOwnerId", @@ -4435,6 +4809,7 @@ }, { "name": "tags", + "readOnly": false, "optional": true, "type": [ { @@ -4448,17 +4823,18 @@ } } ], - "doc": "Tags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." + "doc": "__Deprecated.__\nTags for grouping schedules. These tags are the default tags for the schedule's sessions.\nThe Wix Bookings app uses the following predefined tags to set schedule type: `\"INDIVIDUAL\"`, `\"GROUP\"`, and `\"COURSE\"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags." }, { "name": "timeZone", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Schedule's time zone in [Area/Location](https://en.wikipedia.org/wiki/Tz_database) format. Read-only.\nDerived from the Wix Business time zone." }, { "name": "title", @@ -4595,6 +4971,7 @@ }, { "name": "intervalSplit", + "readOnly": false, "optional": true, "type": [ { @@ -4603,28 +4980,9 @@ ], "doc": "" }, - { - "name": "migrationEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.MigrationEvent" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.MultipleSessionsCreated" - } - ], - "doc": "supported only for schedule migration apis." - }, { "name": "notifyParticipants", + "readOnly": false, "optional": true, "type": [ { @@ -4675,6 +5033,7 @@ }, { "name": "scheduleUnassignedFromUser", + "readOnly": false, "optional": true, "type": [ { @@ -4776,6 +5135,7 @@ }, { "name": "intervalSplit", + "readOnly": false, "optional": true, "type": [ { @@ -4784,26 +5144,6 @@ ], "doc": "" }, - { - "name": "migrationEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.MigrationEvent" - } - ], - "doc": "supported only for schedule migration apis." - }, - { - "name": "multipleSessionsCreated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.MultipleSessionsCreated" - } - ], - "doc": "supported only for schedule migration apis." - }, { "name": "recurringSessionSplit", "optional": true, @@ -4836,6 +5176,7 @@ }, { "name": "scheduleUnassignedFromUser", + "readOnly": false, "optional": true, "type": [ { @@ -5081,6 +5422,7 @@ }, { "name": "advancedSeoData", + "readOnly": false, "optional": true, "type": [ { @@ -5256,7 +5598,7 @@ "nativeType": "string" } ], - "doc": "ID of the staff member providing the service. This ID is the equivalent of the `resourceId`\nof the staff member or the `scheduleOwnerId` of the relevant\n[schedule's](https://dev.wix.com/api/rest/wix-bookings/schedules-and-sessions/schedule/schedule-object)\n`availability.linkedSchedules`." + "doc": "ID of the staff member providing the service. This ID is the equivalent of the `resourceId`\nof the staff member or the `scheduleOwnerId` of the relevant\nschedule's\n`availability.linkedSchedules`." } ], "extra": { @@ -5321,6 +5663,7 @@ }, { "name": "images", + "readOnly": false, "optional": true, "type": [ { @@ -5730,13 +6073,14 @@ }, { "name": "calendarConference", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.CalendarConference" } ], - "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule." + "doc": "A conference created for the session according to the details set in the schedule's conference provider information.\nIf the session is a recurring session, this field is inherited from the schedule.\n**Partially deprecated.** Only `hostUrl` and `guestUrl` are to be supported." }, { "name": "capacity", @@ -5760,13 +6104,14 @@ }, { "name": "externalCalendarOverrides", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ExternalCalendarOverrides" } ], - "doc": "Title and description values to override session defaults when syncing to an external calendar.\nLearn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings).\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__" }, { "name": "inheritedFields", @@ -5842,17 +6187,18 @@ } } ], - "doc": "List of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty." + "doc": "*Partial list** list of participants booked for the session.\nThe list includes participants who have registered for this specific session, and participants who have registered for a schedule that includes this session.\nIf the session is a recurring session, this field must be empty.\nTo retrieve the full list of session participants please use the [Query Extended Bookings API](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings)." }, { "name": "rate", + "readOnly": false, "optional": true, "type": [ { "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.Rate" } ], - "doc": "The price options offered for the session. Defaults to the schedule rate.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "Deprecated. Please use the [Booking Services V2](https://dev.wix.com/api/rest/wix-bookings/services-v2) payment instead." }, { "name": "recurrence", @@ -5926,10 +6272,11 @@ "nativeType": "string" } ], - "doc": "Session status.\n" + "doc": "Session status." }, { "name": "tags", + "readOnly": false, "optional": true, "type": [ { @@ -5943,7 +6290,7 @@ } } ], - "doc": "Tags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." + "doc": "__Deprecated.__\nTags for the session.\nThe value is inherited from the schedule and can be overridden unless the session is a recurring session." }, { "name": "timeReservedAfter", @@ -5984,7 +6331,7 @@ "nativeType": "string" } ], - "doc": "Session type.\n" + "doc": "Session type." }, { "name": "version", @@ -6204,23 +6551,6 @@ { "name": "SitePropertiesEvent", "members": [ - { - "name": "fields", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Set of properties that were updated - corresponds to the fields in \"properties\"." - }, { "name": "properties", "optional": true, diff --git a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryBuilder.service.json b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryBuilder.service.json index 3a51154452..57191678ae 100644 --- a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryBuilder.service.json +++ b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryBuilder.service.json @@ -9,86 +9,6 @@ "relatedGuides": [], "properties": [], "operations": [ - { - "name": "ascending", - "params": [ - { - "name": "propertyNames", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.", - "required": false - } - ], - "requiredFields": [], - "ret": { - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder" - } - ], - "doc": null - }, - "docs": { - "description": [] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ] - }, - { - "name": "descending", - "params": [ - { - "name": "propertyNames", - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.", - "required": false - } - ], - "requiredFields": [], - "ret": { - "type": [ - { - "referenceType": "wix-bookings-v2.ServiceOptionsAndVariants.ServiceOptionsAndVariantsListQueryBuilder" - } - ], - "doc": null - }, - "docs": { - "description": [] - }, - "isVeloEvent": false, - "customLabels": [ - { - "id": "maturity-beta" - } - ] - }, { "name": "eq", "params": [ @@ -125,7 +45,7 @@ "docs": { "summary": "Refines a query to match items where the specified property equals the specified value.", "description": [ - "The `eq()` function refines a `ServiceOptionsAndVariantssQueryBuilder` to match only items where the value of the specified `propertyName` equals the specified `value`.", + "The `eq()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to match only items where the value of the specified `propertyName` equals the specified `value`.", "`eq()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", "Matching strings with `eq()` is case-sensitive, so `'text'` isn't equal to `'Text'`." ], @@ -135,7 +55,7 @@ "body": [ "const query = serviceOptionsAndVariants.queryServiceOptionsAndVariants.eq(", " '_id',", - " '\"some-id\"'", + " 'some-id'", ");", "" ] @@ -148,7 +68,7 @@ "export async function myQueryFunction() {", " const results = await serviceOptionsAndVariants", " .queryServiceOptionsAndVariants()", - " .eq('_id', '\"some-id\"')", + " .eq('_id', 'bb19b637-74ce-55d3-ae32-430b588051da')", " .find();", "", " if (results.items.length > 0) {", @@ -175,7 +95,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "eq" }, { "name": "exists", @@ -211,16 +132,59 @@ "doc": null }, "docs": { - "summary": "", - "description": [], - "examples": [] + "summary": "Refines a query to match items where the specified property contains a value.", + "description": [ + "The `exists()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to only match items where the value of the specified `propertyName` doesn't equal null or undefined.", + " `exists()` checks for either existence or non-existence based on the boolen parameter. Note that `exists()` does match items where the value of the specified `propertyName` is an empty string or an invalid value. `exists()` is only useful for properties which don't contain default values and therefore their values may be unassigned." + ], + "examples": [ + { + "title": "Add an `exists` filter to a query", + "body": [ + "const query = serviceOptionsAndVariants.queryServiceOptionsAndVariants.exists(", + " 'description',", + " 'some-description'", + ");", + "" + ] + }, + { + "title": "Create a query, add an `exists` filter, and run it", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "", + "export async function myQueryFunction() {", + " const results = await serviceOptionsAndVariants", + " .queryServiceOptionsAndVariants()", + " .exists('description', 'some-description')", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] }, "isVeloEvent": false, "customLabels": [ { "id": "maturity-beta" } - ] + ], + "syntaxName": "exists" }, { "name": "find", @@ -242,7 +206,7 @@ "doc": null }, "docs": { - "summary": "Returns the filtered query results.", + "summary": "Returns the query results.", "description": [ "The `find()` function returns a Promise that resolves to the query results and metadata.", "The Promise is rejected if `find()` is called with insufficient permissions or if any of the previous functions used to refine the query are invalid." @@ -289,7 +253,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "find" }, { "name": "hasSome", @@ -334,7 +299,7 @@ "docs": { "summary": "Refines a query to match items whose specified property contains any of the specified values.", "description": [ - "The `hasSome()` function refines a `ServiceOptionsAndVariantssQueryBuilder` to match only items where the value of the specified `propertyName` equals any of the specified `values`.", + "The `hasSome()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to match only items where the value of the specified `propertyName` equals any of the specified `values`.", "Matching strings with `hasSome()` is case-sensitive, so `'text'` isn't equal to `'Text'`.", "If the specified property is an array, `hasSome()` matches if any of that array's elements equal any of the specified values." ], @@ -384,7 +349,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "hasSome" }, { "name": "in", @@ -420,16 +386,59 @@ "doc": null }, "docs": { - "summary": "", - "description": [], - "examples": [] + "summary": "Refines a query to only match items where the specified property conatins any of the values in the provided array of values.", + "description": [ + "The `in()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to match only items where the specified `propertyName` is equal to any of the values in the provided array.", + "Matching strings with `in()` is case-sensitive, so `'text'` isn't equal to `'Text'`." + ], + "examples": [ + { + "title": "Add an `in` filter to a query", + "body": [ + "const query = serviceOptionsAndVariants.queryServiceOptionsAndVariants.in(", + " ['labelIds', 'colors'],", + " ['red', 'blue', 'purple']", + ");", + "" + ] + }, + { + "title": "Create a query, add an `in` filter, and run it", + "body": [ + "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", + "", + "export async function myQueryFunction() {", + " const results = await serviceOptionsAndVariants", + " .queryServiceOptionsAndVariants()", + " .in(['labelIds', 'colors'], ['red', 'blue', 'purple'])", + " .find();", + "", + " if (results.items.length > 0) {", + " const items = results.items;", + " const firstItem = items[0];", + " const pageSize = results.pageSize;", + " const hasNext = results.hasNext();", + " const hasPrev = results.hasPrev();", + " const length = results.length;", + " const query = results.query;", + "", + " return items;", + " } else {", + " // Handle if no matching items found", + " }", + "}", + "" + ] + } + ] }, "isVeloEvent": false, "customLabels": [ { "id": "maturity-beta" } - ] + ], + "syntaxName": "in" }, { "name": "limit", @@ -504,7 +513,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "limit" }, { "name": "ne", @@ -542,7 +552,7 @@ "docs": { "summary": "Refines a query to match items where the specified property doesn't equal the specified value.", "description": [ - "The `ne()` function refines a `ServiceOptionsAndVariantssQueryBuilder` to match only items where the value of the specified `propertyName` doesn't equal the specified `value`.", + "The `ne()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to match only items where the value of the specified `propertyName` doesn't equal the specified `value`.", "`ne()` matches only values of the same type. For example, `0` stored as a number doesn't match `'0'` stored as a string.", "Matching strings with `ne()` is case-sensitive, so `'text'` isn't equal to `'Text'`." ], @@ -552,7 +562,7 @@ "body": [ "const query = serviceOptionsAndVariants.queryServiceOptionsAndVariants.ne(", " '_id',", - " '\"some-id\"'", + " 'bb19b637-74ce-55d3-ae32-430b588051da'", ");", "" ] @@ -565,7 +575,7 @@ "export async function myQueryFunction() {", " const results = await serviceOptionsAndVariants", " .queryServiceOptionsAndVariants()", - " .ne('_id', '\"some-id\"')", + " .ne('_id', 'bb19b637-74ce-55d3-ae32-430b588051da')", " .find();", "", " if (results.items.length > 0) {", @@ -592,7 +602,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "ne" }, { "name": "skipTo", @@ -618,15 +629,15 @@ "doc": null }, "docs": { - "summary": "Refines a query that skips to a specific record", + "summary": "Refines a query that skips to a specific record.", "description": [ - "The `skipTo()` function refines a `ServiceOptionsAndVariantssQueryBuilder` that point to a specific record. You can get the relevant cursor token from `cursors` object in previous call's response.", - "Not relevant fot the first request.", - "Following requests use the cursor token and not a filter property" + "The `skipTo()` function refines a `ServiceOptionsAndVariantsListQueryBuilder` to return items that appear before or after the item pointed to by the provided cursor. Get the relevant cursor for a specific item from the `cursors` object in previous call's response. Then you can skip to `cursors.prev` to return items before the cursor, or `cursors.next` to return items after the cursor.", + " ", + "When using `skipTo()`, the filters and the sorting order of the original query can't be changed. Only the `limit()` property of the query can be changed." ], "examples": [ { - "title": "Perform a query and skip to next cursor", + "title": "Perform a query and skip to the next cursor", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", "", @@ -645,17 +656,19 @@ ] }, { - "title": "Perform a query and get `prev` from the result", + "title": "Perform a query and skip to the previous cursor", "body": [ "import { serviceOptionsAndVariants } from 'wix-bookings.v2';", "", "export async function myQueryFunction() {", - " const results =", - " await serviceOptionsAndVariants.queryServiceOptionsAndVariants();", + " const results = await serviceOptionsAndVariants", + " .queryServiceOptionsAndVariants()", + " .find();", + "", " const prevCursor = results.cursors.prev;", " return serviceOptionsAndVariants", " .queryServiceOptionsAndVariants()", - " .skipTo(prev)", + " .skipTo(prevCursor)", " .find();", "}", "" @@ -668,7 +681,8 @@ { "id": "maturity-beta" } - ] + ], + "syntaxName": "skipTo" } ], "messages": [] diff --git a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryResult.service.json b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryResult.service.json index 86162a7c21..edb6302f1e 100644 --- a/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryResult.service.json +++ b/wix-bookings-v2/wix-bookings-v2/ServiceOptionsAndVariants/ServiceOptionsAndVariantsListQueryResult.service.json @@ -16,9 +16,9 @@ } ], "docs": { - "summary": "Returns the query cursors", + "summary": "Returns the query cursors.", "description": [ - "`cursors` returns the query `next` and `prev` cursors" + "`cursors` returns the query's `next` and `prev` cursors." ], "examples": [ { @@ -58,7 +58,7 @@ "description": [ "`items` contains the current page of results retrieved by the query.", "If no results match the query, `items` is an empty array.", - "The page size is defined by the [`limit()`](#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result." + "The page size is defined by the [`limit()`](wix-bookings-v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantsListQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result." ], "examples": [ { @@ -103,7 +103,7 @@ "summary": "Returns the number of items in the current page of results.", "description": [ "`length` returns just the number of items in the current page, not the total number of items that match the query. For the total number of items that match the query, see [`totalCount`](#totalcount).", - "The page size is defined by the [`limit()`](#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result." + "The page size is defined by the [`limit()`](wix-bookings-v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantsListQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result." ], "examples": [ { @@ -141,7 +141,7 @@ "docs": { "summary": "Returns the requested page size.", "description": [ - "`pageSize` returns the page size set in [`limit()`](#limit) in `ServiceOptionsAndVariantssQueryBuilder`." + "`pageSize` returns the page size set in [`limit()`](wix-bookings-v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantsListQueryBuilder#limit) in `ServiceOptionsAndVariantsListQueryBuilder`." ], "examples": [ { @@ -177,9 +177,9 @@ } ], "docs": { - "summary": "Returns the `ServiceOptionsAndVariantssQueryBuilder` object used to get the current results.", + "summary": "Returns the `ServiceOptionsAndVariantsListQueryBuilder` object used to get the current results.", "description": [ - "Use `query` to create and run a new query by chaining additional `ServiceOptionsAndVariantssQueryBuilder` functions to it. You can filter only on properties that haven't already been used in the previous `ServiceOptionsAndVariantssQueryBuilder`." + "Use `query` to create and run a new query by chaining additional `ServiceOptionsAndVariantsListQueryBuilder` functions to it. You can filter only on properties that haven't already been used in the previous `ServiceOptionsAndVariantsListQueryBuilder`." ], "examples": [ { @@ -251,7 +251,8 @@ } ] }, - "isVeloEvent": false + "isVeloEvent": false, + "syntaxName": "hasNext" }, { "name": "hasPrev", @@ -295,7 +296,8 @@ } ] }, - "isVeloEvent": false + "isVeloEvent": false, + "syntaxName": "hasPrev" }, { "name": "next", @@ -320,8 +322,8 @@ "summary": "Retrieves the next page of query results.", "description": [ "The `next()` function retrieves the next page of query results.", - "The page size is defined by the [`limit()`](#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result.", - "If items are added or removed between calls to `next()`, the values returned by `ServiceOptionsAndVariantssQueryBuilder` may change." + "The page size is defined by the [`limit()`](wix-bookings-v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantsListQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result.", + "If items are added or removed between calls to `next()`, the values returned by `ServiceOptionsAndVariantsListQueryBuilder` may change." ], "examples": [ { @@ -372,7 +374,8 @@ } ] }, - "isVeloEvent": false + "isVeloEvent": false, + "syntaxName": "next" }, { "name": "prev", @@ -397,7 +400,7 @@ "summary": "Retrieves the previous page of query results.", "description": [ "The `prev()` function retrieves the previous page of query results.", - "The page size is defined by the [`limit()`](#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result.", + "The page size is defined by the [`limit()`](wix-bookings-v2.ServiceOptionsAndVariantsList.ServiceOptionsAndVariantsListQueryBuilder#limit) function and can be retrieved using the [`pageSize`](#pagesize) property. You can use the [`next()`](#next) and [`prev()`](#prev) functions returned by `serviceOptionsAndVariants` to navigate the pages of a query result.", "If items are added or removed between calls to `prev()`, the values returned may change." ], "examples": [ @@ -425,7 +428,8 @@ } ] }, - "isVeloEvent": false + "isVeloEvent": false, + "syntaxName": "prev" } ], "messages": [] diff --git a/wix-bookings-v2/wix-bookings-v2/Services.service.json b/wix-bookings-v2/wix-bookings-v2/Services.service.json index 15ca2e09ad..099cddef0c 100644 --- a/wix-bookings-v2/wix-bookings-v2/Services.service.json +++ b/wix-bookings-v2/wix-bookings-v2/Services.service.json @@ -9,6 +9,726 @@ "relatedGuides": [], "properties": [], "operations": [ + { + "name": "countServices", + "params": [ + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.CountServicesOptions" + } + ], + "doc": "", + "required": false + } + ], + "requiredFields": [], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.CountServicesResponse" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Retrieves the number of services that match the provided filters.", + "description": [], + "examples": [ + { + "title": "Count visible services. ", + "body": [ + "", + "import { services } from 'wix-bookings.v2';", + "", + "async function countVisibleServices() {", + " const result = await services.countServices({ filter: { hidden: false } })", + " return result.count;", + "}", + "", + "/* Promise resolves to: 2 */", + "" + ], + "extra": { + "description": "Count the number of visible services." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "countServices", + "isAdminMethod": true + }, + { + "name": "createService", + "params": [ + { + "name": "service", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ], + "doc": "Service to be created.", + "required": true + } + ], + "requiredFields": [ + "service" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } + } + ], + "doc": "The created service.\n" + }, + "docs": { + "summary": "Creates a new service.", + "description": [], + "examples": [ + { + "title": "Create a class service ", + "body": [ + "", + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createClass() {", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.CLASS,", + " name: \"Group Cat Hugging\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy with our cat hugging service!\",", + " defaultCapacity: 30,", + " category: category,", + " media: {", + " mainMedia: {", + " image: \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg#originWidth=800&originHeight=1000\"", + " }", + " },", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"25\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " }", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 3,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"media\": {", + " \"items\": [],", + " \"mainMedia\": {", + " \"image\": \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg/4b3901ffcb8d7ad81a613779d92c9702.jpg#originWidth=800&originHeight=1000\"", + " }", + " },", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + "}", + " */" + ], + "extra": { + "description": "Create a class with a capacity of 30 people." + } + }, + { + "title": "Create an appointment service ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createAppointment(staffMemberIds) {", + "", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.APPOINTMENT,", + " name: \"Personal Cat Hugging\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy with our cat hugging service!\",", + " category: category,", + " media: {", + " mainMedia: {", + " image: \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg/#originWidth=800&originHeight=1000\"", + " }", + " },", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"25\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " staffMemberIds: staffMemberIds", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"APPOINTMENT\",", + " \"sortOrder\": 3,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"media\": {", + " \"items\": [],", + " \"mainMedia\": {", + " \"image\": \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg/4b3901ffcb8d7ad81a613779d92c9702.jpg#originWidth=800&originHeight=1000\"", + " }", + " },", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Create an appointment provided by specific staff members." + } + }, + { + "title": "Create a course service ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "import { categories } from 'wix-bookings.v1';", + "", + "async function getFirstCategory() {", + " const response = await categories.listCategories();", + " return response.categories[0]", + "}", + "", + "async function createCourse() {", + "", + " const category = await getFirstCategory();", + "", + " const serviceToBeCreated = {", + " type: services.ServiceType.COURSE,", + " name: \"Cat Hugging Training\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " tagLine: \"Get some purr therapy training with our cat hugging experts\",", + " defaultCapacity: 30,", + " category: category,", + " media: {", + " mainMedia: {", + " image: \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg/#originWidth=800&originHeight=1000\"", + " }", + " },", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"150\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newService = await services.createService(serviceToBeCreated);", + "", + " console.log('Success! Created a new service:', newService);", + "", + " return newService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 3,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\".", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"media\": {", + " \"items\": [],", + " \"mainMedia\": {", + " \"image\": \"wix:image://v1/4b3901ffcb8d7ad81a613779d92c9702.jpg/4b3901ffcb8d7ad81a613779d92c9702.jpg#originWidth=800&originHeight=1000\"", + " }", + " },", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8d9560d3-72b9-45c0-a16d-1e73f7d38e11\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"1204a214-d1fb-41c8-886a-1ec461b990dd\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:15:30 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Create a course that can accommodate 30 people." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "createService", + "isAdminMethod": true + }, + { + "name": "deleteService", + "params": [ + { + "name": "serviceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of the service to delete.", + "required": true + }, + { + "name": "options", + "type": [ + { + "referenceType": "wix-bookings-v2.Services.DeleteServiceOptions" + } + ], + "doc": "Allows you to configure how to handle the deleted service's future sessions and how to notify the sessions participants.", + "required": false + } + ], + "requiredFields": [ + "serviceId" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "nativeType": "void" + } + ] + } + } + ], + "doc": null + }, + "docs": { + "summary": "Deletes a service.", + "description": [], + "examples": [ + { + "title": "Delete a service @description:", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "/*", + " * Sample serviceID value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " */", + "async function deleteService(serviceID) {", + " await services.deleteService(serviceID);", + " console.log('Deleted the service');", + "}", + "", + "/* Promise resolves to void */", + "" + ] + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "deleteService", + "isAdminMethod": true + }, { "name": "getService", "params": [ @@ -49,17 +769,138 @@ "title": "Retrieve a service ", "body": [ "import { services } from 'wix-bookings.v2';", - " ", + "", + "/*", + " * Sample serviceId value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " */", "async function getService(serviceId) {", " try {", - " const result = await services.getService(serviceId);", - " return result;", + " return services.getService(serviceId);", " } catch (error) {", " console.error(error);", " // Handle the error", " }", "}", - " " + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" ] } ] @@ -95,6 +936,8 @@ ">**Notes:**", "> + Use UTC format when filtering with dates.", "> + Only 1 use of each filter in the same query is supported. If a filter is defined more than once in a query, only the first occurrence is processed.", + "", + "", "|PROPERTY\t|SUPPORTED FILTERS & SORTING\t", "|:---:|:---:|", "|`type`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", @@ -103,13 +946,14 @@ "|`tagLine`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", "|`hidden`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`category.id`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", + "|`category.name`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", "|`form.id`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", "|`payment.options.online`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`payment.options.inPerson`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`payment.options.pricingPlan`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", "|`onlineBooking.enabled`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome)|", - "|`staffMembersIds`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`hasAll()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasAll)|", "|`locations.business.id`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", + "|`staffMemberIds`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`hasAll()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasAll)|", "|`supportedSlugs.name`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|", "|`mainSlug.name`|[`eq()`](wix-bookings-v2.Services.ServicesQueryBuilder#eq),[`ne()`](wix-bookings-v2.Services.ServicesQueryBuilder#ne),[`exists()`](wix-bookings-v2.Services.ServicesQueryBuilder#exists),[`in()`](wix-bookings-v2.Services.ServicesQueryBuilder#in),[`hasSome()`](wix-bookings-v2.Services.ServicesQueryBuilder#hasSome),[`startsWith()`](wix-bookings-v2.Services.ServicesQueryBuilder#startsWith)|" ], @@ -118,12 +962,244 @@ "title": "Query services with default settings ", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function queryServices() {", - " const result = await services.queryServices().find().items;", - " return result;", + "async function queryServices() {", + " const result = await services.queryServices().find()", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ], "extra": { @@ -134,15 +1210,250 @@ "title": "Filter services by category ID", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function filterServicesByCategoryId(categoryId) {", + "/*", + " * Sample categoryId value: '99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c'", + " */", + "async function filterServicesByCategoryId(categoryId) {", " const result = await services.queryServices()", " .eq(\"category.id\", categoryId)", " .find()", - " .items", - " return result;", + "", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ] }, @@ -150,15 +1461,247 @@ "title": "Sort services alphabetically by name ", "body": [ "", - "import { services } from 'wix-bookings.v2';", + "import {services} from 'wix-bookings.v2';", "", - "export async function getServicesSorted() {", + "async function getServicesSorted() {", " const result = await services.queryServices()", " .ascending(\"name\")", " .find()", - " .items", - " return result;", + "", + " return result.items;", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ] }, @@ -166,17 +1709,250 @@ "title": "Filter services by `mainSlug.name` ", "body": [ "", - "import { path } from 'wix-location';", - "import { services } from 'wix-bookings.v2';", + "import {path} from 'wix-location';", + "import {services} from 'wix-bookings.v2';", "", "export async function getServiceFromPath() {", " const [serviceNameInUrl] = path;", - " const response = await services.queryServices()", + " const result = await services.queryServices()", " .eq(\"mainSlug.name\", serviceNameInUrl)", " .limit(1)", - " .find()", - " return response.items[0];", + " .find();", + "", + " return result.items[0];", "}", + "", + "/* Promise resolves to:", + " [", + " {", + " \"type\": \"COURSE\",", + " \"sortOrder\": 5,", + " \"name\": \"Cat Hugging Training\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will train you to become the best cat hugger around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"326e4696-bef0-4e37-83ad-db33236f1106\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/cat-hugging-training\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"2e226dda-ba40-4565-b984-d7425a603e4c\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:29:55 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 4,", + " \"name\": \"Group Cat Hugging\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy with our cat hugging service!\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"category\": {", + " \"name\": \"Our Services\",", + " \"sortOrder\": 0,", + " \"_id\": \"99b3c3af-3dd1-4fcd-8d97-2fcedcb2908c\"", + " },", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"25\",", + " \"currency\": \"USD\"", + " },", + " \"deposit\": {", + " \"value\": \"5\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"81aa34a4-0cbc-4476-b8ec-62878024cd97\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"group-cat-hugging-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:11 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://nitayr7.editorx.io/services-v2-test/service-page/group-cat-hugging-1\",", + " \"bookingPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\",", + " \"calendarPage\": \"https://nitayr7.editorx.io/services-v2-test/booking-calendar/group-cat-hugging-1\"", + " },", + " \"revision\": \"1\",", + " \"_id\": \"fad1a29c-d06b-4ce7-ab80-98c54c4e0772\",", + " \"_createdDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Tue Jan 16 2024 17:20:12 GMT+0100 (Central European Standard Time)\"", + " }", + " ]", + " */", "" ], "extra": { @@ -192,51 +1968,413 @@ } ], "syntaxName": "queryServices" - } - ], - "messages": [ - { - "name": "ActionEvent", - "members": [ - { - "name": "bodyAsJson", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } }, { - "name": "Address", - "members": [ + "name": "updateService", + "params": [ { - "name": "addressLine", - "optional": true, + "name": "_id", "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number as free text." + "doc": "Service ID.", + "required": true }, { - "name": "addressLine1", - "optional": true, + "name": "service", "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.UpdateService" } ], - "doc": "Main address line, usually street and number as free text." + "doc": "", + "required": true + } + ], + "requiredFields": [ + "_id", + "service", + "service.revision" + ], + "ret": { + "type": [ + { + "complexType": { + "nativeType": "Promise", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } + } + ], + "doc": "The updated service.\n" + }, + "docs": { + "summary": "Updates a service.", + "description": [ + "[Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported.\n\nEach time the service is updated, `revision` increments by 1. You must include the\nnumber of the existing revision when\nupdating the service. This ensures you're working with the\nlatest service information and prevents unintended overwrites." + ], + "examples": [ + { + "title": "Update a service with a full update ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "async function updateService() {", + " const serviceToBeCreated = {", + " type: services.ServiceType.APPOINTMENT,", + " name: \"Cat Hugging Training\",", + " description: \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " tagLine: \"Get some purr therapy training with our cat hugging experts\",", + " defaultCapacity: 30,", + " payment: {", + " rateType: services.RateType.FIXED,", + " fixed: {", + " price: {", + " value: \"150\",", + " currency: \"USD\"", + " }", + " },", + " options: {", + " online: true,", + " inPerson: false,", + " deposit: false,", + " pricingPlan: false", + " },", + " },", + " onlineBooking: {", + " enabled: true", + " },", + " }", + "", + " const newName = \"Cat Hugging Training - Advanced\";", + " const createdService = await services.createService(serviceToBeCreated);", + " const updatedService = await services.updateService(createdService._id, {...createdService, name: newName});", + "", + " console.log('Success! Updated a service:', updatedService);", + "", + " return updatedService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 0,", + " \"name\": \"Cat Hugging Training - Advanced\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8bf39bc0-a05a-49ff-9ee3-fc29d698988d\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"name\": \"cat-hugging-training-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/cat-hugging-training-advanced\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\"", + " },", + " \"revision\": \"2\",", + " \"_id\": \"a262b133-e7a1-4498-a722-8340ed3f3db3\",", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Update a service given the entire service, with the changes applied." + } + }, + { + "title": "Update a service with a partial update ", + "body": [ + "import { services } from 'wix-bookings.v2';", + "", + "/*", + " * Sample serviceId value: 'ff61204b-b19a-5cc8-823b-7eed8ae5fc28'", + " * Sample serviceName value: 'Cat Hugging Training - Advanced'", + " * Sample serviceRevision value: 1", + " */", + "async function updateServiceName(serviceId, serviceName, serviceRevision) {", + " const updatedService = await services.updateService(serviceId, {", + " id: serviceId, name: serviceName, revision: serviceRevision", + " });", + "", + " console.log('Success! Updated the service name:', updatedService, serviceName);", + "", + " return updatedService;", + "}", + "", + "/* Promise resolves to:", + " * {", + " \"type\": \"CLASS\",", + " \"sortOrder\": 0,", + " \"name\": \"Cat Hugging Training - Advanced\",", + " \"description\": \"Introducing the Purrfect Hug - the ultimate cat cuddling experience! Our team of expert cuddlers will come to your home and provide your furry feline with the warmest and snuggliest hugs around.\",", + " \"tagLine\": \"Get some purr therapy training with our cat hugging experts\",", + " \"defaultCapacity\": 30,", + " \"hidden\": false,", + " \"payment\": {", + " \"rateType\": \"FIXED\",", + " \"fixed\": {", + " \"price\": {", + " \"value\": \"150\",", + " \"currency\": \"USD\"", + " }", + " },", + " \"options\": {", + " \"online\": true,", + " \"inPerson\": false,", + " \"deposit\": false,", + " \"pricingPlan\": false", + " },", + " \"pricingPlanIds\": []", + " },", + " \"onlineBooking\": {", + " \"enabled\": true", + " },", + " \"locations\": [", + " {", + " \"type\": \"BUSINESS\"", + " }", + " ],", + " \"bookingPolicy\": {", + " \"revision\": \"1\",", + " \"name\": \"Default policy\",", + " \"customPolicyDescription\": {", + " \"enabled\": true,", + " \"description\": \"\"", + " },", + " \"default\": true,", + " \"limitEarlyBookingPolicy\": {", + " \"enabled\": false,", + " \"earliestBookingInMinutes\": 10080", + " },", + " \"limitLateBookingPolicy\": {", + " \"enabled\": false,", + " \"latestBookingInMinutes\": 1440", + " },", + " \"bookAfterStartPolicy\": {", + " \"enabled\": false", + " },", + " \"cancellationPolicy\": {", + " \"enabled\": true,", + " \"limitLatestCancellation\": false,", + " \"latestCancellationInMinutes\": 1440", + " },", + " \"reschedulePolicy\": {", + " \"enabled\": true,", + " \"limitLatestReschedule\": false,", + " \"latestRescheduleInMinutes\": 1440", + " },", + " \"waitlistPolicy\": {", + " \"enabled\": false,", + " \"capacity\": 10,", + " \"reservationTimeInMinutes\": 10", + " },", + " \"participantsPolicy\": {", + " \"enabled\": true,", + " \"maxParticipantsPerBooking\": 1", + " },", + " \"resourcesPolicy\": {", + " \"enabled\": false,", + " \"autoAssignAllowed\": false", + " },", + " \"_id\": \"ede8ad9e-44e1-480e-833f-542aea019bd0\",", + " \"_createdDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Thu Dec 14 2023 16:14:33 GMT+0100 (Central European Standard Time)\"", + " },", + " \"schedule\": {", + " \"_id\": \"8bf39bc0-a05a-49ff-9ee3-fc29d698988d\"", + " },", + " \"staffMemberIds\": [],", + " \"staffMembers\": [],", + " \"resourceGroups\": [],", + " \"serviceResources\": [],", + " \"supportedSlugs\": [", + " {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " {", + " \"name\": \"cat-hugging-training-1\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\"", + " }", + " ],", + " \"mainSlug\": {", + " \"name\": \"cat-hugging-training-advanced\",", + " \"custom\": false,", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " },", + " \"urls\": {", + " \"servicePage\": \"https://www.example.com/services-v2-test/service-page/cat-hugging-training-advanced\",", + " \"bookingPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\",", + " \"calendarPage\": \"https://www.example.com/services-v2-test/booking-calendar/cat-hugging-training-advanced\"", + " },", + " \"revision\": \"2\",", + " \"_id\": \"a262b133-e7a1-4498-a722-8340ed3f3db3\",", + " \"_createdDate\": \"Wed Jan 17 2024 09:37:27 GMT+0100 (Central European Standard Time)\",", + " \"_updatedDate\": \"Wed Jan 17 2024 09:37:28 GMT+0100 (Central European Standard Time)\"", + " }", + " */", + "" + ], + "extra": { + "description": "Update a service given only the fields that need to be updated. For example, update only the service name." + } + } + ] + }, + "isVeloEvent": false, + "customLabels": [ + { + "id": "maturity-beta" + } + ], + "syntaxName": "updateService", + "isAdminMethod": true + } + ], + "messages": [ + { + "name": "ActionEvent", + "members": [ + { + "name": "bodyAsJson", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Address", + "members": [ + { + "name": "addressLine", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number as free text." + }, + { + "name": "addressLine1", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Main address line, usually street and number as free text." }, { "name": "city", @@ -258,6 +2396,16 @@ ], "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, + { + "name": "formatted", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Full address of the location." + }, { "name": "postalCode", "optional": true, @@ -306,6 +2454,36 @@ ] } }, + { + "name": "AddressHint", + "members": [ + { + "name": "placement", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Where the extra text should be displayed." + }, + { + "name": "text", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Extra text displayed next to, or instead of, the actual address." + } + ], + "docs": { + "description": [ + "Extra information on displayed addresses.\nThis is used for display purposes. Used to add additional data about the address, such as \"In the passage\".\nFree text. In addition the user can state where he wants that additional description - before, after, or instead\nthe address string." + ] + } + }, { "name": "AddressLocation", "members": [ @@ -367,133 +2545,114 @@ } }, { - "name": "ApplicationError", + "name": "Aggregation", "members": [ { - "name": "code", + "name": "dateHistogram", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.DateHistogramAggregation" } ], - "doc": "Error code." + "doc": "" }, { - "name": "data", + "name": "fieldPath", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Data related to the error." + "doc": "" }, { - "name": "description", + "name": "groupBy", + "readOnly": false, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.GroupByAggregation" } ], - "doc": "Description of the error." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Availability", - "members": [ + "doc": "" + }, { - "name": "constraints", + "name": "name", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.V1AvailabilityConstraints" + "nativeType": "string" } ], - "doc": "Constraints for calculating the schedule's availability." + "doc": "" }, { - "name": "end", + "name": "nested", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Services.NestedAggregation" } ], - "doc": "Date and time the schedule stops being available for booking. No value indicates no end time." + "doc": "" }, { - "name": "linkedSchedules", + "name": "range", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.LinkedSchedule" - } - ] - } + "referenceType": "wix-bookings-v2.Services.RangeAggregation" } ], - "doc": "Other schedules that impact the availability calculation. Relevant only when there are availability constraints." + "doc": "" }, { - "name": "start", + "name": "scalar", "optional": true, "type": [ { - "nativeType": "Date" + "referenceType": "wix-bookings-v2.Services.ScalarAggregation" } ], - "doc": "Date and time the schedule starts to be available for booking." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "AvailabilityConstraints", - "members": [ + "doc": "" + }, { - "name": "sessionDurations", + "name": "type", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "number" - } - ] - } + "nativeType": "string" } ], - "doc": "A list of duration options for sessions, in minutes.\n\nThe availability calculation generates slots for sessions with these durations, unless there is a conflict with existing sessions or other availability constraints exist.\nRequired for services of type `APPOINTMENT` to allow the customer to book a session of the service. Not relevant for other service types.\n\n\nMin: 1 minute\n" + "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" }, { - "name": "timeBetweenSessions", + "name": "value", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.ValueAggregation" } ], - "doc": "The number of minutes between the end of a session and the start of the next.\n\nMin: 0 minutes\nMax: 720 minutes\n" + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAggregationKindOneOf", + "members": [ + "dateHistogram", + "nested", + "range", + "scalar", + "value" + ] + } + ] + }, "docs": { "description": [ "" @@ -501,108 +2660,84 @@ } }, { - "name": "AvailabilityPolicy", + "name": "AggregationData", "members": [ { - "name": "splitInterval", + "name": "results", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.SplitInterval" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.AggregationResults" + } + ] + } } ], - "doc": "Specify how to split the schedule slots in intervals of minutes." + "doc": "key = aggregation name (as derived from search request)" } ], "docs": { "description": [ - "Availability policy applied to all site schedules." + "" ] } }, { - "name": "AvailabilityPolicyUpdated", + "name": "AggregationKindOneOf", "members": [ { - "name": "availabilityPolicy", + "name": "dateHistogram", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.AvailabilityPolicy" + "referenceType": "wix-bookings-v2.Services.DateHistogramAggregation" } ], "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Behavior", - "members": [ + }, { - "name": "defaultBehavior", + "name": "nested", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntryPass" + "referenceType": "wix-bookings-v2.Services.NestedAggregation" } ], - "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." + "doc": "" }, { - "name": "discount", + "name": "range", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Discount" + "referenceType": "wix-bookings-v2.Services.RangeAggregation" } ], - "doc": "Discount applied to paid resources" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfBehaviorBehaviorOneOf", - "members": [ - "defaultBehavior", - "discount" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BehaviorBehaviorOneOf", - "members": [ + "doc": "" + }, { - "name": "defaultBehavior", + "name": "scalar", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntryPass" + "referenceType": "wix-bookings-v2.Services.ScalarAggregation" } ], - "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." + "doc": "" }, { - "name": "discount", + "name": "value", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Discount" + "referenceType": "wix-bookings-v2.Services.ValueAggregation" } ], - "doc": "Discount applied to paid resources" + "doc": "" } ], "docs": { @@ -612,108 +2747,114 @@ } }, { - "name": "Benefit", + "name": "AggregationResults", "members": [ { - "name": "_id", - "readOnly": true, + "name": "dateHistogram", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.DateHistogramResults" } ], - "doc": "Benefit unique ID" + "doc": "" }, { - "name": "appDefId", - "readOnly": true, + "name": "fieldPath", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Id of the app associated with this benefit" + "doc": "" }, { - "name": "behavior", + "name": "groupedByValue", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Behavior" + "referenceType": "wix-bookings-v2.Services.GroupByValueResults" } ], - "doc": "Benefit behavior" + "doc": "" }, { - "name": "benefitType", + "name": "name", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Benefit Type" + "doc": "" }, { - "name": "creditAmount", + "name": "nested", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.NestedResults" } ], - "doc": "Amount of credits that provided by this benefit" + "doc": "" }, { - "name": "customFields", + "name": "ranges", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Services.RangeResults" } ], - "doc": "additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value" + "doc": "" }, { - "name": "editable", + "name": "scalar", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.ScalarResult" } ], - "doc": "return value only in case it required in the ListRequest, true means that benefit's type could be updated" + "doc": "" }, { - "name": "resourceIds", + "name": "type", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "Resource IDs that serves by this benefit" + "doc": "Supported values:\n- `'DATE_HISTOGRAM'`\n- `'NESTED'`\n- `'RANGE'`\n- `'SCALAR'`\n- `'UNKNOWN_AGGREGATION_TYPE'`\n- `'VALUE'`" + }, + { + "name": "values", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.ValueResults" + } + ], + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfAggregationResultsResultOneOf", + "members": [ + "dateHistogram", + "groupedByValue", + "nested", + "ranges", + "scalar", + "values" + ] + } + ] + }, "docs": { "description": [ "" @@ -721,277 +2862,312 @@ } }, { - "name": "BenefitNotification", + "name": "AggregationResultsResultOneOf", "members": [ { - "name": "appDefId", + "name": "dateHistogram", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.DateHistogramResults" } ], - "doc": "App def ID" + "doc": "" }, { - "name": "benefit", + "name": "groupedByValue", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Benefit" + "referenceType": "wix-bookings-v2.Services.GroupByValueResults" } ], - "doc": "Current benefit details" + "doc": "" }, { - "name": "event", + "name": "nested", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.NestedResults" } ], - "doc": "Notification event" + "doc": "" }, { - "name": "planId", + "name": "ranges", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.RangeResults" } ], - "doc": "Plan unique ID" + "doc": "" }, { - "name": "prevBenefit", + "name": "scalar", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Benefit" + "referenceType": "wix-bookings-v2.Services.ScalarResult" } ], - "doc": "Previous benefit" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BookAfterStartPolicy", - "members": [ + "doc": "" + }, { - "name": "enabled", + "name": "values", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.ValueResults" } ], - "doc": "Whether booking is allowed after the start of the schedule. When `true`,\ncustomers can book after the start of the schedule.\n\nDefault: `false`\n" + "doc": "" } ], "docs": { "description": [ - "The policy for whether a session can be booked after the start of the schedule.\nThis policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy\nis enabled, the `LimitLateBookingPolicy` policy must be disabled." + "" ] } }, { - "name": "BookingPolicy", + "name": "ApplicationError", "members": [ { - "name": "_createdDate", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "Date and time the policy was created." - }, - { - "name": "_id", + "name": "code", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The ID to the policy for the booking." + "doc": "Error code." }, { - "name": "_updatedDate", - "readOnly": true, + "name": "data", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "Object" } ], - "doc": "Date and time the policy was updated." + "doc": "Data related to the error." }, { - "name": "bookAfterStartPolicy", - "readOnly": true, + "name": "description", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BookAfterStartPolicy" + "nativeType": "string" } ], - "doc": "Policy on booking an entity after the start of the schedule." - }, + "doc": "Description of the error." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Availability", + "members": [ { - "name": "cancellationPolicy", - "readOnly": true, + "name": "constraints", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CancellationPolicy" + "referenceType": "wix-bookings-v2.Services.V1AvailabilityConstraints" } ], - "doc": "Policy for canceling a booked entity." + "doc": "Constraints for calculating the schedule's availability." }, { - "name": "customPolicyDescription", - "readOnly": true, + "name": "end", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.PolicyDescription" + "nativeType": "Date" } ], - "doc": "Custom description for the policy. This policy is displayed to the participant." + "doc": "Date and time the schedule stops being available for booking. No value indicates no end time." }, { - "name": "default", - "readOnly": true, + "name": "linkedSchedules", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.LinkedSchedule" + } + ] + } } ], - "doc": "Whether the policy is the default for the meta site." + "doc": "Other schedules that impact the availability calculation. Relevant only when there are availability constraints." }, { - "name": "limitEarlyBookingPolicy", - "readOnly": true, + "name": "start", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.LimitEarlyBookingPolicy" + "nativeType": "Date" } ], - "doc": "Policy for limiting early bookings." - }, + "doc": "Date and time the schedule starts to be available for booking." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AvailabilityConstraints", + "members": [ { - "name": "limitLateBookingPolicy", - "readOnly": true, + "name": "sessionDurations", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.LimitLateBookingPolicy" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "number" + } + ] + } } ], - "doc": "Policy for limiting late bookings." + "doc": "A list of duration options for sessions, in minutes.\n\nThe availability calculation generates slots for sessions with these durations, unless there is a conflict with existing sessions or other availability constraints exist.\nRequired for services of type `APPOINTMENT` to allow the customer to book a session of the service. Not relevant for other service types.\n\n\nMin: 1 minute, Max: 30 days, 23 hours, and 59 minutes\n" }, { - "name": "name", - "readOnly": true, + "name": "timeBetweenSessions", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Name of the policy." - }, - { - "name": "participantsPolicy", - "readOnly": true, + "doc": "The number of minutes between the end of a session and the start of the next.\n\nMin: 0 minutes\nMax: 720 minutes\n" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "AvailabilityPolicy", + "members": [ + { + "name": "splitInterval", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantsPolicy" + "referenceType": "wix-bookings-v2.Services.SplitInterval" } ], - "doc": "Policy regarding the participants per booking." - }, + "doc": "Specify how to split the schedule slots in intervals of minutes." + } + ], + "docs": { + "description": [ + "Availability policy applied to all site schedules." + ] + } + }, + { + "name": "AvailabilityPolicyUpdated", + "members": [ { - "name": "reschedulePolicy", - "readOnly": true, + "name": "availabilityPolicy", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ReschedulePolicy" + "referenceType": "wix-bookings-v2.Services.AvailabilityPolicy" } ], - "doc": "Policy for rescheduling a booked entity." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Behavior", + "members": [ { - "name": "revision", - "readOnly": true, + "name": "defaultBehavior", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.EntryPass" } ], - "doc": "Revision number, which increments by 1 each time the policy is updated. To prevent conflicting changes, the existing revision must be used when updating a policy." + "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." }, { - "name": "waitlistPolicy", - "readOnly": true, + "name": "discount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.WaitlistPolicy" + "referenceType": "wix-bookings-v2.Services.Discount" } ], - "doc": "Waitlist policy for the service." + "doc": "Discount applied to paid resources" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfBehaviorBehaviorOneOf", + "members": [ + "defaultBehavior", + "discount" + ] + } + ] + }, "docs": { "description": [ - "`BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service\nby visitors and members." + "" ] } }, { - "name": "BookingPolicyWithServices", + "name": "BehaviorBehaviorOneOf", "members": [ { - "name": "bookingPolicy", + "name": "defaultBehavior", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BookingPolicy" + "referenceType": "wix-bookings-v2.Services.EntryPass" } ], - "doc": "The booking policy." + "doc": "Entry pass for resources, e.g. a ticket for Bookings service or a ticket for Events." }, { - "name": "services", + "name": "discount", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Service" - } - ] - } + "referenceType": "wix-bookings-v2.Services.Discount" } ], - "doc": "The services associated with the booking policy." + "doc": "Discount applied to paid resources" } ], "docs": { @@ -1001,116 +3177,92 @@ } }, { - "name": "BulkActionMetadata", + "name": "Benefit", "members": [ { - "name": "totalFailures", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that couldn't be processed." + "doc": "Benefit unique ID" }, { - "name": "totalSuccesses", + "name": "appDefId", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items that were successfully processed." + "doc": "Id of the app associated with this benefit" }, { - "name": "undetailedFailures", + "name": "behavior", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.Behavior" } ], - "doc": "Number of failures without details because detailed failure threshold was exceeded." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkCreateServicesOptions", - "members": [ + "doc": "Benefit behavior" + }, { - "name": "returnEntity", + "name": "benefitType", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "`true` if the created entities must be included in the response, otherwise no entities are included in the response." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkCreateServicesRequest", - "members": [ + "doc": "Benefit Type" + }, { - "name": "returnEntity", + "name": "creditAmount", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "`true` if the created entities must be included in the response, otherwise no entities are included in the response." + "doc": "Amount of credits that provided by this benefit" }, { - "name": "services", + "name": "customFields", + "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "string" + }, + { + "nativeType": "string" } ] } } ], - "doc": "Services to create" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkCreateServicesResponse", - "members": [ + "doc": "additional details related to benefit; limited to 20 entries, 20 symbols for key and 20 symbols for value" + }, { - "name": "bulkActionMetadata", + "name": "editable", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" + "nativeType": "boolean" } ], - "doc": "Create statistics." + "doc": "return value only in case it required in the ListRequest, true means that benefit's type could be updated" }, { - "name": "results", + "name": "resourceIds", "optional": true, "type": [ { @@ -1118,13 +3270,13 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.BulkServiceResult" + "nativeType": "string" } ] } } ], - "doc": "The result of each service creation." + "doc": "Resource IDs that serves by this benefit" } ], "docs": { @@ -1134,73 +3286,57 @@ } }, { - "name": "BulkDeleteServicesOptions", + "name": "BenefitNotification", "members": [ { - "name": "participantNotification", + "name": "appDefId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "App def ID" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "benefit", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.Benefit" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkDeleteServicesRequest", - "members": [ + "doc": "Current benefit details" + }, { - "name": "ids", + "name": "event", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "Notification event" }, { - "name": "participantNotification", + "name": "planId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "Plan unique ID" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "prevBenefit", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.Benefit" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "Previous benefit" } ], "docs": { @@ -1210,258 +3346,245 @@ } }, { - "name": "BulkDeleteServicesResponse", + "name": "BookAfterStartPolicy", "members": [ { - "name": "bulkActionMetadata", + "name": "enabled", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" + "nativeType": "boolean" } ], - "doc": "Update statistics." - }, - { - "name": "results", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.BulkServiceResult" - } - ] - } - } - ], - "doc": "The result of each service removal." + "doc": "Whether booking is allowed after the start of the schedule. When `true`,\ncustomers can book after the start of the schedule.\n\nDefault: `false`\n" } ], "docs": { "description": [ - "" + "The policy for whether a session can be booked after the start of the schedule.\nThis policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy\nis enabled, the `LimitLateBookingPolicy` policy must be disabled." ] } }, { - "name": "BulkServiceResult", + "name": "BookingPolicy", "members": [ { - "name": "item", + "name": "_createdDate", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "Date" } ], - "doc": "" + "doc": "Date and time the policy was created." }, { - "name": "itemMetadata", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ItemMetadata" + "nativeType": "string" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateServicesOptions", - "members": [ + "doc": "The ID to the policy for the booking." + }, { - "name": "returnEntity", + "name": "_updatedDate", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "Date" } ], - "doc": "`true` if the updated entities must be included in the response, otherwise no entities are included in the response." + "doc": "Date and time the policy was updated." }, { - "name": "services", + "name": "bookAfterStartPolicy", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.MaskedService" - } - ] - } + "referenceType": "wix-bookings-v2.Services.BookAfterStartPolicy" } ], - "doc": "Services to update." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateServicesRequest", - "members": [ + "doc": "Policy on booking an entity after the start of the schedule." + }, { - "name": "returnEntity", + "name": "cancellationFeePolicy", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.CancellationFeePolicy" } ], - "doc": "`true` if the updated entities must be included in the response, otherwise no entities are included in the response." + "doc": "Rules for cancellation fees." }, { - "name": "services", + "name": "cancellationPolicy", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.MaskedService" - } - ] - } + "referenceType": "wix-bookings-v2.Services.CancellationPolicy" } ], - "doc": "Services to update." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BulkUpdateServicesResponse", - "members": [ + "doc": "Policy for canceling a booked entity." + }, { - "name": "bulkActionMetadata", + "name": "customPolicyDescription", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" + "referenceType": "wix-bookings-v2.Services.PolicyDescription" } ], - "doc": "Update statistics." + "doc": "Custom description for the policy. This policy is displayed to the participant." }, { - "name": "results", + "name": "default", + "readOnly": true, "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.BulkServiceResult" - } - ] - } + "nativeType": "boolean" } ], - "doc": "The result of each service update." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "BusinessLocationOptions", - "members": [ + "doc": "Whether the policy is the default for the meta site." + }, { - "name": "_id", + "name": "limitEarlyBookingPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.LimitEarlyBookingPolicy" + } + ], + "doc": "Policy for limiting early bookings." + }, + { + "name": "limitLateBookingPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.LimitLateBookingPolicy" + } + ], + "doc": "Policy for limiting late bookings." + }, + { + "name": "name", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Business location ID." + "doc": "Name of the policy." }, { - "name": "address", + "name": "participantsPolicy", "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Address" + "referenceType": "wix-bookings-v2.Services.ParticipantsPolicy" } ], - "doc": "Business location address. The address is derived from the business location and is read-only." + "doc": "Policy regarding the participants per booking." }, { - "name": "default", + "name": "reschedulePolicy", "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.ReschedulePolicy" } ], - "doc": "Whether this is the default location. There can only be 1 default location per site. The default location can't be archived." + "doc": "Policy for rescheduling a booked entity." }, { - "name": "name", + "name": "resourcesPolicy", "readOnly": true, "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ResourcesPolicy" } ], - "doc": "Business location name." + "doc": "Policy for allocating resources." + }, + { + "name": "saveCreditCardPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.SaveCreditCardPolicy" + } + ], + "doc": "Rule for saving credit card." + }, + { + "name": "waitlistPolicy", + "readOnly": true, + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.WaitlistPolicy" + } + ], + "doc": "Waitlist policy for the service." } ], "docs": { "description": [ - "" + "`BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service\nby visitors and members." ] } }, { - "name": "BusinessSchedule", + "name": "BookingPolicyWithServices", "members": [ { - "name": "periods", + "name": "bookingPolicy", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.TimePeriod" - } - ] - } + "referenceType": "wix-bookings-v2.Services.BookingPolicy" } ], - "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." + "doc": "The booking policy." }, { - "name": "specialHourPeriod", + "name": "countOfServices", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "The number of services associated with the booking policy." + }, + { + "name": "hasMoreServices", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there are more services associated with the booking policy." + }, + { + "name": "services", "optional": true, "type": [ { @@ -1469,113 +3592,146 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.SpecialHourPeriod" + "referenceType": "wix-bookings-v2.Services.Service" } ] } } ], - "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." + "doc": "The services associated with the booking policy. Up to 5 services are returned per policy." } ], "docs": { "description": [ - "Business schedule. Regular and exceptional time periods when the business is open or the service is available." + "" ] } }, { - "name": "CalendarConference", + "name": "BulkActionMetadata", "members": [ { - "name": "_id", + "name": "totalFailures", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Wix Calendar conference ID." + "doc": "Number of items that couldn't be processed." }, { - "name": "accountOwnerId", + "name": "totalSuccesses", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "ID of the account owner in the video conferencing service." + "doc": "Number of items that were successfully processed." }, { - "name": "conferenceType", + "name": "undetailedFailures", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Conference type.\n" - }, - { - "name": "description", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Conference description." - }, + "doc": "Number of failures without details because detailed failure threshold was exceeded." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateServicesOptions", + "members": [ { - "name": "externalId", + "name": "returnEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Conference meeting ID in the provider's conferencing system." - }, + "doc": "`true` if the created entities must be included in the response, otherwise no entities are included in the response." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateServicesRequest", + "members": [ { - "name": "guestUrl", + "name": "returnEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "URL used by a guest to join the conference." + "doc": "`true` if the created entities must be included in the response, otherwise no entities are included in the response." }, { - "name": "hostUrl", - "optional": true, + "name": "services", "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Service" + } + ] + } } ], - "doc": "URL used by the host to start the conference." - }, + "doc": "Services to create" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkCreateServicesResponse", + "members": [ { - "name": "password", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" } ], - "doc": "Password to join the conference." + "doc": "Create statistics." }, { - "name": "providerId", + "name": "results", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.BulkServiceResult" + } + ] + } } ], - "doc": "Conference provider ID." + "doc": "The result of each service creation." } ], "docs": { @@ -1585,38 +3741,27 @@ } }, { - "name": "CalendarDateTime", + "name": "BulkDeleteServicesOptions", "members": [ { - "name": "localDateTime", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.LocalDateTime" - } - ], - "doc": "An object containing the local date and time for the business's time zone." - }, - { - "name": "timeZone", - "readOnly": true, + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "The time zone. Optional. Derived from the schedule's time zone.\nIn case this field is associated with recurring session, this field is empty." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`.\n" }, { - "name": "timestamp", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "boolean" } ], - "doc": "UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a time zone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `\"2021-01-06T23:00:00.000Z\"`.\nRequired if `localDateTime` is not specified.\nIf `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's time zone." + "doc": "" } ], "docs": { @@ -1626,189 +3771,184 @@ } }, { - "name": "CancellationPolicy", + "name": "BulkDeleteServicesRequest", "members": [ { - "name": "enabled", - "optional": true, + "name": "ids", "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "Whether canceling a booking is allowed. When `true`, customers\ncan cancel the booking.\n\nDefault: `false`\n" + "doc": "" }, { - "name": "latestCancellationInMinutes", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Minimum number of minutes before the start of the booked session that the booking can be canceled.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`.\n" }, { - "name": "limitLatestCancellation", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether there is a limit on the latest cancellation time. When `true`,\na time limit is enforced.\n\nDefault: `false`\n" + "doc": "" } ], "docs": { "description": [ - "The policy for canceling a booked session." + "" ] } }, { - "name": "Category", + "name": "BulkDeleteServicesResponse", "members": [ { - "name": "_id", - "readOnly": true, + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" } ], - "doc": "Category ID. Read-only." + "doc": "Update statistics." }, { - "name": "customProperties", + "name": "results", "optional": true, "type": [ { "complexType": { - "nativeType": "Record", + "nativeType": "Array", "typeParams": [ { - "nativeType": "string" - }, - { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.BulkServiceResult" } ] } } ], - "doc": "Custom properties that can be associated with the category." - }, - { - "name": "name", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Category name." - }, - { - "name": "sortOrder", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Sorting order of the category for Wix Bookings UI." - }, - { - "name": "status", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Category status Read-only." + "doc": "The result of each service removal." } ], "docs": { "description": [ - "Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI." + "" ] } }, { - "name": "CategoryNotification", + "name": "BulkServiceResult", "members": [ { - "name": "category", + "name": "item", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Category" + "referenceType": "wix-bookings-v2.Services.Service" } ], "doc": "" }, { - "name": "event", + "name": "itemMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ItemMetadata" } ], - "doc": "Supported values:\n- `'Created'`\n- `'Deleted'`\n- `'Updated'`" + "doc": "" } ], "docs": { "description": [ - "An event sent every time a category entity is changed." + "" ] } }, { - "name": "CloneServiceOptions", + "name": "BulkUpdateServicesOptions", "members": [ { - "name": "cloneServiceName", + "name": "returnEntity", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "the name of the clone service. The title of the clone service's schedule will also be set to this name. When this parameter is omitted then the clone service will have the same name as the source service and the clone service's schedule will get the same title as the source service's active schedule." + "doc": "`true` if the updated entities must be included in the response, otherwise no entities are included in the response." }, { - "name": "copyPricingPlans", + "name": "services", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.MaskedService" + } + ] + } } ], - "doc": "copy benefits with pricing plans that are connected to the source service. If the source service is connected to more than 120 benefits with pricing plans then they will not be copied. In that case the field `error_types` in the response will include `PRICING_PLANS`." - }, + "doc": "Services to update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BulkUpdateServicesRequest", + "members": [ { - "name": "copyRecurringSessions", + "name": "returnEntity", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "copy recurring sessions of an active service's schedule" + "doc": "`true` if the updated entities must be included in the response, otherwise no entities are included in the response." }, { - "name": "hideService", + "name": "services", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.MaskedService" + } + ] + } } ], - "doc": "whether to hide service from the list or not. Empty means that we will copy this value from the source service without overriding it" + "doc": "Services to update." } ], "docs": { @@ -1818,56 +3958,107 @@ } }, { - "name": "CloneServiceRequest", + "name": "BulkUpdateServicesResponse", "members": [ { - "name": "cloneServiceName", + "name": "bulkActionMetadata", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.BulkActionMetadata" } ], - "doc": "the name of the clone service. The title of the clone service's schedule will also be set to this name. When this parameter is omitted then the clone service will have the same name as the source service and the clone service's schedule will get the same title as the source service's active schedule." + "doc": "Update statistics." }, { - "name": "copyPricingPlans", + "name": "results", "optional": true, "type": [ { - "nativeType": "boolean" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.BulkServiceResult" + } + ] + } } ], - "doc": "copy benefits with pricing plans that are connected to the source service. If the source service is connected to more than 120 benefits with pricing plans then they will not be copied. In that case the field `error_types` in the response will include `PRICING_PLANS`." + "doc": "The result of each service update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BusinessLocation", + "members": [ + { + "name": "locationId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The ID of the business location. Has to be non-empty" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "BusinessLocationOptions", + "members": [ + { + "name": "_id", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Business location ID." }, { - "name": "copyRecurringSessions", + "name": "address", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.Address" } ], - "doc": "copy recurring sessions of an active service's schedule" + "doc": "Business location address. The address is derived from the business location and is read-only." }, { - "name": "hideService", + "name": "default", + "readOnly": true, "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "whether to hide service from the list or not. Empty means that we will copy this value from the source service without overriding it" + "doc": "Whether this is the default location. There can only be 1 default location per site. The default location can't be archived." }, { - "name": "sourceServiceId", + "name": "name", + "readOnly": true, + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of a source service" + "doc": "Business location name." } ], "docs": { @@ -1877,10 +4068,10 @@ } }, { - "name": "CloneServiceResponse", + "name": "BusinessSchedule", "members": [ { - "name": "errors", + "name": "periods", "optional": true, "type": [ { @@ -1888,201 +4079,208 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.TimePeriod" } ] } } ], - "doc": "List of entity types that we failed to clone" + "doc": "Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods." }, { - "name": "service", + "name": "specialHourPeriod", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.SpecialHourPeriod" + } + ] + } } ], - "doc": "Cloned service" + "doc": "Exceptions to the business's regular hours. The business can be open or closed during the exception." } ], "docs": { "description": [ - "" + "Business schedule. Regular and exceptional time periods when the business is open or the service is available." ] } }, { - "name": "CommonAddress", + "name": "CalendarConference", "members": [ { - "name": "addressLine", + "name": "_id", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "Wix Calendar conference ID." }, { - "name": "addressLine2", + "name": "accountOwnerId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + "doc": "ID of the account owner in the video conferencing service." }, { - "name": "city", + "name": "conferenceType", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "City name." + "doc": "Conference type." }, { - "name": "country", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Country code." + "doc": "Conference description." }, { - "name": "countryFullname", + "name": "externalId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Country full name." + "doc": "Conference meeting ID in the provider's conferencing system." }, { - "name": "formattedAddress", + "name": "guestUrl", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "A string containing the full address of this location." + "doc": "URL used by a guest to join the conference." }, { - "name": "geocode", + "name": "hostUrl", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CommonAddressLocation" + "nativeType": "string" } ], - "doc": "Coordinates of the physical address." + "doc": "URL used by the host to start the conference." }, { - "name": "hint", + "name": "password", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Free text to help find the address." + "doc": "Password to join the conference." }, { - "name": "postalCode", + "name": "providerId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Zip/postal code." - }, + "doc": "Conference provider ID." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CalendarDateTime", + "members": [ { - "name": "streetAddress", + "name": "localDateTime", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CommonStreetAddress" + "referenceType": "wix-bookings-v2.Services.LocalDateTime" } ], - "doc": "Street name, number and apartment number." + "doc": "An object containing the local date and time for the business's time zone." }, { - "name": "subdivision", + "name": "timeZone", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." + "doc": "The time zone. Optional. Derived from the schedule's time zone.\nIn case this field is associated with recurring session, this field is empty." }, { - "name": "subdivisions", + "name": "timestamp", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Subdivision" - } - ] - } + "nativeType": "Date" } ], - "doc": "Multi-level subdivisions from top to bottom." + "doc": "UTC date-time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Coordinated_Universal_Time_(UTC)) format. If a time zone offset is specified, the time is converted to UTC. For example, if you specify `new Date('2021-01-06T16:00:00.000-07:00')`, the stored value will be `\"2021-01-06T23:00:00.000Z\"`.\nRequired if `localDateTime` is not specified.\nIf `localDateTime` is specified, `timestamp` is calculated as `localDateTime`, using the business's time zone." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfCommonAddressStreetOneOf", - "members": [ - "addressLine", - "streetAddress" - ] - } - ] - }, "docs": { "description": [ - "Physical address" + "" ] } }, { - "name": "CommonAddressLocation", + "name": "CancellationFeePolicy", "members": [ { - "name": "latitude", + "name": "cancellationWindows", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.CancellationWindow" + } + ] + } } ], - "doc": "Address latitude." + "doc": "Cancellation windows describing the time of cancellation and the fee to charge." }, { - "name": "longitude", + "name": "enabled", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Address longitude." + "doc": "Whether canceling a booking will result in a cancellation fee\n\nDefault: `false`\n" } ], "docs": { @@ -2092,69 +4290,90 @@ } }, { - "name": "CommonAddressStreetOneOf", + "name": "CancellationPolicy", "members": [ { - "name": "addressLine", + "name": "enabled", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Main address line, usually street and number, as free text." + "doc": "Whether canceling a booking is allowed. When `true`, customers\ncan cancel the booking.\n\nDefault: `false`\n" }, { - "name": "streetAddress", + "name": "latestCancellationInMinutes", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CommonStreetAddress" + "nativeType": "number" } ], - "doc": "Street name, number and apartment number." + "doc": "Minimum number of minutes before the start of the booked session that the booking can be canceled.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + }, + { + "name": "limitLatestCancellation", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether there is a limit on the latest cancellation time. When `true`,\na time limit is enforced.\n\nDefault: `false`\n" } ], "docs": { "description": [ - "" + "The policy for canceling a booked session." ] } }, { - "name": "CommonStreetAddress", + "name": "CancellationWindow", "members": [ { - "name": "apt", + "name": "amount", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.CommonMoney" } ], - "doc": "Apartment number." + "doc": "Amount to be charged as a cancellation fee." }, { - "name": "name", + "name": "percentage", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Street name." + "doc": "Percentage of the original price to be charged as a cancellation fee." }, { - "name": "number", + "name": "startInMinutes", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Street number." + "doc": "The fee will be applied if the booked session starts within this start time in minutes." } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCancellationWindowFeeOneOf", + "members": [ + "amount", + "percentage" + ] + } + ] + }, "docs": { "description": [ "" @@ -2162,17 +4381,27 @@ } }, { - "name": "ConferenceProvider", + "name": "CancellationWindowFeeOneOf", "members": [ { - "name": "providerId", + "name": "amount", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.CommonMoney" + } + ], + "doc": "Amount to be charged as a cancellation fee." + }, + { + "name": "percentage", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Conferencing provider ID" + "doc": "Percentage of the original price to be charged as a cancellation fee." } ], "docs": { @@ -2182,57 +4411,44 @@ } }, { - "name": "Conferencing", + "name": "Categories", "members": [ { - "name": "enabled", + "name": "businessTermId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether a conference link is generated for the service's sessions." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CountServicesOptions", - "members": [ + "doc": "Business Term Id" + }, { - "name": "filter", + "name": "primary", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "The filters for performing the count." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CountServicesRequest", - "members": [ + "doc": "Primary site category." + }, { - "name": "filter", + "name": "secondary", "optional": true, "type": [ { - "nativeType": "Object" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The filters for performing the count." + "doc": "Secondary site category." } ], "docs": { @@ -2242,181 +4458,129 @@ } }, { - "name": "CountServicesResponse", + "name": "Category", "members": [ { - "name": "count", + "name": "_id", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" - } - ], - "doc": "The number of services matching the given filter." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateServiceRequest", - "members": [ - { - "name": "service", - "type": [ - { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "string" } ], - "doc": "Service to be created." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CreateServiceResponse", - "members": [ + "doc": "Category ID." + }, { - "name": "service", + "name": "name", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "string" } ], - "doc": "The created service." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CursorPaging", - "members": [ + "doc": "Category name." + }, { - "name": "cursor", + "name": "sortOrder", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + "doc": "Sort order of the category in the Dashboard." }, { - "name": "limit", + "name": "status", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Number of items to load." + "doc": "Category status.\n\nSupported values:\n- `\"CREATED\"`: The category is created.\n- `\"DELETED\"`: The category is deleted.\n\nDefault: `\"CREATED\"`" } ], "docs": { "description": [ - "" + "Categories are used to group multiple services together. A service must be associated with a category in order to be exposed in the Wix Bookings UI." ] } }, { - "name": "CursorPagingMetadata", + "name": "CategoryNotification", "members": [ { - "name": "count", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Number of items returned in the response." - }, - { - "name": "cursors", + "name": "category", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Cursors" + "referenceType": "wix-bookings-v2.Services.Category" } ], - "doc": "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)." + "doc": "" }, { - "name": "hasNext", + "name": "event", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." + "doc": "Supported values:\n- `'Created'`\n- `'Deleted'`\n- `'Updated'`" } ], "docs": { "description": [ - "" + "An event sent every time a category entity is changed." ] } }, { - "name": "CursorQuery", + "name": "ChangeContext", "members": [ { - "name": "cursorPaging", + "name": "propertiesChange", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CursorPaging" + "referenceType": "wix-bookings-v2.Services.PropertiesChange" } ], - "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." + "doc": "Properties were updated." }, { - "name": "filter", + "name": "siteCloned", "optional": true, "type": [ { - "nativeType": "Object" + "referenceType": "wix-bookings-v2.Services.SiteCloned" } ], - "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`" + "doc": "Properties were cloned on site cloning." }, { - "name": "sort", + "name": "siteCreated", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Sorting" - } - ] - } + "referenceType": "wix-bookings-v2.Services.SiteCreated" } ], - "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" + "doc": "Default properties were created on site creation." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfCursorQueryPagingMethodOneOf", + "name": "oneOfChangeContextPayloadOneOf", "members": [ - "cursorPaging" + "propertiesChange", + "siteCloned", + "siteCreated" ] } ] @@ -2428,47 +4592,37 @@ } }, { - "name": "CursorQueryPagingMethodOneOf", + "name": "ChangeContextPayloadOneOf", "members": [ { - "name": "cursorPaging", + "name": "propertiesChange", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CursorPaging" + "referenceType": "wix-bookings-v2.Services.PropertiesChange" } ], - "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Cursors", - "members": [ + "doc": "Properties were updated." + }, { - "name": "next", + "name": "siteCloned", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.SiteCloned" } ], - "doc": "Cursor pointing to next page in the list of results." + "doc": "Properties were cloned on site cloning." }, { - "name": "prev", + "name": "siteCreated", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.SiteCreated" } ], - "doc": "Cursor pointing to previous page in the list of results." + "doc": "Default properties were created on site creation." } ], "docs": { @@ -2478,67 +4632,47 @@ } }, { - "name": "CustomLocationOptions", + "name": "CloneServiceOptions", "members": [ { - "name": "address", + "name": "cloneServiceName", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Address" + "nativeType": "string" } ], - "doc": "A custom address for the location." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "CustomPayment", - "members": [ + "doc": "the name of the clone service. The title of the clone service's schedule will also be set to this name. When this parameter is omitted then the clone service will have the same name as the source service and the clone service's schedule will get the same title as the source service's active schedule." + }, { - "name": "description", + "name": "copyPricingPlans", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "A custom description explaining to the customer how to pay for the service." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteServiceOptions", - "members": [ + "doc": "copy benefits with pricing plans that are connected to the source service. If the source service is connected to more than 120 benefits with pricing plans then they will not be copied. In that case the field `error_types` in the response will include `PRICING_PLANS`." + }, { - "name": "participantNotification", + "name": "copyRecurringSessions", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "copy recurring sessions of an active service's schedule" }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "hideService", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "whether to hide service from the list or not. Empty means that we will copy this value from the source service without overriding it" } ], "docs": { @@ -2548,72 +4682,56 @@ } }, { - "name": "DeleteServiceRequest", + "name": "CloneServiceRequest", "members": [ { - "name": "participantNotification", + "name": "cloneServiceName", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ParticipantNotification" + "nativeType": "string" } ], - "doc": "Whether to notify participants about the change and an optional custom message." + "doc": "the name of the clone service. The title of the clone service's schedule will also be set to this name. When this parameter is omitted then the clone service will have the same name as the source service and the clone service's schedule will get the same title as the source service's active schedule." }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "copyPricingPlans", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether to preserve future sessions with participants. Optional, default is false." + "doc": "copy benefits with pricing plans that are connected to the source service. If the source service is connected to more than 120 benefits with pricing plans then they will not be copied. In that case the field `error_types` in the response will include `PRICING_PLANS`." }, { - "name": "serviceId", + "name": "copyRecurringSessions", + "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "ID of the service to delete." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DeleteServiceResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DisablePricingPlansForServiceOptions", - "members": [ + "doc": "copy recurring sessions of an active service's schedule" + }, { - "name": "pricingPlanIds", + "name": "hideService", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "boolean" } ], - "doc": "ID of the pricing plans to disconnect from the service." + "doc": "whether to hide service from the list or not. Empty means that we will copy this value from the source service without overriding it" + }, + { + "name": "sourceServiceId", + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a source service" } ], "docs": { @@ -2623,10 +4741,10 @@ } }, { - "name": "DisablePricingPlansForServiceRequest", + "name": "CloneServiceResponse", "members": [ { - "name": "pricingPlanIds", + "name": "errors", "optional": true, "type": [ { @@ -2640,16 +4758,17 @@ } } ], - "doc": "ID of the pricing plans to disconnect from the service." + "doc": "List of entity types that we failed to clone" }, { - "name": "serviceId", + "name": "service", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "ID of the service to disconnect the pricing plans from." + "doc": "Cloned service" } ], "docs": { @@ -2659,233 +4778,207 @@ } }, { - "name": "DisablePricingPlansForServiceResponse", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "Discount", + "name": "CommonAddress", "members": [ { - "name": "moneyOffAmount", + "name": "addressLine", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Absolute amount discount" + "doc": "Main address line, usually street and number, as free text." }, { - "name": "percentOffRate", + "name": "addressLine2", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Fixed-rate percent off discount" - } - ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfDiscountDiscountOneOf", - "members": [ - "moneyOffAmount", - "percentOffRate" - ] - } - ] - }, - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DiscountDiscountOneOf", - "members": [ + "doc": "Free text providing more detailed address info. Usually contains Apt, Suite, and Floor." + }, { - "name": "moneyOffAmount", + "name": "city", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Absolute amount discount" + "doc": "City name." }, { - "name": "percentOffRate", + "name": "country", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Fixed-rate percent off discount" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "DomainEvent", - "members": [ + "doc": "Country code." + }, { - "name": "_id", + "name": "countryFullname", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "random GUID so clients can tell if event was already handled" + "doc": "Country full name." }, { - "name": "actionEvent", + "name": "formattedAddress", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ActionEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "A string containing the full address of this location." }, { - "name": "createdEvent", + "name": "geocode", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntityCreatedEvent" + "referenceType": "wix-bookings-v2.Services.CommonAddressLocation" } ], - "doc": "" + "doc": "Coordinates of the physical address." }, { - "name": "deletedEvent", + "name": "hint", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntityDeletedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Free text to help find the address." }, { - "name": "entityEventSequence", + "name": "postalCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." + "doc": "Zip/postal code." }, { - "name": "entityFqdn", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.CommonStreetAddress" } ], - "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" + "doc": "Street name, number and apartment number." }, { - "name": "entityId", + "name": "subdivision", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Assuming that all messages including Actions have id\nExample: The id of the specific order, the id of a specific campaign" + "doc": "Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)." }, { - "name": "eventTime", + "name": "subdivisions", "optional": true, "type": [ { - "nativeType": "Date" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Subdivision" + } + ] + } } ], - "doc": "The time of the event. Useful if there was a delay in dispatching" - }, + "doc": "Multi-level subdivisions from top to bottom." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCommonAddressStreetOneOf", + "members": [ + "addressLine", + "streetAddress" + ] + } + ] + }, + "docs": { + "description": [ + "Physical address" + ] + } + }, + { + "name": "CommonAddressLocation", + "members": [ { - "name": "extendedFieldsUpdatedEvent", + "name": "latitude", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ExtendedFieldsUpdatedEvent" + "nativeType": "number" } ], - "doc": "" + "doc": "Address latitude." }, { - "name": "originatedFrom", + "name": "longitude", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "If present, indicates the action that triggered the event." - }, + "doc": "Address longitude." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CommonAddressStreetOneOf", + "members": [ { - "name": "slug", + "name": "addressLine", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" - }, - { - "name": "triggeredByAnonymizeRequest", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "A field that should be set if this event was triggered by an anonymize request.\nFor example you must set it to true when sending an event as a result of a GDPR right to be forgotten request.\nNOTE: This field is not relevant for `EntityCreatedEvent` but is located here for better ergonomics of consumers." + "doc": "Main address line, usually street and number, as free text." }, { - "name": "updatedEvent", + "name": "streetAddress", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntityUpdatedEvent" + "referenceType": "wix-bookings-v2.Services.CommonStreetAddress" } ], - "doc": "" + "doc": "Street name, number and apartment number." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfDomainEventBodyOneOf", - "members": [ - "actionEvent", - "createdEvent", - "deletedEvent", - "extendedFieldsUpdatedEvent", - "updatedEvent" - ] - } - ] - }, "docs": { "description": [ "" @@ -2893,128 +4986,78 @@ } }, { - "name": "DomainEventBodyOneOf", + "name": "CommonMoney", "members": [ { - "name": "actionEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.ActionEvent" - } - ], - "doc": "" - }, - { - "name": "createdEvent", + "name": "currency", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntityCreatedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Currency code. Must be valid ISO 4217 currency code (e.g., USD)." }, { - "name": "deletedEvent", + "name": "formattedValue", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.EntityDeletedEvent" + "nativeType": "string" } ], - "doc": "" + "doc": "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative." }, { - "name": "extendedFieldsUpdatedEvent", + "name": "value", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ExtendedFieldsUpdatedEvent" + "nativeType": "string" } ], - "doc": "" - }, - { - "name": "updatedEvent", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.EntityUpdatedEvent" - } - ], - "doc": "" + "doc": "Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative." } ], "docs": { "description": [ - "" - ] - } - }, - { - "name": "Empty", - "members": [], - "docs": { - "description": [ - "" + "Money.\nDefault format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003." ] } }, { - "name": "EnablePricingPlansForServiceRequest", + "name": "CommonStreetAddress", "members": [ { - "name": "pricingPlanIds", + "name": "apt", + "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "IDs of the pricing plans to connect to the service." + "doc": "Apartment number." }, { - "name": "serviceId", + "name": "name", + "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "ID of the service to add the pricing plans to." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EnablePricingPlansForServiceResponse", - "members": [ + "doc": "Street name." + }, { - "name": "pricingPlanIds", + "name": "number", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "IDs of the pricing plans connect to the service." + "doc": "Street number." } ], "docs": { @@ -3024,17 +5067,17 @@ } }, { - "name": "EntityCreatedEvent", + "name": "ConferenceProvider", "members": [ { - "name": "entityAsJson", + "name": "providerId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Conferencing provider ID" } ], "docs": { @@ -3044,26 +5087,17 @@ } }, { - "name": "EntityDeletedEvent", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "EntityUpdatedEvent", + "name": "Conferencing", "members": [ { - "name": "currentEntityAsJson", + "name": "enabled", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + "doc": "Whether a conference link is generated for the service's sessions." } ], "docs": { @@ -3073,106 +5107,57 @@ } }, { - "name": "EntryPass", - "members": [], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ExtendedFields", + "name": "ConsentPolicy", "members": [ { - "name": "namespaces", + "name": "advertising", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "nativeType": "Object" - } - ] - } + "nativeType": "boolean" } ], - "doc": "Data Extensions extended fields\nKey: Namespace\nValue: extended fields data in Struct format" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ExtendedFieldsUpdatedEvent", - "members": [ + "doc": "Whether the site uses cookies that collect information allowing better customization of the experience for a current visitor." + }, { - "name": "currentEntityAsJson", + "name": "analytics", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ExternalCalendarInfo", - "members": [ + "doc": "Whether the site uses cookies that collect analytics about how the site is used (in order to improve it)." + }, { - "name": "calendarType", + "name": "dataToThirdParty", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ExternalCalendarOverrides", - "members": [ + "doc": "CCPA compliance flag." + }, { - "name": "description", + "name": "essential", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Synced description of the external calendar event." + "doc": "Whether the site uses cookies that are essential to site operation." }, { - "name": "title", + "name": "functional", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Synced title of the external calendar event." + "doc": "Whether the site uses cookies that affect site performance and other functional measurements." } ], "docs": { @@ -3182,27 +5167,17 @@ } }, { - "name": "FixedPayment", + "name": "CountServicesOptions", "members": [ { - "name": "deposit", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.Money" - } - ], - "doc": "The deposit price required to book the service.\n\nRequired when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`\n" - }, - { - "name": "price", + "name": "filter", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Money" + "nativeType": "Object" } ], - "doc": "The fixed price required to book the service.\n\nRequired when: `rateType` is `FIXED`\n" + "doc": "The filters for performing the count." } ], "docs": { @@ -3212,17 +5187,17 @@ } }, { - "name": "Form", + "name": "CountServicesRequest", "members": [ { - "name": "_id", + "name": "filter", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Object" } ], - "doc": "ID of the form associated with the service.\nForm information submitted when booking, including contact details, participants, and other form fields, set up for the service." + "doc": "The filters for performing the count." } ], "docs": { @@ -3232,17 +5207,17 @@ } }, { - "name": "FormSettings", + "name": "CountServicesResponse", "members": [ { - "name": "hidden", + "name": "count", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Whether the service booking form should be hidden from the site." + "doc": "The number of services matching the given filter." } ], "docs": { @@ -3252,17 +5227,16 @@ } }, { - "name": "Frequency", + "name": "CreateServiceRequest", "members": [ { - "name": "repetition", - "optional": true, + "name": "service", "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." + "doc": "Service to be created." } ], "docs": { @@ -3272,16 +5246,17 @@ } }, { - "name": "GetServiceRequest", + "name": "CreateServiceResponse", "members": [ { - "name": "serviceId", + "name": "service", + "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "ID of the service to retrieve." + "doc": "The created service." } ], "docs": { @@ -3291,17 +5266,27 @@ } }, { - "name": "GetServiceResponse", + "name": "CursorPaging", "members": [ { - "name": "service", + "name": "cursor", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "string" } ], - "doc": "The retrieved service." + "doc": "Pointer to the next or previous page in the list of results.\n\nYou can get the relevant cursor token\nfrom the `pagingMetadata` object in the previous call's response.\nNot relevant for the first request.\n" + }, + { + "name": "limit", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Number of items to load." } ], "docs": { @@ -3311,47 +5296,37 @@ } }, { - "name": "Interval", + "name": "CursorPagingMetadata", "members": [ { - "name": "daysOfWeek", + "name": "count", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." + "doc": "Number of items returned in the response." }, { - "name": "duration", + "name": "cursors", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.Cursors" } ], - "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400." + "doc": "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)." }, { - "name": "hourOfDay", + "name": "hasNext", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." - }, - { - "name": "minuteOfHour", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." + "doc": "Indicates if there are more results after the current page.\nIf `true`, another page of results can be retrieved.\nIf `false`, this is the last page." } ], "docs": { @@ -3361,56 +5336,56 @@ } }, { - "name": "IntervalSplit", + "name": "CursorQuery", "members": [ { - "name": "intervals", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.RecurringInterval" - } - ] - } - } - ], - "doc": "" - }, - { - "name": "newScheduleVersion", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.CursorPaging" } ], - "doc": "" + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." }, { - "name": "oldScheduleVersion", + "name": "filter", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Object" } ], - "doc": "" + "doc": "Filter object in the following format:\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`" }, { - "name": "scheduleId", + "name": "sort", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Sorting" + } + ] + } } ], - "doc": "" + "doc": "Sort object in the following format:\n`[{\"fieldName\":\"sortField1\",\"order\":\"ASC\"},{\"fieldName\":\"sortField2\",\"order\":\"DESC\"}]`" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorQueryPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, "docs": { "description": [ "" @@ -3418,27 +5393,17 @@ } }, { - "name": "InvalidPricingPlan", + "name": "CursorQueryPagingMethodOneOf", "members": [ { - "name": "_id", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "The invalid pricing plan id." - }, - { - "name": "message", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.CursorPaging" } ], - "doc": "The reason for the pricing plan considered as invalid" + "doc": "Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`." } ], "docs": { @@ -3448,49 +5413,83 @@ } }, { - "name": "ItemMetadata", + "name": "CursorSearch", "members": [ { - "name": "_id", + "name": "aggregations", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Aggregation" + } + ] + } } ], - "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." + "doc": "Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition." }, { - "name": "error", + "name": "cursorPaging", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ApplicationError" + "referenceType": "wix-bookings-v2.Services.CursorPaging" } ], - "doc": "Details about the error in case of failure." + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" }, { - "name": "originalIndex", + "name": "filter", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "Object" } ], - "doc": "Index of the item within the request array. Allows for correlation between request and response items." + "doc": "A filter object. See documentation [here](https:// bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)" }, { - "name": "success", + "name": "search", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.SearchDetails" } ], - "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." + "doc": "Free text to match in searchable fields" + }, + { + "name": "sort", + "optional": true, + "type": [ + { + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.Sorting" + } + ] + } + } + ], + "doc": "Sort object in the form [{\"fieldName\":\"sortField1\"},{\"fieldName\":\"sortField2\",\"direction\":\"DESC\"}]" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfCursorSearchPagingMethodOneOf", + "members": [ + "cursorPaging" + ] + } + ] + }, "docs": { "description": [ "" @@ -3498,27 +5497,17 @@ } }, { - "name": "Keyword", + "name": "CursorSearchPagingMethodOneOf", "members": [ { - "name": "isMain", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the keyword is the main focus keyword." - }, - { - "name": "term", + "name": "cursorPaging", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.CursorPaging" } ], - "doc": "Keyword value." + "doc": "Cursor pointing to page of results. Can't be used together with 'paging'. 'cursor_paging.cursor' can not be used together with 'filter' or 'sort'" } ], "docs": { @@ -3528,98 +5517,117 @@ } }, { - "name": "LimitEarlyBookingPolicy", + "name": "Cursors", "members": [ { - "name": "earliestBookingInMinutes", + "name": "next", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Maximum number of minutes before the start of the session that a booking can be made. This value must be greater\nthan `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.\n\nDefault: 10080 minutes (7 days)\nMin: 1 minute\n" + "doc": "Cursor pointing to next page in the list of results." }, { - "name": "enabled", + "name": "prev", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether there is a limit on how early a customer\ncan book. When `false`, there is no limit on the earliest\nbooking time and customers can book in advance, as early as they like.\n\nDefault: `false`\n" + "doc": "Cursor pointing to previous page in the list of results." } ], "docs": { "description": [ - "The policy for limiting early bookings." + "" ] } }, { - "name": "LimitLateBookingPolicy", + "name": "CustomLocationOptions", "members": [ { - "name": "enabled", + "name": "address", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.Address" } ], - "doc": "Whether there is a limit on how late a customer\ncan book. When `false`, there is no limit on the latest\nbooking time and customers can book up to the last minute.\n\nDefault: `false`\n" - }, + "doc": "A custom address for the location." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "CustomPayment", + "members": [ { - "name": "latestBookingInMinutes", + "name": "description", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Minimum number of minutes before the start of the session that a booking can be made.\nFor a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.\nThis value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + "doc": "A custom description explaining to the customer how to pay for the service." } ], "docs": { "description": [ - "The policy for limiting late bookings." + "" ] } }, { - "name": "LinkedSchedule", + "name": "DateHistogramAggregation", "members": [ { - "name": "scheduleId", + "name": "interval", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Schedule ID." - }, + "doc": "Supported values:\n- `'DAY'`\n- `'HOUR'`\n- `'MINUTE'`\n- `'MONTH'`\n- `'SECOND'`\n- `'UNKNOWN_INTERVAL'`\n- `'WEEK'`\n- `'YEAR'`" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DateHistogramResult", + "members": [ { - "name": "scheduleOwnerId", - "readOnly": true, + "name": "count", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Owner ID, of the linked schedule." + "doc": "" }, { - "name": "transparency", + "name": "value", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\n\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions.\n\n\n\n" + "doc": "" } ], "docs": { @@ -3629,57 +5637,74 @@ } }, { - "name": "LocalDateTime", + "name": "DateHistogramResults", "members": [ { - "name": "dayOfMonth", + "name": "results", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.DateHistogramResult" + } + ] + } } ], - "doc": "Day of the month, from 1-31." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Delete", + "members": [ { - "name": "hourOfDay", + "name": "entityId", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Hour of the day in 24-hour format, from 0-23." - }, + "doc": "" + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DeleteServiceOptions", + "members": [ { - "name": "minutesOfHour", + "name": "participantNotification", "optional": true, "type": [ { - "nativeType": "number" - } - ], - "doc": "Minute, from 0-59." - }, - { - "name": "monthOfYear", - "optional": true, - "type": [ - { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "Month number, from 1-12." + "doc": "Whether to notify participants about the change and an optional custom message." }, { - "name": "year", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "boolean" } ], - "doc": "Year. 4-digit format." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`\n" } ], "docs": { @@ -3689,61 +5714,47 @@ } }, { - "name": "Location", + "name": "DeleteServiceRequest", "members": [ { - "name": "business", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.BusinessLocationOptions" - } - ], - "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." - }, - { - "name": "calculatedAddress", - "readOnly": true, + "name": "participantNotification", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Address" + "referenceType": "wix-bookings-v2.Services.ParticipantNotification" } ], - "doc": "The location address, based on the location `type`. If `type` is `CUSTOMER`, this address is empty." + "doc": "Whether to notify participants about the change and an optional custom message." }, { - "name": "custom", + "name": "preserveFutureSessionsWithParticipants", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CustomLocationOptions" + "nativeType": "boolean" } ], - "doc": "The service is offered at a custom location." + "doc": "Whether to preserve future sessions with participants.\n\nDefault: `false`\n" }, { - "name": "type", - "optional": true, + "name": "serviceId", "type": [ { "nativeType": "string" } ], - "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, as defined for the by the Business Info [Locations API](https://www.wix.com/velo/reference/wix-business-tools-v2/locations).\n- `CUSTOMER`: Will be determined by the customer. For appointments only." + "doc": "ID of the service to delete." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfLocationOptionsOneOf", - "members": [ - "business", - "custom" - ] - } + "docs": { + "description": [ + "" ] - }, + } + }, + { + "name": "DeleteServiceResponse", + "members": [], "docs": { "description": [ "" @@ -3751,27 +5762,24 @@ } }, { - "name": "LocationOptionsOneOf", + "name": "DisablePricingPlansForServiceOptions", "members": [ { - "name": "business", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.BusinessLocationOptions" - } - ], - "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." - }, - { - "name": "custom", + "name": "pricingPlanIds", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CustomLocationOptions" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "The service is offered at a custom location." + "doc": "ID of the pricing plans to disconnect from the service." } ], "docs": { @@ -3781,59 +5789,96 @@ } }, { - "name": "LocationsAddress", + "name": "DisablePricingPlansForServiceRequest", "members": [ { - "name": "city", + "name": "pricingPlanIds", "optional": true, "type": [ { - "nativeType": "string" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "City name." + "doc": "ID of the pricing plans to disconnect from the service." }, { - "name": "country", - "optional": true, + "name": "serviceId", "type": [ { "nativeType": "string" } ], - "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." - }, + "doc": "ID of the service to disconnect the pricing plans from." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "DisablePricingPlansForServiceResponse", + "members": [ { - "name": "postalCode", + "name": "service", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "Postal or zip code." - }, + "doc": "The service after the pricing plans update." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Discount", + "members": [ { - "name": "streetAddress", + "name": "moneyOffAmount", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.LocationsStreetAddress" + "nativeType": "string" } ], - "doc": "Street address. Includes street name, number, and apartment number in separate fields." + "doc": "Absolute amount discount" }, { - "name": "subdivision", + "name": "percentOffRate", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." + "doc": "Fixed-rate percent off discount" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDiscountDiscountOneOf", + "members": [ + "moneyOffAmount", + "percentOffRate" + ] + } + ] + }, "docs": { "description": [ "" @@ -3841,234 +5886,242 @@ } }, { - "name": "LocationsAddressLocation", + "name": "DiscountDiscountOneOf", "members": [ { - "name": "latitude", + "name": "moneyOffAmount", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Latitude of the location. Must be between -90 and 90." + "doc": "Absolute amount discount" }, { - "name": "longitude", + "name": "percentOffRate", "optional": true, "type": [ { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Longitude of the location. Must be between -180 and 180." + "doc": "Fixed-rate percent off discount" } ], "docs": { "description": [ - "Address Geolocation" + "" ] } }, { - "name": "LocationsLocation", + "name": "DomainEvent", "members": [ { "name": "_id", - "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location ID." - }, - { - "name": "address", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.LocationsAddress" - } - ], - "doc": "Address." - }, - { - "name": "archived", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." + "doc": "Unique event ID.\nAllows clients to ignore duplicate webhooks." }, { - "name": "businessSchedule", + "name": "actionEvent", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.BusinessSchedule" + "referenceType": "wix-bookings-v2.Services.ActionEvent" } ], - "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" + "doc": "" }, { - "name": "default", - "readOnly": true, + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.EntityCreatedEvent" } ], - "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + "doc": "" }, { - "name": "description", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.EntityDeletedEvent" } ], - "doc": "Location description." + "doc": "" }, { - "name": "email", + "name": "entityEventSequence", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Email address." + "doc": "A sequence number defining the order of updates to the underlying entity.\nFor example, given that some entity was updated at 16:00 and than again at 16:01,\nit is guaranteed that the sequence number of the second update is strictly higher than the first.\nAs the consumer, you can use this value to ensure that you handle messages in the correct order.\nTo do so, you will need to persist this number on your end, and compare the sequence number from the\nmessage against the one you have stored. Given that the stored number is higher, you should ignore the message." }, { - "name": "fax", + "name": "entityFqdn", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Fax number." + "doc": "Assumes actions are also always typed to an entity_type\nExample: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction" }, { - "name": "locationType", + "name": "entityId", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Location type. **Note:** Currently not supported." + "doc": "ID of the entity associated with the event." }, { - "name": "name", + "name": "eventTime", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "Date" } ], - "doc": "Location name." + "doc": "Event timestamp." }, { - "name": "phone", + "name": "originatedFrom", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Phone number." + "doc": "If present, indicates the action that triggered the event." }, { - "name": "revision", + "name": "slug", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." + "doc": "This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)\nThis is although the created/updated/deleted notion is duplication of the oneof types\nExample: created/updated/deleted/started/completed/email_opened" }, { - "name": "status", + "name": "triggeredByAnonymizeRequest", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Location status. Defaults to `ACTIVE`.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status. `INACTIVE` is currently not supported." + "doc": "Whether the event was triggered as a result of a privacy regulation application\n(for example, GDPR)." }, { - "name": "timeZone", + "name": "updatedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.EntityUpdatedEvent" } ], - "doc": "Timezone in `America/New_York` format." + "doc": "" } ], - "docs": { - "description": [ + "extra": { + "oneOfGroups": [ + { + "name": "oneOfDomainEventBodyOneOf", + "members": [ + "actionEvent", + "createdEvent", + "deletedEvent", + "updatedEvent" + ] + } + ] + }, + "docs": { + "description": [ "" ] } }, { - "name": "LocationsStreetAddress", + "name": "DomainEventBodyOneOf", "members": [ { - "name": "apt", + "name": "actionEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ActionEvent" } ], - "doc": "Apartment number." + "doc": "" }, { - "name": "name", + "name": "createdEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.EntityCreatedEvent" } ], - "doc": "Street name." + "doc": "" }, { - "name": "number", + "name": "deletedEvent", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.EntityDeletedEvent" } ], - "doc": "Street number." + "doc": "" + }, + { + "name": "updatedEvent", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.EntityUpdatedEvent" + } + ], + "doc": "" } ], "docs": { "description": [ - "Street address. Includes street name, number, and apartment number in separate fields." + "" ] } }, { - "name": "MaskedService", + "name": "Empty", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EnablePricingPlansForServiceRequest", "members": [ { - "name": "mask", - "optional": true, + "name": "pricingPlanIds", "type": [ { "complexType": { @@ -4081,17 +6134,16 @@ } } ], - "doc": "Explicit list of fields to update." + "doc": "IDs of the pricing plans to connect to the service." }, { - "name": "service", - "optional": true, + "name": "serviceId", "type": [ { - "referenceType": "wix-bookings-v2.Services.Service" + "nativeType": "string" } ], - "doc": "Service to update. [Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported." + "doc": "ID of the service to add the pricing plans to." } ], "docs": { @@ -4101,20 +6153,10 @@ } }, { - "name": "Media", + "name": "EnablePricingPlansForServiceResponse", "members": [ { - "name": "coverMedia", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MediaItem" - } - ], - "doc": "Cover media associated with the service." - }, - { - "name": "items", + "name": "pricingPlanIds", "optional": true, "type": [ { @@ -4122,23 +6164,23 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.MediaItem" + "nativeType": "string" } ] } } ], - "doc": "Media items associated with the service." + "doc": "IDs of the pricing plans connected to the service." }, { - "name": "mainMedia", + "name": "service", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MediaItem" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "Primary media associated with the service." + "doc": "The service after the pricing plans update." } ], "docs": { @@ -4148,29 +6190,19 @@ } }, { - "name": "MediaItem", + "name": "EntityCreatedEvent", "members": [ { - "name": "image", + "name": "entityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Details of the image associated with the service, such as URL and size." + "doc": "" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfMediaItemItemOneOf", - "members": [ - "image" - ] - } - ] - }, "docs": { "description": [ "" @@ -4178,17 +6210,17 @@ } }, { - "name": "MediaItemItemOneOf", + "name": "EntityDeletedEvent", "members": [ { - "name": "image", + "name": "deletedEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Details of the image associated with the service, such as URL and size." + "doc": "Entity that was deleted" } ], "docs": { @@ -4198,34 +6230,56 @@ } }, { - "name": "MigrationData", + "name": "EntityUpdatedEvent", "members": [ { - "name": "businessId", + "name": "currentEntityAsJson", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" - }, + "doc": "Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\nThis means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\nWe don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "EntryPass", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "ExtendedFields", + "members": [ { - "name": "staffs", + "name": "namespaces", "optional": true, "type": [ { "complexType": { - "nativeType": "Array", + "nativeType": "Record", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.StaffData" + "nativeType": "string" + }, + { + "nativeType": "Object" } ] } } ], - "doc": "" + "doc": "Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\nThe value of each key is structured according to the schema defined when the extended fields were configured.\n\nYou can only access fields for which you have the appropriate permissions.\n\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n" } ], "docs": { @@ -4235,17 +6289,17 @@ } }, { - "name": "MigrationEvent", + "name": "ExternalCalendarInfo", "members": [ { - "name": "migrationData", + "name": "calendarType", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MigrationData" + "nativeType": "string" } ], - "doc": "" + "doc": "The external calendar type (e.g. Google Calendar, iCal, etc)." } ], "docs": { @@ -4255,57 +6309,57 @@ } }, { - "name": "Money", + "name": "ExternalCalendarOverrides", "members": [ { - "name": "currency", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Currency code. Must be valid ISO 4217 currency code (e.g., USD)." - }, - { - "name": "formattedValue", + "name": "description", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Monetary amount. Decimal string in local format (e.g., 1 000,30). Optionally, a single (-), to indicate that the amount is negative." + "doc": "Synced description of the external calendar event." }, { - "name": "value", + "name": "title", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Monetary amount. Decimal string with a period as a decimal separator (e.g., 3.99). Optionally, a single (-), to indicate that the amount is negative." + "doc": "Synced title of the external calendar event." } ], "docs": { "description": [ - "Money.\nDefault format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003." + "" ] } }, { - "name": "MoveToNewLocationsOptions", + "name": "FixedPayment", "members": [ { - "name": "newLocation", + "name": "deposit", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Location" + "referenceType": "wix-bookings-v2.Services.Money" } ], - "doc": "The new location to move existing sessions currently set to a removed location, used when `action` is `MOVE_TO_LOCATION`." + "doc": "The deposit price required to book the service.\n\nRequired when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`\n" + }, + { + "name": "price", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.Money" + } + ], + "doc": "The fixed price required to book the service.\n\nRequired when: `rateType` is `FIXED`\n" } ], "docs": { @@ -4315,24 +6369,17 @@ } }, { - "name": "MultipleSessionsCreated", + "name": "Form", "members": [ { - "name": "schedulesWithSessions", + "name": "_id", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.ScheduleWithSessions" - } - ] - } + "nativeType": "string" } ], - "doc": "" + "doc": "ID of the form associated with the service.\nForm information submitted when booking, including contact details, participants, and other form fields, set up for the service." } ], "docs": { @@ -4342,37 +6389,37 @@ } }, { - "name": "OnlineBooking", + "name": "FormSettings", "members": [ { - "name": "allowMultipleRequests", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Multiple customers can request to book the same time slot. Relevant when `requireManualApproval` is `true`." - }, - { - "name": "enabled", + "name": "hidden", "optional": true, "type": [ { "nativeType": "boolean" } ], - "doc": "Whether this service can be booked online.\nWhen set to `true`, customers can book the service online. Configuring the payment options is done via `service.payment` property.\nWhen set to `false`, customers cannot book the service online, and the service can only be paid for in person." - }, + "doc": "Whether the service booking form should be hidden from the site." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "Frequency", + "members": [ { - "name": "requireManualApproval", + "name": "repetition", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "number" } ], - "doc": "Booking the service requires approval by the business owner." + "doc": "The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52." } ], "docs": { @@ -4382,87 +6429,46 @@ } }, { - "name": "Paging", + "name": "GeoCoordinates", "members": [ { - "name": "limit", + "name": "latitude", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of items to load." + "doc": "Latitude of the location. Must be between -90 and 90." }, { - "name": "offset", + "name": "longitude", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "Number of items to skip in the current sort order." + "doc": "Longitude of the location. Must be between -180 and 180." } ], "docs": { "description": [ - "" + "Geocoordinates for a particular address." ] } }, { - "name": "PagingMetadataV2", + "name": "GetServiceAvailabilityConstraintsRequest", "members": [ { - "name": "count", - "optional": true, + "name": "serviceId", "type": [ { - "nativeType": "number" - } - ], - "doc": "Number of items returned in the response." - }, - { - "name": "cursors", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.Cursors" - } - ], - "doc": "Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used." - }, - { - "name": "offset", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Offset that was requested." - }, - { - "name": "tooManyToCount", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Flag that indicates the server failed to calculate the `total` field." - }, - { - "name": "total", - "optional": true, - "type": [ - { - "nativeType": "number" + "nativeType": "string" } ], - "doc": "Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set." + "doc": "ID of the service to retrieve." } ], "docs": { @@ -4472,58 +6478,85 @@ } }, { - "name": "Participant", + "name": "GetServiceAvailabilityConstraintsResponse", "members": [ { - "name": "_id", + "name": "constraints", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ServiceAvailabilityConstraints" } ], - "doc": "Participant ID. Currently represents the booking.id." - }, + "doc": "The retrieved availability constraints of the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetServiceOptions", + "members": [], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetServiceRequest", + "members": [ { - "name": "approvalStatus", - "optional": true, + "name": "serviceId", "type": [ { "nativeType": "string" } ], - "doc": "Approval status for the participant.\n\n" - }, + "doc": "ID of the service to retrieve." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GetServiceResponse", + "members": [ { - "name": "contactId", + "name": "service", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "Contact ID." - }, + "doc": "The retrieved service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "GroupByAggregation", + "members": [ { - "name": "email", + "name": "fieldPath", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Participant's email address." - }, - { - "name": "inherited", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the participant was inherited from the schedule, as opposed to being booked directly to the session." + "doc": "" }, { "name": "name", @@ -4533,29 +6566,29 @@ "nativeType": "string" } ], - "doc": "Participant's name." - }, - { - "name": "partySize", - "optional": true, - "type": [ - { - "nativeType": "number" - } - ], - "doc": "Group or party size. The number of people attending. Defaults to 0. Maximum is 250." + "doc": "" }, { - "name": "phone", + "name": "value", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.ValueAggregation" } ], - "doc": "Participant's phone number." + "doc": "" } ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfGroupByAggregationKindOneOf", + "members": [ + "value" + ] + } + ] + }, "docs": { "description": [ "" @@ -4563,27 +6596,17 @@ } }, { - "name": "ParticipantNotification", + "name": "GroupByAggregationKindOneOf", "members": [ { - "name": "message", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Custom message to send to the participants about the changes to the booking." - }, - { - "name": "notifyParticipants", + "name": "value", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.ValueAggregation" } ], - "doc": "Whether to send the message about the changes to the customer. `false` by default" + "doc": "" } ], "docs": { @@ -4593,89 +6616,87 @@ } }, { - "name": "ParticipantsPolicy", + "name": "GroupByValueResults", "members": [ { - "name": "enabled", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the maximum number of participants applies. When `false`, there is\nno maximum.\n\nDefault: `false`\n" - }, - { - "name": "maxParticipantsPerBooking", + "name": "results", "optional": true, "type": [ { - "nativeType": "number" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.NestedValueAggregationResult" + } + ] + } } ], - "doc": "Maximum number of participants allowed.\n\nDefault: 1 participant\nMin: 1 participant\n" + "doc": "" } ], "docs": { "description": [ - "The policy for the maximum number of participants per booking." + "" ] } }, { - "name": "Payment", + "name": "HtmlSitePublished", "members": [ { - "name": "custom", + "name": "appInstanceId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CustomPayment" + "nativeType": "string" } ], - "doc": "The details for the custom price of the service.\n\nRequired when: `rateType` is `CUSTOM`\n" + "doc": "Application instance ID" }, { - "name": "fixed", + "name": "appType", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.FixedPayment" + "nativeType": "string" } ], - "doc": "The details for the fixed price of the service.\n\nRequired when: `rateType` is `FIXED`\n" + "doc": "Application type" }, { - "name": "options", + "name": "branchId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.PaymentOptions" + "nativeType": "string" } ], - "doc": "The payment options a customer can use to pay for the service." + "doc": "optional branch id if publish is done from branch" }, { - "name": "pricingPlanIds", - "readOnly": true, + "name": "lastTransactionId", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "IDs of pricing plans that can be used as payment for the service." + "doc": "The site's last transactionId" }, { - "name": "pricingPlansIds", - "readOnly": true, + "name": "metaSiteId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "MSID" + }, + { + "name": "pages", "optional": true, "type": [ { @@ -4683,47 +6704,35 @@ "nativeType": "Array", "typeParams": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.Page" } ] } } ], - "doc": "IDs of pricing plans that can be used as payment for the service." + "doc": "A list of the site's pages" }, { - "name": "rateType", + "name": "publishDate", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The rate the customer is expected to pay for the service.\nCan be:\n- `FIXED`: The service has a fixed price.\n- `CUSTOM`: The service has a custom price, expressed as a price description.\n- `VARIED`: This service is offered with a set of different prices based on different terms.\n- `NO_FEE`: This service is offered free of charge." + "doc": "Site's publish date" }, { - "name": "varied", + "name": "revision", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.VariedPayment" + "nativeType": "string" } ], - "doc": "The details for the varied pricing of the service.\nRead more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n\nRequired when: `rateType` is `VARIED`\n" + "doc": "Revision" } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfPaymentRateOneOf", - "members": [ - "custom", - "fixed", - "varied" - ] - } - ] - }, "docs": { "description": [ "" @@ -4731,87 +6740,121 @@ } }, { - "name": "PaymentOptions", + "name": "IdentificationData", "members": [ { - "name": "deposit", + "name": "anonymousVisitorId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "This service requires a deposit to be made online in order to book it.\nWhen `true`:\n+ `rateType` must be `VARIED` or `FIXED`.\n+ A `deposit` must be specified." + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "inPerson", + "name": "appId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Customers can pay for the service in person." + "doc": "ID of an app." }, { - "name": "online", + "name": "identityType", + "readOnly": true, "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Customers can pay for the service online.\nWhen `true`:\n+ `rateType` must be either `FIXED` or `VARIED`.\n+ `fixed.price` or `varied.default_price` must be specified respectively. Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online)." + "doc": "Supported values:\n- `'ANONYMOUS_VISITOR'`\n- `'APP'`\n- `'MEMBER'`\n- `'UNKNOWN'`\n- `'WIX_USER'`" }, { - "name": "pricingPlan", + "name": "memberId", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Customers can pay for the service using a pricing plan." - } - ], - "docs": { + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." + } + ], + "extra": { + "oneOfGroups": [ + { + "name": "oneOfIdentificationDataIdOneOf", + "members": [ + "anonymousVisitorId", + "appId", + "memberId", + "wixUserId" + ] + } + ] + }, + "docs": { "description": [ "" ] } }, { - "name": "PaymentRateOneOf", + "name": "IdentificationDataIdOneOf", "members": [ { - "name": "custom", + "name": "anonymousVisitorId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CustomPayment" + "nativeType": "string" } ], - "doc": "The details for the custom price of the service.\n\nRequired when: `rateType` is `CUSTOM`\n" + "doc": "ID of a site visitor that has not logged in to the site." }, { - "name": "fixed", + "name": "appId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.FixedPayment" + "nativeType": "string" } ], - "doc": "The details for the fixed price of the service.\n\nRequired when: `rateType` is `FIXED`\n" + "doc": "ID of an app." }, { - "name": "varied", + "name": "memberId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.VariedPayment" + "nativeType": "string" } ], - "doc": "The details for the varied pricing of the service.\nRead more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).\n\nRequired when: `rateType` is `VARIED`\n" + "doc": "ID of a site visitor that has logged in to the site." + }, + { + "name": "wixUserId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "ID of a Wix user (site owner, contributor, etc.)." } ], "docs": { @@ -4821,86 +6864,67 @@ } }, { - "name": "PolicyDescription", + "name": "IncludeMissingValuesOptions", "members": [ { - "name": "description", + "name": "addToBucket", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The description to display.\n\nDefault: Empty\nMax length: 1000 characters\n" - }, - { - "name": "enabled", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether the description should be displayed. If `true`, the description is displayed.\n\nDefault: `false`\n" + "doc": "can specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ..." } ], "docs": { "description": [ - "A description of the policy to display to participants." + "" ] } }, { - "name": "Price", + "name": "Interval", "members": [ { - "name": "amount", + "name": "daysOfWeek", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Required payment amount." + "doc": "The day the interval accrue. Optional. The default is the day of the recurring interval's start time." }, { - "name": "currency", + "name": "duration", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Currency in which the amount is quoted." + "doc": "The duration of the interval in minutes. Required. Part of the session end time calculation." }, { - "name": "downPayAmount", + "name": "hourOfDay", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Amount of a down payment or deposit as part of the transaction." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryPoliciesRequest", - "members": [ + "doc": "The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23." + }, { - "name": "query", + "name": "minuteOfHour", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CursorQuery" + "nativeType": "number" } ], - "doc": "WQL expression." + "doc": "The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59." } ], "docs": { @@ -4910,10 +6934,10 @@ } }, { - "name": "QueryPoliciesResponse", + "name": "IntervalSplit", "members": [ { - "name": "bookingPolicies", + "name": "intervals", "optional": true, "type": [ { @@ -4921,42 +6945,43 @@ "nativeType": "Array", "typeParams": [ { - "referenceType": "wix-bookings-v2.Services.BookingPolicyWithServices" + "referenceType": "wix-bookings-v2.Services.RecurringInterval" } ] } } ], - "doc": "The retrieved policies." + "doc": "" }, { - "name": "pagingMetadata", + "name": "newScheduleVersion", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.CursorPagingMetadata" + "nativeType": "number" } ], - "doc": "Paging metadata, including offset and count." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "QueryServicesRequest", - "members": [ + "doc": "" + }, { - "name": "query", + "name": "oldScheduleVersion", + "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.QueryV2" + "nativeType": "number" } ], - "doc": "WQL expression." + "doc": "" + }, + { + "name": "scheduleId", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "" } ], "docs": { @@ -4966,34 +6991,27 @@ } }, { - "name": "QueryServicesResponse", + "name": "InvalidPricingPlan", "members": [ { - "name": "pagingMetadata", + "name": "_id", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.PagingMetadataV2" + "nativeType": "string" } ], - "doc": "Paging metadata, including offset and count." + "doc": "The invalid pricing plan id." }, { - "name": "services", + "name": "message", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Service" - } - ] - } + "nativeType": "string" } ], - "doc": "The retrieved services." + "doc": "The reason for the pricing plan considered as invalid" } ], "docs": { @@ -5003,57 +7021,49 @@ } }, { - "name": "QueryV2", + "name": "ItemMetadata", "members": [ { - "name": "filter", + "name": "_id", "optional": true, "type": [ { - "nativeType": "Object" + "nativeType": "string" } ], - "doc": "Filter object in the following format:\n\n`\"filter\" : {\n\"fieldName1\": \"value1\",\n\"fieldName2\":{\"$operator\":\"value2\"}\n}`\n\nExample of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`\n\nRead more about [supported fields and operators](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting).\n" + "doc": "Item ID. Should always be available, unless it's impossible (for example, when failing to create an item)." }, { - "name": "paging", + "name": "error", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Paging" + "referenceType": "wix-bookings-v2.Services.ApplicationError" } ], - "doc": "Paging options to limit and skip the number of items." + "doc": "Details about the error in case of failure." }, { - "name": "sort", + "name": "originalIndex", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Sorting" - } - ] - } + "nativeType": "number" } ], - "doc": "Sort object in the following format:\n`[ {\"fieldName\":\"sortField1\",\"order\":\"ASC\"},\n{\"fieldName\":\"sortField2\",\"order\":\"DESC\"} ]`\n\nRead more about [sorting](https://dev.wix.com/api/rest/wix-bookings/services-v2/filtering-and-sorting#wix-bookings_services-v2_filtering-and-sorting_sorting).\n" + "doc": "Index of the item within the request array. Allows for correlation between request and response items." + }, + { + "name": "success", + "optional": true, + "type": [ + { + "nativeType": "boolean" + } + ], + "doc": "Whether the requested action was successful for this item. When `false`, the `error` field is populated." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfQueryV2PagingMethodOneOf", - "members": [ - "cursorPaging", - "paging" - ] - } - ] - }, "docs": { "description": [ "" @@ -5061,17 +7071,27 @@ } }, { - "name": "QueryV2PagingMethodOneOf", + "name": "Keyword", "members": [ { - "name": "paging", + "name": "isMain", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Paging" + "nativeType": "boolean" } ], - "doc": "Paging options to limit and skip the number of items." + "doc": "Whether the keyword is the main focus keyword." + }, + { + "name": "term", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "Keyword value." } ], "docs": { @@ -5081,125 +7101,98 @@ } }, { - "name": "Rate", + "name": "LimitEarlyBookingPolicy", "members": [ { - "name": "labeledPriceOptions", + "name": "earliestBookingInMinutes", "optional": true, "type": [ { - "complexType": { - "nativeType": "Record", - "typeParams": [ - { - "nativeType": "string" - }, - { - "referenceType": "wix-bookings-v2.Services.Price" - } - ] - } + "nativeType": "number" } ], - "doc": "Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Maximum number of minutes before the start of the session that a booking can be made. This value must be greater\nthan `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.\n\nDefault: 10080 minutes (7 days)\nMin: 1 minute\n" }, { - "name": "priceText", + "name": "enabled", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.\nWhen present in an update request, the `default_varied_price` is ignored to support backward compatibility." + "doc": "Whether there is a limit on how early a customer\ncan book. When `false`, there is no limit on the earliest\nbooking time and customers can book in advance, as early as they like.\n\nDefault: `false`\n" } ], "docs": { "description": [ - "" + "The policy for limiting early bookings." ] } }, { - "name": "RecurringInterval", + "name": "LimitLateBookingPolicy", "members": [ { - "name": "_id", - "readOnly": true, + "name": "enabled", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "boolean" } ], - "doc": "The recurring interval identifier." + "doc": "Whether there is a limit on how late a customer\ncan book. When `false`, there is no limit on the latest\nbooking time and customers can book up to the last minute.\n\nDefault: `false`\n" }, { - "name": "affectedSchedules", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.LinkedSchedule" - } - ] - } - } - ], - "doc": "Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval." - }, - { - "name": "end", - "optional": true, - "type": [ - { - "nativeType": "Date" - } - ], - "doc": "The end time of the recurring interval. Optional. Empty value indicates that there is no end time." - }, - { - "name": "frequency", + "name": "latestBookingInMinutes", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Frequency" + "nativeType": "number" } ], - "doc": "The frequency of the interval. Optional. The default is frequency with the default repetition." - }, + "doc": "Minimum number of minutes before the start of the session that a booking can be made.\nFor a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.\nThis value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + } + ], + "docs": { + "description": [ + "The policy for limiting late bookings." + ] + } + }, + { + "name": "LinkedSchedule", + "members": [ { - "name": "interval", + "name": "scheduleId", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Interval" + "nativeType": "string" } ], - "doc": "The interval rules. The day, hour and minutes the interval is recurring." + "doc": "Schedule ID." }, { - "name": "intervalType", + "name": "scheduleOwnerId", + "readOnly": true, "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "The type of recurring interval.\n" + "doc": "Owner ID, of the linked schedule." }, { - "name": "start", + "name": "transparency", "optional": true, "type": [ { - "nativeType": "Date" + "nativeType": "string" } ], - "doc": "The start time of the recurring interval. Required." + "doc": "Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `\"BUSY\"`.\nIf set to `\"BUSY\"`, this schedule cannot have any available slots during the linked schedule's sessions.\nIf set to `\"FREE\"`, this schedule can have available slots during the linked schedule's sessions." } ], "docs": { @@ -5209,54 +7202,57 @@ } }, { - "name": "RecurringSessionSplit", + "name": "LocalDateTime", "members": [ { - "name": "newScheduleVersion", + "name": "dayOfMonth", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "" + "doc": "Day of the month, from 1-31." }, { - "name": "oldScheduleVersion", + "name": "hourOfDay", "optional": true, "type": [ { "nativeType": "number" } ], - "doc": "" + "doc": "Hour of the day in 24-hour format, from 0-23." }, { - "name": "recurringSessions", + "name": "minutesOfHour", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Session" - } - ] - } + "nativeType": "number" } ], - "doc": "" + "doc": "Minute, from 0-59." }, { - "name": "scheduleId", + "name": "monthOfYear", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "" + "doc": "Month number, from 1-12." + }, + { + "name": "year", + "optional": true, + "type": [ + { + "nativeType": "number" + } + ], + "doc": "Year. 4-digit format." } ], "docs": { @@ -5266,41 +7262,27 @@ } }, { - "name": "RecurringSessionsUpdated", + "name": "Locale", "members": [ { - "name": "newRecurringSessions", + "name": "country", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Session" - } - ] - } + "nativeType": "string" } ], - "doc": "New schedule's recurring session list." + "doc": "Two-letter country code in [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) format." }, { - "name": "oldRecurringSessions", + "name": "languageCode", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.Session" - } - ] - } + "nativeType": "string" } ], - "doc": "Old schedule's recurring session list." + "doc": "Two-letter language code in [ISO 639-1 alpha-2](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) format." } ], "docs": { @@ -5310,35 +7292,57 @@ } }, { - "name": "RemovedLocationSessionsAction", + "name": "Location", "members": [ { - "name": "action", + "name": "business", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.BusinessLocationOptions" } ], - "doc": "The action to perform on sessions currently set to a removed location." + "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." }, { - "name": "moveToLocationOptions", + "name": "calculatedAddress", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MoveToNewLocationsOptions" + "referenceType": "wix-bookings-v2.Services.Address" } ], - "doc": "Options related to the action, such as a new location to move existing sessions to." + "doc": "The location address, based on the location `type`. If `type` is `CUSTOMER`, this address is empty." + }, + { + "name": "custom", + "optional": true, + "type": [ + { + "referenceType": "wix-bookings-v2.Services.CustomLocationOptions" + } + ], + "doc": "The service is offered at a custom location." + }, + { + "name": "type", + "optional": true, + "type": [ + { + "nativeType": "string" + } + ], + "doc": "The type of location:\n- `CUSTOM`: The location is specific to this service, and is not derived from the business location.\n- `BUSINESS`: A business location, as defined for the by the Business Info [Locations API](https://www.wix.com/velo/reference/wix-business-tools-v2/locations).\n- `CUSTOMER`: Will be determined by the customer. For appointments only." } ], "extra": { "oneOfGroups": [ { - "name": "oneOfRemovedLocationSessionsActionActionOptionsOneOf", + "name": "oneOfLocationOptionsOneOf", "members": [ - "moveToLocationOptions" + "business", + "custom" ] } ] @@ -5350,219 +7354,107 @@ } }, { - "name": "RemovedLocationSessionsActionActionOptionsOneOf", - "members": [ - { - "name": "moveToLocationOptions", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.MoveToNewLocationsOptions" - } - ], - "doc": "Options related to the action, such as a new location to move existing sessions to." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ReschedulePolicy", + "name": "LocationOptionsOneOf", "members": [ { - "name": "enabled", - "optional": true, - "type": [ - { - "nativeType": "boolean" - } - ], - "doc": "Whether rescheduling a booking is allowed. When `true`, customers\ncan reschedule the booking.\n\nDefault: `false`\n" - }, - { - "name": "latestRescheduleInMinutes", + "name": "business", "optional": true, "type": [ { - "nativeType": "number" + "referenceType": "wix-bookings-v2.Services.BusinessLocationOptions" } ], - "doc": "Minimum number of minutes before the start of the booked session that the booking can be rescheduled.\n\nDefault: 1440 minutes (1 day)\nMin: 1 minute\n" + "doc": "The service is offered at the referenced business location, the location has to reference a location from the Business Info [Locations API](https://dev.wix.com/api/rest/business-info/locations)." }, { - "name": "limitLatestReschedule", + "name": "custom", "optional": true, "type": [ { - "nativeType": "boolean" + "referenceType": "wix-bookings-v2.Services.CustomLocationOptions" } ], - "doc": "Whether there is a limit on the latest reschedule time. When `true`,\na time limit is enforced.\n\nDefault: `false`\n" + "doc": "The service is offered at a custom location." } ], "docs": { "description": [ - "The policy for rescheduling a booked session." + "" ] } }, { - "name": "Resource", + "name": "LocationsAddress", "members": [ { - "name": "_id", - "readOnly": true, + "name": "city", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Resource ID." + "doc": "City name." }, { - "name": "description", + "name": "country", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Resource description." + "doc": "2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format." }, { - "name": "email", + "name": "formatted", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Resource email address." + "doc": "Full address of the location." }, { - "name": "images", + "name": "location", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "referenceType": "wix-bookings-v2.Services.LocationsAddressLocation" } ], - "doc": "Resource images." + "doc": "Geographic coordinates of location." }, { - "name": "name", + "name": "postalCode", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "Resource name." + "doc": "Postal or zip code." }, { - "name": "phone", + "name": "streetAddress", "optional": true, "type": [ { - "nativeType": "string" + "referenceType": "wix-bookings-v2.Services.LocationsStreetAddress" } ], - "doc": "Resource phone number." + "doc": "Street address. Includes street name, number, and apartment number in separate fields." }, { - "name": "scheduleIds", - "readOnly": true, + "name": "subdivision", "optional": true, "type": [ { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } + "nativeType": "string" } ], - "doc": "List of IDs of schedules owned by this resource." - }, - { - "name": "schedules", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "referenceType": "wix-bookings-v2.Services.V1Schedule" - } - ] - } - } - ], - "doc": "Deprecated. Please use scheduleIds. List of the schedules owned by this resource. Min size 1." - }, - { - "name": "status", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Resource status.\n" - }, - { - "name": "tag", - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Deprecated. Please use tags." - }, - { - "name": "tags", - "optional": true, - "type": [ - { - "complexType": { - "nativeType": "Array", - "typeParams": [ - { - "nativeType": "string" - } - ] - } - } - ], - "doc": "Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'." - }, - { - "name": "wixUserId", - "readOnly": true, - "optional": true, - "type": [ - { - "nativeType": "string" - } - ], - "doc": "Wix user ID, if the resource is associated with the Wix user.\nA staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager.\n" + "doc": "Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format." } ], "docs": { @@ -5572,37 +7464,37 @@ } }, { - "name": "ResourceNotification", + "name": "LocationsAddressLocation", "members": [ { - "name": "event", + "name": "latitude", "optional": true, "type": [ { - "nativeType": "string" + "nativeType": "number" } ], - "doc": "Event type." + "doc": "Latitude of the location. Must be between -90 and 90." }, { - "name": "resource", + "name": "longitude", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.Resource" + "nativeType": "number" } ], - "doc": "Updated resource entity.\n'resource.schedules' is deprecated and will not be returned. Please use 'resource.scheduleIds' instead." + "doc": "Longitude of the location. Must be between -180 and 180." } ], "docs": { "description": [ - "" + "Address Geolocation" ] } }, { - "name": "Schedule", + "name": "LocationsLocation", "members": [ { "name": "_id", @@ -5613,270 +7505,219 @@ "nativeType": "string" } ], - "doc": "Schedule ID, used to manage the service's sessions." + "doc": "Location ID." }, { - "name": "availabilityConstraints", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.AvailabilityConstraints" - } - ], - "doc": "Limitations dictating the way session availability is calculated. For appointments only." - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ScheduleCancelled", - "members": [ - { - "name": "oldSchedule", + "name": "address", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.V1Schedule" + "referenceType": "wix-bookings-v2.Services.LocationsAddress" } ], - "doc": "" + "doc": "Address." }, { - "name": "participantNotification", + "name": "archived", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.V1ParticipantNotification" + "nativeType": "boolean" } ], - "doc": "Whether to notify participants about the change and an optional custom message" + "doc": "Whether the location is archived. Archived locations can't be updated.\n__Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect its `status`." }, { - "name": "schedule", + "name": "businessSchedule", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.V1Schedule" + "referenceType": "wix-bookings-v2.Services.BusinessSchedule" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ScheduleCreated", - "members": [ + "doc": "Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.\n\n__Note:__ Not supported by Wix Bookings.\n" + }, { - "name": "schedule", + "name": "default", + "readOnly": true, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.V1Schedule" + "nativeType": "boolean" } ], - "doc": "" - } - ], - "docs": { - "description": [ - "" - ] - } - }, - { - "name": "ScheduleNotification", - "members": [ + "doc": "Whether this is the default location. There can only be one default location per site. The default location can't be archived." + }, { - "name": "availabilityPolicyUpdated", + "name": "description", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.AvailabilityPolicyUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "Location description." }, { - "name": "instanceId", + "name": "email", "optional": true, "type": [ { "nativeType": "string" } ], - "doc": "" + "doc": "Email address." }, { - "name": "intervalSplit", + "name": "fax", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.IntervalSplit" + "nativeType": "string" } ], - "doc": "" + "doc": "Fax number." }, { - "name": "migrationEvent", + "name": "locationType", + "readOnly": false, "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MigrationEvent" + "nativeType": "string" } ], - "doc": "supported only for schedule migration apis." + "doc": "Location type.\n\n**Note:** Currently not supported." }, { - "name": "multipleSessionsCreated", + "name": "locationTypes", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MultipleSessionsCreated" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "nativeType": "string" + } + ] + } } ], - "doc": "supported only for schedule migration apis." + "doc": "Location types." }, { - "name": "notifyParticipants", + "name": "name", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "Whether to notify participants about changed sessions. deprecated, use participant_notification" + "doc": "Location name." }, { - "name": "preserveFutureSessionsWithParticipants", + "name": "phone", "optional": true, "type": [ { - "nativeType": "boolean" + "nativeType": "string" } ], - "doc": "" + "doc": "Phone number." }, { - "name": "recurringSessionSplit", + "name": "revision", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.RecurringSessionSplit" + "nativeType": "string" } ], - "doc": "" + "doc": "Revision number, which increments by 1 each time the location is updated.\nTo prevent conflicting changes, the existing revision must be used when updating a location." }, { - "name": "scheduleCancelled", + "name": "status", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ScheduleCancelled" + "nativeType": "string" } ], - "doc": "" + "doc": "Location status. Defaults to `ACTIVE`.\n__Notes:__\n- [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)\ndoesn't affect the location's status.\n- `INACTIVE` status is currently not supported." }, { - "name": "scheduleCreated", + "name": "timeZone", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ScheduleCreated" + "nativeType": "string" } ], - "doc": "" - }, + "doc": "Timezone in `America/New_York` format." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "LocationsStreetAddress", + "members": [ { - "name": "scheduleUnassignedFromUser", + "name": "apt", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ScheduleUnassignedFromUser" + "nativeType": "string" } ], - "doc": "Inspect `schedule.scheduleOwnerUserId` on `scheduleUpdated` instead." + "doc": "Apartment number." }, { - "name": "scheduleUpdated", + "name": "name", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.ScheduleUpdated" + "nativeType": "string" } ], - "doc": "" + "doc": "Street name." }, { - "name": "sessionCancelled", + "name": "number", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.SessionCancelled" + "nativeType": "string" } ], - "doc": "" - }, + "doc": "Street number." + } + ], + "docs": { + "description": [ + "Street address. Includes street name, number, and apartment number in separate fields." + ] + } + }, + { + "name": "MaskedService", + "members": [ { - "name": "sessionCreated", + "name": "service", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.SessionCreated" + "referenceType": "wix-bookings-v2.Services.Service" } ], - "doc": "" - }, - { - "name": "sessionUpdated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.SessionUpdated" - } - ], - "doc": "" - }, - { - "name": "siteProperties", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.SitePropertiesOnScheduleCreation" - } - ], - "doc": "site properties. Optional. Given in create schedule notification." + "doc": "Service to update. [Partial updates](https://dev.wix.com/api/rest/wix-bookings/bookings/patch-endpoints-and-field-masks-in-update-requests) are supported." } ], - "extra": { - "oneOfGroups": [ - { - "name": "oneOfScheduleNotificationEventOneOf", - "members": [ - "availabilityPolicyUpdated", - "intervalSplit", - "migrationEvent", - "multipleSessionsCreated", - "recurringSessionSplit", - "scheduleCancelled", - "scheduleCreated", - "scheduleUnassignedFromUser", - "scheduleUpdated", - "sessionCancelled", - "sessionCreated", - "sessionUpdated" - ] - } - ] - }, "docs": { "description": [ "" @@ -5884,124 +7725,178 @@ } }, { - "name": "ScheduleNotificationEventOneOf", + "name": "Media", "members": [ { - "name": "availabilityPolicyUpdated", - "optional": true, - "type": [ - { - "referenceType": "wix-bookings-v2.Services.AvailabilityPolicyUpdated" - } - ], - "doc": "" - }, - { - "name": "intervalSplit", + "name": "coverMedia", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.IntervalSplit" + "referenceType": "wix-bookings-v2.Services.MediaItem" } ], - "doc": "" + "doc": "Cover media associated with the service." }, { - "name": "migrationEvent", + "name": "items", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MigrationEvent" + "complexType": { + "nativeType": "Array", + "typeParams": [ + { + "referenceType": "wix-bookings-v2.Services.MediaItem" + } + ] + } } ], - "doc": "supported only for schedule migration apis." + "doc": "Media items associated with the service." }, { - "name": "multipleSessionsCreated", + "name": "mainMedia", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.MultipleSessionsCreated" + "referenceType": "wix-bookings-v2.Services.MediaItem" } ], - "doc": "supported only for schedule migration apis." - }, + "doc": "Primary media associated with the service." + } + ], + "docs": { + "description": [ + "" + ] + } + }, + { + "name": "MediaItem", + "members": [ { - "name": "recurringSessionSplit", + "name": "image", "optional": true, "type": [ { - "referenceType": "wix-bookings-v2.Services.RecurringSessionSplit" + "nativeType": "string" } ], - "doc": "" - }, + "doc": "The image's Wix media URL in the following format: `'wix:image://v1/
-- -## Terminology - -* **Generate File Download Url** vs. **Generate Files Download Url** - The Generate Files Download Url generates a permanent URL for downloading a compressed file containing specific files in the Media Manager. However, the [Generate File Download Url](wix-media-v2/files/generatefiledownloadurl) generates one or more temporary URLs for downloading a specific file in the Media Manager. You can use the `expirationInMinutes` parameter to set the URL expiration time, making it more secure than the [Generate Files Download Url](wix-media-v2/files/generatefilesdownloadurl). Therefore, to download private files, use the Generate File Download Url for each private file that you want to generate a download Url for, instead of the Generate Files Download Url. - -* **Generate File Resumable Upload Url** vs. **Generate File Upload Url** - The [Generate File Upload Url](wix-media-v2/files/generatefileuploadurl) generates an upload URL to allow external clients to upload a file to the Media Manager. However, any interruption in the upload process stops the file upload. For files larger than 10MB, or when network connection is poor, use the [Generate File Resumable Upload Url](wix-media-v2/files/generatefileresumableuploadurl) instead. With the resumable upload URL, any interruption in the upload process pauses the file upload, and resumes the file upload process after the interruption. - - **Using the generated upload and resumable upload URLs** - When you get the `uploadUrl` response from Generate File Upload Url, learn how you can use it to [upload a file to the Media Manager](wix-media-v2/files/upload-api). When you get the `uploadUrl` response from Generate File Resumable Upload Url, learn how you can use it to [resumably upload a file to the Media Manager](wix-media-v2/files/resumable-upload-api). - - -* **File Assets** Wix Media files are optimized for web use. When a file is imported or uploaded to the Media Manager, it is processed and may produce several variations of the file for use in different circumstances. - For example: - * A video file can have different resolutions and formats. - * An audio file can have different formats and qualities. - * Video or audio files can have a preview asset containing only a portion of the file. - - With the [Generate File Download Url](wix-media-v2/files/generatefiledownloadurl), you can use the `assetKeys` parameter to download different assets of a file. - -* **Media Types:** Supported media types include the following: - * Image - * Video - * Audio - * Document - * Vector - * Archive - * Model 3D - Learn more about [media file types and size limits](https://support.wix.com/en/article/wix-media-supported-media-file-types-and-file-sizes). \ No newline at end of file diff --git a/wix-media-v2/wix-media-v2/Folders.service.json b/wix-media-v2/wix-media-v2/Folders.service.json index 5dfbb2b0ec..40b396aa71 100644 --- a/wix-media-v2/wix-media-v2/Folders.service.json +++ b/wix-media-v2/wix-media-v2/Folders.service.json @@ -36,7 +36,7 @@ "referenceType": "wix-media-v2.Folders.BulkDeleteFoldersOptions" } ], - "doc": "Options to use when deleting folders.", + "doc": "Options to use when deleting folders.\n", "required": false } ], @@ -61,157 +61,26 @@ "docs": { "summary": "Temporarily deletes the specified folders from the Media Manager.", "description": [ - "The `bulkDeleteFolders()` function returns a Promise that resolves when the folders are deleted.\n\nThe deleted folders are moved to the Media Manager's `TRASH_ROOT` folder (trash bin) unless permanently deleted. To permanently delete folders, pass the `permanent` parameter with the value `true`. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.\n\n>**Notes:**\n> - When a folder is deleted, the files in that folder are deleted.\n> - The specified folders can be from different parent folders.\n> - Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.\n> - Attempting to delete folders that are already in the trash bin doesn't result in an error.\n> - If your site contains files from a non-permanently deleted media folder, the files still appear on your site as the deleted folder is still in the Media Manager (in the trash bin).\n> - You can use the `bulkRestoreFoldersFromTrashBin()` endpoint to restore folders from the Media Manager's trash bin." + "The deleted folders are moved to the Media Manager's `trash-root` folder (trash bin) unless permanently deleted. To permanently delete folders, pass the `permanent` parameter with the value `true`. Permanently deleting folders isn't reversible, so make sure that the files in these folders aren't being used in a site or in any other way as the files will no longer be accessible.\n\nNote the following:\n* When a folder is deleted, the files in that folder are deleted.\n* The specified folders can be from different parent folders.\n* Moving multiple folders at once is an asynchronous action, and may take time for the changes to appear in the Media Manager.\n* Attempting to delete folders that are already in the trash bin doesn't result in an error.\n* If your site contains files from a deleted media folder, the files still appear on your site as the deleted folder is still in the Media Manager (in the trash bin).\n* You can use the [Bulk Restore Folders From Trash Bin](https://www.wix.com/velo/reference/wix-media-v2/folders/bulkrestorefoldersfromtrashbin) endpoint to restore folders from the Media Manager's trash bin.\n\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "Bulk delete folders ", + "title": "bulkDeleteFolders example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample folderIds value:", - " * [ ", - " * '302fc049d70c41dea33fa4a27ab481ba',", - " * 's8ze556gf8wfao3us62nx25ww3lr595a'", - " * ] ", - " */", - "", - "async function myBulkDeleteFoldersFunction(folderIds) {", - " try {", - " const elevatedBulkDeleteFolders = elevate(folders.bulkDeleteFolders);", - " const deletedFolders = await elevatedBulkDeleteFolders(folderIds);", - "", - " console.log('Successfully moved folders to trash.');", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to void */" - ] - }, - { - "title": "Bulk permanently delete folders ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample folderIds value:", - " * [ ", - " * '302fc049d70c41dea33fa4a27ab481ba',", - " * 's8ze556gf8wfao3us62nx25ww3lr595a',", - " * 'c956d69906414e7faf8a0ad81117b17d'", - " * ]", - " * ", - " * Sample options value:", - " * {", - " * permanent: true", - " * }", - " */", - "", - "async function myBulkDeleteFoldersFunction(folderIds, options) {", - " try {", - " const elevatedBulkDeleteFolders = elevate(folders.bulkDeleteFolders);", - " const deletedFolders = await elevatedBulkDeleteFolders(folderIds, options);", - "", - " console.log('Successfully permanently deleted files.');", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to void */" - ] - }, - { - "title": "Bulk delete all folders ", - "body": [ - "/**************************************", - " * Backend code - delete-folders.jsw *", - " *************************************/", - "", - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function deleteFolders(folderIds) {", - " try {", - " const elevatedBulkDeleteFolders = elevate(folders.bulkDeleteFolders);", - " const deletedFolders = await elevatedBulkDeleteFolders(folderIds);", - "", - " console.log('Successfully moved folders to trash.');", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "export async function searchFolders(options) {", - " try {", - " const elevatedSearchFolders = elevate(folders.searchFolders)", - " const foldersFound = await elevatedSearchFolders(options);", - "", - " return foldersFound;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { deleteFolders, listFolders, searchFolders } from 'backend/delete-folders';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdown();", - "", - " $w('#bulkDelete').onClick(async () => {", - " const searchOptions = { rootFolder: $w('#foldersDropdown').value};", - "", - " const foldersToDelete = await searchFolders(searchOptions);", - " const foldersIdsToDelete = foldersToDelete.map((folder) => {", - " return folder._id;", - " });", - " await deleteFolders(foldersIdsToDelete);", - "", - " console.log(`Successfully deleted all folders found in ${$w('#foldersDropdown').label}.`)", - " $w('#bulkDeleteSuccessMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdown() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#foldersDropdown').options = dropdownOptions;", - "};", + " ", + " async function bulkDeleteFolders(folderIds, options) {", + " try {", + " const result = await folders.bulkDeleteFolders(folderIds, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then deletes all folders found within that folder." - } + ] } ] }, @@ -220,9 +89,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "bulkDeleteFolders", - "isAdminMethod": true + ] }, { "name": "bulkRestoreFoldersFromTrashBin", @@ -264,83 +131,24 @@ "doc": null }, "docs": { - "summary": "Restores the specified folders from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.", - "description": [ - "The `bulkRestoreFoldersFromTrashBin()` function returns a Promise that resolves when the folders have been restored." - ], + "summary": "Restores the specified folders from the Media Manager's trash bin, and moves them to their original locations in the Media Manager.\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.", + "description": [], "examples": [ { - "title": "Bulk restore (non-permanently deleted) folders ", + "title": "bulkRestoreFoldersFromTrashBin example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample folderIds value:", - " * [", - " * 'd4051a6890724365a78678a6208ac37e',", - " * '302fc049d70c41dea33fa4a27ab481ba'", - " * ]", - " */", - "", - "async function myBulkRestoreFoldersFromTrashBinFunc(folderIds) {", - " try {", - " const elevatedBulkRestoreFoldersFromTrashBin = elevate(folders.bulkRestoreFoldersFromTrashBin);", - " const restoredFolders = await elevatedBulkRestoreFoldersFromTrashBin(folderIds);", - "", - " console.log('Restored deleted folders:', restoredFolders);", - " return restoredFolders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - " /* Promise resolves to void */" - ] - }, - { - "title": "Bulk restore all folders from the trash bin", - "body": [ - "/**************************************", - " * Backend code - restore-folders.jsw *", - " *************************************/", - "", - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function restoreAllFolders() {", - " try {", - " const elevatedListDeletedFolders = elevate(folders.listDeletedFolders);", - " const deletedFolders = await elevatedListDeletedFolders();", - "", - " const deletedFolderIds = deletedFolders.map((folder) => {", - " return folder._id;", - " });", - " ", - " const elevatedBulkRestoreFoldersFromTrashBin = elevate(folders.bulkRestoreFoldersFromTrashBin);", - " const restoredFolders = await elevatedBulkRestoreFoldersFromTrashBin(deletedFolderIds);", - "", - " return restoredFolders;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { restoreAllFolders } from 'backend/restore-folders';", - "", - "$w.onReady(async () => {", - " $w('#restoreAll').onClick(async () => {", - " const restoredFolders = await restoreAllFolders();", - "", - " console.log('Restored all folders:', restoredFolders);", - " $w('#bulkRestoreSuccessMsg').show();", - " });", - "});", + " ", + " async function bulkRestoreFoldersFromTrashBin(folderIds) {", + " try {", + " const result = await folders.bulkRestoreFoldersFromTrashBin(folderIds);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " ] } @@ -351,9 +159,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "bulkRestoreFoldersFromTrashBin", - "isAdminMethod": true + ] }, { "name": "createFolder", @@ -375,7 +181,7 @@ "referenceType": "wix-media-v2.Folders.CreateFolderOptions" } ], - "doc": "Options for specifying where to create a folder.", + "doc": "Options for specifying where to create a folder.\n", "required": false } ], @@ -400,118 +206,26 @@ "docs": { "summary": "Creates a new folder in the Media Manager.", "description": [ - "The `createFolder()` function returns a Promise that resolves to the created folder.\n\nUse the `parentFolderId` parameter to specify in which existing folder you want the new folder to be created.\nIf no folder is specified, the new folder is created in the `media-root` folder." + "Use the `parentFolderId` parameter to specify in which existing folder you want the new folder to be created.\nIf no folder is specified, the new folder is created in the `media-root` folder.\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "Create a folder ", + "title": "createFolder example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "", - "/* Sample displayName value: 'Vector Art'", - " * ", - " * Sample options value:", - " * {", - " * parentFolderId: 'b2bc72834460412494c93617d88b8c89'", - " * }", - " */", - "", - "async function myCreateFolderFunction(displayName, options) {", - " try {", - " const elevateCreateFolder = elevate(folders.createFolder);", - " const newFolder = await elevateCreateFolder(displayName, options);", - "", - " console.log('Created folder successfully:', newFolder);", - " return newFolder;", - " } catch (err){", - " console.error(err);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folder\": {", - " * \"_createdDate\": \"2023-08-14T08:05:03.000Z\",", - " * \"_id\": \"128833f888ea4846bbfbe8f164f3c6b5\",", - " * \"_updatedDate\": \"2023-08-14T08:05:03.000Z\",", - " * \"displayName\": \"Vector Art\",", - " * \"parentFolderId\": \"b2bc72834460412494c93617d88b8c89\",", - " * \"state\": \"OK\"", - " * }", - " * }", - " */" - ] - }, - { - "title": "Create a folder from visitor input ", - "body": [ - "/************************************", - " * Backend code - create-folder.jsw *", - " ***********************************/", - "", - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "async function createFolder(displayName, options) {", - " try {", - " const elevateCreateFolder = elevate(folders.createFolder);", - " const newFolder = await elevateCreateFolder(displayName, options);", - "", - " return newFolder;", - " } catch (err){", - " console.error(err);", - " }", - "}", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { createFolder, listFolders } from 'backend/create-folder';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdown();", - "", - " $w('#createFolder').onClick(async () => {", - " const folderName = $w('folderName').value;", - " const createOptions = {parentFolderId: $w('foldersDropdown').value};", - " const newFolder = await createFolder(folderName, createOptions);", - "", - " console.log(`Successfully created new folder \"${folderName}\" in ${$w('#foldersDropdown').label}.`)", - " $w('#createdFolderSuccessMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdown() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#foldersDropdown').options = dropdownOptions;", - "};", + " ", + " async function createFolder(displayName, options) {", + " try {", + " const result = await folders.createFolder(displayName, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then creates a folder within that folder." - } + ] } ] }, @@ -520,9 +234,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "createFolder", - "isAdminMethod": true + ] }, { "name": "generateFolderDownloadUrl", @@ -559,102 +271,26 @@ "docs": { "summary": "Generates a URL for downloading a compressed file containing a specific folder in the Media Manager.", "description": [ - "The `generateFolderDownloadUrl()` function returns a Promise that resolves to a download URL.\n\nThe compressed file can contain sub-folders, and up to 1000 files." + "The compressed file can contain sub-folders, and up to 1000 files.\n\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "Generate a folder download url ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function generateFolderDownloadUrl(folderId) {", - " try {", - " const elevatedGenerateFolderDownloadUrl = elevate(folders.generateFolderDownloadUrl);", - " const result = await elevatedGenerateFolderDownloadUrl(folderId);", - "", - " const folderDownloadUrl = result.downloadUrl;", - " return folderDownloadUrl;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"downloadUrl\": \"https://archive.wixmp.com/archive/wix/b367fe21877e4ef589cde5352a3a04af\"", - " * }", - " */" - ] - }, - { - "title": "Generate a folder download url for a chosen folder ", + "title": "generateFolderDownloadUrl example", "body": [ - "/***************************************************", - " * Backend code - generate-folder-download-url.jsw *", - " **************************************************/", - "", "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "async function generateDownloadUrl(folderId) {", - " try {", - " const elevatedGenerateFolderDownloadUrl = elevate(folders.generateFolderDownloadUrl);", - " const result = await elevatedGenerateFolderDownloadUrl(folderId);", " ", - " const folderDownloadUrl = result.downloadUrl;", - " return folderDownloadUrl;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { generateDownloadUrl, listFolders } from 'backend/generate-folder-download-url';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdown();", - "", - " $w('#downloadFolder').onClick(async () => {", - " const folderId = $w('foldersDropdown').value;", - " const downloadUrl = await generateDownloadUrl(folderId);", - "", - " $w('#downloadFolderBtn').link = downloadUrl;", - " $w('#downloadingFolderMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdown() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#foldersDropdown').options = dropdownOptions;", - "};", + " async function generateFolderDownloadUrl(folderId) {", + " try {", + " const result = await folders.generateFolderDownloadUrl(folderId);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then receives a folder download url for that folder." - } + ] } ] }, @@ -663,9 +299,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "generateFolderDownloadUrl", - "isAdminMethod": true + ] }, { "name": "getFolder", @@ -691,51 +325,34 @@ "nativeType": "Promise", "typeParams": [ { - "referenceType": "wix-media-v2.Folders.Folder" + "referenceType": "wix-media-v2.Folders.GetFolderResponse" } ] } } ], - "doc": "Information about the folder.\n" + "doc": null }, "docs": { - "summary": "Gets information from the specified folder in the Media Manager.", - "description": [ - "The `getFolder()` function returns a Promise that resolves to information about the specified folder." - ], + "summary": "Gets information from a specific folder in the Media Manager.\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.", + "description": [], "examples": [ { - "title": "Get a folder ", + "title": "getFolder example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample folderId value: '30ed8f8a8f1e4a99b82c516cb212192f' */", - "", - "async function myGetFolderFunction(folderId) {", - " try {", - " const elevatedGetFolder = elevate(folders.getFolder);", - " const folder = await elevatedGetFolder(folderId);", - "", - " console.log('Successfully retrieved folder:', folder);", - " return folder;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"_createdDate\": \"2023-08-22T08:31:06.000Z\",", - " * \"_id\": \"30ed8f8a8f1e4a99b82c516cb212192f\",", - " * \"_updatedDate\": \"2023-08-22T08:31:06.000Z\",", - " * \"displayName\": \"test2\",", - " * \"parentFolderId\": \"302fc049d70c41dea33fa4a27ab481ba\",", - " * \"state\": \"OK\"", - " * }", - " */" + " ", + " async function getFolder(folderId) {", + " try {", + " const result = await folders.getFolder(folderId);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", + " " ] } ] @@ -745,9 +362,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "getFolder", - "isAdminMethod": true + ] }, { "name": "listDeletedFolders", @@ -759,7 +374,7 @@ "referenceType": "wix-media-v2.Folders.ListDeletedFoldersOptions" } ], - "doc": "Options to use when listing deleted folders from the trash bin.", + "doc": "Options to use when listing deleted folders from the trash bin.\n", "required": false } ], @@ -780,161 +395,24 @@ "doc": null }, "docs": { - "summary": "Retrieves a list of deleted folders from the trash bin.", - "description": [ - "The `listDeletedFolders()` function returns a Promise that resolves to information about the specified deleted folders and cursor information.\n\nTo retrieve a list of non-deleted folders, use the `listFolders()` function." - ], + "summary": "Retrieves a list of deleted folders from the trash bin.\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.", + "description": [], "examples": [ { - "title": "List deleted folders ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function listDeletedFolders() {", - " try {", - " const elevatedListDeletedFolders = elevate(folders.listDeletedFolders);", - " const deletedFolders = await elevatedListDeletedFolders();", - "", - " console.log(\"Deleted Folders:\", deletedFolders);", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:47.000Z\",", - " * \"_id\": \"d4051a6890724365a78678a6208ac37e\",", - " * \"_updatedDate\": \"2023-08-21T09:32:47.000Z\",", - " * \"displayName\": \"family\",", - " * \"parentFolderId\": \"trash-root\",", - " * \"state\": \"DELETED\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"_id\": \"302fc049d70c41dea33fa4a27ab481ba\",", - " * \"_updatedDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"displayName\": \"Videos\",", - " * \"parentFolderId\": \"trash-root\",", - " * \"state\": \"DELETED\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"\"", - " * },", - " * \"hasNext\": false", - " * }", - " * }", - " */" - ] - }, - { - "title": "List deleted folders with sort ", + "title": "listDeletedFolders example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample options value:", - " * {", - " * sort: {", - " * fieldName: 'displayName',", - " * order: 'ASC'", - " * }", - " * }", - " */", - "", - "async function listDeletedFolders(options) {", - " try {", - " const elevatedListDeletedFolders = elevate(folders.listDeletedFolders);", - " const deletedFolders = await elevatedListDeletedFolders(options);", - "", - " console.log(\"Deleted folders, sorted alphabetically by name:\", deletedFolders);", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"_id\": \"302fc049d70c41dea33fa4a27ab481ba\",", - " * \"_updatedDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"displayName\": \"Videos\",", - " * \"parentFolderId\": \"trash-root\",", - " * \"state\": \"DELETED\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:47.000Z\",", - " * \"_id\": \"d4051a6890724365a78678a6208ac37e\",", - " * \"_updatedDate\": \"2023-08-21T09:32:47.000Z\",", - " * \"displayName\": \"family\",", - " * \"parentFolderId\": \"trash-root\",", - " * \"state\": \"DELETED\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"\"", - " * },", - " * \"hasNext\": false", - " * }", - " * }", - " */" - ] - }, - { - "title": "Bulk restore all folders from the trash bin", - "body": [ - "/**************************************", - " * Backend code - restore-folders.jsw *", - " *************************************/", - "", - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function restoreAllFolders() {", - " try {", - " const elevatedListDeletedFolders = elevate(folders.listDeletedFolders);", - " const deletedFolders = await elevatedListDeletedFolders();", - "", - " const deletedFolderIds = deletedFolders.map((folder) => {", - " return folder._id;", - " });", - " ", - " const elevatedBulkRestoreFoldersFromTrashBin = elevate(folders.bulkRestoreFoldersFromTrashBin);", - " const restoredFolders = await elevatedBulkRestoreFoldersFromTrashBin(deletedFolderIds);", - "", - " return restoredFolders;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { restoreAllFolders } from 'backend/restore-folders';", - "", - "$w.onReady(async () => {", - " $w('#restoreAll').onClick(async () => {", - " const restoredFolders = await restoreAllFolders();", - "", - " console.log('Restored all folders:', restoredFolders);", - " $w('#bulkRestoreSuccessMsg').show();", - " });", - "});", + " ", + " async function listDeletedFolders(options) {", + " try {", + " const result = await folders.listDeletedFolders(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " ] } @@ -945,9 +423,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "listDeletedFolders", - "isAdminMethod": true + ] }, { "name": "listFolders", @@ -959,7 +435,7 @@ "referenceType": "wix-media-v2.Folders.ListFoldersOptions" } ], - "doc": "Options to use when listing folders from the Media Manager.", + "doc": "Options to use when listing folders from the Media Manager.\n", "required": false } ], @@ -982,233 +458,26 @@ "docs": { "summary": "Retrieves a list of folders in the Media Manager.", "description": [ - "The `listFolders()` function returns a Promise that resolves to information about the specified folders and cursor information.\n\nTo retrieve a list of folders within a specific folder in the Media Manager, pass the specific folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves only the list of folders within the root folder of the Media Manager.\n\nTo retrieve a list of (non-permanently) deleted folders, use the `listDeletedFolders()` function." + "To retrieve a list of folders within a specific folder in the Media Manager, pass the specific folder's ID in the `parentFolderId` parameter. If no folder is specified, the endpoint retrieves a list of folders within the root folder of the Media Manager.\n\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "List folders ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function myListFoldersFunction()", - "{", - " try {", - " const elevatedListFolders = elevate(folders.listFolders);", - " const folders = await elevatedListFolders();", - "", - " console.log(\"Folders:\", folders);", - " return folders;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-14T07:41:19.000Z\",", - " * \"_id\": \"103601562ec94214bee61f470b403dd5\",", - " * \"_updatedDate\": \"2023-08-14T07:41:19.000Z\",", - " * \"displayName\": \"Pictures\",", - " * \"parentFolderId\": \"media-root\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-14T07:38:31.000Z\",", - " * \"_id\": \"c956d69906414e7faf8a0ad81117b17d\",", - " * \"_updatedDate\": \"2023-08-14T07:38:31.000Z\",", - " * \"displayName\": \"Videos\",", - " * \"parentFolderId\": \"media-root\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-09T08:57:12.000Z\",", - " * \"_id\": \"b2bc72834460412494c93617d88b8c89\",", - " * \"_updatedDate\": \"2023-08-09T08:57:12.000Z\",", - " * \"displayName\": \"Documents\",", - " * \"parentFolderId\": \"media-root\",", - " * \"state\": \"OK\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"\"", - " * },", - " * \"hasNext\": false", - " * }", - " * }", - " */" - ] - }, - { - "title": "List 5 folders found in a parent folder, sorted alphabetically by name ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample options value:", - " * {", - " * paging: {", - " * limit: 5", - " * },", - " * parentFolderId : '103601562ec94214bee61f470b403dd5',", - " * sort : {", - " * fieldName : 'displayName',", - " * order : 'ASC'", - " * }", - " * }", - " */", - "", - "async function myListFoldersFunction(options)", - "{", - " try {", - " const result = await folders.listFolders(options);", - "", - " const folderList = result.folders;", - "", - " folderList.forEach(element => {", - " console.log(element.displayName);", - " });", - "", - " return result;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-21T09:33:47.000Z\",", - " * \"_id\": \"0cfdf68ac3b9453b81cfe171caf40b0c\",", - " * \"_updatedDate\": \"2023-08-21T09:33:47.000Z\",", - " * \"displayName\": \"31-08\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:33:30.000Z\",", - " * \"_id\": \"193161aeef8f4b80b97d7032fb2c4f0a\",", - " * \"_updatedDate\": \"2023-08-21T11:09:58.000Z\",", - " * \"displayName\": \"Water\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:39.000Z\",", - " * \"_id\": \"4b9e2dd061de4f3e80e3ada23b0fb440\",", - " * \"_updatedDate\": \"2023-08-21T09:32:39.000Z\",", - " * \"displayName\": \"city\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:56:43.000Z\",", - " * \"_id\": \"6a86df2ce32c4d279c21fbdd2887c18b\",", - " * \"_updatedDate\": \"2023-08-21T09:56:43.000Z\",", - " * \"displayName\": \"docs1\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:33:10.000Z\",", - " * \"_id\": \"5d0625ed28494bf7938c03e9a21130ba\",", - " * \"_updatedDate\": \"2023-08-21T09:33:24.000Z\",", - " * \"displayName\": \"docs2\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:34.000Z\",", - " * \"_id\": \"7984b3c5454e4371acbd4f4eedde96bc\",", - " * \"_updatedDate\": \"2023-08-21T11:10:51.000Z\",", - " * \"displayName\": \"mountains\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"\"", - " * },", - " * \"hasNext\": false", - " * }", - " * }", - " */" - ] - }, - { - "title": "Create a folder from visitor input ", + "title": "listFolders example", "body": [ - "/************************************", - " * Backend code - create-folder.jsw *", - " ***********************************/", - "", "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "async function createFolder(displayName, options) {", - " try {", - " const elevateCreateFolder = elevate(folders.createFolder);", - " const newFolder = await elevateCreateFolder(displayName, options);", - "", - " return newFolder;", - " } catch (err){", - " console.error(err);", - " }", - "}", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { createFolder, listFolders } from 'backend/create-folder';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdown();", - "", - " $w('#createFolder').onClick(async () => {", - " const folderName = $w('folderName').value;", - " const createOptions = {parentFolderId: $w('foldersDropdown').value};", - " const newFolder = await createFolder(folderName, createOptions);", - "", - " console.log(`Successfully created new folder \"${folderName}\" in ${$w('#foldersDropdown').label}.`)", - " $w('#createdFolderSuccessMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdown() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#foldersDropdown').options = dropdownOptions;", - "};", + " ", + " async function listFolders(options) {", + " try {", + " const result = await folders.listFolders(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then creates a folder within that folder." - } + ] } ] }, @@ -1217,9 +486,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "listFolders", - "isAdminMethod": true + ] }, { "name": "searchFolders", @@ -1231,7 +498,7 @@ "referenceType": "wix-media-v2.Folders.SearchFoldersOptions" } ], - "doc": "Options specifying which folders to search.", + "doc": "Options specifying which folders to search.\n", "required": false } ], @@ -1254,204 +521,26 @@ "docs": { "summary": "Searches the Media Manager and returns a list of folders that match the terms specified in the parameters.", "description": [ - "The `searchFolders()` function returns a Promise that resolves to information about the specified folders and cursor information.\n\nIf no parameters are specified, the function returns all folders in the `MEDIA_ROOT` folder." + "If no parameters are specified, the endpoint returns all folders in the `MEDIA_ROOT` folder.\n\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "Search folders ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "async function mySearchFoldersFunction() {", - " try {", - " const elevatedSearchFolders = elevate(folders.searchFolders);", - " const foldersFound = await elevatedSearchFolders();", - "", - " console.log(\"Folders found in search:\", foldersFound);", - " return foldersFound;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-14T07:41:19.000Z\",", - " * \"_id\": \"103601562ec94214bee61f470b403dd5\",", - " * \"_updatedDate\": \"2023-08-21T11:09:08.000Z\",", - " * \"displayName\": \"Pictures\",", - " * \"parentFolderId\": \"media-root\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"_id\": \"302fc049d70c41dea33fa4a27ab481ba\",", - " * \"_updatedDate\": \"2023-08-21T05:34:03.000Z\",", - " * \"displayName\": \"Videos\",", - " * \"parentFolderId\": \"media-root\",", - " * \"state\": \"OK\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"\"", - " * },", - " * \"hasNext\": false", - " * }", - " * }", - " */" - ] - }, - { - "title": "Search for 2 folders by key-word, returned alphabetically ", - "body": [ - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample options value:", - " * {", - " * search: 'mountains',", - " * sort: {", - " * fieldName: 'updatedDate',", - " * order: 'ASC'", - " * },", - " * paging: {", - " * limit: 2", - " * }", - " * }", - " */", - "", - "async function mySearchFoldersFunction(options) {", - " try {", - " const elevatedSearchFolders = elevate(folders.searchFolders);", - " const foldersFound = await elevatedSearchFolders(options);", - "", - " console.log(\"Folders found in search:\", foldersFound);", - " return foldersFound;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"folders\": [", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:34.000Z\",", - " * \"_id\": \"7984b3c5454e4371acbd4f4eedde96bc\",", - " * \"_updatedDate\": \"2023-08-21T11:10:51.000Z\",", - " * \"displayName\": \"mountains\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * },", - " * {", - " * \"_createdDate\": \"2023-08-24T11:26:26.000Z\",", - " * \"_id\": \"742d4a0ee5884b119292d52ed964f14d\",", - " * \"_updatedDate\": \"2023-08-24T11:26:26.000Z\",", - " * \"displayName\": \"mountain_videos\",", - " * \"parentFolderId\": \"302fc049d70c41dea33fa4a27ab481ba\",", - " * \"state\": \"OK\"", - " * }", - " * ],", - " * \"nextCursor\": {", - " * \"cursors\": {", - " * \"next\": \"eyJ0b3RhbCI6IDEsICJvZmZzZXQiOiAyfQ==\"", - " * },", - " * \"hasNext\": true", - " * }", - " * }", - " */" - ] - }, - { - "title": "Bulk delete all folders ", + "title": "searchFolders example", "body": [ - "/**************************************", - " * Backend code - delete-folders.jsw *", - " *************************************/", - "", "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function deleteFolders(folderIds) {", - " try {", - " const elevatedBulkDeleteFolders = elevate(folders.bulkDeleteFolders);", - " const deletedFolders = await elevatedBulkDeleteFolders(folderIds);", - "", - " console.log('Successfully moved folders to trash.');", - " return deletedFolders;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "export async function searchFolders(options) {", - " try {", - " const elevatedSearchFolders = elevate(folders.searchFolders)", - " const foldersFound = await elevatedSearchFolders(options);", - "", - " return foldersFound;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { deleteFolders, listFolders, searchFolders } from 'backend/delete-folders';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdown();", - "", - " $w('#bulkDelete').onClick(async () => {", - " const searchOptions = { rootFolder: $w('#foldersDropdown').value};", - "", - " const foldersToDelete = await searchFolders(searchOptions);", - " const foldersIdsToDelete = foldersToDelete.map((folder) => {", - " return folder._id;", - " });", - " await deleteFolders(foldersIdsToDelete);", - "", - " console.log(`Successfully deleted all folders found in ${$w('#foldersDropdown').label}.`)", - " $w('#bulkDeleteSuccessMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdown() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#foldersDropdown').options = dropdownOptions;", - "};", + " ", + " async function searchFolders(options) {", + " try {", + " const result = await folders.searchFolders(options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then deletes all folders found within that folder." - } + ] } ] }, @@ -1460,9 +549,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "searchFolders", - "isAdminMethod": true + ] }, { "name": "updateFolder", @@ -1484,7 +571,7 @@ "referenceType": "wix-media-v2.Folders.UpdateFolder" } ], - "doc": "Folder to update.", + "doc": "Folder to update.\n", "required": true } ], @@ -1499,132 +586,37 @@ "nativeType": "Promise", "typeParams": [ { - "referenceType": "wix-media-v2.Folders.Folder" + "referenceType": "wix-media-v2.Folders.UpdateFolderResponse" } ] } } ], - "doc": "Information about the updated folder.\n" + "doc": null }, "docs": { "summary": "Updates a folder.", "description": [ - "The `updateFolder()` function returns a Promise that resolves to information about the updated folder.\n\nYou can use the `parentFolderId` parameter to move a folder from its current parent folder to a different parent folder." + "You can use the `parentFolderId` parameter to move a folder from its current parent folder to a different parent folder.\n\n>**Note:** This function is restricted and only runs if you elevate permissions using the [`wix-auth.elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function." ], "examples": [ { - "title": "Update a folder's name ", + "title": "updateFolder example", "body": [ "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "/* Sample id value: '7984b3c5454e4371aqbd4f4eedde96bc'", - " *", - " * Sample folder value:", - " * {", - " * displayName: 'mountains'", - " * }", - " */", - "", - "async function myUpdateFolderFunction(id, options) {", - " try {", - " const elevatedUpdateFolder = elevate(folders.updateFolder);", - " const updatedFolder = await elevatedUpdateFolder(id, options);", - "", - " console.log(`Updated folder ${updatedFolder.displayName}:`, updatedFolder);", - " return updatedFolder;", - " } catch (error) {", - " console.error(error);", - " // Handle the error", - " }", - "}", - "", - "/* Promise resolves to:", - " * {", - " * \"_createdDate\": \"2023-08-21T09:32:34.000Z\",", - " * \"_id\": \"7984b3c5454e4371acbd4f4eedde96bc\",", - " * \"_updatedDate\": \"2023-08-21T11:10:51.000Z\",", - " * \"displayName\": \"mountains\",", - " * \"parentFolderId\": \"103601562ec94214bee61f470b403dd5\",", - " * \"state\": \"OK\"", - " * }", - " */" - ] - }, - { - "title": "Update a folder's location ", - "body": [ - "/************************************", - " * Backend code - create-folder.jsw *", - " ***********************************/", - "", - "import { folders } from 'wix-media.v2';", - "import { elevate } from 'wix-auth';", - "", - "export async function listFolders() {", - " try {", - " const elevatedListFolders = elevate(folders.listFolders)", - " const foldersList = await elevatedListFolders();", - "", - " return foldersList;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "async function updateFolder(id, options) {", - " try {", - " const elevatedUpdateFolder = elevate(folders.updateFolder);", - " const updatedFolder = await elevatedUpdateFolder(id, options);", - "", - " return updatedFolder;", - " } catch (error) {", - " console.error(error);", - " }", - "}", - "", - "/*************", - " * Page code *", - " ************/", - "", - "import { updateFolder, listFolders } from 'backend/create-folder';", - "", - "$w.onReady(async () => {", - " await populateFoldersDropdowns();", - "", - " $w('#updateFolderLocation').onClick(async () => {", - " const folderId = $w('#updateFolderDropdown').value;", - " const parentFolderId = $w('#parentFolderDropdown').value;", - " if (folderId === parentFolderId) {", - " $w('#folderIsParentFolderMsg').show();", - " return;", - " };", - " const options = {parentFolderId};", - " const updatedFolder = await updateFolder(folderId, options);", - "", - " console.log(`Successfully updated folder ${updatedFolder.displayName}:`, updatedFolder);", - " $w('#updateFolderSuccessMsg').show();", - " });", - "});", - "", - "async function populateFoldersDropdowns() {", - " const folders = await listFolders();", - " const dropdownOptions = folders.map((folder) => {", - " return {", - " label: folder.displayName,", - " value: folder._id", - " };", - " });", - "", - " $w('#updateFolderDropdown').options = dropdownOptions;", - " $w('#parentFolderDropdown').options = dropdownOptions;", - "};", + " ", + " async function updateFolder(id, folder, options) {", + " try {", + " const result = await folders.updateFolder(id, folder, options);", + "", + " return result;", + " } catch (error) {", + " console.error(error);", + " // Handle the error", + " }", + " }", " " - ], - "extra": { - "description": "This code is an example of a page on which a visitor chooses a folder from a dropdown list, and then creates a folder within that folder." - } + ] } ] }, @@ -1633,9 +625,7 @@ { "id": "maturity-beta" } - ], - "syntaxName": "updateFolder", - "isAdminMethod": true + ] } ], "messages": [ @@ -2040,7 +1030,7 @@ "referenceType": "wix-media-v2.Folders.Sorting" } ], - "doc": "Field name and order to sort by. One of:\n- `displayName`\n- `_updatedDate`\n\nDefault: `_updatedDate` in `\"DESC\"` order.\n" + "doc": "Field name and order to sort by. One of:-Warning: -Elevating a function allows it to be called by any site visitor. -Exercise caution to prevent security vulnerabilities. -
-