@wix/bookings 1.0.131 → 1.0.133

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 (47) hide show
  1. package/build/cjs/index.d.ts +1 -0
  2. package/build/cjs/index.js +2 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +1 -1
  5. package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +1 -1
  6. package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +0 -8
  7. package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -1
  8. package/build/cjs/src/bookings-catalog-v1-service-options-and-variants.universal.d.ts +0 -26
  9. package/build/cjs/src/bookings-services-v2-service.universal.d.ts +0 -8
  10. package/build/cjs/src/bookings-v2-attendance.http.d.ts +40 -0
  11. package/build/cjs/src/bookings-v2-attendance.http.js +166 -0
  12. package/build/cjs/src/bookings-v2-attendance.http.js.map +1 -0
  13. package/build/cjs/src/bookings-v2-attendance.public.d.ts +10 -0
  14. package/build/cjs/src/bookings-v2-attendance.public.js +27 -0
  15. package/build/cjs/src/bookings-v2-attendance.public.js.map +1 -0
  16. package/build/cjs/src/bookings-v2-attendance.types.d.ts +112 -0
  17. package/build/cjs/src/bookings-v2-attendance.types.js +15 -0
  18. package/build/cjs/src/bookings-v2-attendance.types.js.map +1 -0
  19. package/build/cjs/src/bookings-v2-attendance.universal.d.ts +245 -0
  20. package/build/cjs/src/bookings-v2-attendance.universal.js +258 -0
  21. package/build/cjs/src/bookings-v2-attendance.universal.js.map +1 -0
  22. package/build/cjs/src/bookings-v2-booking.universal.d.ts +5 -5
  23. package/build/cjs/src/bookings-v2-booking.universal.js +5 -5
  24. package/build/es/index.d.ts +1 -0
  25. package/build/es/index.js +1 -0
  26. package/build/es/index.js.map +1 -1
  27. package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +1 -1
  28. package/build/es/src/bookings-availability-v1-slot-availability.universal.js +1 -1
  29. package/build/es/src/bookings-calendar-v1-session.universal.d.ts +0 -8
  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.universal.d.ts +0 -26
  32. package/build/es/src/bookings-services-v2-service.universal.d.ts +0 -8
  33. package/build/es/src/bookings-v2-attendance.http.d.ts +40 -0
  34. package/build/es/src/bookings-v2-attendance.http.js +160 -0
  35. package/build/es/src/bookings-v2-attendance.http.js.map +1 -0
  36. package/build/es/src/bookings-v2-attendance.public.d.ts +10 -0
  37. package/build/es/src/bookings-v2-attendance.public.js +19 -0
  38. package/build/es/src/bookings-v2-attendance.public.js.map +1 -0
  39. package/build/es/src/bookings-v2-attendance.types.d.ts +112 -0
  40. package/build/es/src/bookings-v2-attendance.types.js +12 -0
  41. package/build/es/src/bookings-v2-attendance.types.js.map +1 -0
  42. package/build/es/src/bookings-v2-attendance.universal.d.ts +245 -0
  43. package/build/es/src/bookings-v2-attendance.universal.js +233 -0
  44. package/build/es/src/bookings-v2-attendance.universal.js.map +1 -0
  45. package/build/es/src/bookings-v2-booking.universal.d.ts +5 -5
  46. package/build/es/src/bookings-v2-booking.universal.js +5 -5
  47. package/package.json +2 -2
@@ -0,0 +1,245 @@
1
+ export declare const __debug: {
2
+ verboseLogging: {
3
+ on: () => boolean;
4
+ off: () => boolean;
5
+ };
6
+ };
7
+ /**
8
+ * Attendance is the main entity of AttendanceService.
9
+ * It contains the attendance information for a given booking in a given session.
10
+ */
11
+ export interface Attendance {
12
+ /**
13
+ * ID of the attendance object.
14
+ * @readonly
15
+ */
16
+ _id?: string | null;
17
+ /** Booking ID. */
18
+ bookingId?: string | null;
19
+ /** Session ID. */
20
+ sessionId?: string | null;
21
+ /**
22
+ * Whether the booked contact attended the session, might be one of the following:
23
+ *
24
+ * + `NOT_SET`: There is no available attendance information.
25
+ * + `ATTENDED`: At least a single participant has attended the session.
26
+ * + `NOT_ATTENDED`: No participant has attended the session.
27
+ */
28
+ status?: AttendanceStatus;
29
+ /** Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants. */
30
+ numberOfAttendees?: number;
31
+ }
32
+ export declare enum AttendanceStatus {
33
+ NOT_SET = "NOT_SET",
34
+ ATTENDED = "ATTENDED",
35
+ NOT_ATTENDED = "NOT_ATTENDED"
36
+ }
37
+ export interface GetAttendanceRequest {
38
+ /** Id of the Attendance to retrieve. */
39
+ attendanceId: string;
40
+ }
41
+ export interface GetAttendanceResponse {
42
+ /** The retrieved Attendance. */
43
+ attendance?: Attendance;
44
+ }
45
+ export interface SetAttendanceRequest {
46
+ /** Attendance to create or updated. */
47
+ attendance: Attendance;
48
+ }
49
+ export interface SetAttendanceResponse {
50
+ /** The updated Attendance. */
51
+ attendance?: Attendance;
52
+ }
53
+ export interface QueryAttendanceRequest {
54
+ /** WQL expression. */
55
+ query: QueryV2;
56
+ }
57
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
58
+ cursorPaging?: CursorPaging;
59
+ filter?: Record<string, any> | null;
60
+ sort?: Sorting[];
61
+ fields?: string[];
62
+ }
63
+ /** @oneof */
64
+ export interface QueryV2PagingMethodOneOf {
65
+ cursorPaging?: CursorPaging;
66
+ }
67
+ export interface Sorting {
68
+ /** Name of the field to sort by. */
69
+ fieldName?: string;
70
+ /** Sort order. */
71
+ order?: SortOrder;
72
+ }
73
+ export declare enum SortOrder {
74
+ ASC = "ASC",
75
+ DESC = "DESC"
76
+ }
77
+ export interface Paging {
78
+ /** Number of items to load. */
79
+ limit?: number | null;
80
+ /** Number of items to skip in the current sort order. */
81
+ offset?: number | null;
82
+ }
83
+ export interface CursorPaging {
84
+ /**
85
+ * Number of attendances to return.
86
+ * Defaults to `50`. Maximum `1000`.
87
+ */
88
+ limit?: number | null;
89
+ /**
90
+ * Pointer to the next or previous page in the list of results.
91
+ * You can get the relevant cursor token
92
+ * from the `pagingMetadata` object in the previous call's response.
93
+ * Not relevant for the first request.
94
+ */
95
+ cursor?: string | null;
96
+ }
97
+ export interface QueryAttendanceResponse {
98
+ /** The retrieved Attendances. */
99
+ attendances?: Attendance[];
100
+ /** Paging Metadata. Cursor pagination is supported. */
101
+ pagingMetadata?: CursorPagingMetadata;
102
+ }
103
+ export interface CursorPagingMetadata {
104
+ /** Use these cursor to paginate between results. [Read more](https://dev.wix.com/api/rest/getting-started/api-query-language#getting-started_api-query-language_cursor-paging). */
105
+ cursors?: Cursors;
106
+ /**
107
+ * Indicates if there are more results after the current page.
108
+ * If `true`, another page of results can be retrieved.
109
+ * If `false`, this is the last page.
110
+ */
111
+ hasNext?: boolean | null;
112
+ }
113
+ export interface Cursors {
114
+ /** Cursor pointing to next page in the list of results. */
115
+ next?: string | null;
116
+ /** Cursor pointing to previous page in the list of results. */
117
+ prev?: string | null;
118
+ }
119
+ /**
120
+ * Get an Attendance by attendance id.
121
+ * @param attendanceId - Id of the Attendance to retrieve.
122
+ * @public
123
+ * @documentationMaturity preview
124
+ * @requiredField attendanceId
125
+ * @returns The retrieved Attendance.
126
+ */
127
+ export declare function getAttendance(attendanceId: string): Promise<Attendance>;
128
+ /**
129
+ * Create an Attendance or Update the status/numberOfAttendees in an existing Attendance of a given booking.
130
+ * It is not allowed to set the Attendance's status as NOT_SET. In such case a proper error will be thrown.
131
+ * The number of attendees can be greater than 1 when the booking is made for a group of people.
132
+ *
133
+ * *Notes:**
134
+ * + Pass the latest `revision` for a successful update.
135
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
136
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
137
+ * @param attendance - Attendance to create or updated.
138
+ * @public
139
+ * @documentationMaturity preview
140
+ * @requiredField attendance
141
+ * @requiredField attendance.bookingId
142
+ * @requiredField attendance.sessionId
143
+ */
144
+ export declare function setAttendance(attendance: Attendance): Promise<SetAttendanceResponse>;
145
+ /**
146
+ * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
147
+ *
148
+ * Up to 100 bookings can be returned per request.
149
+ *
150
+ * Query Attendance runs with the following defaults, which you can override:
151
+ *
152
+ * - `id` sorted in `ASC` order
153
+ * - `cursorPaging.limit` is `50`
154
+ *
155
+ * For field support see
156
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
157
+ * for more information.
158
+ * __Note__: `fields` and `fieldsets` aren't supported.
159
+ *
160
+ *
161
+ * You can only specify a filter only once per query. If a filter is provided
162
+ * more than once, only the first occurrence affects the returned bookings.
163
+ *
164
+ * To learn about working with _Query_ endpoints, see
165
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
166
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
167
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
168
+ * @public
169
+ * @documentationMaturity preview
170
+ */
171
+ export declare function queryAttendance(): AttendancesQueryBuilder;
172
+ interface QueryCursorResult {
173
+ cursors: Cursors;
174
+ hasNext: () => boolean;
175
+ hasPrev: () => boolean;
176
+ length: number;
177
+ pageSize: number;
178
+ }
179
+ export interface AttendancesQueryResult extends QueryCursorResult {
180
+ items: Attendance[];
181
+ query: AttendancesQueryBuilder;
182
+ next: () => Promise<AttendancesQueryResult>;
183
+ prev: () => Promise<AttendancesQueryResult>;
184
+ }
185
+ export interface AttendancesQueryBuilder {
186
+ /** @param propertyName - Property whose value is compared with `value`.
187
+ * @param value - Value to compare against.
188
+ * @documentationMaturity preview
189
+ */
190
+ eq: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
191
+ /** @param propertyName - Property whose value is compared with `value`.
192
+ * @param value - Value to compare against.
193
+ * @documentationMaturity preview
194
+ */
195
+ ne: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
196
+ /** @param propertyName - Property whose value is compared with `value`.
197
+ * @param value - Value to compare against.
198
+ * @documentationMaturity preview
199
+ */
200
+ ge: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
201
+ /** @param propertyName - Property whose value is compared with `value`.
202
+ * @param value - Value to compare against.
203
+ * @documentationMaturity preview
204
+ */
205
+ gt: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
206
+ /** @param propertyName - Property whose value is compared with `value`.
207
+ * @param value - Value to compare against.
208
+ * @documentationMaturity preview
209
+ */
210
+ le: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
211
+ /** @param propertyName - Property whose value is compared with `value`.
212
+ * @param value - Value to compare against.
213
+ * @documentationMaturity preview
214
+ */
215
+ lt: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
216
+ /** @param propertyName - Property whose value is compared with `string`.
217
+ * @param string - String to compare against. Case-insensitive.
218
+ * @documentationMaturity preview
219
+ */
220
+ startsWith: (propertyName: '_id' | 'bookingId' | 'sessionId', value: string) => AttendancesQueryBuilder;
221
+ /** @param propertyName - Property whose value is compared with `values`.
222
+ * @param values - List of values to compare against.
223
+ * @documentationMaturity preview
224
+ */
225
+ hasSome: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any[]) => AttendancesQueryBuilder;
226
+ /** @documentationMaturity preview */
227
+ in: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
228
+ /** @documentationMaturity preview */
229
+ exists: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: boolean) => AttendancesQueryBuilder;
230
+ /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
231
+ * @documentationMaturity preview
232
+ */
233
+ ascending: (...propertyNames: Array<'_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees'>) => AttendancesQueryBuilder;
234
+ /** @param limit - Number of items to return, which is also the `pageSize` of the results object.
235
+ * @documentationMaturity preview
236
+ */
237
+ limit: (limit: number) => AttendancesQueryBuilder;
238
+ /** @param cursor - A pointer to specific record
239
+ * @documentationMaturity preview
240
+ */
241
+ skipTo: (cursor: string) => AttendancesQueryBuilder;
242
+ /** @documentationMaturity preview */
243
+ find: () => Promise<AttendancesQueryResult>;
244
+ }
245
+ export {};
@@ -0,0 +1,233 @@
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, resolveQueryFieldsTransformationPaths, } from '@wix/metro-runtime/velo';
11
+ import * as ambassadorWixBookingsV2Attendance from './bookings-v2-attendance.http';
12
+ // @ts-ignore
13
+ import { wrapWithQueryBuilder } from '@wix/motion-edm-autogen-query-wrapper';
14
+ let __verbose = false;
15
+ function __log(...args) {
16
+ __verbose && console.log(...args);
17
+ }
18
+ function __inspect(obj) {
19
+ return obj;
20
+ }
21
+ export const __debug = {
22
+ verboseLogging: {
23
+ on: () => (__verbose = true),
24
+ off: () => (__verbose = false),
25
+ },
26
+ };
27
+ const _toVeloEntity = '$';
28
+ const _fromVeloEntity = '$';
29
+ export var AttendanceStatus;
30
+ (function (AttendanceStatus) {
31
+ AttendanceStatus["NOT_SET"] = "NOT_SET";
32
+ AttendanceStatus["ATTENDED"] = "ATTENDED";
33
+ AttendanceStatus["NOT_ATTENDED"] = "NOT_ATTENDED";
34
+ })(AttendanceStatus || (AttendanceStatus = {}));
35
+ export var SortOrder;
36
+ (function (SortOrder) {
37
+ SortOrder["ASC"] = "ASC";
38
+ SortOrder["DESC"] = "DESC";
39
+ })(SortOrder || (SortOrder = {}));
40
+ const _getAttendanceRequest = {};
41
+ const _getAttendanceResponse = {};
42
+ const _queryAttendanceRequest = {};
43
+ const _queryAttendanceResponse = {};
44
+ const _setAttendanceRequest = {};
45
+ const _setAttendanceResponse = {};
46
+ /**
47
+ * Get an Attendance by attendance id.
48
+ * @param attendanceId - Id of the Attendance to retrieve.
49
+ * @public
50
+ * @documentationMaturity preview
51
+ * @requiredField attendanceId
52
+ * @returns The retrieved Attendance.
53
+ */
54
+ export function getAttendance(attendanceId) {
55
+ var _a, _b, _c;
56
+ return __awaiter(this, arguments, void 0, function* () {
57
+ const requestTransformation = { attendanceId: '$[0]' };
58
+ const responseTransformation = '$.attendance';
59
+ // @ts-ignore
60
+ const { httpClient, sideEffects } = arguments[1];
61
+ const { toAmbassadorRequest } = serializer({
62
+ rootSchema: _getAttendanceRequest,
63
+ depSchemas: {},
64
+ fqdnTransformation: {
65
+ paths: [],
66
+ transformation: _fromVeloEntity,
67
+ },
68
+ customTransformation: requestTransformation,
69
+ });
70
+ const { fromJSON } = serializer({
71
+ rootSchema: _getAttendanceResponse,
72
+ depSchemas: {},
73
+ fqdnTransformation: {
74
+ paths: [...['attendance']],
75
+ transformation: _toVeloEntity,
76
+ },
77
+ customTransformation: responseTransformation,
78
+ });
79
+ const payload = toAmbassadorRequest([attendanceId]);
80
+ const reqOpts = ambassadorWixBookingsV2Attendance.getAttendance(payload);
81
+ __log(`"GetAttendance" sending request with: ${__inspect(reqOpts)}`);
82
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
83
+ try {
84
+ const result = yield httpClient.request(reqOpts);
85
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
86
+ return fromJSON(result.data);
87
+ }
88
+ catch (err) {
89
+ const transformedError = transformError(err, requestTransformation, [
90
+ 'attendanceId',
91
+ ]);
92
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
93
+ throw transformedError;
94
+ }
95
+ });
96
+ }
97
+ /**
98
+ * Create an Attendance or Update the status/numberOfAttendees in an existing Attendance of a given booking.
99
+ * It is not allowed to set the Attendance's status as NOT_SET. In such case a proper error will be thrown.
100
+ * The number of attendees can be greater than 1 when the booking is made for a group of people.
101
+ *
102
+ * *Notes:**
103
+ * + Pass the latest `revision` for a successful update.
104
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
105
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
106
+ * @param attendance - Attendance to create or updated.
107
+ * @public
108
+ * @documentationMaturity preview
109
+ * @requiredField attendance
110
+ * @requiredField attendance.bookingId
111
+ * @requiredField attendance.sessionId
112
+ */
113
+ export function setAttendance(attendance) {
114
+ var _a, _b, _c;
115
+ return __awaiter(this, arguments, void 0, function* () {
116
+ const requestTransformation = { attendance: '$[0]' };
117
+ const responseTransformation = '$';
118
+ // @ts-ignore
119
+ const { httpClient, sideEffects } = arguments[1];
120
+ const { toAmbassadorRequest } = serializer({
121
+ rootSchema: _setAttendanceRequest,
122
+ depSchemas: {},
123
+ fqdnTransformation: {
124
+ paths: [...['attendance']],
125
+ transformation: _fromVeloEntity,
126
+ },
127
+ customTransformation: requestTransformation,
128
+ });
129
+ const { fromJSON } = serializer({
130
+ rootSchema: _setAttendanceResponse,
131
+ depSchemas: {},
132
+ fqdnTransformation: {
133
+ paths: [...['attendance']],
134
+ transformation: _toVeloEntity,
135
+ },
136
+ customTransformation: responseTransformation,
137
+ });
138
+ const payload = toAmbassadorRequest([attendance]);
139
+ const reqOpts = ambassadorWixBookingsV2Attendance.setAttendance(payload);
140
+ __log(`"SetAttendance" sending request with: ${__inspect(reqOpts)}`);
141
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
142
+ try {
143
+ const result = yield httpClient.request(reqOpts);
144
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
145
+ return fromJSON(result.data);
146
+ }
147
+ catch (err) {
148
+ const transformedError = transformError(err, requestTransformation, [
149
+ 'attendance',
150
+ ]);
151
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
152
+ throw transformedError;
153
+ }
154
+ });
155
+ }
156
+ /**
157
+ * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
158
+ *
159
+ * Up to 100 bookings can be returned per request.
160
+ *
161
+ * Query Attendance runs with the following defaults, which you can override:
162
+ *
163
+ * - `id` sorted in `ASC` order
164
+ * - `cursorPaging.limit` is `50`
165
+ *
166
+ * For field support see
167
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
168
+ * for more information.
169
+ * __Note__: `fields` and `fieldsets` aren't supported.
170
+ *
171
+ *
172
+ * You can only specify a filter only once per query. If a filter is provided
173
+ * more than once, only the first occurrence affects the returned bookings.
174
+ *
175
+ * To learn about working with _Query_ endpoints, see
176
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
177
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
178
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
179
+ * @public
180
+ * @documentationMaturity preview
181
+ */
182
+ export function queryAttendance() {
183
+ const requestTransformation = { '*': '$[1]', query: '$[0]' };
184
+ const responseTransformation = {
185
+ items: '$.attendances',
186
+ pagingMetadata: '$.pagingMetadata',
187
+ };
188
+ // @ts-ignore
189
+ const { httpClient, sideEffects } = arguments[0];
190
+ const { toAmbassadorRequest } = serializer({
191
+ rootSchema: _queryAttendanceRequest,
192
+ depSchemas: {},
193
+ fqdnTransformation: {
194
+ paths: [],
195
+ transformation: _fromVeloEntity,
196
+ },
197
+ customTransformation: requestTransformation,
198
+ });
199
+ const { fromJSON } = serializer({
200
+ rootSchema: _queryAttendanceResponse,
201
+ depSchemas: {},
202
+ fqdnTransformation: {
203
+ paths: [...['Array#attendances']],
204
+ transformation: _toVeloEntity,
205
+ },
206
+ customTransformation: responseTransformation,
207
+ });
208
+ return wrapWithQueryBuilder({
209
+ func: (payload) => __awaiter(this, void 0, void 0, function* () {
210
+ var _a, _b, _c;
211
+ const reqOpts = ambassadorWixBookingsV2Attendance.queryAttendance(payload);
212
+ (_a = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSiteCall) === null || _a === void 0 ? void 0 : _a.call(sideEffects);
213
+ try {
214
+ const result = yield httpClient.request(reqOpts);
215
+ (_b = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onSuccess) === null || _b === void 0 ? void 0 : _b.call(sideEffects, result);
216
+ return result;
217
+ }
218
+ catch (err) {
219
+ (_c = sideEffects === null || sideEffects === void 0 ? void 0 : sideEffects.onError) === null || _c === void 0 ? void 0 : _c.call(sideEffects, err);
220
+ throw err;
221
+ }
222
+ }),
223
+ requestTransformer: (...args) => toAmbassadorRequest(args),
224
+ responseTransformer: ({ data }) => fromJSON(data),
225
+ errorTransformer: (err) => {
226
+ const transformedError = transformError(err, requestTransformation);
227
+ throw transformedError;
228
+ },
229
+ pagingMethod: 'CURSOR',
230
+ transformationPaths: resolveQueryFieldsTransformationPaths(_toVeloEntity),
231
+ })({ cursorWithEmptyFilterAndSort: true });
232
+ }
233
+ //# sourceMappingURL=bookings-v2-attendance.universal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-attendance.universal.js","sourceRoot":"","sources":["../../../src/bookings-v2-attendance.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,qCAAqC,GACtC,MAAM,yBAA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escheduling is validated against the service's rescheduling
1742
1742
  * policy.
1743
1743
  *
1744
- * This function is not a universal function and runs only on the backend
1744
+ * This function is not a universal function and runs only on the backend.
1745
1745
  * @param bookingId - Id of the booking to reschedule.
1746
1746
  * @param slot - Information about the new slot.
1747
1747
  * @public
@@ -1813,7 +1813,7 @@ export interface RescheduleBookingOptions extends RescheduleBookingRequestPartic
1813
1813
  * has been approved. The slot's or schedule's availability is checked just
1814
1814
  * before confirming the booking as part of the automatic flow.
1815
1815
  *
1816
- * This function is not a universal function and runs only on the backend
1816
+ * This function is not a universal function and runs only on the backend.
1817
1817
  * @param bookingId - ID of the booking to confirm.
1818
1818
  * @param revision - Revision number, which increments by 1 each time the booking is updated.
1819
1819
  * To prevent conflicting changes, the current revision must be passed when
@@ -1847,7 +1847,7 @@ export interface ConfirmBookingOptions {
1847
1847
  * the decline. You also need to pass `participantNotification.notifyParticipants`
1848
1848
  * as `true` to actually send the message.
1849
1849
  *
1850
- * This function is not a universal function and runs only on the backend
1850
+ * This function is not a universal function and runs only on the backend.
1851
1851
  * @param bookingId - ID of the booking to decline.
1852
1852
  * @param revision - Revision number, which increments by 1 each time the booking is updated.
1853
1853
  * To prevent conflicting changes, the current revision must be passed when
@@ -1888,7 +1888,7 @@ export interface DeclineBookingOptions {
1888
1888
  * ensures that the cancelation is validated against the service's cancelation
1889
1889
  * policy.
1890
1890
  *
1891
- * This function is not a universal function and runs only on the backend
1891
+ * This function is not a universal function and runs only on the backend.
1892
1892
  * @param bookingId - ID of the booking to cancel.
1893
1893
  * @public
1894
1894
  * @documentationMaturity preview
@@ -1935,7 +1935,7 @@ export interface CancelBookingOptions {
1935
1935
  * all of the provided choices must exist for the service. Otherwise, the
1936
1936
  * call returns an `INVALID_SERVICE_CHOICES` error.
1937
1937
  *
1938
- * This function is not a universal function and runs only on the backend
1938
+ * This function is not a universal function and runs only on the backend.
1939
1939
  * @param bookingId - ID of the booking to update the number of participants for.
1940
1940
  * @public
1941
1941
  * @documentationMaturity preview
@@ -327,7 +327,7 @@ export function bulkCreateBooking(createBookingsInfo, options) {
327
327
  * ensures that the rescheduling is validated against the service's rescheduling
328
328
  * policy.
329
329
  *
330
- * This function is not a universal function and runs only on the backend
330
+ * This function is not a universal function and runs only on the backend.
331
331
  * @param bookingId - Id of the booking to reschedule.
332
332
  * @param slot - Information about the new slot.
333
333
  * @public
@@ -419,7 +419,7 @@ export function rescheduleBooking(bookingId, slot, options) {
419
419
  * has been approved. The slot's or schedule's availability is checked just
420
420
  * before confirming the booking as part of the automatic flow.
421
421
  *
422
- * This function is not a universal function and runs only on the backend
422
+ * This function is not a universal function and runs only on the backend.
423
423
  * @param bookingId - ID of the booking to confirm.
424
424
  * @param revision - Revision number, which increments by 1 each time the booking is updated.
425
425
  * To prevent conflicting changes, the current revision must be passed when
@@ -494,7 +494,7 @@ export function confirmBooking(bookingId, revision, options) {
494
494
  * the decline. You also need to pass `participantNotification.notifyParticipants`
495
495
  * as `true` to actually send the message.
496
496
  *
497
- * This function is not a universal function and runs only on the backend
497
+ * This function is not a universal function and runs only on the backend.
498
498
  * @param bookingId - ID of the booking to decline.
499
499
  * @param revision - Revision number, which increments by 1 each time the booking is updated.
500
500
  * To prevent conflicting changes, the current revision must be passed when
@@ -576,7 +576,7 @@ export function declineBooking(bookingId, revision, options) {
576
576
  * ensures that the cancelation is validated against the service's cancelation
577
577
  * policy.
578
578
  *
579
- * This function is not a universal function and runs only on the backend
579
+ * This function is not a universal function and runs only on the backend.
580
580
  * @param bookingId - ID of the booking to cancel.
581
581
  * @public
582
582
  * @documentationMaturity preview
@@ -651,7 +651,7 @@ export function cancelBooking(bookingId, options) {
651
651
  * all of the provided choices must exist for the service. Otherwise, the
652
652
  * call returns an `INVALID_SERVICE_CHOICES` error.
653
653
  *
654
- * This function is not a universal function and runs only on the backend
654
+ * This function is not a universal function and runs only on the backend.
655
655
  * @param bookingId - ID of the booking to update the number of participants for.
656
656
  * @public
657
657
  * @documentationMaturity preview
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/bookings",
3
- "version": "1.0.131",
3
+ "version": "1.0.133",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -33,5 +33,5 @@
33
33
  "groupId": "com.wixpress.public-sdk-autogen"
34
34
  }
35
35
  },
36
- "falconPackageHash": "2024623bab8e8140c64f9a8bd9eed30cfaa70f12bf669d9cfb319b7d"
36
+ "falconPackageHash": "0dce8673f3d4b4a83a7efa764cc52ad312e4c0832012a50bb9a9784b"
37
37
  }