@wix/bookings 1.0.148 → 1.0.150

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.
@@ -1,38 +1,49 @@
1
1
  import { RequestOptionsFactory } from '@wix/sdk-types';
2
2
  import { GetAttendanceRequest, GetAttendanceResponse, QueryAttendanceRequest, QueryAttendanceResponse, SetAttendanceRequest, SetAttendanceResponse } from './bookings-v2-attendance.types';
3
- /** Get an Attendance by attendance id. */
3
+ /** Retrieves attendance information by ID. */
4
4
  export declare function getAttendance(payload: GetAttendanceRequest): RequestOptionsFactory<GetAttendanceResponse>;
5
5
  /**
6
- * Create an Attendance or Update the status and numberOfAttendees in an existing Attendance of a given booking.
7
- * If the Attendance to set has no numberOfAttendees, it will get the default value of 1.
8
- * The number of attendees can be greater than 1 when the booking is made for a group of people.
6
+ * Sets information about whether a booking's session was attended. This information
7
+ * is saved in an `attendance` object.
9
8
  *
10
- * __Notes:__
11
- * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
12
- * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
9
+ *
10
+ * If attendance was already set, meaning the `attendance` object already exists, the
11
+ * existing attendance information is updated. Otherwise, a new `attendance` object
12
+ * is created.
13
+ *
14
+ * By default, the number
15
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
16
+ * participants attend. Do not set to `0` to indicate that no one attended the session.
17
+ * Instead, set the `status` field to `NOT_ATTENDED`.
18
+ *
19
+ * > __Note:__ Make sure your code validates that:
20
+ * > + There is no mismatch between `numberOfAttendees` and `attendanceStatus` to make sure, for example, that `attendanceStatus` is not `NOT_ATTENDED` while `numberOfAttendees` is `5`.
21
+ * > + The attendance's `numberOfAttendees` and the booking's `numberOfParticipants` correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).
13
22
  */
14
23
  export declare function setAttendance(payload: SetAttendanceRequest): RequestOptionsFactory<SetAttendanceResponse>;
15
24
  /**
16
- * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
25
+ * Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.
26
+ *
17
27
  *
18
- * Up to 100 bookings can be returned per request.
28
+ * When querying attendance information, you can query from the perspective of:
29
+ * + **A booking.** Specify a booking ID to retrieve attendance information for all sessions related to that booking.
30
+ * + **A session.** Specify a session ID to retrieve attendance information for all bookings related to that session.
31
+ *
32
+ * For example, query by a course's `bookingId` and `status = "NOT_ATTENDED"` to retrieve course sessions for that booking that
33
+ * had no attendees. Was there bad weather on those days? Or was
34
+ * there a sudden drop in attendance due to a business reason that must be handled, like a less-qualified instructor?
19
35
  *
20
36
  * Query Attendance runs with the following defaults, which you can override:
21
37
  *
22
38
  * - `id` sorted in `ASC` order
23
39
  * - `cursorPaging.limit` is `50`
24
40
  *
25
- * For field support see
26
- * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
27
- * for more information.
28
- *
29
- * __Notes__:
30
- * + An alternative way to obtain attendance information for bookings can be done by calling BookingsReader [queryExtendedBookings] (https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` parameter set to true.
31
- * + `fields` and `fieldsets` aren't supported.
32
- *
41
+ * For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters).
33
42
  *
34
- * You can only specify a filter only once per query. If a filter is provided
35
- * more than once, only the first occurrence affects the returned bookings.
43
+ * > __Notes__:
44
+ * > + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` set to `true`.
45
+ * > + Up to 100 results can be returned per request.
46
+ * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
36
47
  *
37
48
  * To learn about working with _Query_ endpoints, see
38
49
  * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
@@ -63,7 +63,7 @@ function resolveComWixpressBookingsAttendanceV2AttendanceServiceUrl(opts) {
63
63
  };
64
64
  return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
65
65
  }
66
- /** Get an Attendance by attendance id. */
66
+ /** Retrieves attendance information by ID. */
67
67
  function getAttendance(payload) {
68
68
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getAttendanceRequest, {});
69
69
  const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getAttendanceResponse, {});
@@ -88,13 +88,22 @@ function getAttendance(payload) {
88
88
  }
89
89
  exports.getAttendance = getAttendance;
90
90
  /**
91
- * Create an Attendance or Update the status and numberOfAttendees in an existing Attendance of a given booking.
92
- * If the Attendance to set has no numberOfAttendees, it will get the default value of 1.
93
- * The number of attendees can be greater than 1 when the booking is made for a group of people.
91
+ * Sets information about whether a booking's session was attended. This information
92
+ * is saved in an `attendance` object.
94
93
  *
95
- * __Notes:__
96
- * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and `attendanceStatus`.
97
- * + There is no validation on the number of attendees or on the relationship between `numberOfAttendees` and the booking's `numberOfParticipants`.
94
+ *
95
+ * If attendance was already set, meaning the `attendance` object already exists, the
96
+ * existing attendance information is updated. Otherwise, a new `attendance` object
97
+ * is created.
98
+ *
99
+ * By default, the number
100
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
101
+ * participants attend. Do not set to `0` to indicate that no one attended the session.
102
+ * Instead, set the `status` field to `NOT_ATTENDED`.
103
+ *
104
+ * > __Note:__ Make sure your code validates that:
105
+ * > + There is no mismatch between `numberOfAttendees` and `attendanceStatus` to make sure, for example, that `attendanceStatus` is not `NOT_ATTENDED` while `numberOfAttendees` is `5`.
106
+ * > + The attendance's `numberOfAttendees` and the booking's `numberOfParticipants` correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).
98
107
  */
99
108
  function setAttendance(payload) {
100
109
  const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_setAttendanceRequest, {});
@@ -120,26 +129,28 @@ function setAttendance(payload) {
120
129
  }
121
130
  exports.setAttendance = setAttendance;
122
131
  /**
123
- * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
132
+ * Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.
133
+ *
124
134
  *
125
- * Up to 100 bookings can be returned per request.
135
+ * When querying attendance information, you can query from the perspective of:
136
+ * + **A booking.** Specify a booking ID to retrieve attendance information for all sessions related to that booking.
137
+ * + **A session.** Specify a session ID to retrieve attendance information for all bookings related to that session.
138
+ *
139
+ * For example, query by a course's `bookingId` and `status = "NOT_ATTENDED"` to retrieve course sessions for that booking that
140
+ * had no attendees. Was there bad weather on those days? Or was
141
+ * there a sudden drop in attendance due to a business reason that must be handled, like a less-qualified instructor?
126
142
  *
127
143
  * Query Attendance runs with the following defaults, which you can override:
128
144
  *
129
145
  * - `id` sorted in `ASC` order
130
146
  * - `cursorPaging.limit` is `50`
131
147
  *
132
- * For field support see
133
- * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
134
- * for more information.
135
- *
136
- * __Notes__:
137
- * + An alternative way to obtain attendance information for bookings can be done by calling BookingsReader [queryExtendedBookings] (https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` parameter set to true.
138
- * + `fields` and `fieldsets` aren't supported.
139
- *
148
+ * For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters).
140
149
  *
141
- * You can only specify a filter only once per query. If a filter is provided
142
- * more than once, only the first occurrence affects the returned bookings.
150
+ * > __Notes__:
151
+ * > + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` set to `true`.
152
+ * > + Up to 100 results can be returned per request.
153
+ * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
143
154
  *
144
155
  * To learn about working with _Query_ endpoints, see
145
156
  * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),
@@ -1 +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;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,oBAAoB,EAAE;YACpB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,+BAA+B;gBACxC,QAAQ,EAAE,gBAAgB;aAC3B;YACD;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EA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BAAiB,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"}
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;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,EAAE;aACb;SACF;QACD,oBAAoB,EAAE;YACpB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,+BAA+B;gBACxC,QAAQ,EAAE,gBAAgB;aAC3B;YACD;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,2BAA2B;gBACpC,QAAQ,EAAE,gBAAgB;aAC3B;SACF;QACD,CAAC,EAAE;YACD;gBACE,OAAO,EAAE,sBAAsB;gBAC/B,QAAQ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AAE,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"}
@@ -1,26 +1,34 @@
1
1
  /**
2
- * Attendance is the main entity of AttendanceService.
3
- * It contains the attendance information for a given booking in a given session.
2
+ * The `attendance` object is the main entity of Attendance.
3
+ * This object contains the attendance information for a booked session, such as if anyone attended the session and if so, how many.
4
4
  */
5
5
  export interface Attendance {
6
6
  /**
7
- * ID of the attendance object.
7
+ * ID of the `attendance` object.
8
8
  * @readonly
9
9
  */
10
10
  id?: string | null;
11
- /** Booking ID. */
11
+ /** Corresponding booking ID. */
12
12
  bookingId?: string | null;
13
- /** Session ID. */
13
+ /** Corresponding session ID. */
14
14
  sessionId?: string | null;
15
15
  /**
16
- * Whether the booked contact attended the session, might be one of the following:
16
+ * Status indicating if any particpants attended the session:
17
17
  *
18
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.
19
+ * + `ATTENDED`: At least a single participant attended the session.
20
+ * + `NOT_ATTENDED`: No participants attended the session.
21
21
  */
22
22
  status?: AttendanceStatus;
23
- /** Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants. */
23
+ /**
24
+ * Total number of participants that attended the session. By default, the number
25
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
26
+ * participants attend.
27
+ *
28
+ * Do not set to `0` to indicate that no one attended the session. Instead, set the `status` field to `NOT_ATTENDED`.
29
+ *
30
+ * Default: 1
31
+ */
24
32
  numberOfAttendees?: number;
25
33
  }
26
34
  export declare enum AttendanceStatus {
@@ -29,33 +37,49 @@ export declare enum AttendanceStatus {
29
37
  NOT_ATTENDED = "NOT_ATTENDED"
30
38
  }
31
39
  export interface GetAttendanceRequest {
32
- /** Id of the Attendance to retrieve. */
40
+ /** ID of the object that contains the attendance information that you want to retrieve. */
33
41
  attendanceId: string;
34
42
  }
35
43
  export interface GetAttendanceResponse {
36
- /** The retrieved Attendance. */
44
+ /** The retrieved attendance information for the booked session. */
37
45
  attendance?: Attendance;
38
46
  }
39
47
  export interface SetAttendanceRequest {
40
- /** Attendance to create or updated. */
48
+ /** The attendance information for a booked session that you want to create or update. */
41
49
  attendance: Attendance;
42
50
  }
43
51
  export interface SetAttendanceResponse {
44
- /** The updated Attendance. */
52
+ /** The created or updated attendance information for the booked session. */
45
53
  attendance?: Attendance;
46
54
  }
47
55
  export interface QueryAttendanceRequest {
48
- /** WQL expression. */
56
+ /** Query options. */
49
57
  query: QueryV2;
50
58
  }
51
59
  export interface QueryV2 extends QueryV2PagingMethodOneOf {
60
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
52
61
  cursorPaging?: CursorPaging;
62
+ /**
63
+ * Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
64
+ *
65
+ * For a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
66
+ *
67
+ * Max: 1 filter
68
+ */
53
69
  filter?: Record<string, any> | null;
70
+ /**
71
+ * Sort object in the following format:
72
+ * `[ {"fieldName":"sortField1","order":"ASC"}, {"fieldName":"sortField2","order":"DESC"} ]`
73
+ *
74
+ * For details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
75
+ */
54
76
  sort?: Sorting[];
77
+ /** Array of projected fields. A list of specific field names to return. */
55
78
  fields?: string[];
56
79
  }
57
80
  /** @oneof */
58
81
  export interface QueryV2PagingMethodOneOf {
82
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
59
83
  cursorPaging?: CursorPaging;
60
84
  }
61
85
  export interface Sorting {
@@ -64,6 +88,11 @@ export interface Sorting {
64
88
  /** Sort order. */
65
89
  order?: SortOrder;
66
90
  }
91
+ /**
92
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
93
+ *
94
+ * Default: `ASC`.
95
+ */
67
96
  export declare enum SortOrder {
68
97
  ASC = "ASC",
69
98
  DESC = "DESC"
@@ -76,26 +105,32 @@ export interface Paging {
76
105
  }
77
106
  export interface CursorPaging {
78
107
  /**
79
- * Number of attendances to return.
80
- * Defaults to `50`. Maximum `1000`.
108
+ * Number of `attendance` objects to return.
109
+ *
110
+ * Default: `50`
111
+ * Maximum: `1000`
81
112
  */
82
113
  limit?: number | null;
83
114
  /**
84
115
  * Pointer to the next or previous page in the list of results.
116
+ *
85
117
  * You can get the relevant cursor token
86
118
  * from the `pagingMetadata` object in the previous call's response.
119
+ *
87
120
  * Not relevant for the first request.
88
121
  */
89
122
  cursor?: string | null;
90
123
  }
124
+ /** List of objects that contain attendance information. */
91
125
  export interface QueryAttendanceResponse {
92
- /** The retrieved Attendances. */
126
+ /** List of objects that contain attendance information for a booked session. */
93
127
  attendances?: Attendance[];
94
- /** Paging Metadata. Cursor pagination is supported. */
128
+ /** Details on the paged set of results returned. */
95
129
  pagingMetadata?: CursorPagingMetadata;
96
130
  }
131
+ /** This is the preferred message for cursor-paging enabled services */
97
132
  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). */
133
+ /** Use these cursors 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
134
  cursors?: Cursors;
100
135
  /**
101
136
  * Indicates if there are more results after the current page.
@@ -7,6 +7,11 @@ var AttendanceStatus;
7
7
  AttendanceStatus["ATTENDED"] = "ATTENDED";
8
8
  AttendanceStatus["NOT_ATTENDED"] = "NOT_ATTENDED";
9
9
  })(AttendanceStatus = exports.AttendanceStatus || (exports.AttendanceStatus = {}));
10
+ /**
11
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
12
+ *
13
+ * Default: `ASC`.
14
+ */
10
15
  var SortOrder;
11
16
  (function (SortOrder) {
12
17
  SortOrder["ASC"] = "ASC";
@@ -1 +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"}
1
+ {"version":3,"file":"bookings-v2-attendance.types.js","sourceRoot":"","sources":["../../../src/bookings-v2-attendance.types.ts"],"names":[],"mappings":";;;AAkCA,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,iDAA6B,CAAA;AAC/B,CAAC,EAJW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAI3B;AA8DD;;;;GAIG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,0BAAa,CAAA;AACf,CAAC,EAHW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAGpB"}
@@ -5,28 +5,36 @@ export declare const __debug: {
5
5
  };
6
6
  };
7
7
  /**
8
- * Attendance is the main entity of AttendanceService.
9
- * It contains the attendance information for a given booking in a given session.
8
+ * The `attendance` object is the main entity of Attendance.
9
+ * This object contains the attendance information for a booked session, such as if anyone attended the session and if so, how many.
10
10
  */
11
11
  export interface Attendance {
12
12
  /**
13
- * ID of the attendance object.
13
+ * ID of the `attendance` object.
14
14
  * @readonly
15
15
  */
16
16
  _id?: string | null;
17
- /** Booking ID. */
17
+ /** Corresponding booking ID. */
18
18
  bookingId?: string | null;
19
- /** Session ID. */
19
+ /** Corresponding session ID. */
20
20
  sessionId?: string | null;
21
21
  /**
22
- * Whether the booked contact attended the session, might be one of the following:
22
+ * Status indicating if any particpants attended the session:
23
23
  *
24
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.
25
+ * + `ATTENDED`: At least a single participant attended the session.
26
+ * + `NOT_ATTENDED`: No participants attended the session.
27
27
  */
28
28
  status?: AttendanceStatus;
29
- /** Total number of participants who have that attended the session. Can be greater than `1` for bookings with multiple participants. */
29
+ /**
30
+ * Total number of participants that attended the session. By default, the number
31
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
32
+ * participants attend.
33
+ *
34
+ * Do not set to `0` to indicate that no one attended the session. Instead, set the `status` field to `NOT_ATTENDED`.
35
+ *
36
+ * Default: 1
37
+ */
30
38
  numberOfAttendees?: number;
31
39
  }
32
40
  export declare enum AttendanceStatus {
@@ -35,33 +43,49 @@ export declare enum AttendanceStatus {
35
43
  NOT_ATTENDED = "NOT_ATTENDED"
36
44
  }
37
45
  export interface GetAttendanceRequest {
38
- /** Id of the Attendance to retrieve. */
46
+ /** ID of the object that contains the attendance information that you want to retrieve. */
39
47
  attendanceId: string;
40
48
  }
41
49
  export interface GetAttendanceResponse {
42
- /** The retrieved Attendance. */
50
+ /** The retrieved attendance information for the booked session. */
43
51
  attendance?: Attendance;
44
52
  }
45
53
  export interface SetAttendanceRequest {
46
- /** Attendance to create or updated. */
54
+ /** The attendance information for a booked session that you want to create or update. */
47
55
  attendance: Attendance;
48
56
  }
49
57
  export interface SetAttendanceResponse {
50
- /** The updated Attendance. */
58
+ /** The created or updated attendance information for the booked session. */
51
59
  attendance?: Attendance;
52
60
  }
53
61
  export interface QueryAttendanceRequest {
54
- /** WQL expression. */
62
+ /** Query options. */
55
63
  query: QueryV2;
56
64
  }
57
65
  export interface QueryV2 extends QueryV2PagingMethodOneOf {
66
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
58
67
  cursorPaging?: CursorPaging;
68
+ /**
69
+ * Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
70
+ *
71
+ * For a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
72
+ *
73
+ * Max: 1 filter
74
+ */
59
75
  filter?: Record<string, any> | null;
76
+ /**
77
+ * Sort object in the following format:
78
+ * `[ {"fieldName":"sortField1","order":"ASC"}, {"fieldName":"sortField2","order":"DESC"} ]`
79
+ *
80
+ * For details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
81
+ */
60
82
  sort?: Sorting[];
83
+ /** Array of projected fields. A list of specific field names to return. */
61
84
  fields?: string[];
62
85
  }
63
86
  /** @oneof */
64
87
  export interface QueryV2PagingMethodOneOf {
88
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
65
89
  cursorPaging?: CursorPaging;
66
90
  }
67
91
  export interface Sorting {
@@ -70,6 +94,11 @@ export interface Sorting {
70
94
  /** Sort order. */
71
95
  order?: SortOrder;
72
96
  }
97
+ /**
98
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
99
+ *
100
+ * Default: `ASC`.
101
+ */
73
102
  export declare enum SortOrder {
74
103
  ASC = "ASC",
75
104
  DESC = "DESC"
@@ -82,26 +111,32 @@ export interface Paging {
82
111
  }
83
112
  export interface CursorPaging {
84
113
  /**
85
- * Number of attendances to return.
86
- * Defaults to `50`. Maximum `1000`.
114
+ * Number of `attendance` objects to return.
115
+ *
116
+ * Default: `50`
117
+ * Maximum: `1000`
87
118
  */
88
119
  limit?: number | null;
89
120
  /**
90
121
  * Pointer to the next or previous page in the list of results.
122
+ *
91
123
  * You can get the relevant cursor token
92
124
  * from the `pagingMetadata` object in the previous call's response.
125
+ *
93
126
  * Not relevant for the first request.
94
127
  */
95
128
  cursor?: string | null;
96
129
  }
130
+ /** List of objects that contain attendance information. */
97
131
  export interface QueryAttendanceResponse {
98
- /** The retrieved Attendances. */
132
+ /** List of objects that contain attendance information for a booked session. */
99
133
  attendances?: Attendance[];
100
- /** Paging Metadata. Cursor pagination is supported. */
134
+ /** Details on the paged set of results returned. */
101
135
  pagingMetadata?: CursorPagingMetadata;
102
136
  }
137
+ /** This is the preferred message for cursor-paging enabled services */
103
138
  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). */
139
+ /** Use these cursors 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
140
  cursors?: Cursors;
106
141
  /**
107
142
  * Indicates if there are more results after the current page.
@@ -117,24 +152,33 @@ export interface Cursors {
117
152
  prev?: string | null;
118
153
  }
119
154
  /**
120
- * Get an Attendance by attendance id.
121
- * @param attendanceId - Id of the Attendance to retrieve.
155
+ * Retrieves attendance information by ID.
156
+ * @param attendanceId - ID of the object that contains the attendance information that you want to retrieve.
122
157
  * @public
123
158
  * @documentationMaturity preview
124
159
  * @requiredField attendanceId
125
160
  * @permissionScope Read Bookings - Including Participants
126
- * @returns The retrieved Attendance.
161
+ * @returns The retrieved attendance information for the booked session.
127
162
  */
128
163
  export declare function getAttendance(attendanceId: string): Promise<Attendance>;
129
164
  /**
130
- * Create an Attendance or Update the status and numberOfAttendees in an existing Attendance of a given booking.
131
- * If the Attendance to set has no numberOfAttendees, it will get the default value of 1.
132
- * The number of attendees can be greater than 1 when the booking is made for a group of people.
165
+ * Sets information about whether a booking's session was attended. This information
166
+ * is saved in an `attendance` object.
167
+ *
133
168
  *
134
- * __Notes:__
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.
169
+ * If attendance was already set, meaning the `attendance` object already exists, the
170
+ * existing attendance information is updated. Otherwise, a new `attendance` object
171
+ * is created.
172
+ *
173
+ * By default, the number
174
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
175
+ * participants attend. Do not set to `0` to indicate that no one attended the session.
176
+ * Instead, set the `status` field to `NOT_ATTENDED`.
177
+ *
178
+ * > __Note:__ Make sure your code validates that:
179
+ * > + There is no mismatch between `numberOfAttendees` and `attendanceStatus` to make sure, for example, that `attendanceStatus` is not `NOT_ATTENDED` while `numberOfAttendees` is `5`.
180
+ * > + The attendance's `numberOfAttendees` and the booking's `numberOfParticipants` correspond. For example, the number of attendees usually should not exceed the booking's intended number of participants (unless perhaps you allow walk-ins that did not sign up in advance).
181
+ * @param attendance - The attendance information for a booked session that you want to create or update.
138
182
  * @public
139
183
  * @documentationMaturity preview
140
184
  * @requiredField attendance
@@ -145,26 +189,28 @@ export declare function getAttendance(attendanceId: string): Promise<Attendance>
145
189
  */
146
190
  export declare function setAttendance(attendance: Attendance): Promise<SetAttendanceResponse>;
147
191
  /**
148
- * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
192
+ * Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.
193
+ *
149
194
  *
150
- * Up to 100 bookings can be returned per request.
195
+ * When querying attendance information, you can query from the perspective of:
196
+ * + **A booking.** Specify a booking ID to retrieve attendance information for all sessions related to that booking.
197
+ * + **A session.** Specify a session ID to retrieve attendance information for all bookings related to that session.
198
+ *
199
+ * For example, query by a course's `bookingId` and `status = "NOT_ATTENDED"` to retrieve course sessions for that booking that
200
+ * had no attendees. Was there bad weather on those days? Or was
201
+ * there a sudden drop in attendance due to a business reason that must be handled, like a less-qualified instructor?
151
202
  *
152
203
  * Query Attendance runs with the following defaults, which you can override:
153
204
  *
154
205
  * - `id` sorted in `ASC` order
155
206
  * - `cursorPaging.limit` is `50`
156
207
  *
157
- * For field support see
158
- * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
159
- * for more information.
160
- *
161
- * __Notes__:
162
- * + An alternative way to obtain attendance information for bookings can be done by calling BookingsReader [queryExtendedBookings] (https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` parameter set to true.
163
- * + `fields` and `fieldsets` aren't supported.
164
- *
208
+ * For field support, see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters).
165
209
  *
166
- * You can only specify a filter only once per query. If a filter is provided
167
- * more than once, only the first occurrence affects the returned bookings.
210
+ * > __Notes__:
211
+ * > + Another way to retrieve attendance information is to call Bookings Reader V2's [Query Extended Bookings](https://dev.wix.com/api/rest/wix-bookings/bookings-reader-v2/query-extended-bookings) with `withBookingAttendanceInfo` set to `true`.
212
+ * > + Up to 100 results can be returned per request.
213
+ * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
168
214
  *
169
215
  * To learn about working with _Query_ endpoints, see
170
216
  * [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language),