@wix/bookings 1.0.148 → 1.0.149

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,50 @@
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 actually 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 attended. `0` is not a valid value for indicating that a session was not attended.
17
+ * Instead, set the `attendanceStatus` 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 only course sessions 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)
41
+ * For field support see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
27
42
  * for more information.
28
43
  *
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
- *
33
- *
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.
44
+ * > __Notes__:
45
+ * > + 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`.
46
+ * > + Up to 100 results can be returned per request.
47
+ * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
36
48
  *
37
49
  * To learn about working with _Query_ endpoints, see
38
50
  * [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 actually 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 attended. `0` is not a valid value for indicating that a session was not attended.
102
+ * Instead, set the `attendanceStatus` 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,29 @@ 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 only course sessions 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)
148
+ * For field support see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
134
149
  * for more information.
135
150
  *
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
- *
140
- *
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.
151
+ * > __Notes__:
152
+ * > + 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`.
153
+ * > + Up to 100 results can be returned per request.
154
+ * > + Only 1 filter is supported per query. If you define multiple filters in the same query, only the first is processed.
143
155
  *
144
156
  * To learn about working with _Query_ endpoints, see
145
157
  * [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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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"}
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,sBA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L,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"}
@@ -4,23 +4,30 @@
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 attendees that attended the session. By default, the number
25
+ * of attendees is `1` but you can set a number greater than `1` if multiple
26
+ * participants attend. `0` is not a valid value for indicating that a session was not attended.
27
+ * Instead, set the `attendanceStatus` field to `NOT_ATTENDED`.
28
+ *
29
+ * Default: 1
30
+ */
24
31
  numberOfAttendees?: number;
25
32
  }
26
33
  export declare enum AttendanceStatus {
@@ -29,33 +36,49 @@ export declare enum AttendanceStatus {
29
36
  NOT_ATTENDED = "NOT_ATTENDED"
30
37
  }
31
38
  export interface GetAttendanceRequest {
32
- /** Id of the Attendance to retrieve. */
39
+ /** ID of the object that contains the attendance information that you want to retrieve. */
33
40
  attendanceId: string;
34
41
  }
35
42
  export interface GetAttendanceResponse {
36
- /** The retrieved Attendance. */
43
+ /** The retrieved attendance information for the booked session. */
37
44
  attendance?: Attendance;
38
45
  }
39
46
  export interface SetAttendanceRequest {
40
- /** Attendance to create or updated. */
47
+ /** The attendance information for a booked session that you want to create or update. */
41
48
  attendance: Attendance;
42
49
  }
43
50
  export interface SetAttendanceResponse {
44
- /** The updated Attendance. */
51
+ /** The created or updated attendance information for the booked session. */
45
52
  attendance?: Attendance;
46
53
  }
47
54
  export interface QueryAttendanceRequest {
48
- /** WQL expression. */
55
+ /** Query options. */
49
56
  query: QueryV2;
50
57
  }
51
58
  export interface QueryV2 extends QueryV2PagingMethodOneOf {
59
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
52
60
  cursorPaging?: CursorPaging;
61
+ /**
62
+ * Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
63
+ *
64
+ * For a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
65
+ *
66
+ * Max: 1 filter
67
+ */
53
68
  filter?: Record<string, any> | null;
69
+ /**
70
+ * Sort object in the following format:
71
+ * `[ {"fieldName":"sortField1","order":"ASC"}, {"fieldName":"sortField2","order":"DESC"} ]`
72
+ *
73
+ * For details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
74
+ */
54
75
  sort?: Sorting[];
76
+ /** Array of projected fields. A list of specific field names to return. */
55
77
  fields?: string[];
56
78
  }
57
79
  /** @oneof */
58
80
  export interface QueryV2PagingMethodOneOf {
81
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
59
82
  cursorPaging?: CursorPaging;
60
83
  }
61
84
  export interface Sorting {
@@ -64,6 +87,11 @@ export interface Sorting {
64
87
  /** Sort order. */
65
88
  order?: SortOrder;
66
89
  }
90
+ /**
91
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
92
+ *
93
+ * Default: `ASC`.
94
+ */
67
95
  export declare enum SortOrder {
68
96
  ASC = "ASC",
69
97
  DESC = "DESC"
@@ -76,26 +104,32 @@ export interface Paging {
76
104
  }
77
105
  export interface CursorPaging {
78
106
  /**
79
- * Number of attendances to return.
80
- * Defaults to `50`. Maximum `1000`.
107
+ * Number of `attendance` objects to return.
108
+ *
109
+ * Default: `50`
110
+ * Maximum: `1000`
81
111
  */
82
112
  limit?: number | null;
83
113
  /**
84
114
  * Pointer to the next or previous page in the list of results.
115
+ *
85
116
  * You can get the relevant cursor token
86
117
  * from the `pagingMetadata` object in the previous call's response.
118
+ *
87
119
  * Not relevant for the first request.
88
120
  */
89
121
  cursor?: string | null;
90
122
  }
123
+ /** List of objects that contain attendance information. */
91
124
  export interface QueryAttendanceResponse {
92
- /** The retrieved Attendances. */
125
+ /** List of objects that contain attendance information for a booked session. */
93
126
  attendances?: Attendance[];
94
- /** Paging Metadata. Cursor pagination is supported. */
127
+ /** Details on the paged set of results returned. */
95
128
  pagingMetadata?: CursorPagingMetadata;
96
129
  }
130
+ /** This is the preferred message for cursor-paging enabled services */
97
131
  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). */
132
+ /** 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
133
  cursors?: Cursors;
100
134
  /**
101
135
  * 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":";;;AAiCA,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"}
@@ -10,23 +10,30 @@ export declare const __debug: {
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 attendees that attended the session. By default, the number
31
+ * of attendees is `1` but you can set a number greater than `1` if multiple
32
+ * participants attend. `0` is not a valid value for indicating that a session was not attended.
33
+ * Instead, set the `attendanceStatus` field to `NOT_ATTENDED`.
34
+ *
35
+ * Default: 1
36
+ */
30
37
  numberOfAttendees?: number;
31
38
  }
32
39
  export declare enum AttendanceStatus {
@@ -35,33 +42,49 @@ export declare enum AttendanceStatus {
35
42
  NOT_ATTENDED = "NOT_ATTENDED"
36
43
  }
37
44
  export interface GetAttendanceRequest {
38
- /** Id of the Attendance to retrieve. */
45
+ /** ID of the object that contains the attendance information that you want to retrieve. */
39
46
  attendanceId: string;
40
47
  }
41
48
  export interface GetAttendanceResponse {
42
- /** The retrieved Attendance. */
49
+ /** The retrieved attendance information for the booked session. */
43
50
  attendance?: Attendance;
44
51
  }
45
52
  export interface SetAttendanceRequest {
46
- /** Attendance to create or updated. */
53
+ /** The attendance information for a booked session that you want to create or update. */
47
54
  attendance: Attendance;
48
55
  }
49
56
  export interface SetAttendanceResponse {
50
- /** The updated Attendance. */
57
+ /** The created or updated attendance information for the booked session. */
51
58
  attendance?: Attendance;
52
59
  }
53
60
  export interface QueryAttendanceRequest {
54
- /** WQL expression. */
61
+ /** Query options. */
55
62
  query: QueryV2;
56
63
  }
57
64
  export interface QueryV2 extends QueryV2PagingMethodOneOf {
65
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
58
66
  cursorPaging?: CursorPaging;
67
+ /**
68
+ * Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
69
+ *
70
+ * For a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
71
+ *
72
+ * Max: 1 filter
73
+ */
59
74
  filter?: Record<string, any> | null;
75
+ /**
76
+ * Sort object in the following format:
77
+ * `[ {"fieldName":"sortField1","order":"ASC"}, {"fieldName":"sortField2","order":"DESC"} ]`
78
+ *
79
+ * For details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supportedfilters).
80
+ */
60
81
  sort?: Sorting[];
82
+ /** Array of projected fields. A list of specific field names to return. */
61
83
  fields?: string[];
62
84
  }
63
85
  /** @oneof */
64
86
  export interface QueryV2PagingMethodOneOf {
87
+ /** Cursors to navigate through the result pages using `next` and `prev`. */
65
88
  cursorPaging?: CursorPaging;
66
89
  }
67
90
  export interface Sorting {
@@ -70,6 +93,11 @@ export interface Sorting {
70
93
  /** Sort order. */
71
94
  order?: SortOrder;
72
95
  }
96
+ /**
97
+ * Sort order. Use `ASC` for ascending order or `DESC` for descending order.
98
+ *
99
+ * Default: `ASC`.
100
+ */
73
101
  export declare enum SortOrder {
74
102
  ASC = "ASC",
75
103
  DESC = "DESC"
@@ -82,26 +110,32 @@ export interface Paging {
82
110
  }
83
111
  export interface CursorPaging {
84
112
  /**
85
- * Number of attendances to return.
86
- * Defaults to `50`. Maximum `1000`.
113
+ * Number of `attendance` objects to return.
114
+ *
115
+ * Default: `50`
116
+ * Maximum: `1000`
87
117
  */
88
118
  limit?: number | null;
89
119
  /**
90
120
  * Pointer to the next or previous page in the list of results.
121
+ *
91
122
  * You can get the relevant cursor token
92
123
  * from the `pagingMetadata` object in the previous call's response.
124
+ *
93
125
  * Not relevant for the first request.
94
126
  */
95
127
  cursor?: string | null;
96
128
  }
129
+ /** List of objects that contain attendance information. */
97
130
  export interface QueryAttendanceResponse {
98
- /** The retrieved Attendances. */
131
+ /** List of objects that contain attendance information for a booked session. */
99
132
  attendances?: Attendance[];
100
- /** Paging Metadata. Cursor pagination is supported. */
133
+ /** Details on the paged set of results returned. */
101
134
  pagingMetadata?: CursorPagingMetadata;
102
135
  }
136
+ /** This is the preferred message for cursor-paging enabled services */
103
137
  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). */
138
+ /** 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
139
  cursors?: Cursors;
106
140
  /**
107
141
  * Indicates if there are more results after the current page.
@@ -117,24 +151,33 @@ export interface Cursors {
117
151
  prev?: string | null;
118
152
  }
119
153
  /**
120
- * Get an Attendance by attendance id.
121
- * @param attendanceId - Id of the Attendance to retrieve.
154
+ * Retrieves attendance information by ID.
155
+ * @param attendanceId - ID of the object that contains the attendance information that you want to retrieve.
122
156
  * @public
123
157
  * @documentationMaturity preview
124
158
  * @requiredField attendanceId
125
159
  * @permissionScope Read Bookings - Including Participants
126
- * @returns The retrieved Attendance.
160
+ * @returns The retrieved attendance information for the booked session.
127
161
  */
128
162
  export declare function getAttendance(attendanceId: string): Promise<Attendance>;
129
163
  /**
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.
164
+ * Sets information about whether a booking's session was actually attended. This information
165
+ * is saved in an `attendance` object.
166
+ *
167
+ *
168
+ * If attendance was already set, meaning the `attendance` object already exists, the
169
+ * existing attendance information is updated. Otherwise, a new `attendance` object
170
+ * is created.
133
171
  *
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.
172
+ * By default, the number
173
+ * of attendees is set to `1`, but you can set a number to greater than `1` if multiple
174
+ * participants attended. `0` is not a valid value for indicating that a session was not attended.
175
+ * Instead, set the `attendanceStatus` field to `NOT_ATTENDED`.
176
+ *
177
+ * > __Note:__ Make sure your code validates that:
178
+ * > + There is no mismatch between `numberOfAttendees` and `attendanceStatus` to make sure, for example, that `attendanceStatus` is not `NOT_ATTENDED` while `numberOfAttendees` is `5`.
179
+ * > + 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).
180
+ * @param attendance - The attendance information for a booked session that you want to create or update.
138
181
  * @public
139
182
  * @documentationMaturity preview
140
183
  * @requiredField attendance
@@ -145,26 +188,29 @@ export declare function getAttendance(attendanceId: string): Promise<Attendance>
145
188
  */
146
189
  export declare function setAttendance(attendance: Attendance): Promise<SetAttendanceResponse>;
147
190
  /**
148
- * Retrieves a list of bookings Attendances, according to the provided paging, filtering, and sorting.
191
+ * Retrieves attendance information for booked sessions, given the provided paging, filtering, and sorting.
192
+ *
193
+ *
194
+ * When querying attendance information, you can query from the perspective of:
195
+ * + **A booking.** Specify a booking ID to retrieve attendance information for all sessions related to that booking.
196
+ * + **A session.** Specify a session ID to retrieve attendance information for all bookings related to that session.
149
197
  *
150
- * Up to 100 bookings can be returned per request.
198
+ * For example, query by a course's `bookingId` and `status = "NOT_ATTENDED"` to retrieve only course sessions that
199
+ * had no attendees. Was there bad weather on those days? Or was
200
+ * there a sudden drop in attendance due to a business reason that must be handled, like a less-qualified instructor?
151
201
  *
152
202
  * Query Attendance runs with the following defaults, which you can override:
153
203
  *
154
204
  * - `id` sorted in `ASC` order
155
205
  * - `cursorPaging.limit` is `50`
156
206
  *
157
- * For field support see
158
- * [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
207
+ * For field support see [supported filters](https://dev.wix.com/api/rest/wix-bookings/bookings-attendance-v2/supported-filters)
159
208
  * for more information.
160
209
  *
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
- *
165
- *
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),