@wix/bookings 1.0.131 → 1.0.132

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 +2 -1
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/cjs/src/bookings-v2-attendance.http.d.ts +40 -0
  5. package/build/cjs/src/bookings-v2-attendance.http.js +166 -0
  6. package/build/cjs/src/bookings-v2-attendance.http.js.map +1 -0
  7. package/build/cjs/src/bookings-v2-attendance.public.d.ts +10 -0
  8. package/build/cjs/src/bookings-v2-attendance.public.js +27 -0
  9. package/build/cjs/src/bookings-v2-attendance.public.js.map +1 -0
  10. package/build/cjs/src/bookings-v2-attendance.types.d.ts +112 -0
  11. package/build/cjs/src/bookings-v2-attendance.types.js +15 -0
  12. package/build/cjs/src/bookings-v2-attendance.types.js.map +1 -0
  13. package/build/cjs/src/bookings-v2-attendance.universal.d.ts +249 -0
  14. package/build/cjs/src/bookings-v2-attendance.universal.js +258 -0
  15. package/build/cjs/src/bookings-v2-attendance.universal.js.map +1 -0
  16. package/build/es/index.d.ts +1 -0
  17. package/build/es/index.js +1 -0
  18. package/build/es/index.js.map +1 -1
  19. package/build/es/src/bookings-v2-attendance.http.d.ts +40 -0
  20. package/build/es/src/bookings-v2-attendance.http.js +160 -0
  21. package/build/es/src/bookings-v2-attendance.http.js.map +1 -0
  22. package/build/es/src/bookings-v2-attendance.public.d.ts +10 -0
  23. package/build/es/src/bookings-v2-attendance.public.js +19 -0
  24. package/build/es/src/bookings-v2-attendance.public.js.map +1 -0
  25. package/build/es/src/bookings-v2-attendance.types.d.ts +112 -0
  26. package/build/es/src/bookings-v2-attendance.types.js +12 -0
  27. package/build/es/src/bookings-v2-attendance.types.js.map +1 -0
  28. package/build/es/src/bookings-v2-attendance.universal.d.ts +249 -0
  29. package/build/es/src/bookings-v2-attendance.universal.js +233 -0
  30. package/build/es/src/bookings-v2-attendance.universal.js.map +1 -0
  31. package/package.json +2 -2
@@ -7,5 +7,6 @@ export * as sessionsView from './src/bookings-calendar-v2-session-view.public';
7
7
  export * as serviceOptionsAndVariants from './src/bookings-catalog-v1-service-options-and-variants.public';
8
8
  export * as extendedBookings from './src/bookings-reader-v2-extended-booking.public';
9
9
  export * as services from './src/bookings-services-v2-service.public';
10
+ export * as attendance from './src/bookings-v2-attendance.public';
10
11
  export * as bookings from './src/bookings-v2-booking.public';
11
12
  export * as pricing from './src/bookings-v2-price-info.public';
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
19
19
  return result;
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.pricing = exports.bookings = exports.services = exports.extendedBookings = exports.serviceOptionsAndVariants = exports.sessionsView = exports.externalCalendars = exports.sessions = exports.availabilityCalendar = exports.resources = exports.sessionsFeed = void 0;
22
+ exports.pricing = exports.bookings = exports.attendance = exports.services = exports.extendedBookings = exports.serviceOptionsAndVariants = exports.sessionsView = exports.externalCalendars = exports.sessions = exports.availabilityCalendar = exports.resources = exports.sessionsFeed = void 0;
23
23
  exports.sessionsFeed = __importStar(require("./src/bookings-calendar-v2-session-feed-event.public"));
24
24
  exports.resources = __importStar(require("./src/bookings-catalog-v1-resource.public"));
25
25
  exports.availabilityCalendar = __importStar(require("./src/bookings-availability-v1-slot-availability.public"));
@@ -29,6 +29,7 @@ exports.sessionsView = __importStar(require("./src/bookings-calendar-v2-session-
29
29
  exports.serviceOptionsAndVariants = __importStar(require("./src/bookings-catalog-v1-service-options-and-variants.public"));
30
30
  exports.extendedBookings = __importStar(require("./src/bookings-reader-v2-extended-booking.public"));
31
31
  exports.services = __importStar(require("./src/bookings-services-v2-service.public"));
32
+ exports.attendance = __importStar(require("./src/bookings-v2-attendance.public"));
32
33
  exports.bookings = __importStar(require("./src/bookings-v2-booking.public"));
33
34
  exports.pricing = __importStar(require("./src/bookings-v2-price-info.public"));
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF;AACrF,uFAAuE;AACvE,gHAAgG;AAChG,sFAAsE;AACtE,yGAAyF;AACzF,+FAA+E;AAC/E,2HAA2G;AAC3G,qGAAqF;AACrF,sFAAsE;AACtE,6EAA6D;AAC7D,+EAA+D"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qGAAqF;AACrF,uFAAuE;AACvE,gHAAgG;AAChG,sFAAsE;AACtE,yGAAyF;AACzF,+FAA+E;AAC/E,2HAA2G;AAC3G,qGAAqF;AACrF,sFAAsE;AACtE,kFAAkE;AAClE,6EAA6D;AAC7D,+EAA+D"}
@@ -0,0 +1,40 @@
1
+ import { RequestOptionsFactory } from '@wix/sdk-types';
2
+ import { GetAttendanceRequest, GetAttendanceResponse, QueryAttendanceRequest, QueryAttendanceResponse, SetAttendanceRequest, SetAttendanceResponse } from './bookings-v2-attendance.types';
3
+ /** Get an Attendance by attendance id. */
4
+ export declare function getAttendance(payload: GetAttendanceRequest): RequestOptionsFactory<GetAttendanceResponse>;
5
+ /**
6
+ * Create an Attendance or Update the status/numberOfAttendees in an existing Attendance of a given booking.
7
+ * It is not allowed to set the Attendance's status as NOT_SET. In such case a proper error will be thrown.
8
+ * The number of attendees can be greater than 1 when the booking is made for a group of people.
9
+ *
10
+ * *Notes:**
11
+ * + Pass the latest `revision` for a successful update.
12
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
13
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
14
+ */
15
+ export declare function setAttendance(payload: SetAttendanceRequest): RequestOptionsFactory<SetAttendanceResponse>;
16
+ /**
17
+ * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
18
+ *
19
+ * Up to 100 bookings can be returned per request.
20
+ *
21
+ * Query Attendance runs with the following defaults, which you can override:
22
+ *
23
+ * - `id` sorted in `ASC` order
24
+ * - `cursorPaging.limit` is `50`
25
+ *
26
+ * For field support see
27
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
28
+ * for more information.
29
+ * __Note__: `fields` and `fieldsets` aren't supported.
30
+ *
31
+ *
32
+ * You can only specify a filter only once per query. If a filter is provided
33
+ * more than once, only the first occurrence affects the returned bookings.
34
+ *
35
+ * To learn about working with _Query_ endpoints, see
36
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
37
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
38
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
39
+ */
40
+ export declare function queryAttendance(payload: QueryAttendanceRequest): RequestOptionsFactory<QueryAttendanceResponse>;
@@ -0,0 +1,166 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.queryAttendance = exports.setAttendance = exports.getAttendance = void 0;
4
+ const metro_runtime_1 = require("@wix/metro-runtime");
5
+ const ambassador_1 = require("@wix/metro-runtime/ambassador");
6
+ const metro_runtime_2 = require("@wix/metro-runtime");
7
+ const _getAttendanceRequest = {};
8
+ const _getAttendanceResponse = {};
9
+ const _queryAttendanceRequest = {};
10
+ const _queryAttendanceResponse = {};
11
+ const _setAttendanceRequest = {};
12
+ const _setAttendanceResponse = {};
13
+ function resolveComWixpressBookingsAttendanceV2AttendanceServiceUrl(opts) {
14
+ const domainToMappings = {
15
+ 'manage._base_domain_': [
16
+ {
17
+ srcPath: '/_api/bookings-attendance',
18
+ destPath: '',
19
+ },
20
+ ],
21
+ 'www.wixapis.com': [
22
+ {
23
+ srcPath: '/v2/bookings/',
24
+ destPath: '',
25
+ },
26
+ {
27
+ srcPath: '/_api/bookings-attendance',
28
+ destPath: '',
29
+ },
30
+ {
31
+ srcPath: '/bookings/bookings-attendance',
32
+ destPath: '',
33
+ },
34
+ ],
35
+ 'www._base_domain_': [
36
+ {
37
+ srcPath: '/_api/bookings-attendance',
38
+ destPath: '',
39
+ },
40
+ ],
41
+ '*.dev.wix-code.com': [
42
+ {
43
+ srcPath: '/_api/bookings-attendance',
44
+ destPath: '',
45
+ },
46
+ ],
47
+ _: [
48
+ {
49
+ srcPath: '/bookings-attendance',
50
+ destPath: '',
51
+ },
52
+ ],
53
+ 'editor.wixapps.net': [
54
+ {
55
+ srcPath: '/_api/bookings-attendance',
56
+ destPath: '',
57
+ },
58
+ ],
59
+ };
60
+ return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
61
+ }
62
+ /** Get an Attendance by attendance id. */
63
+ function getAttendance(payload) {
64
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getAttendanceRequest, {});
65
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getAttendanceResponse, {});
66
+ function __getAttendance({ host }) {
67
+ const serializedData = toReq(payload);
68
+ const metadata = {
69
+ entityFqdn: 'wix.bookings.v2.attendance',
70
+ method: 'GET',
71
+ methodFqn: 'com.wixpress.bookings.attendance.v2.AttendanceService.GetAttendance',
72
+ url: resolveComWixpressBookingsAttendanceV2AttendanceServiceUrl({
73
+ protoPath: '/v2/attendance/{attendanceId}',
74
+ data: serializedData,
75
+ host,
76
+ }),
77
+ params: (0, metro_runtime_1.toURLSearchParams)(serializedData),
78
+ transformResponse: fromRes,
79
+ };
80
+ return metadata;
81
+ }
82
+ __getAttendance.fromReq = fromReq;
83
+ return __getAttendance;
84
+ }
85
+ exports.getAttendance = getAttendance;
86
+ /**
87
+ * Create an Attendance or Update the status/numberOfAttendees in an existing Attendance of a given booking.
88
+ * It is not allowed to set the Attendance's status as NOT_SET. In such case a proper error will be thrown.
89
+ * The number of attendees can be greater than 1 when the booking is made for a group of people.
90
+ *
91
+ * *Notes:**
92
+ * + Pass the latest `revision` for a successful update.
93
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
94
+ * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
95
+ */
96
+ function setAttendance(payload) {
97
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_setAttendanceRequest, {});
98
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_setAttendanceResponse, {});
99
+ function __setAttendance({ host }) {
100
+ const serializedData = toReq(payload);
101
+ const metadata = {
102
+ entityFqdn: 'wix.bookings.v2.attendance',
103
+ method: 'POST',
104
+ methodFqn: 'com.wixpress.bookings.attendance.v2.AttendanceService.SetAttendance',
105
+ url: resolveComWixpressBookingsAttendanceV2AttendanceServiceUrl({
106
+ protoPath: '/v2/attendance/set',
107
+ data: serializedData,
108
+ host,
109
+ }),
110
+ data: serializedData,
111
+ transformResponse: fromRes,
112
+ };
113
+ return metadata;
114
+ }
115
+ __setAttendance.fromReq = fromReq;
116
+ return __setAttendance;
117
+ }
118
+ exports.setAttendance = setAttendance;
119
+ /**
120
+ * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
121
+ *
122
+ * Up to 100 bookings can be returned per request.
123
+ *
124
+ * Query Attendance runs with the following defaults, which you can override:
125
+ *
126
+ * - `id` sorted in `ASC` order
127
+ * - `cursorPaging.limit` is `50`
128
+ *
129
+ * For field support see
130
+ * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
131
+ * for more information.
132
+ * __Note__: `fields` and `fieldsets` aren't supported.
133
+ *
134
+ *
135
+ * You can only specify a filter only once per query. If a filter is provided
136
+ * more than once, only the first occurrence affects the returned bookings.
137
+ *
138
+ * To learn about working with _Query_ endpoints, see
139
+ * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
140
+ * [Sorting and Paging](https://dev.wix.com/api/rest/getting-started/sorting-and-paging),
141
+ * and [Field Projection](https://dev.wix.com/api/rest/getting-started/field-projection).
142
+ */
143
+ function queryAttendance(payload) {
144
+ const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_queryAttendanceRequest, {});
145
+ const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_queryAttendanceResponse, {});
146
+ function __queryAttendance({ host }) {
147
+ const serializedData = toReq(payload);
148
+ const metadata = {
149
+ entityFqdn: 'wix.bookings.v2.attendance',
150
+ method: 'POST',
151
+ methodFqn: 'com.wixpress.bookings.attendance.v2.AttendanceService.QueryAttendance',
152
+ url: resolveComWixpressBookingsAttendanceV2AttendanceServiceUrl({
153
+ protoPath: '/v2/attendance/query',
154
+ data: serializedData,
155
+ host,
156
+ }),
157
+ data: serializedData,
158
+ transformResponse: fromRes,
159
+ };
160
+ return metadata;
161
+ }
162
+ __queryAttendance.fromReq = fromReq;
163
+ return __queryAttendance;
164
+ }
165
+ exports.queryAttendance = queryAttendance;
166
+ //# sourceMappingURL=bookings-v2-attendance.http.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-attendance.http.js","sourceRoot":"","sources":["../../../src/bookings-v2-attendance.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,8DAA2D;AAC3D,sDAAgD;AAYhD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AACpC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,SAAS,0DAA0D,CACjE,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,eAAe;gBACxB,QAAQ,EAAE,EAAE;aACb;YACD;gBAC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AC,CAAC;IAEvE,SAAS,iBAAiB,CAAC,EAAE,IAAI,EAAO;QACtC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,4BAA4B;YACxC,MAAM,EAAE,MAAa;YACrB,SAAS,EACP,uEAAuE;YACzE,GAAG,EAAE,0DAA0D,CAAC;gBAC9D,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,iBAAiB,CAAC,OAAO,GAAG,OAAO,CAAC;IAEpC,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AA/BD,0CA+BC"}
@@ -0,0 +1,10 @@
1
+ import { HttpClient } from '@wix/sdk-types';
2
+ import { Attendance } from './bookings-v2-attendance.universal';
3
+ export declare const __metadata: {
4
+ PACKAGE_NAME: string;
5
+ };
6
+ export declare function getAttendance(httpClient: HttpClient): (attendanceId: string) => Promise<Attendance>;
7
+ export declare function setAttendance(httpClient: HttpClient): (attendance: Attendance) => Promise<import("./bookings-v2-attendance.universal").SetAttendanceResponse>;
8
+ export declare function queryAttendance(httpClient: HttpClient): () => import("./bookings-v2-attendance.universal").AttendancesQueryBuilder;
9
+ export { AttendanceStatus, SortOrder, } from './bookings-v2-attendance.universal';
10
+ export { Attendance, GetAttendanceRequest, GetAttendanceResponse, SetAttendanceRequest, SetAttendanceResponse, QueryAttendanceRequest, QueryV2, QueryV2PagingMethodOneOf, Sorting, Paging, CursorPaging, QueryAttendanceResponse, CursorPagingMetadata, Cursors, AttendancesQueryResult, AttendancesQueryBuilder, } from './bookings-v2-attendance.universal';
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.AttendanceStatus = exports.queryAttendance = exports.setAttendance = exports.getAttendance = exports.__metadata = void 0;
4
+ const bookings_v2_attendance_universal_1 = require("./bookings-v2-attendance.universal");
5
+ exports.__metadata = { PACKAGE_NAME: '@wix/bookings' };
6
+ function getAttendance(httpClient) {
7
+ return (attendanceId) => (0, bookings_v2_attendance_universal_1.getAttendance)(attendanceId,
8
+ // @ts-ignore
9
+ { httpClient });
10
+ }
11
+ exports.getAttendance = getAttendance;
12
+ function setAttendance(httpClient) {
13
+ return (attendance) => (0, bookings_v2_attendance_universal_1.setAttendance)(attendance,
14
+ // @ts-ignore
15
+ { httpClient });
16
+ }
17
+ exports.setAttendance = setAttendance;
18
+ function queryAttendance(httpClient) {
19
+ return () => (0, bookings_v2_attendance_universal_1.queryAttendance)(
20
+ // @ts-ignore
21
+ { httpClient });
22
+ }
23
+ exports.queryAttendance = queryAttendance;
24
+ var bookings_v2_attendance_universal_2 = require("./bookings-v2-attendance.universal");
25
+ Object.defineProperty(exports, "AttendanceStatus", { enumerable: true, get: function () { return bookings_v2_attendance_universal_2.AttendanceStatus; } });
26
+ Object.defineProperty(exports, "SortOrder", { enumerable: true, get: function () { return bookings_v2_attendance_universal_2.SortOrder; } });
27
+ //# sourceMappingURL=bookings-v2-attendance.public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-attendance.public.js","sourceRoot":"","sources":["../../../src/bookings-v2-attendance.public.ts"],"names":[],"mappings":";;;AACA,yFAK4C;AAE/B,QAAA,UAAU,GAAG,EAAE,YAAY,EAAE,eAAe,EAAE,CAAC;AAE5D,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,YAAoB,EAAE,EAAE,CAC9B,IAAA,gDAAsB,EACpB,YAAY;IACZ,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sCAOC;AAED,SAAgB,aAAa,CAAC,UAAsB;IAClD,OAAO,CAAC,UAAsB,EAAE,EAAE,CAChC,IAAA,gDAAsB,EACpB,UAAU;IACV,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAPD,sCAOC;AAED,SAAgB,eAAe,CAAC,UAAsB;IACpD,OAAO,GAAG,EAAE,CACV,IAAA,kDAAwB;IACtB,aAAa;IACb,EAAE,UAAU,EAAE,CACf,CAAC;AACN,CAAC;AAND,0CAMC;AAED,uFAG4C;AAF1C,oIAAA,gBAAgB,OAAA;AAChB,6HAAA,SAAS,OAAA"}
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Attendance is the main entity of AttendanceService.
3
+ * It contains the attendance information for a given booking in a given session.
4
+ */
5
+ export interface Attendance {
6
+ /**
7
+ * ID of the attendance object.
8
+ * @readonly
9
+ */
10
+ id?: string | null;
11
+ /** Booking ID. */
12
+ bookingId?: string | null;
13
+ /** Session ID. */
14
+ sessionId?: string | null;
15
+ /**
16
+ * Whether the booked contact attended the session, might be one of the following:
17
+ *
18
+ * + `NOT_SET`: There is no available attendance information.
19
+ * + `ATTENDED`: At least a single participant has attended the session.
20
+ * + `NOT_ATTENDED`: No participant has attended the session.
21
+ */
22
+ status?: AttendanceStatus;
23
+ /** Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants. */
24
+ numberOfAttendees?: number;
25
+ }
26
+ export declare enum AttendanceStatus {
27
+ NOT_SET = "NOT_SET",
28
+ ATTENDED = "ATTENDED",
29
+ NOT_ATTENDED = "NOT_ATTENDED"
30
+ }
31
+ export interface GetAttendanceRequest {
32
+ /** Id of the Attendance to retrieve. */
33
+ attendanceId: string;
34
+ }
35
+ export interface GetAttendanceResponse {
36
+ /** The retrieved Attendance. */
37
+ attendance?: Attendance;
38
+ }
39
+ export interface SetAttendanceRequest {
40
+ /** Attendance to create or updated. */
41
+ attendance: Attendance;
42
+ }
43
+ export interface SetAttendanceResponse {
44
+ /** The updated Attendance. */
45
+ attendance?: Attendance;
46
+ }
47
+ export interface QueryAttendanceRequest {
48
+ /** WQL expression. */
49
+ query: QueryV2;
50
+ }
51
+ export interface QueryV2 extends QueryV2PagingMethodOneOf {
52
+ cursorPaging?: CursorPaging;
53
+ filter?: Record<string, any> | null;
54
+ sort?: Sorting[];
55
+ fields?: string[];
56
+ }
57
+ /** @oneof */
58
+ export interface QueryV2PagingMethodOneOf {
59
+ cursorPaging?: CursorPaging;
60
+ }
61
+ export interface Sorting {
62
+ /** Name of the field to sort by. */
63
+ fieldName?: string;
64
+ /** Sort order. */
65
+ order?: SortOrder;
66
+ }
67
+ export declare enum SortOrder {
68
+ ASC = "ASC",
69
+ DESC = "DESC"
70
+ }
71
+ export interface Paging {
72
+ /** Number of items to load. */
73
+ limit?: number | null;
74
+ /** Number of items to skip in the current sort order. */
75
+ offset?: number | null;
76
+ }
77
+ export interface CursorPaging {
78
+ /**
79
+ * Number of attendances to return.
80
+ * Defaults to `50`. Maximum `1000`.
81
+ */
82
+ limit?: number | null;
83
+ /**
84
+ * Pointer to the next or previous page in the list of results.
85
+ * You can get the relevant cursor token
86
+ * from the `pagingMetadata` object in the previous call's response.
87
+ * Not relevant for the first request.
88
+ */
89
+ cursor?: string | null;
90
+ }
91
+ export interface QueryAttendanceResponse {
92
+ /** The retrieved Attendances. */
93
+ attendances?: Attendance[];
94
+ /** Paging Metadata. Cursor pagination is supported. */
95
+ pagingMetadata?: CursorPagingMetadata;
96
+ }
97
+ export interface CursorPagingMetadata {
98
+ /** 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). */
99
+ cursors?: Cursors;
100
+ /**
101
+ * Indicates if there are more results after the current page.
102
+ * If `true`, another page of results can be retrieved.
103
+ * If `false`, this is the last page.
104
+ */
105
+ hasNext?: boolean | null;
106
+ }
107
+ export interface Cursors {
108
+ /** Cursor pointing to next page in the list of results. */
109
+ next?: string | null;
110
+ /** Cursor pointing to previous page in the list of results. */
111
+ prev?: string | null;
112
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortOrder = exports.AttendanceStatus = void 0;
4
+ var AttendanceStatus;
5
+ (function (AttendanceStatus) {
6
+ AttendanceStatus["NOT_SET"] = "NOT_SET";
7
+ AttendanceStatus["ATTENDED"] = "ATTENDED";
8
+ AttendanceStatus["NOT_ATTENDED"] = "NOT_ATTENDED";
9
+ })(AttendanceStatus = exports.AttendanceStatus || (exports.AttendanceStatus = {}));
10
+ var SortOrder;
11
+ (function (SortOrder) {
12
+ SortOrder["ASC"] = "ASC";
13
+ SortOrder["DESC"] = "DESC";
14
+ })(SortOrder = exports.SortOrder || (exports.SortOrder = {}));
15
+ //# sourceMappingURL=bookings-v2-attendance.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bookings-v2-attendance.types.js","sourceRoot":"","sources":["../../../src/bookings-v2-attendance.types.ts"],"names":[],"mappings":";;;AA0BA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iDAA6B,CAAA;AAC/B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AA8CD,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}