@wix/auto_sdk_bookings_attendance 1.0.0

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