@wix/auto_sdk_bookings_attendance 1.0.6 → 1.0.8
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.
- package/build/cjs/index.d.ts +1 -0
- package/build/cjs/index.js +18 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +18 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1 -0
- package/build/cjs/meta.js +18 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.context.d.ts +8 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.context.js +14 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.context.js.map +1 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.http.d.ts +58 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.http.js +288 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.http.js.map +1 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.meta.d.ts +18 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.meta.js +104 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.meta.js.map +1 -0
- package/build/{internal/index.d.ts → cjs/src/bookings-v2-attendance-attendance.public.d.ts} +10 -15
- package/build/cjs/src/bookings-v2-attendance-attendance.public.js +34 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.public.js.map +1 -0
- package/build/{bookings-v2-attendance-attendance.universal-Bpl5-MB6.d.mts → cjs/src/bookings-v2-attendance-attendance.types.d.ts} +45 -122
- package/build/cjs/src/bookings-v2-attendance-attendance.types.js +31 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.types.js.map +1 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.universal.d.ts +588 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.universal.js +296 -0
- package/build/cjs/src/bookings-v2-attendance-attendance.universal.js.map +1 -0
- package/build/es/index.d.ts +1 -0
- package/build/es/index.js +2 -0
- package/build/es/index.js.map +1 -0
- package/build/es/index.typings.d.ts +1 -0
- package/build/es/index.typings.js +2 -0
- package/build/es/index.typings.js.map +1 -0
- package/build/es/meta.d.ts +1 -0
- package/build/es/meta.js +2 -0
- package/build/es/meta.js.map +1 -0
- package/build/es/package.json +3 -0
- package/build/es/src/bookings-v2-attendance-attendance.context.d.ts +8 -0
- package/build/es/src/bookings-v2-attendance-attendance.context.js +8 -0
- package/build/es/src/bookings-v2-attendance-attendance.context.js.map +1 -0
- package/build/es/src/bookings-v2-attendance-attendance.http.d.ts +58 -0
- package/build/es/src/bookings-v2-attendance-attendance.http.js +281 -0
- package/build/es/src/bookings-v2-attendance-attendance.http.js.map +1 -0
- package/build/es/src/bookings-v2-attendance-attendance.meta.d.ts +18 -0
- package/build/es/src/bookings-v2-attendance-attendance.meta.js +74 -0
- package/build/es/src/bookings-v2-attendance-attendance.meta.js.map +1 -0
- package/build/{index.d.ts → es/src/bookings-v2-attendance-attendance.public.d.ts} +10 -15
- package/build/es/src/bookings-v2-attendance-attendance.public.js +24 -0
- package/build/es/src/bookings-v2-attendance-attendance.public.js.map +1 -0
- package/build/{bookings-v2-attendance-attendance.universal-Bpl5-MB6.d.ts → es/src/bookings-v2-attendance-attendance.types.d.ts} +45 -122
- package/build/es/src/bookings-v2-attendance-attendance.types.js +28 -0
- package/build/es/src/bookings-v2-attendance-attendance.types.js.map +1 -0
- package/build/es/src/bookings-v2-attendance-attendance.universal.d.ts +588 -0
- package/build/es/src/bookings-v2-attendance-attendance.universal.js +266 -0
- package/build/es/src/bookings-v2-attendance-attendance.universal.js.map +1 -0
- package/build/internal/cjs/index.d.ts +1 -0
- package/build/internal/cjs/index.js +18 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1 -0
- package/build/internal/cjs/index.typings.js +18 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1 -0
- package/build/internal/cjs/meta.js +18 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.context.d.ts +8 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.context.js +14 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.context.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.http.d.ts +58 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.http.js +288 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.http.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.meta.d.ts +18 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.meta.js +104 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.meta.js.map +1 -0
- package/build/internal/{index.d.mts → cjs/src/bookings-v2-attendance-attendance.public.d.ts} +10 -15
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.public.js +34 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.public.js.map +1 -0
- package/build/internal/{bookings-v2-attendance-attendance.universal-Bpl5-MB6.d.mts → cjs/src/bookings-v2-attendance-attendance.types.d.ts} +45 -122
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.types.js +31 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.types.js.map +1 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.universal.d.ts +588 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.universal.js +296 -0
- package/build/internal/cjs/src/bookings-v2-attendance-attendance.universal.js.map +1 -0
- package/build/internal/es/index.d.ts +1 -0
- package/build/internal/es/index.js +2 -0
- package/build/internal/es/index.js.map +1 -0
- package/build/internal/es/index.typings.d.ts +1 -0
- package/build/internal/es/index.typings.js +2 -0
- package/build/internal/es/index.typings.js.map +1 -0
- package/build/internal/es/meta.d.ts +1 -0
- package/build/internal/es/meta.js +2 -0
- package/build/internal/es/meta.js.map +1 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.context.d.ts +8 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.context.js +8 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.context.js.map +1 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.http.d.ts +58 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.http.js +281 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.http.js.map +1 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.meta.d.ts +18 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.meta.js +74 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.meta.js.map +1 -0
- package/build/{index.d.mts → internal/es/src/bookings-v2-attendance-attendance.public.d.ts} +10 -15
- package/build/internal/es/src/bookings-v2-attendance-attendance.public.js +24 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.public.js.map +1 -0
- package/build/internal/{bookings-v2-attendance-attendance.universal-Bpl5-MB6.d.ts → es/src/bookings-v2-attendance-attendance.types.d.ts} +45 -122
- package/build/internal/es/src/bookings-v2-attendance-attendance.types.js +28 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.types.js.map +1 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.universal.d.ts +588 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.universal.js +266 -0
- package/build/internal/es/src/bookings-v2-attendance-attendance.universal.js.map +1 -0
- package/package.json +11 -12
- package/build/index.js +0 -458
- package/build/index.js.map +0 -1
- package/build/index.mjs +0 -428
- package/build/index.mjs.map +0 -1
- package/build/internal/index.js +0 -458
- package/build/internal/index.js.map +0 -1
- package/build/internal/index.mjs +0 -428
- package/build/internal/index.mjs.map +0 -1
- package/build/internal/meta.d.mts +0 -255
- package/build/internal/meta.d.ts +0 -255
- package/build/internal/meta.js +0 -339
- package/build/internal/meta.js.map +0 -1
- package/build/internal/meta.mjs +0 -309
- package/build/internal/meta.mjs.map +0 -1
- package/build/meta.d.mts +0 -255
- package/build/meta.d.ts +0 -255
- package/build/meta.js +0 -339
- package/build/meta.js.map +0 -1
- package/build/meta.mjs +0 -309
- package/build/meta.mjs.map +0 -1
|
@@ -0,0 +1,588 @@
|
|
|
1
|
+
import { NonNullablePaths } from '@wix/sdk-types';
|
|
2
|
+
/**
|
|
3
|
+
* The `attendance` object represents the attendance information
|
|
4
|
+
* for a booked session, such as:
|
|
5
|
+
*
|
|
6
|
+
* + Did anyone attend the session?
|
|
7
|
+
* + How many people attended the session?
|
|
8
|
+
*
|
|
9
|
+
* The number of session `attendance` objects available depends on the booking type:
|
|
10
|
+
* + Appointment bookings have 1 `attendance` object per appointment session.
|
|
11
|
+
* + Class bookings have 1 `attendance` object for each session of the class. The number of sessions for a class is defined in Schedule and Sessions `schedule.capacity` property.
|
|
12
|
+
* + Course bookings have an `attendance` object for each session of the course. For example, if there are 12 sessions in a course, there are 12 `attendance` objects. The number of sessions for a class is defined in Schedule and Sessions `schedule.capacity` property.
|
|
13
|
+
*/
|
|
14
|
+
export interface Attendance {
|
|
15
|
+
/**
|
|
16
|
+
* ID of the `attendance` object.
|
|
17
|
+
* @format GUID
|
|
18
|
+
* @readonly
|
|
19
|
+
*/
|
|
20
|
+
_id?: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* Corresponding booking ID.
|
|
23
|
+
* @format GUID
|
|
24
|
+
*/
|
|
25
|
+
bookingId?: string | null;
|
|
26
|
+
/** Corresponding session ID. */
|
|
27
|
+
sessionId?: string | null;
|
|
28
|
+
/** Status indicating if any participants attended the session. */
|
|
29
|
+
status?: AttendanceStatus;
|
|
30
|
+
/**
|
|
31
|
+
* Total number of participants that attended the session. By default, the number
|
|
32
|
+
* of attendees is set to `1`, but you can set a number to greater than `1` if multiple
|
|
33
|
+
* participants attended.
|
|
34
|
+
*
|
|
35
|
+
* Do not set to `0` to indicate that no one attended the session. Instead, set the `status` field to `NOT_ATTENDED`.
|
|
36
|
+
*
|
|
37
|
+
* Default: 1
|
|
38
|
+
*/
|
|
39
|
+
numberOfAttendees?: number;
|
|
40
|
+
}
|
|
41
|
+
export declare enum AttendanceStatus {
|
|
42
|
+
/** There is no available attendance information. */
|
|
43
|
+
NOT_SET = "NOT_SET",
|
|
44
|
+
/** At least a single participant attended the session. */
|
|
45
|
+
ATTENDED = "ATTENDED",
|
|
46
|
+
/** No participants attended the session. */
|
|
47
|
+
NOT_ATTENDED = "NOT_ATTENDED"
|
|
48
|
+
}
|
|
49
|
+
export interface GetAttendanceRequest {
|
|
50
|
+
/**
|
|
51
|
+
* ID of the attendance object to retrieve.
|
|
52
|
+
* @format GUID
|
|
53
|
+
*/
|
|
54
|
+
attendanceId: string;
|
|
55
|
+
}
|
|
56
|
+
export interface GetAttendanceResponse {
|
|
57
|
+
/** Retrieved attendance. */
|
|
58
|
+
attendance?: Attendance;
|
|
59
|
+
}
|
|
60
|
+
export interface SetAttendanceRequest {
|
|
61
|
+
/** Attendance to create or update. */
|
|
62
|
+
attendance: Attendance;
|
|
63
|
+
/** Information about whether to send a message to a customer after their attendance was set. */
|
|
64
|
+
participantNotification?: ParticipantNotification;
|
|
65
|
+
}
|
|
66
|
+
export interface ParticipantNotification {
|
|
67
|
+
/**
|
|
68
|
+
* Specify whether to send the message about the changes to the customer.
|
|
69
|
+
*
|
|
70
|
+
* Default: `false`
|
|
71
|
+
*/
|
|
72
|
+
notifyParticipants?: boolean | null;
|
|
73
|
+
/**
|
|
74
|
+
* Optional custom message to send to the participants about the changes to the booking.
|
|
75
|
+
* @minLength 1
|
|
76
|
+
* @maxLength 5000
|
|
77
|
+
*/
|
|
78
|
+
message?: string | null;
|
|
79
|
+
}
|
|
80
|
+
export interface SetAttendanceResponse {
|
|
81
|
+
/** Created or updated attendance. */
|
|
82
|
+
attendance?: Attendance;
|
|
83
|
+
}
|
|
84
|
+
export interface AttendanceMarkedAsNotAttended {
|
|
85
|
+
/** The attendance information for a booked session that you want to create or update. */
|
|
86
|
+
attendance?: Attendance;
|
|
87
|
+
/** Information about whether to send a message to a customer after their attendance was set. */
|
|
88
|
+
participantNotification?: ParticipantNotification;
|
|
89
|
+
}
|
|
90
|
+
export interface BulkSetAttendanceRequest {
|
|
91
|
+
returnFullEntity?: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* List of attendance details for booking sessions to create or update.
|
|
94
|
+
* @maxSize 8
|
|
95
|
+
*/
|
|
96
|
+
attendanceDetails?: AttendanceDetails[];
|
|
97
|
+
}
|
|
98
|
+
export interface AttendanceDetails {
|
|
99
|
+
/** Created or updated attendance information for a booking session. */
|
|
100
|
+
attendance?: Attendance;
|
|
101
|
+
/** Information about whether to send a message to the customer after their attendance was set. */
|
|
102
|
+
participantNotification?: ParticipantNotification;
|
|
103
|
+
}
|
|
104
|
+
export interface BulkSetAttendanceResponse {
|
|
105
|
+
/**
|
|
106
|
+
* List of created or updated `attendance` objects.
|
|
107
|
+
* @minSize 1
|
|
108
|
+
* @maxSize 8
|
|
109
|
+
*/
|
|
110
|
+
results?: BulkAttendanceResult[];
|
|
111
|
+
/** Information about the total number of successes and failures for the Bulk Set Attendance call. */
|
|
112
|
+
bulkActionMetadata?: BulkActionMetadata;
|
|
113
|
+
}
|
|
114
|
+
export interface BulkAttendanceResult {
|
|
115
|
+
/** Created or updated `attendance` object. */
|
|
116
|
+
item?: Attendance;
|
|
117
|
+
/** Metadata for the created or updated `attendance` object. */
|
|
118
|
+
itemMetadata?: ItemMetadata;
|
|
119
|
+
}
|
|
120
|
+
export interface ItemMetadata {
|
|
121
|
+
/** Item ID. Should always be available, unless it's impossible (for example, when failing to create an item). */
|
|
122
|
+
_id?: string | null;
|
|
123
|
+
/** Index of the item within the request array. Allows for correlation between request and response items. */
|
|
124
|
+
originalIndex?: number;
|
|
125
|
+
/** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */
|
|
126
|
+
success?: boolean;
|
|
127
|
+
/** Details about the error in case of failure. */
|
|
128
|
+
error?: ApplicationError;
|
|
129
|
+
}
|
|
130
|
+
export interface ApplicationError {
|
|
131
|
+
/** Error code. */
|
|
132
|
+
code?: string;
|
|
133
|
+
/** Description of the error. */
|
|
134
|
+
description?: string;
|
|
135
|
+
/** Data related to the error. */
|
|
136
|
+
data?: Record<string, any> | null;
|
|
137
|
+
}
|
|
138
|
+
export interface BulkActionMetadata {
|
|
139
|
+
/** Number of items that were successfully processed. */
|
|
140
|
+
totalSuccesses?: number;
|
|
141
|
+
/** Number of items that couldn't be processed. */
|
|
142
|
+
totalFailures?: number;
|
|
143
|
+
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
144
|
+
undetailedFailures?: number;
|
|
145
|
+
}
|
|
146
|
+
export interface QueryAttendanceRequest {
|
|
147
|
+
/** Query options. */
|
|
148
|
+
query: QueryV2;
|
|
149
|
+
}
|
|
150
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
151
|
+
/**
|
|
152
|
+
* Cursor token pointing to a page of results. In the first request,
|
|
153
|
+
* specify `cursorPaging.limit`. For following requests, specify the
|
|
154
|
+
* retrieved `cursorPaging.cursor` token and not `query.filter` or
|
|
155
|
+
* `query.sort`.
|
|
156
|
+
*/
|
|
157
|
+
cursorPaging?: CursorPaging;
|
|
158
|
+
/**
|
|
159
|
+
* Filter object. See [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) for more information.
|
|
160
|
+
*
|
|
161
|
+
* For a detailed list of supported fields and operators, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).
|
|
162
|
+
*
|
|
163
|
+
* Max: 1 filter
|
|
164
|
+
*/
|
|
165
|
+
filter?: Record<string, any> | null;
|
|
166
|
+
/**
|
|
167
|
+
* Sort object in the following format:
|
|
168
|
+
* `[ {"fieldName":"sortField1","order":"ASC"}, {"fieldName":"sortField2","order":"DESC"} ]`
|
|
169
|
+
*
|
|
170
|
+
* For details about sorting, see [Supported Filters and Sorting](https://dev.wix.com/api/rest/wix-bookings/attendance/supported-filters).
|
|
171
|
+
*/
|
|
172
|
+
sort?: Sorting[];
|
|
173
|
+
}
|
|
174
|
+
/** @oneof */
|
|
175
|
+
export interface QueryV2PagingMethodOneOf {
|
|
176
|
+
/**
|
|
177
|
+
* Cursor token pointing to a page of results. In the first request,
|
|
178
|
+
* specify `cursorPaging.limit`. For following requests, specify the
|
|
179
|
+
* retrieved `cursorPaging.cursor` token and not `query.filter` or
|
|
180
|
+
* `query.sort`.
|
|
181
|
+
*/
|
|
182
|
+
cursorPaging?: CursorPaging;
|
|
183
|
+
}
|
|
184
|
+
export interface Sorting {
|
|
185
|
+
/** Name of the field to sort by. */
|
|
186
|
+
fieldName?: string;
|
|
187
|
+
/** Sort order. */
|
|
188
|
+
order?: SortOrder;
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* Sort order. Use `ASC` for ascending order or `DESC` for descending order.
|
|
192
|
+
*
|
|
193
|
+
* Default: `ASC`.
|
|
194
|
+
*/
|
|
195
|
+
export declare enum SortOrder {
|
|
196
|
+
ASC = "ASC",
|
|
197
|
+
DESC = "DESC"
|
|
198
|
+
}
|
|
199
|
+
export interface Paging {
|
|
200
|
+
/** Number of items to load. */
|
|
201
|
+
limit?: number | null;
|
|
202
|
+
/** Number of items to skip in the current sort order. */
|
|
203
|
+
offset?: number | null;
|
|
204
|
+
}
|
|
205
|
+
export interface CursorPaging {
|
|
206
|
+
/**
|
|
207
|
+
* Number of `Attendance` objects to return.
|
|
208
|
+
*
|
|
209
|
+
* Default: `50`
|
|
210
|
+
* Maximum: `1000`
|
|
211
|
+
* @max 1000
|
|
212
|
+
*/
|
|
213
|
+
limit?: number | null;
|
|
214
|
+
/**
|
|
215
|
+
* Pointer to the next or previous page in the list of results.
|
|
216
|
+
*
|
|
217
|
+
* You can get the relevant cursor token
|
|
218
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
219
|
+
*
|
|
220
|
+
* Not relevant for the first request.
|
|
221
|
+
*/
|
|
222
|
+
cursor?: string | null;
|
|
223
|
+
}
|
|
224
|
+
/** List of objects that contain attendance information. */
|
|
225
|
+
export interface QueryAttendanceResponse {
|
|
226
|
+
/** List of `attendance` objects that contain attendance information for a booked session. */
|
|
227
|
+
attendances?: Attendance[];
|
|
228
|
+
/** Metadata for the paged set of results. */
|
|
229
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
230
|
+
}
|
|
231
|
+
/** This is the preferred message for cursor-paging enabled services */
|
|
232
|
+
export interface CursorPagingMetadata {
|
|
233
|
+
/** 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). */
|
|
234
|
+
cursors?: Cursors;
|
|
235
|
+
/**
|
|
236
|
+
* Indicates if there are more results after the current page.
|
|
237
|
+
* If `true`, another page of results can be retrieved.
|
|
238
|
+
* If `false`, this is the last page.
|
|
239
|
+
*/
|
|
240
|
+
hasNext?: boolean | null;
|
|
241
|
+
}
|
|
242
|
+
export interface Cursors {
|
|
243
|
+
/** Cursor pointing to next page in the list of results. */
|
|
244
|
+
next?: string | null;
|
|
245
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
246
|
+
prev?: string | null;
|
|
247
|
+
}
|
|
248
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
249
|
+
createdEvent?: EntityCreatedEvent;
|
|
250
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
251
|
+
deletedEvent?: EntityDeletedEvent;
|
|
252
|
+
actionEvent?: ActionEvent;
|
|
253
|
+
/**
|
|
254
|
+
* Unique event ID.
|
|
255
|
+
* Allows clients to ignore duplicate webhooks.
|
|
256
|
+
*/
|
|
257
|
+
_id?: string;
|
|
258
|
+
/**
|
|
259
|
+
* Assumes actions are also always typed to an entity_type
|
|
260
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
261
|
+
*/
|
|
262
|
+
entityFqdn?: string;
|
|
263
|
+
/**
|
|
264
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
265
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
266
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
267
|
+
*/
|
|
268
|
+
slug?: string;
|
|
269
|
+
/** ID of the entity associated with the event. */
|
|
270
|
+
entityId?: string;
|
|
271
|
+
/** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example: 2020-04-26T13:57:50.699Z */
|
|
272
|
+
eventTime?: Date | null;
|
|
273
|
+
/**
|
|
274
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
275
|
+
* (for example, GDPR).
|
|
276
|
+
*/
|
|
277
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
278
|
+
/** If present, indicates the action that triggered the event. */
|
|
279
|
+
originatedFrom?: string | null;
|
|
280
|
+
/**
|
|
281
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
282
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
283
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
284
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
285
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
286
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
287
|
+
*/
|
|
288
|
+
entityEventSequence?: string | null;
|
|
289
|
+
}
|
|
290
|
+
/** @oneof */
|
|
291
|
+
export interface DomainEventBodyOneOf {
|
|
292
|
+
createdEvent?: EntityCreatedEvent;
|
|
293
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
294
|
+
deletedEvent?: EntityDeletedEvent;
|
|
295
|
+
actionEvent?: ActionEvent;
|
|
296
|
+
}
|
|
297
|
+
export interface EntityCreatedEvent {
|
|
298
|
+
entity?: string;
|
|
299
|
+
}
|
|
300
|
+
export interface RestoreInfo {
|
|
301
|
+
deletedDate?: Date | null;
|
|
302
|
+
}
|
|
303
|
+
export interface EntityUpdatedEvent {
|
|
304
|
+
/**
|
|
305
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
306
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
307
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
308
|
+
*/
|
|
309
|
+
currentEntity?: string;
|
|
310
|
+
}
|
|
311
|
+
export interface EntityDeletedEvent {
|
|
312
|
+
/** Entity that was deleted */
|
|
313
|
+
deletedEntity?: string | null;
|
|
314
|
+
}
|
|
315
|
+
export interface ActionEvent {
|
|
316
|
+
body?: string;
|
|
317
|
+
}
|
|
318
|
+
export interface MessageEnvelope {
|
|
319
|
+
/**
|
|
320
|
+
* App instance ID.
|
|
321
|
+
* @format GUID
|
|
322
|
+
*/
|
|
323
|
+
instanceId?: string | null;
|
|
324
|
+
/**
|
|
325
|
+
* Event type.
|
|
326
|
+
* @maxLength 150
|
|
327
|
+
*/
|
|
328
|
+
eventType?: string;
|
|
329
|
+
/** The identification type and identity data. */
|
|
330
|
+
identity?: IdentificationData;
|
|
331
|
+
/** Stringify payload. */
|
|
332
|
+
data?: string;
|
|
333
|
+
}
|
|
334
|
+
export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
335
|
+
/**
|
|
336
|
+
* ID of a site visitor that has not logged in to the site.
|
|
337
|
+
* @format GUID
|
|
338
|
+
*/
|
|
339
|
+
anonymousVisitorId?: string;
|
|
340
|
+
/**
|
|
341
|
+
* ID of a site visitor that has logged in to the site.
|
|
342
|
+
* @format GUID
|
|
343
|
+
*/
|
|
344
|
+
memberId?: string;
|
|
345
|
+
/**
|
|
346
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
347
|
+
* @format GUID
|
|
348
|
+
*/
|
|
349
|
+
wixUserId?: string;
|
|
350
|
+
/**
|
|
351
|
+
* ID of an app.
|
|
352
|
+
* @format GUID
|
|
353
|
+
*/
|
|
354
|
+
appId?: string;
|
|
355
|
+
/** @readonly */
|
|
356
|
+
identityType?: WebhookIdentityType;
|
|
357
|
+
}
|
|
358
|
+
/** @oneof */
|
|
359
|
+
export interface IdentificationDataIdOneOf {
|
|
360
|
+
/**
|
|
361
|
+
* ID of a site visitor that has not logged in to the site.
|
|
362
|
+
* @format GUID
|
|
363
|
+
*/
|
|
364
|
+
anonymousVisitorId?: string;
|
|
365
|
+
/**
|
|
366
|
+
* ID of a site visitor that has logged in to the site.
|
|
367
|
+
* @format GUID
|
|
368
|
+
*/
|
|
369
|
+
memberId?: string;
|
|
370
|
+
/**
|
|
371
|
+
* ID of a Wix user (site owner, contributor, etc.).
|
|
372
|
+
* @format GUID
|
|
373
|
+
*/
|
|
374
|
+
wixUserId?: string;
|
|
375
|
+
/**
|
|
376
|
+
* ID of an app.
|
|
377
|
+
* @format GUID
|
|
378
|
+
*/
|
|
379
|
+
appId?: string;
|
|
380
|
+
}
|
|
381
|
+
export declare enum WebhookIdentityType {
|
|
382
|
+
UNKNOWN = "UNKNOWN",
|
|
383
|
+
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
384
|
+
MEMBER = "MEMBER",
|
|
385
|
+
WIX_USER = "WIX_USER",
|
|
386
|
+
APP = "APP"
|
|
387
|
+
}
|
|
388
|
+
type AttendanceNonNullablePaths = `status` | `numberOfAttendees`;
|
|
389
|
+
/**
|
|
390
|
+
* Retrieves attendance information.
|
|
391
|
+
* @param attendanceId - ID of the attendance object to retrieve.
|
|
392
|
+
* @public
|
|
393
|
+
* @documentationMaturity preview
|
|
394
|
+
* @requiredField attendanceId
|
|
395
|
+
* @permissionId BOOKINGS.ATTENDANCE_READ
|
|
396
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
397
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
398
|
+
* @permissionScope Manage Bookings
|
|
399
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
400
|
+
* @permissionScope Read Bookings - Including Participants
|
|
401
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
402
|
+
* @permissionScope Read Bookings - all read permissions
|
|
403
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
404
|
+
* @permissionScope Manage Bookings - all permissions
|
|
405
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
406
|
+
* @applicableIdentity APP
|
|
407
|
+
* @applicableIdentity VISITOR
|
|
408
|
+
* @returns Retrieved attendance.
|
|
409
|
+
* @fqn com.wixpress.bookings.attendance.v2.AttendanceService.GetAttendance
|
|
410
|
+
*/
|
|
411
|
+
export declare function getAttendance(attendanceId: string): Promise<NonNullablePaths<Attendance, AttendanceNonNullablePaths>>;
|
|
412
|
+
/**
|
|
413
|
+
* Sets or updates attendance information for a booking session. This
|
|
414
|
+
* information is stored in an `attendance` object.
|
|
415
|
+
*
|
|
416
|
+
* If an `attendance` object already exists for the session, it's updated.
|
|
417
|
+
* Otherwise, a new object is created.
|
|
418
|
+
*
|
|
419
|
+
* By default, `numberOfAttendees` is set to `1`, but you can specify a higher
|
|
420
|
+
* number if multiple participants attended. Do not set `numberOfAttendees` to
|
|
421
|
+
* `0` to indicate no attendance, instead specify `{"status": "NOT_ATTENDED"}`.
|
|
422
|
+
*
|
|
423
|
+
* Validation guidelines:
|
|
424
|
+
*
|
|
425
|
+
* + The call succeeds for mismatches between `numberOfAttendees`
|
|
426
|
+
* and `status`. For example, make sure that your code doesn't specify
|
|
427
|
+
* `{"status": "NOT_ATTENDED"}` with `{"numberOfAttendees": 5}`.
|
|
428
|
+
* + The API also allows `numberOfAttendees` to exceed the booking's
|
|
429
|
+
* `numberOfParticipants`. Use higher values only when scenarios like
|
|
430
|
+
* walk-ins justify the exception.
|
|
431
|
+
* @param attendance - Attendance to create or update.
|
|
432
|
+
* @public
|
|
433
|
+
* @documentationMaturity preview
|
|
434
|
+
* @requiredField attendance
|
|
435
|
+
* @requiredField attendance.bookingId
|
|
436
|
+
* @requiredField attendance.status
|
|
437
|
+
* @param options - Options to use when setting an attendance.
|
|
438
|
+
* @permissionId BOOKINGS.ATTENDANCE_SET
|
|
439
|
+
* @permissionScope Manage Bookings
|
|
440
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
441
|
+
* @permissionScope Manage Bookings - all permissions
|
|
442
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
443
|
+
* @applicableIdentity APP
|
|
444
|
+
* @fqn com.wixpress.bookings.attendance.v2.AttendanceService.SetAttendance
|
|
445
|
+
*/
|
|
446
|
+
export declare function setAttendance(attendance: NonNullablePaths<Attendance, `bookingId` | `status`>, options?: SetAttendanceOptions): Promise<NonNullablePaths<SetAttendanceResponse, {
|
|
447
|
+
[P in AttendanceNonNullablePaths]: `attendance.${P}`;
|
|
448
|
+
}[AttendanceNonNullablePaths]>>;
|
|
449
|
+
export interface SetAttendanceOptions {
|
|
450
|
+
/** Information about whether to send a message to a customer after their attendance was set. */
|
|
451
|
+
participantNotification?: ParticipantNotification;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Sets or updates attendance information for multiple booking sessions.
|
|
455
|
+
*
|
|
456
|
+
*
|
|
457
|
+
* Refer to Set Attendance for detailed behavior of individual attendance
|
|
458
|
+
* entries.
|
|
459
|
+
*
|
|
460
|
+
* The call fails entirely if any entry in `attendanceDetails` is missing a
|
|
461
|
+
* required field.
|
|
462
|
+
*
|
|
463
|
+
* If attendance details are provided for a non-existent session, the call
|
|
464
|
+
* succeeds for valid sessions while marking the unavailable session as a
|
|
465
|
+
* failure in the response.
|
|
466
|
+
* @public
|
|
467
|
+
* @documentationMaturity preview
|
|
468
|
+
* @param options - Options to use when setting multiple attendances in bulk.
|
|
469
|
+
* @permissionId BOOKINGS.ATTENDANCE_SET
|
|
470
|
+
* @permissionScope Manage Bookings
|
|
471
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
472
|
+
* @permissionScope Manage Bookings - all permissions
|
|
473
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
474
|
+
* @applicableIdentity APP
|
|
475
|
+
* @fqn com.wixpress.bookings.attendance.v2.AttendanceService.BulkSetAttendance
|
|
476
|
+
*/
|
|
477
|
+
export declare function bulkSetAttendance(options?: BulkSetAttendanceOptions): Promise<NonNullablePaths<BulkSetAttendanceResponse, `results` | {
|
|
478
|
+
[P in AttendanceNonNullablePaths]: `results.${number}.item.${P}`;
|
|
479
|
+
}[AttendanceNonNullablePaths] | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
480
|
+
export interface BulkSetAttendanceOptions {
|
|
481
|
+
returnFullEntity?: boolean;
|
|
482
|
+
/**
|
|
483
|
+
* List of attendance details for booking sessions to create or update.
|
|
484
|
+
* @maxSize 8
|
|
485
|
+
*/
|
|
486
|
+
attendanceDetails?: AttendanceDetails[];
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Creates a query to retrieve a list of attendances.
|
|
490
|
+
*
|
|
491
|
+
* The `queryAttendances()` function builds a query to retrieve a list of attendances and returns a `AttendancesQueryBuilder` object.
|
|
492
|
+
*
|
|
493
|
+
* The returned object contains the query definition, which is typically used to call the query using the [find()](https://dev.wix.com/docs/sdk/backend-modules/bookings/attendance/attendances-query-builder/find) function.
|
|
494
|
+
*
|
|
495
|
+
* You can refine the query by chaining `AttendancesQueryBuilder` functions onto the query. `AttendancesQueryBuilder` functions enable you to sort, filter, and control the results that `queryAttendances()` returns.
|
|
496
|
+
*
|
|
497
|
+
* `queryAttendances()` uses the following `AttendancesQueryBuilder` default values that you can override:
|
|
498
|
+
*
|
|
499
|
+
* + `limit` is `50`.
|
|
500
|
+
* + Sorted by `id` in ascending order.
|
|
501
|
+
*
|
|
502
|
+
* The functions that are chained to `queryAttendances()` are applied in the order they are called. For example, if you apply `ascending("status")` and then `ascending("numberOfAttendees")`, the results are sorted first by the `"status"`, and then, if there are multiple results with the same `"status"`, the items are sorted by `"numberOfAttendees"`.
|
|
503
|
+
*
|
|
504
|
+
* The following `AttendancesQueryBuilder` functions are supported for the `queryAttendances()` function. For a full description of the tip settings object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/attendance/attendances-query-result/items) property in `AttendancesQueryResult`.
|
|
505
|
+
* @public
|
|
506
|
+
* @documentationMaturity preview
|
|
507
|
+
* @permissionScope Manage Bookings Services and Settings
|
|
508
|
+
* @permissionScopeId SCOPE.BOOKINGS.CONFIGURATION
|
|
509
|
+
* @permissionScope Manage Bookings
|
|
510
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
511
|
+
* @permissionScope Read Bookings - Including Participants
|
|
512
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
513
|
+
* @permissionScope Read Bookings - all read permissions
|
|
514
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
515
|
+
* @permissionScope Manage Bookings - all permissions
|
|
516
|
+
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
517
|
+
* @permissionId BOOKINGS.ATTENDANCE_READ
|
|
518
|
+
* @applicableIdentity APP
|
|
519
|
+
* @applicableIdentity VISITOR
|
|
520
|
+
* @fqn com.wixpress.bookings.attendance.v2.AttendanceService.QueryAttendance
|
|
521
|
+
*/
|
|
522
|
+
export declare function queryAttendance(): AttendancesQueryBuilder;
|
|
523
|
+
interface QueryCursorResult {
|
|
524
|
+
cursors: Cursors;
|
|
525
|
+
hasNext: () => boolean;
|
|
526
|
+
hasPrev: () => boolean;
|
|
527
|
+
length: number;
|
|
528
|
+
pageSize: number;
|
|
529
|
+
}
|
|
530
|
+
export interface AttendancesQueryResult extends QueryCursorResult {
|
|
531
|
+
items: Attendance[];
|
|
532
|
+
query: AttendancesQueryBuilder;
|
|
533
|
+
next: () => Promise<AttendancesQueryResult>;
|
|
534
|
+
prev: () => Promise<AttendancesQueryResult>;
|
|
535
|
+
}
|
|
536
|
+
export interface AttendancesQueryBuilder {
|
|
537
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
538
|
+
* @param value - Value to compare against.
|
|
539
|
+
* @documentationMaturity preview
|
|
540
|
+
*/
|
|
541
|
+
eq: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
542
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
543
|
+
* @param value - Value to compare against.
|
|
544
|
+
* @documentationMaturity preview
|
|
545
|
+
*/
|
|
546
|
+
ne: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
547
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
548
|
+
* @param value - Value to compare against.
|
|
549
|
+
* @documentationMaturity preview
|
|
550
|
+
*/
|
|
551
|
+
ge: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
552
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
553
|
+
* @param value - Value to compare against.
|
|
554
|
+
* @documentationMaturity preview
|
|
555
|
+
*/
|
|
556
|
+
gt: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
557
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
558
|
+
* @param value - Value to compare against.
|
|
559
|
+
* @documentationMaturity preview
|
|
560
|
+
*/
|
|
561
|
+
le: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
562
|
+
/** @param propertyName - Property whose value is compared with `value`.
|
|
563
|
+
* @param value - Value to compare against.
|
|
564
|
+
* @documentationMaturity preview
|
|
565
|
+
*/
|
|
566
|
+
lt: (propertyName: 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
567
|
+
/** @documentationMaturity preview */
|
|
568
|
+
in: (propertyName: '_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees', value: any) => AttendancesQueryBuilder;
|
|
569
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
570
|
+
* @documentationMaturity preview
|
|
571
|
+
*/
|
|
572
|
+
ascending: (...propertyNames: Array<'_id' | 'bookingId' | 'sessionId' | 'status' | 'numberOfAttendees'>) => AttendancesQueryBuilder;
|
|
573
|
+
/** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.
|
|
574
|
+
* @documentationMaturity preview
|
|
575
|
+
*/
|
|
576
|
+
descending: (...propertyNames: Array<'numberOfAttendees'>) => AttendancesQueryBuilder;
|
|
577
|
+
/** @param limit - Number of items to return, which is also the `pageSize` of the results object.
|
|
578
|
+
* @documentationMaturity preview
|
|
579
|
+
*/
|
|
580
|
+
limit: (limit: number) => AttendancesQueryBuilder;
|
|
581
|
+
/** @param cursor - A pointer to specific record
|
|
582
|
+
* @documentationMaturity preview
|
|
583
|
+
*/
|
|
584
|
+
skipTo: (cursor: string) => AttendancesQueryBuilder;
|
|
585
|
+
/** @documentationMaturity preview */
|
|
586
|
+
find: () => Promise<AttendancesQueryResult>;
|
|
587
|
+
}
|
|
588
|
+
export {};
|