@wix/bookings 1.0.0 → 1.0.2

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 (137) hide show
  1. package/build/cjs/index.d.ts +5 -0
  2. package/build/cjs/index.js +6 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  5. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +6 -6
  6. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  7. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  8. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  9. package/build/cjs/src/bookings-calendar-v1-session.http.d.ts +75 -0
  10. package/build/cjs/src/bookings-calendar-v1-session.http.js +355 -0
  11. package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -0
  12. package/build/cjs/src/bookings-calendar-v1-session.public.d.ts +8 -0
  13. package/build/cjs/src/bookings-calendar-v1-session.public.js +41 -0
  14. package/build/cjs/src/bookings-calendar-v1-session.public.js.map +1 -0
  15. package/build/cjs/src/bookings-calendar-v1-session.types.d.ts +1011 -0
  16. package/build/cjs/src/bookings-calendar-v1-session.types.js +110 -0
  17. package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -0
  18. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
  19. package/build/cjs/src/bookings-calendar-v1-session.universal.js +437 -0
  20. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -0
  21. package/build/cjs/src/bookings-catalog-v1-resource.http.d.ts +195 -0
  22. package/build/cjs/src/bookings-catalog-v1-resource.http.js +564 -0
  23. package/build/cjs/src/bookings-catalog-v1-resource.http.js.map +1 -0
  24. package/build/cjs/src/bookings-catalog-v1-resource.public.d.ts +10 -0
  25. package/build/cjs/src/bookings-catalog-v1-resource.public.js +55 -0
  26. package/build/cjs/src/bookings-catalog-v1-resource.public.js.map +1 -0
  27. package/build/cjs/src/bookings-catalog-v1-resource.types.d.ts +931 -0
  28. package/build/cjs/src/bookings-catalog-v1-resource.types.js +125 -0
  29. package/build/cjs/src/bookings-catalog-v1-resource.types.js.map +1 -0
  30. package/build/cjs/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
  31. package/build/cjs/src/bookings-catalog-v1-resource.universal.js +740 -0
  32. package/build/cjs/src/bookings-catalog-v1-resource.universal.js.map +1 -0
  33. package/build/cjs/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  34. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +117 -0
  35. package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  36. package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  37. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +22 -0
  38. package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  39. package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  40. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +90 -0
  41. package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  42. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  43. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +226 -0
  44. package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  45. package/build/cjs/src/bookings-v2-booking.http.d.ts +123 -0
  46. package/build/cjs/src/bookings-v2-booking.http.js +305 -0
  47. package/build/cjs/src/bookings-v2-booking.http.js.map +1 -0
  48. package/build/cjs/src/bookings-v2-booking.public.d.ts +9 -0
  49. package/build/cjs/src/bookings-v2-booking.public.js +47 -0
  50. package/build/cjs/src/bookings-v2-booking.public.js.map +1 -0
  51. package/build/cjs/src/bookings-v2-booking.types.d.ts +1594 -0
  52. package/build/cjs/src/bookings-v2-booking.types.js +99 -0
  53. package/build/cjs/src/bookings-v2-booking.types.js.map +1 -0
  54. package/build/cjs/src/bookings-v2-booking.universal.d.ts +1840 -0
  55. package/build/cjs/src/bookings-v2-booking.universal.js +561 -0
  56. package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -0
  57. package/build/cjs/src/bookings-v2-price-info.http.d.ts +56 -0
  58. package/build/cjs/src/bookings-v2-price-info.http.js +164 -0
  59. package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -0
  60. package/build/cjs/src/bookings-v2-price-info.public.d.ts +6 -0
  61. package/build/cjs/src/bookings-v2-price-info.public.js +26 -0
  62. package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -0
  63. package/build/cjs/src/bookings-v2-price-info.types.d.ts +594 -0
  64. package/build/cjs/src/bookings-v2-price-info.types.js +79 -0
  65. package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -0
  66. package/build/cjs/src/bookings-v2-price-info.universal.d.ts +664 -0
  67. package/build/cjs/src/bookings-v2-price-info.universal.js +274 -0
  68. package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -0
  69. package/build/es/index.d.ts +5 -0
  70. package/build/es/index.js +5 -0
  71. package/build/es/index.js.map +1 -1
  72. package/build/es/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
  73. package/build/es/src/bookings-availability-v1-slot-availability.http.js +6 -6
  74. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
  75. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +7 -6
  76. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
  77. package/build/es/src/bookings-calendar-v1-session.http.d.ts +75 -0
  78. package/build/es/src/bookings-calendar-v1-session.http.js +348 -0
  79. package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -0
  80. package/build/es/src/bookings-calendar-v1-session.public.d.ts +8 -0
  81. package/build/es/src/bookings-calendar-v1-session.public.js +23 -0
  82. package/build/es/src/bookings-calendar-v1-session.public.js.map +1 -0
  83. package/build/es/src/bookings-calendar-v1-session.types.d.ts +1011 -0
  84. package/build/es/src/bookings-calendar-v1-session.types.js +107 -0
  85. package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -0
  86. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
  87. package/build/es/src/bookings-calendar-v1-session.universal.js +411 -0
  88. package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -0
  89. package/build/es/src/bookings-catalog-v1-resource.http.d.ts +195 -0
  90. package/build/es/src/bookings-catalog-v1-resource.http.js +555 -0
  91. package/build/es/src/bookings-catalog-v1-resource.http.js.map +1 -0
  92. package/build/es/src/bookings-catalog-v1-resource.public.d.ts +10 -0
  93. package/build/es/src/bookings-catalog-v1-resource.public.js +33 -0
  94. package/build/es/src/bookings-catalog-v1-resource.public.js.map +1 -0
  95. package/build/es/src/bookings-catalog-v1-resource.types.d.ts +931 -0
  96. package/build/es/src/bookings-catalog-v1-resource.types.js +122 -0
  97. package/build/es/src/bookings-catalog-v1-resource.types.js.map +1 -0
  98. package/build/es/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
  99. package/build/es/src/bookings-catalog-v1-resource.universal.js +712 -0
  100. package/build/es/src/bookings-catalog-v1-resource.universal.js.map +1 -0
  101. package/build/es/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
  102. package/build/es/src/bookings-reader-v2-extended-booking.http.js +113 -0
  103. package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
  104. package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
  105. package/build/es/src/bookings-reader-v2-extended-booking.public.js +8 -0
  106. package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
  107. package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
  108. package/build/es/src/bookings-reader-v2-extended-booking.types.js +87 -0
  109. package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
  110. package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
  111. package/build/es/src/bookings-reader-v2-extended-booking.universal.js +203 -0
  112. package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
  113. package/build/es/src/bookings-v2-booking.http.d.ts +123 -0
  114. package/build/es/src/bookings-v2-booking.http.js +297 -0
  115. package/build/es/src/bookings-v2-booking.http.js.map +1 -0
  116. package/build/es/src/bookings-v2-booking.public.d.ts +9 -0
  117. package/build/es/src/bookings-v2-booking.public.js +28 -0
  118. package/build/es/src/bookings-v2-booking.public.js.map +1 -0
  119. package/build/es/src/bookings-v2-booking.types.d.ts +1594 -0
  120. package/build/es/src/bookings-v2-booking.types.js +96 -0
  121. package/build/es/src/bookings-v2-booking.types.js.map +1 -0
  122. package/build/es/src/bookings-v2-booking.universal.d.ts +1840 -0
  123. package/build/es/src/bookings-v2-booking.universal.js +534 -0
  124. package/build/es/src/bookings-v2-booking.universal.js.map +1 -0
  125. package/build/es/src/bookings-v2-price-info.http.d.ts +56 -0
  126. package/build/es/src/bookings-v2-price-info.http.js +159 -0
  127. package/build/es/src/bookings-v2-price-info.http.js.map +1 -0
  128. package/build/es/src/bookings-v2-price-info.public.d.ts +6 -0
  129. package/build/es/src/bookings-v2-price-info.public.js +13 -0
  130. package/build/es/src/bookings-v2-price-info.public.js.map +1 -0
  131. package/build/es/src/bookings-v2-price-info.types.d.ts +594 -0
  132. package/build/es/src/bookings-v2-price-info.types.js +76 -0
  133. package/build/es/src/bookings-v2-price-info.types.js.map +1 -0
  134. package/build/es/src/bookings-v2-price-info.universal.d.ts +664 -0
  135. package/build/es/src/bookings-v2-price-info.universal.js +250 -0
  136. package/build/es/src/bookings-v2-price-info.universal.js.map +1 -0
  137. package/package.json +2 -2
@@ -1 +1,6 @@
1
+ export * as sessions from './src/bookings-calendar-v1-session.public';
2
+ export * as resources from './src/bookings-catalog-v1-resource.public';
1
3
  export * as availabilityCalendar from './src/bookings-availability-v1-slot-availability.public';
4
+ export * as extendedBookings from './src/bookings-reader-v2-extended-booking.public';
5
+ export * as bookings from './src/bookings-v2-booking.public';
6
+ export * as bookingsPricing from './src/bookings-v2-price-info.public';
@@ -19,6 +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.availabilityCalendar = void 0;
22
+ exports.bookingsPricing = exports.bookings = exports.extendedBookings = exports.availabilityCalendar = exports.resources = exports.sessions = void 0;
23
+ exports.sessions = __importStar(require("./src/bookings-calendar-v1-session.public"));
24
+ exports.resources = __importStar(require("./src/bookings-catalog-v1-resource.public"));
23
25
  exports.availabilityCalendar = __importStar(require("./src/bookings-availability-v1-slot-availability.public"));
26
+ exports.extendedBookings = __importStar(require("./src/bookings-reader-v2-extended-booking.public"));
27
+ exports.bookings = __importStar(require("./src/bookings-v2-booking.public"));
28
+ exports.bookingsPricing = __importStar(require("./src/bookings-v2-price-info.public"));
24
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,gHAAgG"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAsE;AACtE,uFAAuE;AACvE,gHAAgG;AAChG,qGAAqF;AACrF,6EAA6D;AAC7D,uFAAuE"}
@@ -5,7 +5,7 @@ import { QueryAvailabilityRequest, QueryAvailabilityResponse } from './bookings-
5
5
  * that match the provided query criteria (paging, filtering, and sorting).
6
6
  *
7
7
  *
8
- * The Calendar Availability APIs calculate the availability of sessions for
8
+ * The Availability Calendar APIs calculate the availability of sessions for
9
9
  * appointments and classes, but not
10
10
  * for courses.
11
11
  *
@@ -29,7 +29,7 @@ import { QueryAvailabilityRequest, QueryAvailabilityResponse } from './bookings-
29
29
  * Locked sessions do not impact session availability and `bookable` can
30
30
  * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
31
31
  * place frees up, the slot is offered to the customers on the waitlist, one by one. The
32
- * sesssion remains locked because there is still a waitlist, but for a period of time
32
+ * session remains locked because there is still a waitlist, but for a period of time
33
33
  * there is availability, until a customer on the waitlist takes the slot. Locking
34
34
  * prevents customers who are not yet on the waitlist from grabbing the slot.
35
35
  *
@@ -41,10 +41,10 @@ import { QueryAvailabilityRequest, QueryAvailabilityResponse } from './bookings-
41
41
  * because at `00:00` the clock moved
42
42
  * 1 hour forward to `01:00`.
43
43
  *
44
- * In this case, the Availability APIs take this
45
- * into account and mediate the time gaps automatically. The non-existant local time is
46
- * automtically moved forward 1 hour to match local DST. Local times that exist do not change.
47
- * So if the `Query Availability` endpoint is called with a `startDate` of `2021-09-05T00:00:01.000`
44
+ * In this case, the Availability Calendar APIs take this
45
+ * into account and mediate the time gaps automatically. The non-existent local time is
46
+ * automatically moved forward 1 hour to match local DST. Local times that exist do not change.
47
+ * So if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`
48
48
  * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
49
49
  * instead. The start time shifts one hour forward and the end time remains the same.
50
50
  */
@@ -93,7 +93,7 @@ function resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl(opts) {
93
93
  * that match the provided query criteria (paging, filtering, and sorting).
94
94
  *
95
95
  *
96
- * The Calendar Availability APIs calculate the availability of sessions for
96
+ * The Availability Calendar APIs calculate the availability of sessions for
97
97
  * appointments and classes, but not
98
98
  * for courses.
99
99
  *
@@ -117,7 +117,7 @@ function resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl(opts) {
117
117
  * Locked sessions do not impact session availability and `bookable` can
118
118
  * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
119
119
  * place frees up, the slot is offered to the customers on the waitlist, one by one. The
120
- * sesssion remains locked because there is still a waitlist, but for a period of time
120
+ * session remains locked because there is still a waitlist, but for a period of time
121
121
  * there is availability, until a customer on the waitlist takes the slot. Locking
122
122
  * prevents customers who are not yet on the waitlist from grabbing the slot.
123
123
  *
@@ -129,10 +129,10 @@ function resolveComWixpressBookingsAvailabilityAvailabilityCalendarUrl(opts) {
129
129
  * because at `00:00` the clock moved
130
130
  * 1 hour forward to `01:00`.
131
131
  *
132
- * In this case, the Availability APIs take this
133
- * into account and mediate the time gaps automatically. The non-existant local time is
134
- * automtically moved forward 1 hour to match local DST. Local times that exist do not change.
135
- * So if the `Query Availability` endpoint is called with a `startDate` of `2021-09-05T00:00:01.000`
132
+ * In this case, the Availability Calendar APIs take this
133
+ * into account and mediate the time gaps automatically. The non-existent local time is
134
+ * automatically moved forward 1 hour to match local DST. Local times that exist do not change.
135
+ * So if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`
136
136
  * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
137
137
  * instead. The start time shifts one hour forward and the end time remains the same.
138
138
  */
@@ -63,10 +63,9 @@ export interface Slot {
63
63
  */
64
64
  endDate?: string | null;
65
65
  /**
66
- * The timezone for which slot availability is to be calculated.
67
- *
68
- * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
69
- * when calculating availability.
66
+ * The timezone for which slot availability is to be calculated. If specified,
67
+ * dates are based on the local date/time, meaning that the timezone offset
68
+ * in the date's format is ignored.
70
69
  */
71
70
  timezone?: string | null;
72
71
  /**
@@ -133,12 +132,9 @@ export interface QueryAvailabilityRequest {
133
132
  /** Query options. */
134
133
  query: QueryV2;
135
134
  /**
136
- * The timezone for which session availability is to be calculated. If specified,
135
+ * The timezone for which slot availability is to be calculated. If specified,
137
136
  * dates are based on the local date/time, meaning that the timezone offset
138
137
  * in the date's format is ignored.
139
- *
140
- * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
141
- * when calculating availability.
142
138
  */
143
139
  timezone?: string | null;
144
140
  /**
@@ -154,16 +150,10 @@ export interface QueryAvailabilityRequest {
154
150
  }
155
151
  export interface QueryV2 extends QueryV2PagingMethodOneOf {
156
152
  /**
157
- * Filter object. For a list of
158
- * fields you can filter by, see [Calendar Availability: Supported Fields, Filters, and Sorting](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/supported-fields,-filters,-and-sorting).
159
- * You must include the `startDate` and `endDate` in the filter. This avoids large results that can impact performance.
153
+ * Filter object. You must include the `startDate` and `endDate` in the filter. This avoids large results that can impact performance.
160
154
  */
161
155
  filter?: Record<string, any> | null;
162
- /**
163
- * Sort options.
164
- * Currently, only sorting by `startDate` is supported. For details
165
- * on sorting, see [Calendar Availability: Supported Fields, Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/supported-fields,-filters,-and-sorting).
166
- */
156
+ /** Currently, only sorting by `startDate` is supported. */
167
157
  sort?: Sorting[];
168
158
  /** List of projected fields to return. All fields are supported. */
169
159
  fields?: string[];
@@ -228,9 +218,6 @@ export interface GetSlotAvailabilityRequest {
228
218
  * The timezone for which slot availability is to be calculated. If specified,
229
219
  * dates are based on the local date/time, meaning that the timezone offset
230
220
  * in the date's format is ignored.
231
- *
232
- * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
233
- * when calculating availability.
234
221
  */
235
222
  timezone?: string | null;
236
223
  }
@@ -269,7 +256,7 @@ export interface ScheduleAvailability {
269
256
  * that match the provided query criteria (paging, filtering, and sorting).
270
257
  *
271
258
  *
272
- * The Calendar Availability APIs calculate the availability of sessions for
259
+ * The Availability Calendar APIs calculate the availability of sessions for
273
260
  * appointments and classes, but not
274
261
  * for courses.
275
262
  *
@@ -293,7 +280,7 @@ export interface ScheduleAvailability {
293
280
  * Locked sessions do not impact session availability and `bookable` can
294
281
  * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
295
282
  * place frees up, the slot is offered to the customers on the waitlist, one by one. The
296
- * sesssion remains locked because there is still a waitlist, but for a period of time
283
+ * session remains locked because there is still a waitlist, but for a period of time
297
284
  * there is availability, until a customer on the waitlist takes the slot. Locking
298
285
  * prevents customers who are not yet on the waitlist from grabbing the slot.
299
286
  *
@@ -305,10 +292,10 @@ export interface ScheduleAvailability {
305
292
  * because at `00:00` the clock moved
306
293
  * 1 hour forward to `01:00`.
307
294
  *
308
- * In this case, the Availability APIs take this
309
- * into account and mediate the time gaps automatically. The non-existant local time is
310
- * automtically moved forward 1 hour to match local DST. Local times that exist do not change.
311
- * So if the `Query Availability` endpoint is called with a `startDate` of `2021-09-05T00:00:01.000`
295
+ * In this case, the Availability Calendar APIs take this
296
+ * into account and mediate the time gaps automatically. The non-existent local time is
297
+ * automatically moved forward 1 hour to match local DST. Local times that exist do not change.
298
+ * So if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`
312
299
  * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
313
300
  * instead. The start time shifts one hour forward and the end time remains the same.
314
301
  * @param query - Query options.
@@ -316,16 +303,14 @@ export interface ScheduleAvailability {
316
303
  * @documentationMaturity preview
317
304
  * @requiredField query
318
305
  * @requiredField query.filter
306
+ * @param options - Additional options for performing the query.
319
307
  */
320
308
  export declare function queryAvailability(query: QueryV2, options?: QueryAvailabilityOptions): Promise<QueryAvailabilityResponse>;
321
309
  export interface QueryAvailabilityOptions {
322
310
  /**
323
- * The timezone for which session availability is to be calculated. If specified,
311
+ * The timezone for which slot availability is to be calculated. If specified,
324
312
  * dates are based on the local date/time, meaning that the timezone offset
325
313
  * in the date's format is ignored.
326
- *
327
- * Learn more about [handling Daylight Savings Time (DST) for local time zones](https://dev.wix.com/api/rest/wix-bookings/availability-calendar/query-availability#wix-bookings_availability-calendar_query-availability_handling-daylight-savings-time-dst-for-local-time-zones)
328
- * when calculating availability.
329
314
  */
330
315
  timezone?: string | null;
331
316
  /**
@@ -65,7 +65,7 @@ const _queryAvailabilityResponse = {};
65
65
  * that match the provided query criteria (paging, filtering, and sorting).
66
66
  *
67
67
  *
68
- * The Calendar Availability APIs calculate the availability of sessions for
68
+ * The Availability Calendar APIs calculate the availability of sessions for
69
69
  * appointments and classes, but not
70
70
  * for courses.
71
71
  *
@@ -89,7 +89,7 @@ const _queryAvailabilityResponse = {};
89
89
  * Locked sessions do not impact session availability and `bookable` can
90
90
  * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
91
91
  * place frees up, the slot is offered to the customers on the waitlist, one by one. The
92
- * sesssion remains locked because there is still a waitlist, but for a period of time
92
+ * session remains locked because there is still a waitlist, but for a period of time
93
93
  * there is availability, until a customer on the waitlist takes the slot. Locking
94
94
  * prevents customers who are not yet on the waitlist from grabbing the slot.
95
95
  *
@@ -101,10 +101,10 @@ const _queryAvailabilityResponse = {};
101
101
  * because at `00:00` the clock moved
102
102
  * 1 hour forward to `01:00`.
103
103
  *
104
- * In this case, the Availability APIs take this
105
- * into account and mediate the time gaps automatically. The non-existant local time is
106
- * automtically moved forward 1 hour to match local DST. Local times that exist do not change.
107
- * So if the `Query Availability` endpoint is called with a `startDate` of `2021-09-05T00:00:01.000`
104
+ * In this case, the Availability Calendar APIs take this
105
+ * into account and mediate the time gaps automatically. The non-existent local time is
106
+ * automatically moved forward 1 hour to match local DST. Local times that exist do not change.
107
+ * So if the `queryAvailability()` function is called with a `startDate` of `2021-09-05T00:00:01.000`
108
108
  * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
109
109
  * instead. The start time shifts one hour forward and the end time remains the same.
110
110
  * @param query - Query options.
@@ -112,6 +112,7 @@ const _queryAvailabilityResponse = {};
112
112
  * @documentationMaturity preview
113
113
  * @requiredField query
114
114
  * @requiredField query.filter
115
+ * @param options - Additional options for performing the query.
115
116
  */
116
117
  function queryAvailability(query, options) {
117
118
  var _a, _b, _c;
@@ -1 +1 @@
1
- {"version":3,"file":"bookings-availability-v1-slot-availability.universal.js","sourceRoot":"","sources":["../../../src/bookings-availability-v1-slot-availability.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,uIAAyH;AAEzH,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA2G5B,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AA8ED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB;AA2FD,MAAM,yBAAyB,GAAG,EAAE,CAAC;AACrC,MAAM,0BAA0B,GAAG,EAAE,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,SAAsB,iBAAiB,CACrC,KAAc,EACd,OAAkC;;;QAElC,MAAM,qBAAqB,GAAG;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,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,qBAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,OAAO;gBACP,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA7DD,8CA6DC"}
1
+ {"version":3,"file":"bookings-availability-v1-slot-availability.universal.js","sourceRoot":"","sources":["../../../src/bookings-availability-v1-slot-availability.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,uIAAyH;AAEzH,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;AA0G5B,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,uCAAuB,CAAA;IACvB,iDAAiC,CAAA;IACjC,6CAA6B,CAAA;IAC7B,iCAAiB,CAAA;AACnB,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AAqED,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,i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CAAvB,WAAW,CAAgB,CAAC;QAC5B,IAAI;YACF,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACjD,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,+CAAtB,WAAW,EAAc,MAAM,CAAC,CAAC;YAEjC,OAAO,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAQ,CAAC;SACrC;QAAC,OAAO,GAAQ,EAAE;YACjB,MAAM,gBAAgB,GAAG,qBAAc,CAAC,GAAG,EAAE,qBAAqB,EAAE;gBAClE,OAAO;gBACP,SAAS;aACV,CAAC,CAAC;YACH,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,OAAO,+CAApB,WAAW,EAAY,GAAG,CAAC,CAAC;YAE5B,MAAM,gBAAgB,CAAC;SACxB;;CACF;AA7DD,8CA6DC"}
@@ -0,0 +1,75 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { QuerySessionsRequest, QuerySessionsResponse, GetSessionRequest, GetSessionResponse, ListSessionsRequest, ListSessionsResponse, QueryEventSessionInstancesRequest, QueryEventSessionInstancesResponse } from './bookings-calendar-v1-session.types';
3
+ /**
4
+ * Retrieves a list of sessions, given the provided time range, filtering, and paging.
5
+ *
6
+ * Query Sessions runs with these defaults, which you can override:
7
+ * - All session types are returned.
8
+ * - `instance` is true. This means only single sessions and instances of recurring sessions are returned.
9
+ * - Session objects are returned with the fields specified in the `NO_PI` fieldset. This means they don't contain personal information.
10
+ * - `query.cursorPaging.limit` is `50`.
11
+ *
12
+ * Note the following limitations, which you can't override:
13
+ * - Sessions are always sorted by `start.timestamp` in `ASC` order.
14
+ * - The maximum time range you can query is 1 year.
15
+ *
16
+ * 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.
17
+ *
18
+ * To query for recurring session pattern definitions, set `instance` to `false`. In this case, you don't need to specify a time range.
19
+ *
20
+ * To return session objects including personal information, use the `ALL_PI` fieldset. This requires the CALENDAR.SESSION_READ_PI permission scope.
21
+ *
22
+ * For details on fieldsets, see [Sessions: Supported Fieldsets](#fieldsets).
23
+ *
24
+ * For field support for filters, see [Sessions: Supported Filters](#filtering).
25
+ *
26
+ * To learn about working with _Query_ endpoints in general, see
27
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and
28
+ * [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
29
+ */
30
+ export declare function calendarServerQuerySessions(payload: QuerySessionsRequest): RequestOptionsFactory<QuerySessionsResponse>;
31
+ /**
32
+ * Retrieves a session by ID.
33
+ *
34
+ *
35
+ * By default session object without any personal information is returned.
36
+ * This means without `participants`, `location`, `calendarConference`, and
37
+ * `externalCalendarOverrides`. You can retrieve full session object by passing
38
+ * `ALL_PI` in the `fieldsets` array. It isn't possible to retrieve sessions
39
+ * with personal information just for specific participants.
40
+ */
41
+ export declare function getSession(payload: GetSessionRequest): RequestOptionsFactory<GetSessionResponse>;
42
+ /**
43
+ * Retrieves a list of sessions.
44
+ *
45
+ *
46
+ * By default session objects without any personal information are returned.
47
+ * This means without `participants`, `location`, `calendarConference`, and
48
+ * `externalCalendarOverrides`. You can retrieve full session objects by passing
49
+ * `ALL_PI` in the `fieldsets` array. It isn't possible to retrieve sessions
50
+ * with personal information just for specific participants.
51
+ */
52
+ export declare function listSessions(payload: ListSessionsRequest): RequestOptionsFactory<ListSessionsResponse>;
53
+ /**
54
+ * Retrieves a list of event session instances, given the provided paging and filtering.
55
+ *
56
+ *
57
+ * By default session objects without any personal information are returned.
58
+ * This means without `participants`, `location`, `calendarConference`, and
59
+ * `externalCalendarOverrides`. You can retrieve full session objects by passing
60
+ * `ALL_PI` in the `fieldsets` array. It isn't possible to retrieve sessions
61
+ * with personal information just for specific participants.
62
+ *
63
+ * > __Note:__ Sessions are sorted by `start.timestamp`, in ascending order.
64
+ * > Other sorting options aren't supported.
65
+ *
66
+ *
67
+ * For a detailed list of supported operations in the Bookings Calendar V2 API, see
68
+ * [filtering](https://dev.wix.com/api/rest/wix-bookings/calendar-v2/filters).
69
+ *
70
+ *
71
+ * To learn about working with _Query_ endpoints, see
72
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language)
73
+ * and [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging).
74
+ */
75
+ export declare function queryEventSessionInstances(payload: QueryEventSessionInstancesRequest): RequestOptionsFactory<QueryEventSessionInstancesResponse>;