@wix/bookings 1.0.14 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/build/cjs/index.d.ts +2 -1
  2. package/build/cjs/index.js +3 -2
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-calendar-v1-session.http.d.ts +49 -26
  5. package/build/cjs/src/bookings-calendar-v1-session.http.js +49 -26
  6. package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -1
  7. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +49 -26
  8. package/build/cjs/src/bookings-calendar-v1-session.universal.js +49 -26
  9. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
  10. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.d.ts +64 -0
  11. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js +296 -0
  12. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -0
  13. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +11 -0
  14. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js +69 -0
  15. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -0
  16. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +1831 -0
  17. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js +197 -0
  18. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -0
  19. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +1992 -0
  20. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js +685 -0
  21. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -0
  22. package/build/es/index.d.ts +2 -1
  23. package/build/es/index.js +2 -1
  24. package/build/es/index.js.map +1 -1
  25. package/build/es/src/bookings-calendar-v1-session.http.d.ts +49 -26
  26. package/build/es/src/bookings-calendar-v1-session.http.js +49 -26
  27. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -1
  28. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +49 -26
  29. package/build/es/src/bookings-calendar-v1-session.universal.js +49 -26
  30. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -1
  31. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.d.ts +64 -0
  32. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js +286 -0
  33. package/build/es/src/bookings-catalog-v1-service-options-and-variants.http.js.map +1 -0
  34. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.d.ts +11 -0
  35. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js +38 -0
  36. package/build/es/src/bookings-catalog-v1-service-options-and-variants.public.js.map +1 -0
  37. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.d.ts +1831 -0
  38. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js +194 -0
  39. package/build/es/src/bookings-catalog-v1-service-options-and-variants.types.js.map +1 -0
  40. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +1992 -0
  41. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js +656 -0
  42. package/build/es/src/bookings-catalog-v1-service-options-and-variants.universal.js.map +1 -0
  43. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  export * as resources from './src/bookings-catalog-v1-resource.public';
2
- export * as sessions from './src/bookings-calendar-v1-session.public';
3
2
  export * as availabilityCalendar from './src/bookings-availability-v1-slot-availability.public';
3
+ export * as sessions from './src/bookings-calendar-v1-session.public';
4
+ export * as serviceOptionsAndVariants from './src/bookings-catalog-v1-service-options-and-variants.public';
4
5
  export * as extendedBookings from './src/bookings-reader-v2-extended-booking.public';
5
6
  export * as bookings from './src/bookings-v2-booking.public';
6
7
  export * as bookingsPricing from './src/bookings-v2-price-info.public';
@@ -19,10 +19,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.bookingsPricing = exports.bookings = exports.extendedBookings = exports.availabilityCalendar = exports.sessions = exports.resources = void 0;
22
+ exports.bookingsPricing = exports.bookings = exports.extendedBookings = exports.serviceOptionsAndVariants = exports.sessions = exports.availabilityCalendar = exports.resources = void 0;
23
23
  exports.resources = __importStar(require("./src/bookings-catalog-v1-resource.public"));
24
- exports.sessions = __importStar(require("./src/bookings-calendar-v1-session.public"));
25
24
  exports.availabilityCalendar = __importStar(require("./src/bookings-availability-v1-slot-availability.public"));
25
+ exports.sessions = __importStar(require("./src/bookings-calendar-v1-session.public"));
26
+ exports.serviceOptionsAndVariants = __importStar(require("./src/bookings-catalog-v1-service-options-and-variants.public"));
26
27
  exports.extendedBookings = __importStar(require("./src/bookings-reader-v2-extended-booking.public"));
27
28
  exports.bookings = __importStar(require("./src/bookings-v2-booking.public"));
28
29
  exports.bookingsPricing = __importStar(require("./src/bookings-v2-price-info.public"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAuE;AACvE,sFAAsE;AACtE,gHAAgG;AAChG,qGAAqF;AACrF,6EAA6D;AAC7D,uFAAuE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,uFAAuE;AACvE,gHAAgG;AAChG,sFAAsE;AACtE,2HAA2G;AAC3G,qGAAqF;AACrF,6EAA6D;AAC7D,uFAAuE"}
@@ -3,32 +3,40 @@ import { QuerySessionsRequest, QuerySessionsResponse, CreateSessionRequest, Crea
3
3
  /**
4
4
  * Creates a session.
5
5
  *
6
+ *
7
+ * The `createSession()` function returns a Promise that resolves when a session is created.
6
8
  * A session is one of the following:
7
- * + `"EVENT"`: Reserved period of time on any [schedule](wix-bookings-backend.sessions/introduction#schedules). For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [**Booking Calendar**](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `"EVENT"` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
8
- * + `"WORKING_HOURS"`: Placeholder for available time on a resource’s schedule. Set `type` to `"WORKING_HOURS"` when creating sessions for resource availability.
9
+ * + `EVENT`: Reserved period of time on any schedule. For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `EVENT` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
10
+ * + `WORKING_HOURS`: Placeholder for available time on a resource’s schedule. Set `type` to `WORKING_HOURS` when creating sessions for resource availability.
9
11
  *
10
12
  * Sessions belong to a schedule. Schedules are owned by a resource or a service.
11
13
  *
12
14
  * A session may be an individual session or a recurring session.
13
15
  * An individual session has a discrete start and end date, while a recurring session defines a series of repeating sessions. An instance of a recurring session is a specific session in a series of repeating sessions, generated according to the recurrence rule.
16
+ *
14
17
  * The `start` and `end` properties set the time and duration of the session. For non-recurring sessions, you can use either the `timestamp` or `localDateTime` properties.
15
- * For recurring sessions, use the `localDateTime` property only. For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
18
+ * For recurring sessions, use the `localDateTime` property only.
19
+ *
20
+ * For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
16
21
  *
17
22
  * The `year`, `monthOfYear` and `dayOfMonth` properties in the `end` property are used with the `hourOfDay` and `minutesOfHour` properties to set the duration of each session relative to the `start`.
23
+ *
18
24
  * The `UNTIL` keyword in the `recurrence` property sets the date for the last recurring session.
19
25
  *
20
- * You can create a session that blocks hours on the resource's calendar, making the resource unavailable.
21
- * Create a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
26
+ * You can create a session that blocks hours on the resource's calendar, making the resource unavailable, by creating a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
22
27
  *
23
28
  * >**Notes:**
24
29
  * > + For properties where there is no explicit timezone information, the timezone used is the business’s timezone.
25
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can create a session. You can override the permissions by setting the `suppressAuth` option to `true`.
30
+ * > + 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.
26
31
  */
27
32
  export declare function createSession(payload: CreateSessionRequest): RequestOptionsFactory<CreateSessionResponse>;
28
33
  /**
29
34
  * Updates a session.
30
35
  *
31
- * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session affect the session instance:
36
+ *
37
+ * The `updateSession()` function returns a Promise that resolves to the updated session.
38
+ *
39
+ * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session pattern definition affect the session instance:
32
40
  * |Change made to the instance | Effect of changes made to the recurrence
33
41
  * |--|--|
34
42
  * |Instance `start` time changed.|Changes to the recurring session's `start` or `end` time will not update the instance.|
@@ -41,61 +49,76 @@ export declare function createSession(payload: CreateSessionRequest): RequestOpt
41
49
  *
42
50
  * >**Notes:**
43
51
  * > + Where there is no explicit timezone information, the timezone used is the business’s timezone.
44
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can update a session. You can override the permissions by setting the `suppressAuth` option to `true`.
52
+ * > + 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.
45
53
  */
46
54
  export declare function updateSession(payload: UpdateSessionRequest): RequestOptionsFactory<UpdateSessionResponse>;
47
55
  /**
48
56
  * Deletes a session.
49
57
  *
50
- * Use the `participantNotification` property to send an email to the participants when the session is deleted.
51
- * When deleting a session of type `"EVENT"` where a booking exists, the booking's status is updated to `"CANCELED"`.
52
- * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` property in the parameters.
58
+ *
59
+ * The `deleteSession()` function returns a Promise that resolves when the session has been deleted.
60
+ *
61
+ * Use the `options.participantNotification` property to send an email notification to the participants when the session is deleted.
62
+ *
63
+ * When deleting a session of type `EVENT` where a booking exists, the booking's status is updated to `CANCELED`.
64
+ *
65
+ * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` parameter.
53
66
  * When deleting a recurrence, only future instances of the recurrence are deleted.
54
67
  *
55
- * >**Note:** Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can delete a session. You can override the permissions by setting the `suppressAuth` option to `true`.
68
+ * >**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.
56
69
  */
57
70
  export declare function deleteSession(payload: DeleteSessionRequest): RequestOptionsFactory<DeleteSessionResponse>;
58
71
  /**
59
72
  * Retrieves a list of sessions, given the provided time range, filtering, and paging.
60
73
  *
61
- * Query Sessions runs with these defaults, which you can override:
74
+ *
75
+ * The `querySessions()` function builds a query to retrieve a list of sessions, and returns a `SessionQueryBuilder` object.
76
+ *
77
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
78
+ *
79
+ * You can refine the query by chaining `SessionQueryBuilder` functions to the query, before chaining `find()`. These enable you to filter and control the results a query returns.
80
+ *
81
+ * The `querySessions()` function runs with these defaults, which you can override:
62
82
  * - All session types are returned.
63
- * - `instances` is true. This means only single sessions and instances of recurring sessions are returned.
83
+ * - `options.instances` is true. This means only single sessions and instances of recurring sessions are returned.
64
84
  * - Session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
65
- * - `query.cursorPaging.limit` is `100`.
66
85
  *
67
86
  * Note the following limitations, which you can't override:
68
87
  * - Sessions are always sorted by `start.timestamp` in `ASC` order.
69
88
  * - The maximum time range you can query is 1 year.
70
89
  *
71
- * To query only for events, set `type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
72
- *
73
- * To query for recurring session pattern definitions, set `instances` to `false`. In this case, you don't need to specify a time range.
90
+ * To query only for events, set `options.type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
74
91
  *
75
- * To return session objects including personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
92
+ * To query for recurring session pattern definitions, set `options.instances` to `false`. In this case, you don't need to specify a time range.
76
93
  *
77
- * For details on fieldsets, see [Sessions: Supported Fieldsets](#fieldsets).
94
+ * To return session objects including personal information, use the `ALL_PI` fieldset.
78
95
  *
79
- * For field support for filters, see [Sessions: Supported Filters](#filtering).
96
+ * For details on fieldsets, see [Sessions: Supported Fieldsets](https://www.wix.com/velo/reference/wix-bookings-v2/sessions/fieldsets).
80
97
  *
81
- * To learn about working with _Query_ endpoints in general, see
82
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and
83
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
98
+ * >**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.
84
99
  */
85
100
  export declare function calendarServerQuerySessions(payload: QuerySessionsRequest): RequestOptionsFactory<QuerySessionsResponse>;
86
101
  /**
87
102
  * Retrieves a session by ID.
88
103
  *
89
104
  *
105
+ * The `getSession()` function returns a Promise that resolves to a session with the specified session ID.
106
+ *
90
107
  * By default, a session object is returned with the fields specified in the `NO_PI` fieldset. This means it doesn't contain personal information.
91
- * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
108
+ * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset.
109
+ *
110
+ * >**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.
92
111
  */
93
112
  export declare function getSession(payload: GetSessionRequest): RequestOptionsFactory<GetSessionResponse>;
94
113
  /**
95
114
  * Retrieves a list of sessions by their IDs.
96
115
  *
97
116
  *
117
+ * The `listSessions()` function returns a Promise that resolves to the sessions with the specified IDs.
118
+ *
98
119
  * By default, session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
99
- * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
120
+ * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset.
121
+ *
122
+ * >**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.
100
123
  */
101
124
  export declare function listSessions(payload: ListSessionsRequest): RequestOptionsFactory<ListSessionsResponse>;
@@ -257,26 +257,31 @@ function resolveComWixBookingsSchedulesVeloV2VeloSessionsServiceUrl(opts) {
257
257
  /**
258
258
  * Creates a session.
259
259
  *
260
+ *
261
+ * The `createSession()` function returns a Promise that resolves when a session is created.
260
262
  * A session is one of the following:
261
- * + `"EVENT"`: Reserved period of time on any [schedule](wix-bookings-backend.sessions/introduction#schedules). For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [**Booking Calendar**](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `"EVENT"` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
262
- * + `"WORKING_HOURS"`: Placeholder for available time on a resource’s schedule. Set `type` to `"WORKING_HOURS"` when creating sessions for resource availability.
263
+ * + `EVENT`: Reserved period of time on any schedule. For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `EVENT` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
264
+ * + `WORKING_HOURS`: Placeholder for available time on a resource’s schedule. Set `type` to `WORKING_HOURS` when creating sessions for resource availability.
263
265
  *
264
266
  * Sessions belong to a schedule. Schedules are owned by a resource or a service.
265
267
  *
266
268
  * A session may be an individual session or a recurring session.
267
269
  * An individual session has a discrete start and end date, while a recurring session defines a series of repeating sessions. An instance of a recurring session is a specific session in a series of repeating sessions, generated according to the recurrence rule.
270
+ *
268
271
  * The `start` and `end` properties set the time and duration of the session. For non-recurring sessions, you can use either the `timestamp` or `localDateTime` properties.
269
- * For recurring sessions, use the `localDateTime` property only. For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
272
+ * For recurring sessions, use the `localDateTime` property only.
273
+ *
274
+ * For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
270
275
  *
271
276
  * The `year`, `monthOfYear` and `dayOfMonth` properties in the `end` property are used with the `hourOfDay` and `minutesOfHour` properties to set the duration of each session relative to the `start`.
277
+ *
272
278
  * The `UNTIL` keyword in the `recurrence` property sets the date for the last recurring session.
273
279
  *
274
- * You can create a session that blocks hours on the resource's calendar, making the resource unavailable.
275
- * Create a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
280
+ * You can create a session that blocks hours on the resource's calendar, making the resource unavailable, by creating a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
276
281
  *
277
282
  * >**Notes:**
278
283
  * > + For properties where there is no explicit timezone information, the timezone used is the business’s timezone.
279
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can create a session. You can override the permissions by setting the `suppressAuth` option to `true`.
284
+ * > + 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.
280
285
  */
281
286
  function createSession(payload) {
282
287
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_createSessionRequest, {
@@ -320,7 +325,10 @@ exports.createSession = createSession;
320
325
  /**
321
326
  * Updates a session.
322
327
  *
323
- * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session affect the session instance:
328
+ *
329
+ * The `updateSession()` function returns a Promise that resolves to the updated session.
330
+ *
331
+ * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session pattern definition affect the session instance:
324
332
  * |Change made to the instance | Effect of changes made to the recurrence
325
333
  * |--|--|
326
334
  * |Instance `start` time changed.|Changes to the recurring session's `start` or `end` time will not update the instance.|
@@ -333,7 +341,7 @@ exports.createSession = createSession;
333
341
  *
334
342
  * >**Notes:**
335
343
  * > + Where there is no explicit timezone information, the timezone used is the business’s timezone.
336
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can update a session. You can override the permissions by setting the `suppressAuth` option to `true`.
344
+ * > + 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.
337
345
  */
338
346
  function updateSession(payload) {
339
347
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_updateSessionRequest, {
@@ -377,12 +385,17 @@ exports.updateSession = updateSession;
377
385
  /**
378
386
  * Deletes a session.
379
387
  *
380
- * Use the `participantNotification` property to send an email to the participants when the session is deleted.
381
- * When deleting a session of type `"EVENT"` where a booking exists, the booking's status is updated to `"CANCELED"`.
382
- * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` property in the parameters.
388
+ *
389
+ * The `deleteSession()` function returns a Promise that resolves when the session has been deleted.
390
+ *
391
+ * Use the `options.participantNotification` property to send an email notification to the participants when the session is deleted.
392
+ *
393
+ * When deleting a session of type `EVENT` where a booking exists, the booking's status is updated to `CANCELED`.
394
+ *
395
+ * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` parameter.
383
396
  * When deleting a recurrence, only future instances of the recurrence are deleted.
384
397
  *
385
- * >**Note:** Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can delete a session. You can override the permissions by setting the `suppressAuth` option to `true`.
398
+ * >**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.
386
399
  */
387
400
  function deleteSession(payload) {
388
401
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_deleteSessionRequest, {});
@@ -408,29 +421,31 @@ exports.deleteSession = deleteSession;
408
421
  /**
409
422
  * Retrieves a list of sessions, given the provided time range, filtering, and paging.
410
423
  *
411
- * Query Sessions runs with these defaults, which you can override:
424
+ *
425
+ * The `querySessions()` function builds a query to retrieve a list of sessions, and returns a `SessionQueryBuilder` object.
426
+ *
427
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
428
+ *
429
+ * You can refine the query by chaining `SessionQueryBuilder` functions to the query, before chaining `find()`. These enable you to filter and control the results a query returns.
430
+ *
431
+ * The `querySessions()` function runs with these defaults, which you can override:
412
432
  * - All session types are returned.
413
- * - `instances` is true. This means only single sessions and instances of recurring sessions are returned.
433
+ * - `options.instances` is true. This means only single sessions and instances of recurring sessions are returned.
414
434
  * - Session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
415
- * - `query.cursorPaging.limit` is `100`.
416
435
  *
417
436
  * Note the following limitations, which you can't override:
418
437
  * - Sessions are always sorted by `start.timestamp` in `ASC` order.
419
438
  * - The maximum time range you can query is 1 year.
420
439
  *
421
- * To query only for events, set `type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
422
- *
423
- * To query for recurring session pattern definitions, set `instances` to `false`. In this case, you don't need to specify a time range.
440
+ * To query only for events, set `options.type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
424
441
  *
425
- * To return session objects including personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
442
+ * To query for recurring session pattern definitions, set `options.instances` to `false`. In this case, you don't need to specify a time range.
426
443
  *
427
- * For details on fieldsets, see [Sessions: Supported Fieldsets](#fieldsets).
444
+ * To return session objects including personal information, use the `ALL_PI` fieldset.
428
445
  *
429
- * For field support for filters, see [Sessions: Supported Filters](#filtering).
446
+ * For details on fieldsets, see [Sessions: Supported Fieldsets](https://www.wix.com/velo/reference/wix-bookings-v2/sessions/fieldsets).
430
447
  *
431
- * To learn about working with _Query_ endpoints in general, see
432
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and
433
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
448
+ * >**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.
434
449
  */
435
450
  function calendarServerQuerySessions(payload) {
436
451
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_querySessionsRequest, {});
@@ -466,8 +481,12 @@ exports.calendarServerQuerySessions = calendarServerQuerySessions;
466
481
  * Retrieves a session by ID.
467
482
  *
468
483
  *
484
+ * The `getSession()` function returns a Promise that resolves to a session with the specified session ID.
485
+ *
469
486
  * By default, a session object is returned with the fields specified in the `NO_PI` fieldset. This means it doesn't contain personal information.
470
- * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
487
+ * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset.
488
+ *
489
+ * >**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.
471
490
  */
472
491
  function getSession(payload) {
473
492
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_getSessionRequest, {});
@@ -503,8 +522,12 @@ exports.getSession = getSession;
503
522
  * Retrieves a list of sessions by their IDs.
504
523
  *
505
524
  *
525
+ * The `listSessions()` function returns a Promise that resolves to the sessions with the specified IDs.
526
+ *
506
527
  * By default, session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
507
- * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
528
+ * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset.
529
+ *
530
+ * >**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.
508
531
  */
509
532
  function listSessions(payload) {
510
533
  const { toJSON: toReq, fromJSON: fromReq } = ambassador_1.serializer(_listSessionsRequest, {});
@@ -1 +1 @@
1
- {"version":3,"file":"bookings-calendar-v1-session.http.js","sourceRoot":"","sources":["../../../src/bookings-calendar-v1-session.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAkBhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,iBAAiB,GAAG,EAAE,SAAS,EAAE,2BAA2B,EAAE,CAAC;AACrE,MAAM,qBAAqB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACtD,MAAM,sBAAsB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,mBAAmB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AACpD,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;AACvD,MAAM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AMG;AACH,SAAgB,YAAY,CAC1B,OAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CACrD,oBAAoB,EACpB,EAAE,CACH,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,uBAAU,CAAC,qBAAqB,EAAE;QAC9D,QAAQ;QACR,gBAAgB;QAChB,iBAAiB;QACjB,SAAS;QACT,iBAAiB;QACjB,yBAAyB;QACzB,kBAAkB;QAClB,QAAQ;KACT,CAAC,CAAC;IAEH,SAAS,cAAc,CAAC,EAAE,IAAI,EAAO;QACnC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,MAAM,EAAE,MAAa;YACrB,GAAG,EAAE,uCAAuC,CAAC;gBAC3C,SAAS,EAAE,4BAA4B;gBACvC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;IAEjC,OAAO,cAAc,CAAC;AACxB,CAAC;AArCD,oCAqCC"}
1
+ {"version":3,"file":"bookings-calendar-v1-session.http.js","sourceRoot":"","sources":["../../../src/bookings-calendar-v1-session.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAkBhD,MAAM,QAAQ,GAAG,EAAE,OAAO,EAAE,kBAAkB,EAAE,CAAC;AACjD,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,6BAA6B;IACvC,SAAS,EAAE,6BAA6B;CACzC,CAAC;AACF,MAAM,iBAAiB,GAAG,EAAE,SAAS,EAAE,2BAA2B,EAAE,CAAC;AACrE,MAAM,qBAAqB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CA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
1004
1004
  /**
1005
1005
  * Creates a session.
1006
1006
  *
1007
+ *
1008
+ * The `createSession()` function returns a Promise that resolves when a session is created.
1007
1009
  * A session is one of the following:
1008
- * + `"EVENT"`: Reserved period of time on any [schedule](wix-bookings-backend.sessions/introduction#schedules). For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [**Booking Calendar**](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `"EVENT"` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
1009
- * + `"WORKING_HOURS"`: Placeholder for available time on a resource’s schedule. Set `type` to `"WORKING_HOURS"` when creating sessions for resource availability.
1010
+ * + `EVENT`: Reserved period of time on any schedule. For example, an appointment, class, or course. Events are visible in the Dashboard in the Bookings app's [Booking Calendar](https://support.wix.com/en/article/wix-bookings-about-the-wix-bookings-calendar) page. Set `type` to `EVENT` when creating sessions that reserve time on a service's schedule, or when creating a blocked time for a resource.
1011
+ * + `WORKING_HOURS`: Placeholder for available time on a resource’s schedule. Set `type` to `WORKING_HOURS` when creating sessions for resource availability.
1010
1012
  *
1011
1013
  * Sessions belong to a schedule. Schedules are owned by a resource or a service.
1012
1014
  *
1013
1015
  * A session may be an individual session or a recurring session.
1014
1016
  * An individual session has a discrete start and end date, while a recurring session defines a series of repeating sessions. An instance of a recurring session is a specific session in a series of repeating sessions, generated according to the recurrence rule.
1017
+ *
1015
1018
  * The `start` and `end` properties set the time and duration of the session. For non-recurring sessions, you can use either the `timestamp` or `localDateTime` properties.
1016
- * For recurring sessions, use the `localDateTime` property only. For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
1019
+ * For recurring sessions, use the `localDateTime` property only.
1020
+ *
1021
+ * For recurring sessions, the `start` property sets the date and time of the first recurring session, subject to the recurrence rule. For example, if you set the `start` to Saturday, May 1 and your recurrence rule says every second Monday, then the first session will only be on Monday, May 10.
1017
1022
  *
1018
1023
  * The `year`, `monthOfYear` and `dayOfMonth` properties in the `end` property are used with the `hourOfDay` and `minutesOfHour` properties to set the duration of each session relative to the `start`.
1024
+ *
1019
1025
  * The `UNTIL` keyword in the `recurrence` property sets the date for the last recurring session.
1020
1026
  *
1021
- * You can create a session that blocks hours on the resource's calendar, making the resource unavailable.
1022
- * Create a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
1027
+ * You can create a session that blocks hours on the resource's calendar, making the resource unavailable, by creating a non-recurring session of type `"EVENT"`, and add `"Blocked"` to the `tags` array.
1023
1028
  *
1024
1029
  * >**Notes:**
1025
1030
  * > + For properties where there is no explicit timezone information, the timezone used is the business’s timezone.
1026
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can create a session. You can override the permissions by setting the `suppressAuth` option to `true`.
1031
+ * > + 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.
1027
1032
  * @param session - The session to create.
1028
1033
  * @public
1029
1034
  * @documentationMaturity preview
@@ -1037,7 +1042,10 @@ export declare function createSession(session: Session): Promise<Session>;
1037
1042
  /**
1038
1043
  * Updates a session.
1039
1044
  *
1040
- * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session affect the session instance:
1045
+ *
1046
+ * The `updateSession()` function returns a Promise that resolves to the updated session.
1047
+ *
1048
+ * When you update a recurring session, only the future instances of the recurrence will be updated. Changing an individual instance's `start` or `end` time will change the way updates to `start` and `end` on the recurring session pattern definition affect the session instance:
1041
1049
  * |Change made to the instance | Effect of changes made to the recurrence
1042
1050
  * |--|--|
1043
1051
  * |Instance `start` time changed.|Changes to the recurring session's `start` or `end` time will not update the instance.|
@@ -1050,7 +1058,7 @@ export declare function createSession(session: Session): Promise<Session>;
1050
1058
  *
1051
1059
  * >**Notes:**
1052
1060
  * > + Where there is no explicit timezone information, the timezone used is the business’s timezone.
1053
- * > + Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can update a session. You can override the permissions by setting the `suppressAuth` option to `true`.
1061
+ * > + 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.
1054
1062
  * @param _id - Session ID.
1055
1063
  * @public
1056
1064
  * @documentationMaturity preview
@@ -1231,12 +1239,17 @@ export interface UpdateSessionOptions {
1231
1239
  /**
1232
1240
  * Deletes a session.
1233
1241
  *
1234
- * Use the `participantNotification` property to send an email to the participants when the session is deleted.
1235
- * When deleting a session of type `"EVENT"` where a booking exists, the booking's status is updated to `"CANCELED"`.
1236
- * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` property in the parameters.
1242
+ *
1243
+ * The `deleteSession()` function returns a Promise that resolves when the session has been deleted.
1244
+ *
1245
+ * Use the `options.participantNotification` property to send an email notification to the participants when the session is deleted.
1246
+ *
1247
+ * When deleting a session of type `EVENT` where a booking exists, the booking's status is updated to `CANCELED`.
1248
+ *
1249
+ * To delete a set of recurring sessions, specify the session's `recurringSessionId` in the `sessionId` parameter.
1237
1250
  * When deleting a recurrence, only future instances of the recurrence are deleted.
1238
1251
  *
1239
- * >**Note:** Only users with **[Bookings Admin](https://support.wix.com/en/article/roles-permissions-overview#bookings-admin)** permissions can delete a session. You can override the permissions by setting the `suppressAuth` option to `true`.
1252
+ * >**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.
1240
1253
  * @param sessionId - The ID of the session to delete.
1241
1254
  * @public
1242
1255
  * @documentationMaturity preview
@@ -1250,29 +1263,31 @@ export interface DeleteSessionOptions {
1250
1263
  /**
1251
1264
  * Retrieves a list of sessions, given the provided time range, filtering, and paging.
1252
1265
  *
1253
- * Query Sessions runs with these defaults, which you can override:
1266
+ *
1267
+ * The `querySessions()` function builds a query to retrieve a list of sessions, and returns a `SessionQueryBuilder` object.
1268
+ *
1269
+ * The returned object contains the query definition, which is typically used to run the query using the `find()` function.
1270
+ *
1271
+ * You can refine the query by chaining `SessionQueryBuilder` functions to the query, before chaining `find()`. These enable you to filter and control the results a query returns.
1272
+ *
1273
+ * The `querySessions()` function runs with these defaults, which you can override:
1254
1274
  * - All session types are returned.
1255
- * - `instances` is true. This means only single sessions and instances of recurring sessions are returned.
1275
+ * - `options.instances` is true. This means only single sessions and instances of recurring sessions are returned.
1256
1276
  * - Session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
1257
- * - `query.cursorPaging.limit` is `100`.
1258
1277
  *
1259
1278
  * Note the following limitations, which you can't override:
1260
1279
  * - Sessions are always sorted by `start.timestamp` in `ASC` order.
1261
1280
  * - The maximum time range you can query is 1 year.
1262
1281
  *
1263
- * To query only for events, set `type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
1264
- *
1265
- * To query for recurring session pattern definitions, set `instances` to `false`. In this case, you don't need to specify a time range.
1282
+ * To query only for events, set `options.type` to `EVENT`. An event is a single or recurring session that appears in a calendar, for example an appointment or a class.
1266
1283
  *
1267
- * To return session objects including personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
1284
+ * To query for recurring session pattern definitions, set `options.instances` to `false`. In this case, you don't need to specify a time range.
1268
1285
  *
1269
- * For details on fieldsets, see [Sessions: Supported Fieldsets](#fieldsets).
1286
+ * To return session objects including personal information, use the `ALL_PI` fieldset.
1270
1287
  *
1271
- * For field support for filters, see [Sessions: Supported Filters](#filtering).
1288
+ * For details on fieldsets, see [Sessions: Supported Fieldsets](https://www.wix.com/velo/reference/wix-bookings-v2/sessions/fieldsets).
1272
1289
  *
1273
- * To learn about working with _Query_ endpoints in general, see
1274
- * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and
1275
- * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
1290
+ * >**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.
1276
1291
  * @public
1277
1292
  * @documentationMaturity preview
1278
1293
  */
@@ -1352,8 +1367,12 @@ export interface SessionsQueryBuilder {
1352
1367
  * Retrieves a session by ID.
1353
1368
  *
1354
1369
  *
1370
+ * The `getSession()` function returns a Promise that resolves to a session with the specified session ID.
1371
+ *
1355
1372
  * By default, a session object is returned with the fields specified in the `NO_PI` fieldset. This means it doesn't contain personal information.
1356
- * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
1373
+ * To retrieve a full session object including all personal information, use the `ALL_PI` fieldset.
1374
+ *
1375
+ * >**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.
1357
1376
  * @param _id - ID of the session to retrieve.
1358
1377
  * @public
1359
1378
  * @documentationMaturity preview
@@ -1375,8 +1394,12 @@ export interface GetSessionOptions {
1375
1394
  * Retrieves a list of sessions by their IDs.
1376
1395
  *
1377
1396
  *
1397
+ * The `listSessions()` function returns a Promise that resolves to the sessions with the specified IDs.
1398
+ *
1378
1399
  * By default, session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
1379
- * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
1400
+ * To retrieve full session objects including all personal information, use the `ALL_PI` fieldset.
1401
+ *
1402
+ * >**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.
1380
1403
  * @param ids - IDs of the sessions to retrieve.
1381
1404
  * @public
1382
1405
  * @documentationMaturity preview