@wix/bookings 1.0.0

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 (31) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +24 -0
  3. package/build/cjs/index.js.map +1 -0
  4. package/build/cjs/src/bookings-availability-v1-slot-availability.http.d.ts +51 -0
  5. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +160 -0
  6. package/build/cjs/src/bookings-availability-v1-slot-availability.http.js.map +1 -0
  7. package/build/cjs/src/bookings-availability-v1-slot-availability.public.d.ts +5 -0
  8. package/build/cjs/src/bookings-availability-v1-slot-availability.public.js +14 -0
  9. package/build/cjs/src/bookings-availability-v1-slot-availability.public.js.map +1 -0
  10. package/build/cjs/src/bookings-availability-v1-slot-availability.types.d.ts +260 -0
  11. package/build/cjs/src/bookings-availability-v1-slot-availability.types.js +16 -0
  12. package/build/cjs/src/bookings-availability-v1-slot-availability.types.js.map +1 -0
  13. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +341 -0
  14. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +165 -0
  15. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +2 -0
  18. package/build/es/index.js.map +1 -0
  19. package/build/es/src/bookings-availability-v1-slot-availability.http.d.ts +51 -0
  20. package/build/es/src/bookings-availability-v1-slot-availability.http.js +156 -0
  21. package/build/es/src/bookings-availability-v1-slot-availability.http.js.map +1 -0
  22. package/build/es/src/bookings-availability-v1-slot-availability.public.d.ts +5 -0
  23. package/build/es/src/bookings-availability-v1-slot-availability.public.js +8 -0
  24. package/build/es/src/bookings-availability-v1-slot-availability.public.js.map +1 -0
  25. package/build/es/src/bookings-availability-v1-slot-availability.types.d.ts +260 -0
  26. package/build/es/src/bookings-availability-v1-slot-availability.types.js +13 -0
  27. package/build/es/src/bookings-availability-v1-slot-availability.types.js.map +1 -0
  28. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +341 -0
  29. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +142 -0
  30. package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -0
  31. package/package.json +37 -0
@@ -0,0 +1,341 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ export interface SlotAvailability {
8
+ /**
9
+ * The slot for the corresponding session, when the session is either a single session
10
+ * or a specific session generated from a recurring session.
11
+ */
12
+ slot?: Slot;
13
+ /**
14
+ * Whether the slot is bookable. Bookability is determined by checking a
15
+ * session's open slots and booking policies. Locks are not taken into
16
+ * account.
17
+ */
18
+ bookable?: boolean;
19
+ /**
20
+ * Total number of spots for this slot.
21
+ * For example, if a session has a total of 10 spots and 3 spots are booked,
22
+ * `spotsTotal` is 10 and `openSpots` is 7.
23
+ */
24
+ totalSpots?: number | null;
25
+ /** Number of open spots for this slot. */
26
+ openSpots?: number | null;
27
+ /** An object describing the slot's waitlist and its occupancy. */
28
+ waitingList?: WaitingList;
29
+ /** Booking policy violations for the slot. */
30
+ bookingPolicyViolations?: BookingPolicyViolations;
31
+ /**
32
+ * Indicates whether the slot is locked because a waitlist exists.
33
+ * When a slot frees up, the slot is offered to the next customer on the waitlist. Read-only.
34
+ */
35
+ locked?: boolean | null;
36
+ }
37
+ export interface Slot {
38
+ /**
39
+ * ID for the slot's corresponding session, when the session is either a single session
40
+ * or a specific session generated from a recurring session.
41
+ */
42
+ sessionId?: string | null;
43
+ /** Service ID. */
44
+ serviceId?: string;
45
+ /** Schedule ID. */
46
+ scheduleId?: string;
47
+ /**
48
+ * The start time of this slot in [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339)
49
+ * format.
50
+ *
51
+ * If `timezone` is specified,
52
+ * dates are based on the local date/time. This means that the timezone offset
53
+ * in the `start_date` is ignored.
54
+ */
55
+ startDate?: string | null;
56
+ /**
57
+ * The end time of this slot in
58
+ * [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339) format.
59
+ *
60
+ * If `timezone` is specified,
61
+ * dates are based on the local date/time. This means that the timezone offset
62
+ * in the `end_date` is ignored.
63
+ */
64
+ endDate?: string | null;
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.
70
+ */
71
+ timezone?: string | null;
72
+ /**
73
+ * The resource required for this slot. Currently, the only supported resource
74
+ * is the relevant staff member for the slot.
75
+ */
76
+ resource?: SlotResource;
77
+ /** Geographic location of the slot. */
78
+ location?: Location;
79
+ }
80
+ export interface SlotResource {
81
+ /**
82
+ * Resource ID.
83
+ * @readonly
84
+ */
85
+ _id?: string | null;
86
+ /** Resource name. Read only. */
87
+ name?: string | null;
88
+ }
89
+ export interface Location {
90
+ /**
91
+ * Business location ID. Available only for locations that are business locations,
92
+ * meaning the `location_type` is `"OWNER_BUSINESS"`.
93
+ */
94
+ _id?: string | null;
95
+ /** Location name. */
96
+ name?: string | null;
97
+ /** The full address of this location. */
98
+ formattedAddress?: string | null;
99
+ /**
100
+ * Location type.
101
+ *
102
+ * - `"OWNER_BUSINESS"`: The business address, as set in the site’s general settings.
103
+ * - `"OWNER_CUSTOM"`: The address as set when creating the service.
104
+ * - `"CUSTOM"`: The address as set for the individual session.
105
+ */
106
+ locationType?: LocationType;
107
+ }
108
+ export declare enum LocationType {
109
+ UNDEFINED = "UNDEFINED",
110
+ OWNER_BUSINESS = "OWNER_BUSINESS",
111
+ OWNER_CUSTOM = "OWNER_CUSTOM",
112
+ CUSTOM = "CUSTOM"
113
+ }
114
+ export interface WaitingList {
115
+ /**
116
+ * Total number of spots and open spots for this waitlist.
117
+ * For example, a Yoga class with 10 waitlist spots and 3 registered
118
+ * on the waitlist has 10 `total_spots` and 7 `open_spots`.
119
+ */
120
+ totalSpots?: number | null;
121
+ /** Number of open spots for this waitlist. */
122
+ openSpots?: number | null;
123
+ }
124
+ export interface BookingPolicyViolations {
125
+ /** Bookings policy violation. Too early to book this slot. */
126
+ tooEarlyToBook?: boolean | null;
127
+ /** Bookings policy violation. Too late to book this slot. */
128
+ tooLateToBook?: boolean | null;
129
+ /** Bookings policy violation. Online booking is disabled for this slot. */
130
+ bookOnlineDisabled?: boolean | null;
131
+ }
132
+ export interface QueryAvailabilityRequest {
133
+ /** Query options. */
134
+ query: QueryV2;
135
+ /**
136
+ * The timezone for which session availability is to be calculated. If specified,
137
+ * dates are based on the local date/time, meaning that the timezone offset
138
+ * 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
+ */
143
+ timezone?: string | null;
144
+ /**
145
+ * Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
146
+ * at most 3 available slots are returned for each day in the date range specified in the query's
147
+ * `filter`.
148
+ *
149
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
150
+ * Non-bookable slots are returned according to the specified filters, after all
151
+ * bookable slots are already included.
152
+ */
153
+ slotsPerDay?: number | null;
154
+ }
155
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
156
+ /**
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.
160
+ */
161
+ 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
+ */
167
+ sort?: Sorting[];
168
+ /** List of projected fields to return. All fields are supported. */
169
+ fields?: string[];
170
+ /** 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`. */
171
+ cursorPaging?: CursorPaging;
172
+ }
173
+ /** @oneof */
174
+ export interface QueryV2PagingMethodOneOf {
175
+ /** 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`. */
176
+ cursorPaging?: CursorPaging;
177
+ }
178
+ export interface Sorting {
179
+ /** Name of the field to sort by. */
180
+ fieldName?: string;
181
+ /** Sort order. */
182
+ order?: SortOrder;
183
+ }
184
+ export declare enum SortOrder {
185
+ ASC = "ASC",
186
+ DESC = "DESC"
187
+ }
188
+ export interface CursorPaging {
189
+ /** Number of items to load. */
190
+ limit?: number | null;
191
+ /**
192
+ * Pointer to the next or previous page in the list of results.
193
+ *
194
+ * You can get the relevant cursor token
195
+ * from the `pagingMetadata` object in the previous call's response.
196
+ * Not relevant for the first request.
197
+ */
198
+ cursor?: string | null;
199
+ }
200
+ export interface QueryAvailabilityResponse {
201
+ /** List of slots that potentially can be booked. */
202
+ availabilityEntries?: SlotAvailability[];
203
+ /** Details on the paged set of returned results. */
204
+ pagingMetadata?: PagingMetadataV2;
205
+ }
206
+ export interface PagingMetadataV2 {
207
+ /** Number of items returned in the response. */
208
+ count?: number | null;
209
+ /** Offset that was requested. */
210
+ offset?: number | null;
211
+ /** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
212
+ total?: number | null;
213
+ /** Flag that indicates the server failed to calculate the `total` field. */
214
+ tooManyToCount?: boolean | null;
215
+ /** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
216
+ cursors?: Cursors;
217
+ }
218
+ export interface Cursors {
219
+ /** Cursor pointing to next page in the list of results. */
220
+ next?: string | null;
221
+ /** Cursor pointing to previous page in the list of results. */
222
+ prev?: string | null;
223
+ }
224
+ export interface GetSlotAvailabilityRequest {
225
+ /** The slot for which the availability is checked. */
226
+ slot?: Slot;
227
+ /**
228
+ * The timezone for which slot availability is to be calculated. If specified,
229
+ * dates are based on the local date/time, meaning that the timezone offset
230
+ * 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
+ */
235
+ timezone?: string | null;
236
+ }
237
+ export interface GetSlotAvailabilityResponse {
238
+ availability?: SlotAvailability;
239
+ bookingPolicySettings?: BookingPolicySettings;
240
+ }
241
+ export interface BookingPolicySettings {
242
+ /**
243
+ * The policy defining the maximum number of participants that can
244
+ * be booked for a slot or a schedule.
245
+ */
246
+ maxParticipantsPerBooking?: number | null;
247
+ }
248
+ export interface GetScheduleAvailabilityRequest {
249
+ /** The schedule ID for which availability is being checked. */
250
+ scheduleId?: string;
251
+ }
252
+ export interface GetScheduleAvailabilityResponse {
253
+ availability?: ScheduleAvailability;
254
+ bookingPolicySettings?: BookingPolicySettings;
255
+ }
256
+ export interface ScheduleAvailability {
257
+ /**
258
+ * The total number of spots defined for the schedule, including
259
+ * both open and non-available spots.
260
+ */
261
+ totalSpots?: number | null;
262
+ /** The number of open spots defined for the schedule. */
263
+ openSpots?: number | null;
264
+ /** Booking policy violations for the schedule. */
265
+ bookingPolicyViolations?: BookingPolicyViolations;
266
+ }
267
+ /**
268
+ * Retrieves the availability for sessions
269
+ * that match the provided query criteria (paging, filtering, and sorting).
270
+ *
271
+ *
272
+ * The Calendar Availability APIs calculate the availability of sessions for
273
+ * appointments and classes, but not
274
+ * for courses.
275
+ *
276
+ * The entire list of slots is returned in case you want to display both
277
+ * available and non-available slots in the calendar for your customers.
278
+ * Using the `bookable` property, you can limit the display to available
279
+ * slots only.
280
+ *
281
+ * When querying, you must enter a start date and an end date. This avoids very large
282
+ * results that can impact performance.
283
+ *
284
+ * #### Calculating availability
285
+ *
286
+ * The availability is determined
287
+ * by checking:
288
+ * + **The sessions' open slots**. A slot is considered open if the session's
289
+ * capacity is greater than number of participants.
290
+ * + **Booking policies**. Policies that affect whether a slot is considered
291
+ * available include `tooEarlyToBook`, `tooLateToBook`, and `bookOnlineDisabled`.
292
+ *
293
+ * Locked sessions do not impact session availability and `bookable` can
294
+ * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
295
+ * 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
297
+ * there is availability, until a customer on the waitlist takes the slot. Locking
298
+ * prevents customers who are not yet on the waitlist from grabbing the slot.
299
+ *
300
+ * #### Handling Daylight Savings Time (DST) for local time zones
301
+ *
302
+ * Because of DST, there are cases where certain times either do not exist
303
+ * or exist twice for a local time zone.
304
+ * For example, the tine `00:05` on September 5th 2021 might not exist in Santiago, Chile,
305
+ * because at `00:00` the clock moved
306
+ * 1 hour forward to `01:00`.
307
+ *
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`
312
+ * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
313
+ * instead. The start time shifts one hour forward and the end time remains the same.
314
+ * @param query - Query options.
315
+ * @public
316
+ * @documentationMaturity preview
317
+ * @requiredField query
318
+ * @requiredField query.filter
319
+ */
320
+ export declare function queryAvailability(query: QueryV2, options?: QueryAvailabilityOptions): Promise<QueryAvailabilityResponse>;
321
+ export interface QueryAvailabilityOptions {
322
+ /**
323
+ * The timezone for which session availability is to be calculated. If specified,
324
+ * dates are based on the local date/time, meaning that the timezone offset
325
+ * 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
+ */
330
+ timezone?: string | null;
331
+ /**
332
+ * Maximum number of slots to load for each date. For example, if `slots_per_day` is set to `3`,
333
+ * at most 3 available slots are returned for each day in the date range specified in the query's
334
+ * `filter`.
335
+ *
336
+ * When a day has both bookable and non-bookable slots, bookable slots are returned first.
337
+ * Non-bookable slots are returned according to the specified filters, after all
338
+ * bookable slots are already included.
339
+ */
340
+ slotsPerDay?: number | null;
341
+ }
@@ -0,0 +1,142 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { serializer, transformError } from '@wix/metro-runtime/velo';
11
+ import * as ambassadorWixBookingsAvailabilityV1SlotAvailability from './bookings-availability-v1-slot-availability.http';
12
+ let __verbose = false;
13
+ function __log(...args) {
14
+ __verbose && console.log(...args);
15
+ }
16
+ function __inspect(obj) {
17
+ return obj;
18
+ }
19
+ export const __debug = {
20
+ verboseLogging: {
21
+ on: () => (__verbose = true),
22
+ off: () => (__verbose = false),
23
+ },
24
+ };
25
+ const _toVeloEntity = '$';
26
+ const _fromVeloEntity = '$';
27
+ export var LocationType;
28
+ (function (LocationType) {
29
+ LocationType["UNDEFINED"] = "UNDEFINED";
30
+ LocationType["OWNER_BUSINESS"] = "OWNER_BUSINESS";
31
+ LocationType["OWNER_CUSTOM"] = "OWNER_CUSTOM";
32
+ LocationType["CUSTOM"] = "CUSTOM";
33
+ })(LocationType || (LocationType = {}));
34
+ export var SortOrder;
35
+ (function (SortOrder) {
36
+ SortOrder["ASC"] = "ASC";
37
+ SortOrder["DESC"] = "DESC";
38
+ })(SortOrder || (SortOrder = {}));
39
+ const _queryAvailabilityRequest = {};
40
+ const _queryAvailabilityResponse = {};
41
+ /**
42
+ * Retrieves the availability for sessions
43
+ * that match the provided query criteria (paging, filtering, and sorting).
44
+ *
45
+ *
46
+ * The Calendar Availability APIs calculate the availability of sessions for
47
+ * appointments and classes, but not
48
+ * for courses.
49
+ *
50
+ * The entire list of slots is returned in case you want to display both
51
+ * available and non-available slots in the calendar for your customers.
52
+ * Using the `bookable` property, you can limit the display to available
53
+ * slots only.
54
+ *
55
+ * When querying, you must enter a start date and an end date. This avoids very large
56
+ * results that can impact performance.
57
+ *
58
+ * #### Calculating availability
59
+ *
60
+ * The availability is determined
61
+ * by checking:
62
+ * + **The sessions' open slots**. A slot is considered open if the session's
63
+ * capacity is greater than number of participants.
64
+ * + **Booking policies**. Policies that affect whether a slot is considered
65
+ * available include `tooEarlyToBook`, `tooLateToBook`, and `bookOnlineDisabled`.
66
+ *
67
+ * Locked sessions do not impact session availability and `bookable` can
68
+ * be `true` even if `locked` is `true`. For example, if a session has a waitlist and a
69
+ * place frees up, the slot is offered to the customers on the waitlist, one by one. The
70
+ * sesssion remains locked because there is still a waitlist, but for a period of time
71
+ * there is availability, until a customer on the waitlist takes the slot. Locking
72
+ * prevents customers who are not yet on the waitlist from grabbing the slot.
73
+ *
74
+ * #### Handling Daylight Savings Time (DST) for local time zones
75
+ *
76
+ * Because of DST, there are cases where certain times either do not exist
77
+ * or exist twice for a local time zone.
78
+ * For example, the tine `00:05` on September 5th 2021 might not exist in Santiago, Chile,
79
+ * because at `00:00` the clock moved
80
+ * 1 hour forward to `01:00`.
81
+ *
82
+ * In this case, the Availability APIs take this
83
+ * into account and mediate the time gaps automatically. The non-existant local time is
84
+ * automtically moved forward 1 hour to match local DST. Local times that exist do not change.
85
+ * So if the `Query Availability` endpoint is called with a `startDate` of `2021-09-05T00:00:01.000`
86
+ * and an `endDate` of `2021-09-06T00:00:02.000`, `2021-09-05T01:00:01.000` is used in the query
87
+ * instead. The start time shifts one hour forward and the end time remains the same.
88
+ * @param query - Query options.
89
+ * @public
90
+ * @documentationMaturity preview
91
+ * @requiredField query
92
+ * @requiredField query.filter
93
+ */
94
+ export function queryAvailability(query, options) {
95
+ var _a, _b, _c;
96
+ return __awaiter(this, arguments, void 0, function* () {
97
+ const requestTransformation = {
98
+ query: '$[0]',
99
+ timezone: '$[1].timezone',
100
+ slotsPerDay: '$[1].slotsPerDay',
101
+ };
102
+ const responseTransformation = '$';
103
+ // @ts-ignore
104
+ const { httpClient, sideEffects } = arguments[2];
105
+ const { toAmbassadorRequest } = serializer({
106
+ rootSchema: _queryAvailabilityRequest,
107
+ depSchemas: {},
108
+ fqdnTransformation: {
109
+ paths: [],
110
+ transformation: _fromVeloEntity,
111
+ },
112
+ customTransformation: requestTransformation,
113
+ });
114
+ const { fromJSON } = serializer({
115
+ rootSchema: _queryAvailabilityResponse,
116
+ depSchemas: {},
117
+ fqdnTransformation: {
118
+ paths: [...['Array#availabilityEntries']],
119
+ transformation: _toVeloEntity,
120
+ },
121
+ customTransformation: responseTransformation,
122
+ });
123
+ const payload = toAmbassadorRequest([query, options]);
124
+ const reqOpts = ambassadorWixBookingsAvailabilityV1SlotAvailability.queryAvailability(payload);
125
+ __log(`"QueryAvailability" sending request with: ${__inspect(reqOpts)}`);
126
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
127
+ try {
128
+ const result = yield httpClient.request(reqOpts);
129
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
130
+ return fromJSON(result.data);
131
+ }
132
+ catch (err) {
133
+ const transformedError = transformError(err, requestTransformation, [
134
+ 'query',
135
+ 'options',
136
+ ]);
137
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
138
+ throw transformedError;
139
+ }
140
+ });
141
+ }
142
+ //# sourceMappingURL=bookings-availability-v1-slot-availability.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-availability-v1-slot-availability.universal.js","sourceRoot":"","sources":["../../../src/bookings-availability-v1-slot-availability.universal.ts"],"names":[],"mappings":"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"}
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@wix/bookings",
3
+ "version": "1.0.0",
4
+ "publishConfig": {
5
+ "registry": "https://registry.npmjs.org/",
6
+ "access": "public"
7
+ },
8
+ "sideEffects": false,
9
+ "module": "build/es/index.js",
10
+ "main": "build/cjs/index.js",
11
+ "typings": "./build/cjs/index.d.ts",
12
+ "files": [
13
+ "build",
14
+ "frontend/package.json"
15
+ ],
16
+ "dependencies": {
17
+ "@wix/metro-runtime": "^1.0.0",
18
+ "@wix/sdk-types": "^1.0.0",
19
+ "@wix/motion-edm-autogen-query-wrapper": "^1.0.0"
20
+ },
21
+ "devDependencies": {
22
+ "@wix/typescript-to-service-json": "^1.0.0"
23
+ },
24
+ "scripts": {
25
+ "build": "tsc -b tsconfig.json tsconfig.esm.json",
26
+ "autodocs": "ts-to-sj",
27
+ "posttest": "npm run autodocs",
28
+ "test": ":"
29
+ },
30
+ "wix": {
31
+ "artifact": {
32
+ "artifactId": "bookings-public-sdk-autogen",
33
+ "groupId": "com.wixpress.public-sdk-autogen"
34
+ }
35
+ },
36
+ "falconPackageHash": "fcb232e9c7c3951782e4987748c692adf6ba5aca890d78b0bfc8b63e"
37
+ }