@wix/auto_sdk_bookings_catalog-search 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.
- package/build/cjs/index.d.ts +1784 -0
- package/build/cjs/index.js +304 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/index.typings.d.ts +1 -0
- package/build/cjs/index.typings.js +291 -0
- package/build/cjs/index.typings.js.map +1 -0
- package/build/cjs/meta.d.ts +1825 -0
- package/build/cjs/meta.js +240 -0
- package/build/cjs/meta.js.map +1 -0
- package/build/es/index.d.mts +1784 -0
- package/build/es/index.mjs +267 -0
- package/build/es/index.mjs.map +1 -0
- package/build/es/index.typings.d.mts +1 -0
- package/build/es/index.typings.mjs +254 -0
- package/build/es/index.typings.mjs.map +1 -0
- package/build/es/meta.d.mts +1825 -0
- package/build/es/meta.mjs +200 -0
- package/build/es/meta.mjs.map +1 -0
- package/build/es/package.json +3 -0
- package/build/internal/cjs/index.d.ts +22 -0
- package/build/internal/cjs/index.js +304 -0
- package/build/internal/cjs/index.js.map +1 -0
- package/build/internal/cjs/index.typings.d.ts +1862 -0
- package/build/internal/cjs/index.typings.js +291 -0
- package/build/internal/cjs/index.typings.js.map +1 -0
- package/build/internal/cjs/meta.d.ts +1826 -0
- package/build/internal/cjs/meta.js +240 -0
- package/build/internal/cjs/meta.js.map +1 -0
- package/build/internal/es/index.d.mts +22 -0
- package/build/internal/es/index.mjs +267 -0
- package/build/internal/es/index.mjs.map +1 -0
- package/build/internal/es/index.typings.d.mts +1862 -0
- package/build/internal/es/index.typings.mjs +254 -0
- package/build/internal/es/index.typings.mjs.map +1 -0
- package/build/internal/es/meta.d.mts +1826 -0
- package/build/internal/es/meta.mjs +200 -0
- package/build/internal/es/meta.mjs.map +1 -0
- package/meta/package.json +3 -0
- package/package.json +55 -0
|
@@ -0,0 +1,1784 @@
|
|
|
1
|
+
interface CatalogSearchResult {
|
|
2
|
+
/** @format GUID */
|
|
3
|
+
_id?: string;
|
|
4
|
+
}
|
|
5
|
+
interface QueryServicesByAvailabilityRequest {
|
|
6
|
+
/**
|
|
7
|
+
* Query against the service catalog — WQL filter, sort, and cursor paging.
|
|
8
|
+
* Supports the same fields as QueryServices.
|
|
9
|
+
*/
|
|
10
|
+
query?: QueryV2;
|
|
11
|
+
/**
|
|
12
|
+
* Availability and resource constraints applied on top of the service query.
|
|
13
|
+
* When absent, no availability check is performed and all pre-filtered services are returned.
|
|
14
|
+
*/
|
|
15
|
+
availabilityFilter?: AvailabilityFilter;
|
|
16
|
+
}
|
|
17
|
+
interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
18
|
+
paging?: Paging;
|
|
19
|
+
filter?: Record<string, any> | null;
|
|
20
|
+
/** @maxSize 50 */
|
|
21
|
+
sort?: Sorting[];
|
|
22
|
+
}
|
|
23
|
+
/** @oneof */
|
|
24
|
+
interface QueryV2PagingMethodOneOf {
|
|
25
|
+
paging?: Paging;
|
|
26
|
+
}
|
|
27
|
+
interface Sorting {
|
|
28
|
+
/**
|
|
29
|
+
* Name of the field to sort by.
|
|
30
|
+
* @maxLength 512
|
|
31
|
+
*/
|
|
32
|
+
fieldName?: string;
|
|
33
|
+
/** Sort order. */
|
|
34
|
+
order?: SortOrderWithLiterals;
|
|
35
|
+
}
|
|
36
|
+
declare enum SortOrder {
|
|
37
|
+
ASC = "ASC",
|
|
38
|
+
DESC = "DESC"
|
|
39
|
+
}
|
|
40
|
+
/** @enumType */
|
|
41
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
42
|
+
interface Paging {
|
|
43
|
+
/** Number of items to load. */
|
|
44
|
+
limit?: number | null;
|
|
45
|
+
/** Number of items to skip in the current sort order. */
|
|
46
|
+
offset?: number | null;
|
|
47
|
+
}
|
|
48
|
+
interface CursorPaging {
|
|
49
|
+
/**
|
|
50
|
+
* Maximum number of items to return in the results.
|
|
51
|
+
* @max 100
|
|
52
|
+
*/
|
|
53
|
+
limit?: number | null;
|
|
54
|
+
/**
|
|
55
|
+
* Pointer to the next or previous page in the list of results.
|
|
56
|
+
*
|
|
57
|
+
* Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
58
|
+
* Not relevant for the first request.
|
|
59
|
+
* @maxLength 16000
|
|
60
|
+
*/
|
|
61
|
+
cursor?: string | null;
|
|
62
|
+
}
|
|
63
|
+
interface AvailabilityFilter {
|
|
64
|
+
/**
|
|
65
|
+
* Start of the availability window (ISO local date-time, e.g. "2024-03-25T09:00:00").
|
|
66
|
+
* Must be provided together with local_end_date.
|
|
67
|
+
* @format LOCAL_DATE_TIME
|
|
68
|
+
*/
|
|
69
|
+
localStartDate?: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* End of the availability window (ISO local date-time, e.g. "2024-03-25T17:00:00").
|
|
72
|
+
* Must be provided together with local_start_date.
|
|
73
|
+
* @format LOCAL_DATE_TIME
|
|
74
|
+
*/
|
|
75
|
+
localEndDate?: string | null;
|
|
76
|
+
/**
|
|
77
|
+
* IANA time zone identifier (e.g. "America/New_York"). Required when a date range is provided.
|
|
78
|
+
* @maxLength 100
|
|
79
|
+
*/
|
|
80
|
+
timeZone?: string | null;
|
|
81
|
+
/**
|
|
82
|
+
* When true: the service must be bookable for the entire requested range.
|
|
83
|
+
* - Hours range (< 2 days): a single booking must fit the full range duration.
|
|
84
|
+
* - Days range (≥ 2 days): the service must have available slots on every day.
|
|
85
|
+
* When false (default): the service needs at least one bookable slot anywhere within the range.
|
|
86
|
+
*/
|
|
87
|
+
exactMatch?: boolean | null;
|
|
88
|
+
/**
|
|
89
|
+
* Filters services to those whose resources are available at these business locations.
|
|
90
|
+
* If empty, no location-based resource filtering is applied.
|
|
91
|
+
* Note: at most 200 matching resources are scanned for the location/resource_type pre-filter;
|
|
92
|
+
* beyond that the filtered set is truncated and results may be imprecise.
|
|
93
|
+
* @maxSize 100
|
|
94
|
+
* @format GUID
|
|
95
|
+
*/
|
|
96
|
+
locationIds?: string[];
|
|
97
|
+
/**
|
|
98
|
+
* Filters services to those that have a resource matching the requested attributes. Values given
|
|
99
|
+
* for the same attribute are OR'd (match any); values for different attributes are AND'd (match all).
|
|
100
|
+
* If empty, no attribute filtering is applied.
|
|
101
|
+
* Note: at most 1,000 matching attribute values are scanned across all conditions; beyond that the
|
|
102
|
+
* set is truncated and results may be imprecise.
|
|
103
|
+
* @maxSize 10
|
|
104
|
+
*/
|
|
105
|
+
attributes?: Attribute[];
|
|
106
|
+
/**
|
|
107
|
+
* Filters services to those that use resources of the given types (e.g. "STAFF", "ROOM").
|
|
108
|
+
* If empty, all resource types are included.
|
|
109
|
+
* Note: see `locations` for the 200-resource pre-filter scan limit.
|
|
110
|
+
* @maxSize 10
|
|
111
|
+
* @maxLength 100
|
|
112
|
+
*/
|
|
113
|
+
resourceTypes?: string[];
|
|
114
|
+
/**
|
|
115
|
+
* When true, unavailable services are included in the response with available=false.
|
|
116
|
+
* When absent or false, only available services are returned.
|
|
117
|
+
*/
|
|
118
|
+
includeUnavailable?: boolean | null;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Filters resources by a single attribute value.
|
|
122
|
+
* Exactly one value variant must be set, matching the attribute definition's value_type.
|
|
123
|
+
*/
|
|
124
|
+
interface Attribute extends AttributeValueOneOf {
|
|
125
|
+
/**
|
|
126
|
+
* Exact enum value to match. Must be in the attribute's EnumConfig.allowed_values.
|
|
127
|
+
* @maxLength 40
|
|
128
|
+
*/
|
|
129
|
+
enumValue?: string;
|
|
130
|
+
/** Exact number value to match. */
|
|
131
|
+
numberValue?: number;
|
|
132
|
+
/** Exact boolean value to match. */
|
|
133
|
+
boolValue?: boolean;
|
|
134
|
+
/**
|
|
135
|
+
* ID of the attribute definition to filter by.
|
|
136
|
+
* @format GUID
|
|
137
|
+
*/
|
|
138
|
+
attributeId?: string;
|
|
139
|
+
}
|
|
140
|
+
/** @oneof */
|
|
141
|
+
interface AttributeValueOneOf {
|
|
142
|
+
/**
|
|
143
|
+
* Exact enum value to match. Must be in the attribute's EnumConfig.allowed_values.
|
|
144
|
+
* @maxLength 40
|
|
145
|
+
*/
|
|
146
|
+
enumValue?: string;
|
|
147
|
+
/** Exact number value to match. */
|
|
148
|
+
numberValue?: number;
|
|
149
|
+
/** Exact boolean value to match. */
|
|
150
|
+
boolValue?: boolean;
|
|
151
|
+
}
|
|
152
|
+
interface QueryServicesByAvailabilityResponse {
|
|
153
|
+
/** Services matching the query, each enriched with availability data. */
|
|
154
|
+
results?: ServiceWithAvailability[];
|
|
155
|
+
/**
|
|
156
|
+
* Paging metadata. The cursor in `paging_metadata.cursors.next` is an opaque token owned by CatalogSearch.
|
|
157
|
+
* Pass it unchanged in the next request's `query.cursor_paging.cursor`.
|
|
158
|
+
* Do not assume any relationship between this cursor and the internal cursors of services-2 or other upstream services.
|
|
159
|
+
*/
|
|
160
|
+
pagingMetadata?: CursorPagingMetadata;
|
|
161
|
+
}
|
|
162
|
+
/** A service enriched with availability data. */
|
|
163
|
+
interface ServiceWithAvailability {
|
|
164
|
+
/** The service entity. */
|
|
165
|
+
service?: Service;
|
|
166
|
+
/**
|
|
167
|
+
* Whether the service has available slots in the requested window.
|
|
168
|
+
* Always true when no date range was provided.
|
|
169
|
+
*/
|
|
170
|
+
available?: boolean;
|
|
171
|
+
}
|
|
172
|
+
/** The `service` object represents an offering that a business provides to its customers. */
|
|
173
|
+
interface Service {
|
|
174
|
+
/**
|
|
175
|
+
* Service ID.
|
|
176
|
+
* @format GUID
|
|
177
|
+
* @readonly
|
|
178
|
+
*/
|
|
179
|
+
_id?: string | null;
|
|
180
|
+
/**
|
|
181
|
+
* ID of the app associated with the service. You can't update `appId`.
|
|
182
|
+
* Services are displayed in Wix Bookings only if they are associated with the Wix Bookings appId or have no associated app ID.
|
|
183
|
+
* Default: `13d21c63-b5ec-5912-8397-c3a5ddb27a97` (Wix Bookings app ID)
|
|
184
|
+
* For services from Wix apps, the following values apply:
|
|
185
|
+
* - Wix Bookings: `"13d21c63-b5ec-5912-8397-c3a5ddb27a97"`
|
|
186
|
+
* - Wix Services: `"cc552162-24a4-45e0-9695-230c4931ef40"`
|
|
187
|
+
* - Wix Meetings: `"6646a75c-2027-4f49-976c-58f3d713ed0f"`.<!-- [Scheduling Form Fields](https://dev.wix.com/docs/api-reference/business-solutions/bookings/about-scheduling-form-fields) services also use this app ID. Use `createdByAppId` to distinguish between Wix Meetings and Scheduling Form Fields services.-->
|
|
188
|
+
* [Full list of apps created by Wix](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/platform/about-apps-created-by-wix).
|
|
189
|
+
* <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
|
|
190
|
+
* @format GUID
|
|
191
|
+
* @immutable
|
|
192
|
+
*/
|
|
193
|
+
appId?: string | null;
|
|
194
|
+
/**
|
|
195
|
+
* ID of the app that created the service. This field is used for analytics, auditing, and tracking creation sources.
|
|
196
|
+
* This read-only field is automatically populated during service creation by checking these sources in order:
|
|
197
|
+
* 1. The caller's App ID from the request identity context.
|
|
198
|
+
* 2. The service's `appId` field.
|
|
199
|
+
* 3. The Wix Bookings App ID (`13d21c63-b5ec-5912-8397-c3a5ddb27a97`) as the final fallback.
|
|
200
|
+
* <!-- TODO: Uncomment when Platform docs are published - Learn more about [app identity in the Bookings Platform](https://dev.wix.com/docs/api-reference/business-solutions/bookings/bookings-platform/app-identity-in-the-bookings-platform). -->
|
|
201
|
+
* @format GUID
|
|
202
|
+
* @readonly
|
|
203
|
+
*/
|
|
204
|
+
createdByAppId?: string | null;
|
|
205
|
+
/**
|
|
206
|
+
* Service type.
|
|
207
|
+
* Learn more about [service types](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-types).
|
|
208
|
+
*/
|
|
209
|
+
type?: ServiceTypeWithLiterals;
|
|
210
|
+
/** Order of the service within a [category](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v1/category-object). */
|
|
211
|
+
sortOrder?: number | null;
|
|
212
|
+
/**
|
|
213
|
+
* Service name.
|
|
214
|
+
* @maxLength 400
|
|
215
|
+
* @minLength 1
|
|
216
|
+
*/
|
|
217
|
+
name?: string | null;
|
|
218
|
+
/**
|
|
219
|
+
* Service description. For example, `High-class hair styling, cuts, straightening and color`.
|
|
220
|
+
* @maxLength 7000
|
|
221
|
+
*/
|
|
222
|
+
description?: string | null;
|
|
223
|
+
/**
|
|
224
|
+
* Short service description, such as `Hair styling`.
|
|
225
|
+
* @maxLength 6000
|
|
226
|
+
*/
|
|
227
|
+
tagLine?: string | null;
|
|
228
|
+
/**
|
|
229
|
+
* Default maximum number of customers that can book the service. The service cannot be booked beyond this capacity.
|
|
230
|
+
* @min 1
|
|
231
|
+
* @max 1000
|
|
232
|
+
*/
|
|
233
|
+
defaultCapacity?: number | null;
|
|
234
|
+
/** Media associated with the service. */
|
|
235
|
+
media?: Media;
|
|
236
|
+
/** Whether the service is hidden from Wix Bookings pages and widgets. */
|
|
237
|
+
hidden?: boolean | null;
|
|
238
|
+
/**
|
|
239
|
+
* [Category](https://dev.wix.com/docs/rest/business-solutions/bookings/services/categories-v2/introduction)
|
|
240
|
+
* the service is associated with. Services aren't automatically assigned to a category.
|
|
241
|
+
* Without an associated category, the service isn't visible on the live site.
|
|
242
|
+
*/
|
|
243
|
+
category?: Category;
|
|
244
|
+
/** Form the customer filled out when booking the service. */
|
|
245
|
+
form?: Form;
|
|
246
|
+
/**
|
|
247
|
+
* Payment options for booking the service.
|
|
248
|
+
* Learn more about [service payments](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-payments).
|
|
249
|
+
*/
|
|
250
|
+
payment?: Payment;
|
|
251
|
+
/** Online booking settings. */
|
|
252
|
+
onlineBooking?: OnlineBooking;
|
|
253
|
+
/** Conferencing options for the service. */
|
|
254
|
+
conferencing?: Conferencing;
|
|
255
|
+
/**
|
|
256
|
+
* The locations this service is offered at. Read more about [service locations](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations).
|
|
257
|
+
* @immutable
|
|
258
|
+
* @maxSize 500
|
|
259
|
+
*/
|
|
260
|
+
locations?: Location[];
|
|
261
|
+
/**
|
|
262
|
+
* [Policy](https://dev.wix.com/docs/rest/business-solutions/bookings/policies/booking-policies/introduction)
|
|
263
|
+
* determining under what conditions this service can be booked. For example, whether the service can only be booked up to 30 minutes before it begins.
|
|
264
|
+
*/
|
|
265
|
+
bookingPolicy?: BookingPolicy;
|
|
266
|
+
/**
|
|
267
|
+
* The service's [schedule](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction),
|
|
268
|
+
* which can be used to manage the service's [events](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction).
|
|
269
|
+
*/
|
|
270
|
+
schedule?: Schedule;
|
|
271
|
+
/**
|
|
272
|
+
* IDs of the [resources](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction) associated with the [staff members](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/introduction) providing the service.
|
|
273
|
+
* Note that these are the resource IDs, not the staff member IDs.
|
|
274
|
+
*
|
|
275
|
+
* For appointment-based services, set this field when creating or updating the service.
|
|
276
|
+
* For classes and courses, this field is read-only and is automatically derived from staff assigned to the service's recurring scheduled sessions.
|
|
277
|
+
* Staff assigned only to single, non-recurring events are not included.
|
|
278
|
+
* Once all of a staff member's upcoming recurring sessions have ended, their ID is removed from this field.
|
|
279
|
+
* To retrieve the full list of staff for classes or courses, query the service's calendar events instead.
|
|
280
|
+
* Learn more about [retrieving staff for classes and courses](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/sample-flows#retrieve-staff-members-for-a-class-or-course).
|
|
281
|
+
* @maxSize 220
|
|
282
|
+
* @format GUID
|
|
283
|
+
*/
|
|
284
|
+
staffMemberIds?: string[];
|
|
285
|
+
/** Staff members details. Returned only if `STAFF_MEMBER_DETAILS` conditional field was specified. */
|
|
286
|
+
staffMemberDetails?: StaffMemberDetails;
|
|
287
|
+
/**
|
|
288
|
+
* Information about which resources must be available so customers can book the service.
|
|
289
|
+
* For example, a meeting room or equipment.
|
|
290
|
+
* Some nested fields are only returned when specific conditional fields are requested:
|
|
291
|
+
* pass `RESOURCE_TYPE_DETAILS` to retrieve `resourceType.name`, and `RESOURCE_DETAILS` to retrieve `resourceDetails.resources`.
|
|
292
|
+
* @maxSize 3
|
|
293
|
+
*/
|
|
294
|
+
serviceResources?: ServiceResource[];
|
|
295
|
+
/**
|
|
296
|
+
* A slug is the last part of the URL address that serves as a unique identifier of the service.
|
|
297
|
+
* The list of supported slugs includes past service names for backwards compatibility, and a custom slug if one was set by the business owner.
|
|
298
|
+
* @readonly
|
|
299
|
+
* @maxSize 100
|
|
300
|
+
*/
|
|
301
|
+
supportedSlugs?: Slug[];
|
|
302
|
+
/**
|
|
303
|
+
* Active slug for the service.
|
|
304
|
+
* Learn more about [service slugs](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-slugs).
|
|
305
|
+
* @readonly
|
|
306
|
+
*/
|
|
307
|
+
mainSlug?: Slug;
|
|
308
|
+
/**
|
|
309
|
+
* URLs to various service-related pages, such as the calendar page and the booking page.
|
|
310
|
+
* @readonly
|
|
311
|
+
*/
|
|
312
|
+
urls?: URLs;
|
|
313
|
+
/** Extensions enabling users to save custom data related to the service. */
|
|
314
|
+
extendedFields?: ExtendedFields;
|
|
315
|
+
/** Custom SEO data for the service. */
|
|
316
|
+
seoData?: SeoSchema;
|
|
317
|
+
/**
|
|
318
|
+
* Date and time the service was created in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
319
|
+
* @readonly
|
|
320
|
+
*/
|
|
321
|
+
_createdDate?: Date | null;
|
|
322
|
+
/**
|
|
323
|
+
* Date and time the service was updated in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
324
|
+
* @readonly
|
|
325
|
+
*/
|
|
326
|
+
_updatedDate?: Date | null;
|
|
327
|
+
/**
|
|
328
|
+
* Revision number, which increments by 1 each time the service is updated. To
|
|
329
|
+
* prevent conflicting changes, the existing revision must be used when updating
|
|
330
|
+
* a service.
|
|
331
|
+
* @readonly
|
|
332
|
+
*/
|
|
333
|
+
revision?: string | null;
|
|
334
|
+
/**
|
|
335
|
+
* Information about the [add-on groups](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-add-on-groups) associated with the service.
|
|
336
|
+
* @maxSize 3
|
|
337
|
+
*/
|
|
338
|
+
addOnGroups?: AddOnGroup[];
|
|
339
|
+
/**
|
|
340
|
+
* Details about all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) customers can choose when booking the service.
|
|
341
|
+
* @readonly
|
|
342
|
+
* @maxSize 50
|
|
343
|
+
*/
|
|
344
|
+
addOnDetails?: AddOnDetails[];
|
|
345
|
+
/** Taxable address used to calculate tax */
|
|
346
|
+
taxableAddress?: TaxableAddress;
|
|
347
|
+
/** Whether to inherit resource locations for availability resolution. */
|
|
348
|
+
inheritResourceLocations?: boolean | null;
|
|
349
|
+
}
|
|
350
|
+
declare enum ServiceType {
|
|
351
|
+
/** Appointment-based service. */
|
|
352
|
+
APPOINTMENT = "APPOINTMENT",
|
|
353
|
+
/** Class service. */
|
|
354
|
+
CLASS = "CLASS",
|
|
355
|
+
/** Course service. */
|
|
356
|
+
COURSE = "COURSE"
|
|
357
|
+
}
|
|
358
|
+
/** @enumType */
|
|
359
|
+
type ServiceTypeWithLiterals = ServiceType | 'APPOINTMENT' | 'CLASS' | 'COURSE';
|
|
360
|
+
interface Media {
|
|
361
|
+
/**
|
|
362
|
+
* Media items associated with the service.
|
|
363
|
+
* @maxSize 100
|
|
364
|
+
*/
|
|
365
|
+
items?: MediaItem[];
|
|
366
|
+
/** Primary media associated with the service. */
|
|
367
|
+
mainMedia?: MediaItem;
|
|
368
|
+
/** Cover media associated with the service. */
|
|
369
|
+
coverMedia?: MediaItem;
|
|
370
|
+
}
|
|
371
|
+
interface MediaItem extends MediaItemItemOneOf {
|
|
372
|
+
/** Details of the image associated with the service, such as URL and size. */
|
|
373
|
+
image?: string;
|
|
374
|
+
}
|
|
375
|
+
/** @oneof */
|
|
376
|
+
interface MediaItemItemOneOf {
|
|
377
|
+
/** Details of the image associated with the service, such as URL and size. */
|
|
378
|
+
image?: string;
|
|
379
|
+
}
|
|
380
|
+
interface Category {
|
|
381
|
+
/**
|
|
382
|
+
* Category ID.
|
|
383
|
+
* @format GUID
|
|
384
|
+
*/
|
|
385
|
+
_id?: string;
|
|
386
|
+
/**
|
|
387
|
+
* Category name.
|
|
388
|
+
* @maxLength 500
|
|
389
|
+
* @readonly
|
|
390
|
+
*/
|
|
391
|
+
name?: string | null;
|
|
392
|
+
/**
|
|
393
|
+
* Order of a category within a category list.
|
|
394
|
+
* @readonly
|
|
395
|
+
*/
|
|
396
|
+
sortOrder?: number | null;
|
|
397
|
+
}
|
|
398
|
+
interface Form {
|
|
399
|
+
/**
|
|
400
|
+
* ID of the form associated with the service.
|
|
401
|
+
* The form information that you submit when booking includes contact details, participants, and other form fields set up for the service.
|
|
402
|
+
* You can manage the service booking form fields using the Bookings Forms API.
|
|
403
|
+
* @format GUID
|
|
404
|
+
*/
|
|
405
|
+
_id?: string;
|
|
406
|
+
}
|
|
407
|
+
interface FormSettings {
|
|
408
|
+
/** Whether the service booking form should be hidden from the site. */
|
|
409
|
+
hidden?: boolean | null;
|
|
410
|
+
}
|
|
411
|
+
interface Payment extends PaymentRateOneOf {
|
|
412
|
+
/**
|
|
413
|
+
* The details for the fixed price of the service.
|
|
414
|
+
*
|
|
415
|
+
* Required when: `rateType` is `FIXED`
|
|
416
|
+
*/
|
|
417
|
+
fixed?: FixedPayment;
|
|
418
|
+
/**
|
|
419
|
+
* The details for the custom price of the service.
|
|
420
|
+
*
|
|
421
|
+
* Required when: `rateType` is `CUSTOM`
|
|
422
|
+
*/
|
|
423
|
+
custom?: CustomPayment;
|
|
424
|
+
/**
|
|
425
|
+
* The details for the varied pricing of the service.
|
|
426
|
+
* Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
|
|
427
|
+
*
|
|
428
|
+
* Required when: `rateType` is `VARIED`
|
|
429
|
+
*/
|
|
430
|
+
varied?: VariedPayment;
|
|
431
|
+
/** The rate the customer is expected to pay for the service. */
|
|
432
|
+
rateType?: RateTypeWithLiterals;
|
|
433
|
+
/** The payment options a customer can use to pay for the service. */
|
|
434
|
+
options?: PaymentOptions;
|
|
435
|
+
/**
|
|
436
|
+
* IDs of pricing plans that can be used as payment for the service.
|
|
437
|
+
* Read more about [service payment options](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments).
|
|
438
|
+
* @readonly
|
|
439
|
+
* @maxSize 75
|
|
440
|
+
* @format GUID
|
|
441
|
+
*/
|
|
442
|
+
pricingPlanIds?: string[];
|
|
443
|
+
/**
|
|
444
|
+
* How customers can pay for add-ons when paying for the related booking with a [pricing plan](https://dev.wix.com/docs/api-reference/business-solutions/pricing-plans/pricing-plans/introduction).
|
|
445
|
+
* If customers pay for the booking using any method other than a pricing plan, the value of this field is ignored.
|
|
446
|
+
*/
|
|
447
|
+
addOnOption?: AddOnPaymentOptionsWithLiterals;
|
|
448
|
+
/**
|
|
449
|
+
* Estimated discount information for the service based on active [eCommerce discounts](https://dev.wix.com/docs/rest/business-solutions/e-commerce/extensions/discounts/introduction).
|
|
450
|
+
* The final discount is determined during eCommerce checkout and may differ from the estimate,
|
|
451
|
+
* for example when discounts depend on cart totals.
|
|
452
|
+
*
|
|
453
|
+
* A discount is considered active when its start time has passed and its end time hasn't.
|
|
454
|
+
* If multiple active discounts apply, the most recently created one is returned.
|
|
455
|
+
*
|
|
456
|
+
* Returned only when `DISCOUNT_INFO_DETAILS` is requested.
|
|
457
|
+
* @readonly
|
|
458
|
+
*/
|
|
459
|
+
discountInfo?: DiscountInfo;
|
|
460
|
+
}
|
|
461
|
+
/** @oneof */
|
|
462
|
+
interface PaymentRateOneOf {
|
|
463
|
+
/**
|
|
464
|
+
* The details for the fixed price of the service.
|
|
465
|
+
*
|
|
466
|
+
* Required when: `rateType` is `FIXED`
|
|
467
|
+
*/
|
|
468
|
+
fixed?: FixedPayment;
|
|
469
|
+
/**
|
|
470
|
+
* The details for the custom price of the service.
|
|
471
|
+
*
|
|
472
|
+
* Required when: `rateType` is `CUSTOM`
|
|
473
|
+
*/
|
|
474
|
+
custom?: CustomPayment;
|
|
475
|
+
/**
|
|
476
|
+
* The details for the varied pricing of the service.
|
|
477
|
+
* Read more about [varied price options](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online#offering-varied-price-options).
|
|
478
|
+
*
|
|
479
|
+
* Required when: `rateType` is `VARIED`
|
|
480
|
+
*/
|
|
481
|
+
varied?: VariedPayment;
|
|
482
|
+
}
|
|
483
|
+
declare enum RateType {
|
|
484
|
+
/** The service has a fixed price. */
|
|
485
|
+
FIXED = "FIXED",
|
|
486
|
+
/** The service has a custom price, expressed as a price description. */
|
|
487
|
+
CUSTOM = "CUSTOM",
|
|
488
|
+
/** This service is offered with a set of different prices based on different terms. */
|
|
489
|
+
VARIED = "VARIED",
|
|
490
|
+
/** This service is offered free of charge. */
|
|
491
|
+
NO_FEE = "NO_FEE"
|
|
492
|
+
}
|
|
493
|
+
/** @enumType */
|
|
494
|
+
type RateTypeWithLiterals = RateType | 'FIXED' | 'CUSTOM' | 'VARIED' | 'NO_FEE';
|
|
495
|
+
interface FixedPayment {
|
|
496
|
+
/**
|
|
497
|
+
* The fixed price required to book the service.
|
|
498
|
+
*
|
|
499
|
+
* Required when: `rateType` is `FIXED`
|
|
500
|
+
*/
|
|
501
|
+
price?: Money;
|
|
502
|
+
/**
|
|
503
|
+
* The deposit price required to book the service.
|
|
504
|
+
*
|
|
505
|
+
* Required when: `rateType` is `FIXED` and `paymentOptions.deposit` is `true`
|
|
506
|
+
*/
|
|
507
|
+
deposit?: Money;
|
|
508
|
+
/**
|
|
509
|
+
* Whether customers can choose to pay the full service price upfront instead of only the deposit.
|
|
510
|
+
*
|
|
511
|
+
* Used only when a `deposit` amount is set.
|
|
512
|
+
*
|
|
513
|
+
* Default: `false`.
|
|
514
|
+
*/
|
|
515
|
+
fullUpfrontPaymentAllowed?: boolean | null;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Money.
|
|
519
|
+
* Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.
|
|
520
|
+
*/
|
|
521
|
+
interface Money {
|
|
522
|
+
/**
|
|
523
|
+
* Monetary amount. Decimal string with a period as a decimal separator. For example `25.05`.
|
|
524
|
+
* @format DECIMAL_VALUE
|
|
525
|
+
* @decimalValue options { gt:0, maxScale:2 }
|
|
526
|
+
*/
|
|
527
|
+
value?: string;
|
|
528
|
+
/**
|
|
529
|
+
* Currency code in [ISO 4217 format](https://en.wikipedia.org/wiki/ISO_4217). For example, `USD`.
|
|
530
|
+
* @format CURRENCY
|
|
531
|
+
* @readonly
|
|
532
|
+
*/
|
|
533
|
+
currency?: string;
|
|
534
|
+
/**
|
|
535
|
+
* Monetary amount. Decimal string in local format. For example, `1 000,30`.
|
|
536
|
+
* @maxLength 50
|
|
537
|
+
*/
|
|
538
|
+
formattedValue?: string | null;
|
|
539
|
+
}
|
|
540
|
+
interface CustomPayment {
|
|
541
|
+
/**
|
|
542
|
+
* A custom description explaining to the customer how to pay for the service.
|
|
543
|
+
* @maxLength 50
|
|
544
|
+
*/
|
|
545
|
+
description?: string | null;
|
|
546
|
+
}
|
|
547
|
+
interface VariedPayment {
|
|
548
|
+
/** The default price for the service without any variants. It will also be used as the default price for any new variant. */
|
|
549
|
+
defaultPrice?: Money;
|
|
550
|
+
/**
|
|
551
|
+
* The deposit price required to book the service.
|
|
552
|
+
*
|
|
553
|
+
* Required when: `rateType` is `VARIED` and `paymentOptions.deposit` is `true`
|
|
554
|
+
*/
|
|
555
|
+
deposit?: Money;
|
|
556
|
+
/**
|
|
557
|
+
* The minimal price a customer may pay for this service, based on its variants.
|
|
558
|
+
* @readonly
|
|
559
|
+
*/
|
|
560
|
+
minPrice?: Money;
|
|
561
|
+
/**
|
|
562
|
+
* The maximum price a customer may pay for this service, based on its variants.
|
|
563
|
+
* @readonly
|
|
564
|
+
*/
|
|
565
|
+
maxPrice?: Money;
|
|
566
|
+
/**
|
|
567
|
+
* Whether customers can choose to pay the full service price upfront instead of only the deposit.
|
|
568
|
+
*
|
|
569
|
+
* Used only when a `deposit` amount is set.
|
|
570
|
+
*
|
|
571
|
+
* Default: `false`.
|
|
572
|
+
*/
|
|
573
|
+
fullUpfrontPaymentAllowed?: boolean | null;
|
|
574
|
+
}
|
|
575
|
+
interface SubscriptionPayment {
|
|
576
|
+
/** Amount charged each billing cycle. */
|
|
577
|
+
amountPerBillingCycle?: Money;
|
|
578
|
+
/** Billing frequency used for recurring subscription charges. */
|
|
579
|
+
frequency?: FrequencyTypeWithLiterals;
|
|
580
|
+
/**
|
|
581
|
+
* Total number of recurring payments in the subscription.
|
|
582
|
+
* Value must be greater than `1`.
|
|
583
|
+
* Required when: `rateType` is `SUBSCRIPTION`
|
|
584
|
+
* @min 2
|
|
585
|
+
*/
|
|
586
|
+
totalPayments?: number | null;
|
|
587
|
+
/** When the first recurring payment is charged. */
|
|
588
|
+
firstChargeDate?: FirstChargeDateTypeWithLiterals;
|
|
589
|
+
/**
|
|
590
|
+
* Date and time when recurring payments start in `YYYY-MM-DDThh:mm:ss.sssZ` format.
|
|
591
|
+
* When `firstChargeDate` is `SCHEDULED`, the first charge occurs on this date.
|
|
592
|
+
* When `firstChargeDate` is `CHECKOUT`, the first charge occurs at checkout and recurring billing begins on this date.
|
|
593
|
+
* Required when: `rateType` is `SUBSCRIPTION`. Sets the future billing cycle dates.
|
|
594
|
+
*/
|
|
595
|
+
recurringStartDate?: Date | null;
|
|
596
|
+
/**
|
|
597
|
+
* Deprecated.
|
|
598
|
+
* @deprecated Deprecated.
|
|
599
|
+
* @targetRemovalDate 2026-07-01
|
|
600
|
+
*/
|
|
601
|
+
enrollmentFeeAmount?: Money;
|
|
602
|
+
/**
|
|
603
|
+
* Deprecated.
|
|
604
|
+
* @deprecated Deprecated.
|
|
605
|
+
* @targetRemovalDate 2026-07-01
|
|
606
|
+
*/
|
|
607
|
+
fullUpfrontPayment?: FullUpfrontPayment;
|
|
608
|
+
}
|
|
609
|
+
declare enum FrequencyType {
|
|
610
|
+
/** Payment is charged once every month. */
|
|
611
|
+
MONTHLY = "MONTHLY"
|
|
612
|
+
}
|
|
613
|
+
/** @enumType */
|
|
614
|
+
type FrequencyTypeWithLiterals = FrequencyType | 'MONTHLY';
|
|
615
|
+
declare enum FirstChargeDateType {
|
|
616
|
+
/** Charge the first billing cycle at checkout. */
|
|
617
|
+
CHECKOUT = "CHECKOUT",
|
|
618
|
+
/** Charge the first billing cycle on the `recurringStartDate`. */
|
|
619
|
+
SCHEDULED = "SCHEDULED"
|
|
620
|
+
}
|
|
621
|
+
/** @enumType */
|
|
622
|
+
type FirstChargeDateTypeWithLiterals = FirstChargeDateType | 'CHECKOUT' | 'SCHEDULED';
|
|
623
|
+
interface FullUpfrontPayment {
|
|
624
|
+
/** Whether customers can choose a one-time full payment instead of recurring subscription payments. */
|
|
625
|
+
supported?: boolean | null;
|
|
626
|
+
/**
|
|
627
|
+
* Percentage discount applied when a customer chooses the full payment option.
|
|
628
|
+
* Min: `0.01` percent
|
|
629
|
+
* Max: `100` percent
|
|
630
|
+
* @format DECIMAL_VALUE
|
|
631
|
+
* @decimalValue options { gte:0.01, lte:100, maxScale:2 }
|
|
632
|
+
*/
|
|
633
|
+
discountPercent?: string | null;
|
|
634
|
+
}
|
|
635
|
+
interface PaymentOptions {
|
|
636
|
+
/**
|
|
637
|
+
* Customers can pay for the service online.
|
|
638
|
+
* When `true`:
|
|
639
|
+
* + `rateType` must be `FIXED` or `VARIED`.
|
|
640
|
+
* + `fixed.price` or `varied.defaultPrice` must be specified respectively.
|
|
641
|
+
* Read more about [getting paid online](https://support.wix.com/en/article/wix-bookings-about-getting-paid-online).
|
|
642
|
+
*/
|
|
643
|
+
online?: boolean | null;
|
|
644
|
+
/** Customers can pay for the service in person. */
|
|
645
|
+
inPerson?: boolean | null;
|
|
646
|
+
/**
|
|
647
|
+
* This service requires a deposit to be made online in order to book it.
|
|
648
|
+
* When `true`:
|
|
649
|
+
* + `rateType` must be `VARIED` or `FIXED`.
|
|
650
|
+
* + A `deposit` must be specified.
|
|
651
|
+
*/
|
|
652
|
+
deposit?: boolean | null;
|
|
653
|
+
/**
|
|
654
|
+
* Whether customers can pay for the service using a pricing plan.
|
|
655
|
+
* Read more about [service payment options](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/services-v2/about-service-payments).
|
|
656
|
+
*/
|
|
657
|
+
pricingPlan?: boolean | null;
|
|
658
|
+
}
|
|
659
|
+
declare enum AddOnPaymentOptions {
|
|
660
|
+
/** Customers are required to pay online for add-ons when the booking is paid for with a pricing plan. */
|
|
661
|
+
ONLINE = "ONLINE",
|
|
662
|
+
/** Customers are required to pay in person for add-ons when the booking is paid for with a pricing plan. */
|
|
663
|
+
IN_PERSON = "IN_PERSON"
|
|
664
|
+
}
|
|
665
|
+
/** @enumType */
|
|
666
|
+
type AddOnPaymentOptionsWithLiterals = AddOnPaymentOptions | 'ONLINE' | 'IN_PERSON';
|
|
667
|
+
/** Estimated discount information for a service based on active eCommerce discounts. */
|
|
668
|
+
interface DiscountInfo {
|
|
669
|
+
/**
|
|
670
|
+
* Name of the discount. For example, `Summer Sale - 20% Off`.
|
|
671
|
+
* @minLength 1
|
|
672
|
+
* @maxLength 50
|
|
673
|
+
*/
|
|
674
|
+
discountName?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Estimated price after applying the discount. The final price is determined at checkout and may differ when additional discounts are applied or rules are re-evaluated with complete booking information.
|
|
677
|
+
*
|
|
678
|
+
* Not returned when the discount depends on booking or cart context, for example a discount that applies to a service only when booked together with another service, or when the discount requires information only available at checkout.
|
|
679
|
+
*/
|
|
680
|
+
priceAfterDiscount?: Money;
|
|
681
|
+
}
|
|
682
|
+
interface OnlineBooking {
|
|
683
|
+
/**
|
|
684
|
+
* Whether the service can be booked online.
|
|
685
|
+
* When set to `true`, customers can book the service online. Configure the payment options via the `service.payment` property.
|
|
686
|
+
* When set to `false`, customers cannot book the service online, and the service can only be paid for in person.
|
|
687
|
+
*/
|
|
688
|
+
enabled?: boolean | null;
|
|
689
|
+
/** Booking the service requires approval by the Wix user. */
|
|
690
|
+
requireManualApproval?: boolean | null;
|
|
691
|
+
/** Multiple customers can request to book the same time slot. This is relevant when `requireManualApproval` is `true`. */
|
|
692
|
+
allowMultipleRequests?: boolean | null;
|
|
693
|
+
}
|
|
694
|
+
interface Conferencing {
|
|
695
|
+
/** Whether a conference link is generated for the service's sessions. */
|
|
696
|
+
enabled?: boolean | null;
|
|
697
|
+
}
|
|
698
|
+
interface Location extends LocationOptionsOneOf {
|
|
699
|
+
/** Information about business locations. */
|
|
700
|
+
business?: BusinessLocationOptions;
|
|
701
|
+
/** Information about custom locations. */
|
|
702
|
+
custom?: CustomLocationOptions;
|
|
703
|
+
/**
|
|
704
|
+
* Location ID.
|
|
705
|
+
* @format GUID
|
|
706
|
+
* @readonly
|
|
707
|
+
*/
|
|
708
|
+
_id?: string;
|
|
709
|
+
/**
|
|
710
|
+
* Location type.
|
|
711
|
+
*
|
|
712
|
+
* Default: `CUSTOM`
|
|
713
|
+
*/
|
|
714
|
+
type?: LocationTypeWithLiterals;
|
|
715
|
+
/**
|
|
716
|
+
* Location address. Empty for `{"type": "CUSTOMER"}`.
|
|
717
|
+
* @readonly
|
|
718
|
+
*/
|
|
719
|
+
calculatedAddress?: Address;
|
|
720
|
+
}
|
|
721
|
+
/** @oneof */
|
|
722
|
+
interface LocationOptionsOneOf {
|
|
723
|
+
/** Information about business locations. */
|
|
724
|
+
business?: BusinessLocationOptions;
|
|
725
|
+
/** Information about custom locations. */
|
|
726
|
+
custom?: CustomLocationOptions;
|
|
727
|
+
}
|
|
728
|
+
declare enum LocationType {
|
|
729
|
+
/** Location set by the business that is not a standard business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction). */
|
|
730
|
+
CUSTOM = "CUSTOM",
|
|
731
|
+
/** Business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction). */
|
|
732
|
+
BUSINESS = "BUSINESS",
|
|
733
|
+
/**
|
|
734
|
+
* The customer specifies any address when booking. Available only for
|
|
735
|
+
* appointment-based services.
|
|
736
|
+
*/
|
|
737
|
+
CUSTOMER = "CUSTOMER"
|
|
738
|
+
}
|
|
739
|
+
/** @enumType */
|
|
740
|
+
type LocationTypeWithLiterals = LocationType | 'CUSTOM' | 'BUSINESS' | 'CUSTOMER';
|
|
741
|
+
interface Address extends AddressStreetOneOf {
|
|
742
|
+
/** Street name and number. */
|
|
743
|
+
streetAddress?: StreetAddress;
|
|
744
|
+
/** @maxLength 255 */
|
|
745
|
+
addressLine1?: string | null;
|
|
746
|
+
/**
|
|
747
|
+
* 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
|
|
748
|
+
* @format COUNTRY
|
|
749
|
+
*/
|
|
750
|
+
country?: string | null;
|
|
751
|
+
/**
|
|
752
|
+
* Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format.
|
|
753
|
+
* @maxLength 255
|
|
754
|
+
*/
|
|
755
|
+
subdivision?: string | null;
|
|
756
|
+
/**
|
|
757
|
+
* City name.
|
|
758
|
+
* @maxLength 255
|
|
759
|
+
*/
|
|
760
|
+
city?: string | null;
|
|
761
|
+
/**
|
|
762
|
+
* Postal or zip code.
|
|
763
|
+
* @maxLength 255
|
|
764
|
+
*/
|
|
765
|
+
postalCode?: string | null;
|
|
766
|
+
/**
|
|
767
|
+
* Full address of the location.
|
|
768
|
+
* @maxLength 512
|
|
769
|
+
*/
|
|
770
|
+
formatted?: string | null;
|
|
771
|
+
}
|
|
772
|
+
/** @oneof */
|
|
773
|
+
interface AddressStreetOneOf {
|
|
774
|
+
/** Street name and number. */
|
|
775
|
+
streetAddress?: StreetAddress;
|
|
776
|
+
/** @maxLength 255 */
|
|
777
|
+
addressLine?: string | null;
|
|
778
|
+
}
|
|
779
|
+
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
780
|
+
interface StreetAddress {
|
|
781
|
+
/**
|
|
782
|
+
* Street number.
|
|
783
|
+
* @maxLength 255
|
|
784
|
+
*/
|
|
785
|
+
number?: string;
|
|
786
|
+
/**
|
|
787
|
+
* Street name.
|
|
788
|
+
* @maxLength 255
|
|
789
|
+
*/
|
|
790
|
+
name?: string;
|
|
791
|
+
/**
|
|
792
|
+
* Apartment number.
|
|
793
|
+
* @maxLength 255
|
|
794
|
+
*/
|
|
795
|
+
apt?: string;
|
|
796
|
+
}
|
|
797
|
+
interface AddressLocation {
|
|
798
|
+
/** Address latitude. */
|
|
799
|
+
latitude?: number | null;
|
|
800
|
+
/** Address longitude. */
|
|
801
|
+
longitude?: number | null;
|
|
802
|
+
}
|
|
803
|
+
interface BusinessLocationOptions {
|
|
804
|
+
/**
|
|
805
|
+
* ID of the business [location](https://dev.wix.com/docs/api-reference/business-management/locations/introduction).
|
|
806
|
+
* When setting a business location, specify only the location ID. Other location details are overwritten.
|
|
807
|
+
* @format GUID
|
|
808
|
+
*/
|
|
809
|
+
_id?: string;
|
|
810
|
+
/**
|
|
811
|
+
* Business location name.
|
|
812
|
+
* @readonly
|
|
813
|
+
* @maxLength 150
|
|
814
|
+
*/
|
|
815
|
+
name?: string;
|
|
816
|
+
/**
|
|
817
|
+
* Whether this is the default location. There can only be a single default location per site.
|
|
818
|
+
* @readonly
|
|
819
|
+
*/
|
|
820
|
+
default?: boolean | null;
|
|
821
|
+
/**
|
|
822
|
+
* Business location address.
|
|
823
|
+
* @readonly
|
|
824
|
+
*/
|
|
825
|
+
address?: Address;
|
|
826
|
+
/**
|
|
827
|
+
* Business location email.
|
|
828
|
+
* @format EMAIL
|
|
829
|
+
* @readonly
|
|
830
|
+
*/
|
|
831
|
+
email?: string | null;
|
|
832
|
+
/**
|
|
833
|
+
* Business location phone.
|
|
834
|
+
* @format PHONE
|
|
835
|
+
* @readonly
|
|
836
|
+
*/
|
|
837
|
+
phone?: string | null;
|
|
838
|
+
}
|
|
839
|
+
interface CustomLocationOptions {
|
|
840
|
+
/**
|
|
841
|
+
* ID of the custom location.
|
|
842
|
+
* @format GUID
|
|
843
|
+
* @readonly
|
|
844
|
+
*/
|
|
845
|
+
_id?: string;
|
|
846
|
+
/** Address of the custom location. */
|
|
847
|
+
address?: Address;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* `BookingPolicy` is the main entity of `BookingPolicyService` and specifies a set of rules for booking a service
|
|
851
|
+
* by visitors and members.
|
|
852
|
+
*
|
|
853
|
+
* Each `BookingPolicy` consists of a number of sub-policies. When the Bookings App is provisioned to a meta site then a
|
|
854
|
+
* default `BookingPolicy` will be created with defaults for each of these sub-policies. This also applies when a request
|
|
855
|
+
* is received to create a new `BookingPolicy` and one or more of these sub-policies are not provided.
|
|
856
|
+
*
|
|
857
|
+
* Sub-policies are defined in separate objects as specified below.
|
|
858
|
+
*
|
|
859
|
+
* - The `LimitEarlyBookingPolicy` object defines the policy for limiting early bookings.
|
|
860
|
+
* - The `LimitLateBookingPolicy` object defines the policy for limiting late bookings.
|
|
861
|
+
* - The `BookAfterStartPolicy` object defines the policy for booking after the start of the schedule.
|
|
862
|
+
* - The `CancellationPolicy` object defines the policy for canceling a booked entity.
|
|
863
|
+
* - The `ReschedulePolicy` object defines the policy for rescheduling booked entity.
|
|
864
|
+
* - The `WaitlistPolicy` object defines the policy for a waitlist.
|
|
865
|
+
* - The `ParticipantsPolicy` object defines the policy regarding the participants per booking.
|
|
866
|
+
* - The `ResourcesPolicy` object defines the policy regarding the resources per booking.
|
|
867
|
+
* - The `CancellationFeePolicy` object defines the policy regarding cancellation fees.
|
|
868
|
+
* - The `SaveCreditCardPolicy` object defines the policy for saving credit card details.
|
|
869
|
+
*
|
|
870
|
+
* By default each sub-policy is disabled. A more detailed specification of the default settings of each sub-policy
|
|
871
|
+
* can be found in the description of the corresponding object.
|
|
872
|
+
*
|
|
873
|
+
* Partial updates are supported on the main entity level, however in order to update a sub-policy the client needs to provide the whole sub-policy object.
|
|
874
|
+
*/
|
|
875
|
+
interface BookingPolicy {
|
|
876
|
+
/**
|
|
877
|
+
* The ID to the policy for the booking.
|
|
878
|
+
* @format GUID
|
|
879
|
+
*/
|
|
880
|
+
_id?: string;
|
|
881
|
+
/**
|
|
882
|
+
* Date and time the policy was created.
|
|
883
|
+
* @readonly
|
|
884
|
+
*/
|
|
885
|
+
_createdDate?: Date | null;
|
|
886
|
+
/**
|
|
887
|
+
* Date and time the policy was updated.
|
|
888
|
+
* @readonly
|
|
889
|
+
*/
|
|
890
|
+
_updatedDate?: Date | null;
|
|
891
|
+
/**
|
|
892
|
+
* Name of the policy.
|
|
893
|
+
* @maxLength 400
|
|
894
|
+
* @readonly
|
|
895
|
+
*/
|
|
896
|
+
name?: string | null;
|
|
897
|
+
/**
|
|
898
|
+
* Custom description for the policy. This policy is displayed to the participant.
|
|
899
|
+
* @readonly
|
|
900
|
+
*/
|
|
901
|
+
customPolicyDescription?: PolicyDescription;
|
|
902
|
+
/**
|
|
903
|
+
* Whether the policy is the default for the meta site.
|
|
904
|
+
* @readonly
|
|
905
|
+
*/
|
|
906
|
+
default?: boolean | null;
|
|
907
|
+
/**
|
|
908
|
+
* Policy for limiting early bookings.
|
|
909
|
+
* @readonly
|
|
910
|
+
*/
|
|
911
|
+
limitEarlyBookingPolicy?: LimitEarlyBookingPolicy;
|
|
912
|
+
/**
|
|
913
|
+
* Policy for limiting late bookings.
|
|
914
|
+
* @readonly
|
|
915
|
+
*/
|
|
916
|
+
limitLateBookingPolicy?: LimitLateBookingPolicy;
|
|
917
|
+
/**
|
|
918
|
+
* Policy on booking an entity after the start of the schedule.
|
|
919
|
+
* @readonly
|
|
920
|
+
*/
|
|
921
|
+
bookAfterStartPolicy?: BookAfterStartPolicy;
|
|
922
|
+
/**
|
|
923
|
+
* Policy for canceling a booked entity.
|
|
924
|
+
* @readonly
|
|
925
|
+
*/
|
|
926
|
+
cancellationPolicy?: CancellationPolicy;
|
|
927
|
+
/**
|
|
928
|
+
* Policy for rescheduling a booked entity.
|
|
929
|
+
* @readonly
|
|
930
|
+
*/
|
|
931
|
+
reschedulePolicy?: ReschedulePolicy;
|
|
932
|
+
/**
|
|
933
|
+
* Waitlist policy for the service.
|
|
934
|
+
* @readonly
|
|
935
|
+
*/
|
|
936
|
+
waitlistPolicy?: WaitlistPolicy;
|
|
937
|
+
/**
|
|
938
|
+
* Policy regarding the participants per booking.
|
|
939
|
+
* @readonly
|
|
940
|
+
*/
|
|
941
|
+
participantsPolicy?: ParticipantsPolicy;
|
|
942
|
+
/**
|
|
943
|
+
* Policy for allocating resources.
|
|
944
|
+
* @readonly
|
|
945
|
+
*/
|
|
946
|
+
resourcesPolicy?: ResourcesPolicy;
|
|
947
|
+
/**
|
|
948
|
+
* Rules for cancellation fees.
|
|
949
|
+
* @readonly
|
|
950
|
+
*/
|
|
951
|
+
cancellationFeePolicy?: CancellationFeePolicy;
|
|
952
|
+
/**
|
|
953
|
+
* Rule for saving credit card.
|
|
954
|
+
* @readonly
|
|
955
|
+
*/
|
|
956
|
+
saveCreditCardPolicy?: SaveCreditCardPolicy;
|
|
957
|
+
}
|
|
958
|
+
/** A description of the policy to display to participants. */
|
|
959
|
+
interface PolicyDescription {
|
|
960
|
+
/**
|
|
961
|
+
* Whether the description should be displayed. If `true`, the description is displayed.
|
|
962
|
+
*
|
|
963
|
+
* Default: `false`
|
|
964
|
+
*/
|
|
965
|
+
enabled?: boolean;
|
|
966
|
+
/**
|
|
967
|
+
* The description to display.
|
|
968
|
+
*
|
|
969
|
+
* Default: Empty
|
|
970
|
+
* Max length: 2500 characters
|
|
971
|
+
* @maxLength 2500
|
|
972
|
+
*/
|
|
973
|
+
description?: string;
|
|
974
|
+
}
|
|
975
|
+
/** The policy for limiting early bookings. */
|
|
976
|
+
interface LimitEarlyBookingPolicy {
|
|
977
|
+
/**
|
|
978
|
+
* Whether there is a limit on how early a customer
|
|
979
|
+
* can book. When `false`, there is no limit on the earliest
|
|
980
|
+
* booking time and customers can book in advance, as early as they like.
|
|
981
|
+
*
|
|
982
|
+
* Default: `false`
|
|
983
|
+
*/
|
|
984
|
+
enabled?: boolean;
|
|
985
|
+
/**
|
|
986
|
+
* Maximum number of minutes before the start of the session that a booking can be made. This value must be greater
|
|
987
|
+
* than `latest_booking_in_minutes` in the `LimitLateBookingPolicy` policy.
|
|
988
|
+
*
|
|
989
|
+
* Default: 10080 minutes (7 days)
|
|
990
|
+
* Min: 1 minute
|
|
991
|
+
* @min 1
|
|
992
|
+
*/
|
|
993
|
+
earliestBookingInMinutes?: number;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* The policy for limiting late bookings.
|
|
997
|
+
*
|
|
998
|
+
* This policy and the `BookAfterStartPolicy` policy cannot be enabled at the same time. So if this policy
|
|
999
|
+
* is enabled, `BookAfterStartPolicy` must be disabled.
|
|
1000
|
+
*/
|
|
1001
|
+
interface LimitLateBookingPolicy {
|
|
1002
|
+
/**
|
|
1003
|
+
* Whether there is a limit on how late a customer
|
|
1004
|
+
* can book. When `false`, there is no limit on the latest
|
|
1005
|
+
* booking time and customers can book up to the last minute.
|
|
1006
|
+
*
|
|
1007
|
+
* Default: `false`
|
|
1008
|
+
*/
|
|
1009
|
+
enabled?: boolean;
|
|
1010
|
+
/**
|
|
1011
|
+
* Minimum number of minutes before the start of the session that a booking can be made.
|
|
1012
|
+
* For a schedule, this is relative to the start time of the next booked session, excluding past-booked sessions.
|
|
1013
|
+
* This value must be less than `earliest_booking_in_minutes` in the `LimitEarlyBookingPolicy` policy.
|
|
1014
|
+
*
|
|
1015
|
+
* Default: 1440 minutes (1 day)
|
|
1016
|
+
* Min: 1 minute
|
|
1017
|
+
* @min 1
|
|
1018
|
+
*/
|
|
1019
|
+
latestBookingInMinutes?: number;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* The policy for whether a session can be booked after the start of the schedule.
|
|
1023
|
+
* This policy and `LimitLateBookingPolicy` cannot be enabled at the same time. So if this policy
|
|
1024
|
+
* is enabled, the `LimitLateBookingPolicy` policy must be disabled.
|
|
1025
|
+
*/
|
|
1026
|
+
interface BookAfterStartPolicy {
|
|
1027
|
+
/**
|
|
1028
|
+
* Whether booking is allowed after the start of the schedule. When `true`,
|
|
1029
|
+
* customers can book after the start of the schedule.
|
|
1030
|
+
*
|
|
1031
|
+
* Default: `false`
|
|
1032
|
+
*/
|
|
1033
|
+
enabled?: boolean;
|
|
1034
|
+
}
|
|
1035
|
+
/** The policy for canceling a booked session. */
|
|
1036
|
+
interface CancellationPolicy {
|
|
1037
|
+
/**
|
|
1038
|
+
* Whether canceling a booking is allowed. When `true`, customers
|
|
1039
|
+
* can cancel the booking.
|
|
1040
|
+
*
|
|
1041
|
+
* Default: `false`
|
|
1042
|
+
*/
|
|
1043
|
+
enabled?: boolean;
|
|
1044
|
+
/**
|
|
1045
|
+
* Whether there is a limit on the latest cancellation time. When `true`,
|
|
1046
|
+
* a time limit is enforced.
|
|
1047
|
+
*
|
|
1048
|
+
* Default: `false`
|
|
1049
|
+
*/
|
|
1050
|
+
limitLatestCancellation?: boolean;
|
|
1051
|
+
/**
|
|
1052
|
+
* Minimum number of minutes before the start of the booked session that the booking can be canceled.
|
|
1053
|
+
*
|
|
1054
|
+
* Default: 1440 minutes (1 day)
|
|
1055
|
+
* Min: 1 minute
|
|
1056
|
+
* @min 1
|
|
1057
|
+
*/
|
|
1058
|
+
latestCancellationInMinutes?: number;
|
|
1059
|
+
/**
|
|
1060
|
+
* Whether this cancellation policy allows anonymous cancellations.
|
|
1061
|
+
*
|
|
1062
|
+
* **Important**: This flag only applies when `enabled` is `true`. If the cancellation
|
|
1063
|
+
* policy itself is disabled (`enabled` = `false`), anonymous users cannot cancel
|
|
1064
|
+
* regardless of this flag's value.
|
|
1065
|
+
*
|
|
1066
|
+
* When not set (null), defaults to enabled. Anonymous cancellations are allowed by default
|
|
1067
|
+
* so that customers aren't required to be site members to cancel their bookings.
|
|
1068
|
+
*
|
|
1069
|
+
* Default: `null` (treated as `true`)
|
|
1070
|
+
*/
|
|
1071
|
+
allowAnonymous?: boolean | null;
|
|
1072
|
+
}
|
|
1073
|
+
/** The policy for rescheduling a booked session. */
|
|
1074
|
+
interface ReschedulePolicy {
|
|
1075
|
+
/**
|
|
1076
|
+
* Whether rescheduling a booking is allowed. When `true`, customers
|
|
1077
|
+
* can reschedule the booking.
|
|
1078
|
+
*
|
|
1079
|
+
* Default: `false`
|
|
1080
|
+
*/
|
|
1081
|
+
enabled?: boolean;
|
|
1082
|
+
/**
|
|
1083
|
+
* Whether there is a limit on the latest reschedule time. When `true`,
|
|
1084
|
+
* a time limit is enforced.
|
|
1085
|
+
*
|
|
1086
|
+
* Default: `false`
|
|
1087
|
+
*/
|
|
1088
|
+
limitLatestReschedule?: boolean;
|
|
1089
|
+
/**
|
|
1090
|
+
* Minimum number of minutes before the start of the booked session that the booking can be rescheduled.
|
|
1091
|
+
*
|
|
1092
|
+
* Default: 1440 minutes (1 day)
|
|
1093
|
+
* Min: 1 minute
|
|
1094
|
+
* @min 1
|
|
1095
|
+
*/
|
|
1096
|
+
latestRescheduleInMinutes?: number;
|
|
1097
|
+
/**
|
|
1098
|
+
* Whether this reschedule policy allows anonymous rescheduling.
|
|
1099
|
+
*
|
|
1100
|
+
* **Important**: This flag only applies when `enabled` is `true`. If the reschedule
|
|
1101
|
+
* policy itself is disabled (`enabled` = `false`), anonymous users cannot reschedule
|
|
1102
|
+
* regardless of this flag's value.
|
|
1103
|
+
*
|
|
1104
|
+
* When not set (null), defaults to enabled. Anonymous rescheduling is allowed by default
|
|
1105
|
+
* so that customers aren't required to be site members to reschedule their bookings.
|
|
1106
|
+
*
|
|
1107
|
+
* Default: `null` (treated as `true`)
|
|
1108
|
+
*/
|
|
1109
|
+
allowAnonymous?: boolean | null;
|
|
1110
|
+
}
|
|
1111
|
+
/** The policy for the waitlist. */
|
|
1112
|
+
interface WaitlistPolicy {
|
|
1113
|
+
/**
|
|
1114
|
+
* Whether the session has a waitlist. If `true`, there is a waitlist.
|
|
1115
|
+
*
|
|
1116
|
+
* Default: `false`
|
|
1117
|
+
*/
|
|
1118
|
+
enabled?: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* Number of spots available in the waitlist.
|
|
1121
|
+
*
|
|
1122
|
+
* Default: 10 spots
|
|
1123
|
+
* Min: 1 spot
|
|
1124
|
+
* @min 1
|
|
1125
|
+
*/
|
|
1126
|
+
capacity?: number;
|
|
1127
|
+
/**
|
|
1128
|
+
* Amount of time a participant is given to book, once notified that a spot is available.
|
|
1129
|
+
*
|
|
1130
|
+
* Default: 10 minutes
|
|
1131
|
+
* Min: 1 spot
|
|
1132
|
+
* @min 1
|
|
1133
|
+
*/
|
|
1134
|
+
reservationTimeInMinutes?: number;
|
|
1135
|
+
}
|
|
1136
|
+
/** The policy for the maximum number of participants per booking. */
|
|
1137
|
+
interface ParticipantsPolicy {
|
|
1138
|
+
/**
|
|
1139
|
+
* Maximum number of participants allowed.
|
|
1140
|
+
*
|
|
1141
|
+
* Default: 1 participant
|
|
1142
|
+
* Min: 1 participant
|
|
1143
|
+
* @min 1
|
|
1144
|
+
*/
|
|
1145
|
+
maxParticipantsPerBooking?: number;
|
|
1146
|
+
}
|
|
1147
|
+
/** The policy regarding the allocation of resources (e.g. staff members). */
|
|
1148
|
+
interface ResourcesPolicy {
|
|
1149
|
+
/**
|
|
1150
|
+
* `true` if this policy is enabled, `false` otherwise.
|
|
1151
|
+
* When `false` then the client must always select a resource when booking an appointment.
|
|
1152
|
+
*/
|
|
1153
|
+
enabled?: boolean;
|
|
1154
|
+
/**
|
|
1155
|
+
* `true`, if it is allowed to automatically assign a resource when booking an appointment,
|
|
1156
|
+
* `false`, if the client must always select a resource.
|
|
1157
|
+
*
|
|
1158
|
+
* Default: `false`
|
|
1159
|
+
*/
|
|
1160
|
+
autoAssignAllowed?: boolean;
|
|
1161
|
+
}
|
|
1162
|
+
interface CancellationFeePolicy {
|
|
1163
|
+
/**
|
|
1164
|
+
* Whether canceling a booking will result in a cancellation fee
|
|
1165
|
+
*
|
|
1166
|
+
* Default: `false`
|
|
1167
|
+
*/
|
|
1168
|
+
enabled?: boolean;
|
|
1169
|
+
/**
|
|
1170
|
+
* Cancellation windows describing the time of cancellation and the fee to charge.
|
|
1171
|
+
* @maxSize 2
|
|
1172
|
+
*/
|
|
1173
|
+
cancellationWindows?: CancellationWindow[];
|
|
1174
|
+
/**
|
|
1175
|
+
* Whether the cancellation fee should not be automatically collected when customer cancels the booking.
|
|
1176
|
+
*
|
|
1177
|
+
* Default: `true`
|
|
1178
|
+
*/
|
|
1179
|
+
autoCollectFeeEnabled?: boolean | null;
|
|
1180
|
+
}
|
|
1181
|
+
interface CancellationWindow extends CancellationWindowFeeOneOf {
|
|
1182
|
+
/** Amount to be charged as a cancellation fee. */
|
|
1183
|
+
amount?: Money;
|
|
1184
|
+
/**
|
|
1185
|
+
* Percentage of the original price to be charged as a cancellation fee.
|
|
1186
|
+
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
1187
|
+
*/
|
|
1188
|
+
percentage?: string;
|
|
1189
|
+
/**
|
|
1190
|
+
* The fee will be applied if the booked session starts within this start time in minutes.
|
|
1191
|
+
* @min 1
|
|
1192
|
+
*/
|
|
1193
|
+
startInMinutes?: number | null;
|
|
1194
|
+
}
|
|
1195
|
+
/** @oneof */
|
|
1196
|
+
interface CancellationWindowFeeOneOf {
|
|
1197
|
+
/** Amount to be charged as a cancellation fee. */
|
|
1198
|
+
amount?: Money;
|
|
1199
|
+
/**
|
|
1200
|
+
* Percentage of the original price to be charged as a cancellation fee.
|
|
1201
|
+
* @decimalValue options { gt:0, lte:100, maxScale:2 }
|
|
1202
|
+
*/
|
|
1203
|
+
percentage?: string;
|
|
1204
|
+
}
|
|
1205
|
+
interface SaveCreditCardPolicy {
|
|
1206
|
+
/** Default: `false` */
|
|
1207
|
+
enabled?: boolean;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* Policy for determining how staff members are sorted and selected during the booking process.
|
|
1211
|
+
* This affects which staff member is chosen when multiple staff members are available for a service.
|
|
1212
|
+
*/
|
|
1213
|
+
interface StaffSortingPolicy extends StaffSortingPolicyOptionsOneOf {
|
|
1214
|
+
rankingOptions?: RankingOptions;
|
|
1215
|
+
customOptions?: CustomOptions;
|
|
1216
|
+
/**
|
|
1217
|
+
* Method used for sorting and selecting staff members.
|
|
1218
|
+
*
|
|
1219
|
+
* Default: `RANDOM`
|
|
1220
|
+
*/
|
|
1221
|
+
sortingMethodType?: SortingMethodTypeWithLiterals;
|
|
1222
|
+
}
|
|
1223
|
+
/** @oneof */
|
|
1224
|
+
interface StaffSortingPolicyOptionsOneOf {
|
|
1225
|
+
rankingOptions?: RankingOptions;
|
|
1226
|
+
customOptions?: CustomOptions;
|
|
1227
|
+
}
|
|
1228
|
+
/** Order for ranking-based staff selection. */
|
|
1229
|
+
declare enum RankingOrder {
|
|
1230
|
+
/** Staff members with lower priority values are selected first. */
|
|
1231
|
+
LOWEST_TO_HIGHEST = "LOWEST_TO_HIGHEST",
|
|
1232
|
+
/** Staff members with higher priority values are selected first. */
|
|
1233
|
+
HIGHEST_TO_LOWEST = "HIGHEST_TO_LOWEST"
|
|
1234
|
+
}
|
|
1235
|
+
/** @enumType */
|
|
1236
|
+
type RankingOrderWithLiterals = RankingOrder | 'LOWEST_TO_HIGHEST' | 'HIGHEST_TO_LOWEST';
|
|
1237
|
+
/** Method used to sort and select staff members. */
|
|
1238
|
+
declare enum SortingMethodType {
|
|
1239
|
+
/** Staff members are selected randomly from available options. */
|
|
1240
|
+
RANDOM = "RANDOM",
|
|
1241
|
+
/** Staff members are selected based on their priority ranking. */
|
|
1242
|
+
RANKING = "RANKING",
|
|
1243
|
+
/**
|
|
1244
|
+
* Staff members are selected using a custom implementation provided by SortStaffSPI.
|
|
1245
|
+
* This allows third-party apps to implement custom staff sorting logic.
|
|
1246
|
+
*/
|
|
1247
|
+
CUSTOM = "CUSTOM"
|
|
1248
|
+
}
|
|
1249
|
+
/** @enumType */
|
|
1250
|
+
type SortingMethodTypeWithLiterals = SortingMethodType | 'RANDOM' | 'RANKING' | 'CUSTOM';
|
|
1251
|
+
/**
|
|
1252
|
+
* Configuration options for ranking-based staff selection.
|
|
1253
|
+
* Used when `sorting_method_type` is set to `RANKING`.
|
|
1254
|
+
*/
|
|
1255
|
+
interface RankingOptions {
|
|
1256
|
+
/**
|
|
1257
|
+
* Order in which staff members are sorted by their priority ranking.
|
|
1258
|
+
*
|
|
1259
|
+
* Default: `LOWEST_TO_HIGHEST`
|
|
1260
|
+
*/
|
|
1261
|
+
order?: RankingOrderWithLiterals;
|
|
1262
|
+
}
|
|
1263
|
+
/**
|
|
1264
|
+
* Configuration options for custom staff selection methods.
|
|
1265
|
+
* Used when `sorting_method_type` is set to `CUSTOM`.
|
|
1266
|
+
*/
|
|
1267
|
+
interface CustomOptions {
|
|
1268
|
+
/**
|
|
1269
|
+
* ID of the custom sorting method implemented in SortStaffSPI.
|
|
1270
|
+
* This identifies which custom sorting algorithm to use.
|
|
1271
|
+
* @format GUID
|
|
1272
|
+
*/
|
|
1273
|
+
implementationId?: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* ID of the app that provides the custom sorting method.
|
|
1276
|
+
* @format GUID
|
|
1277
|
+
*/
|
|
1278
|
+
appId?: string;
|
|
1279
|
+
}
|
|
1280
|
+
/** Policy for integrating with Intake form. Stores which form to use and when to present it. */
|
|
1281
|
+
interface IntakeFormPolicy {
|
|
1282
|
+
/**
|
|
1283
|
+
* Whether intake form integration is enabled for the service.
|
|
1284
|
+
* Default: `false`
|
|
1285
|
+
*/
|
|
1286
|
+
enabled?: boolean;
|
|
1287
|
+
/**
|
|
1288
|
+
* ID of the intake form to integrate with the service.
|
|
1289
|
+
* @format GUID
|
|
1290
|
+
*/
|
|
1291
|
+
formId?: string | null;
|
|
1292
|
+
/** When to present the intake form to the customer. */
|
|
1293
|
+
timing?: TimingWithLiterals;
|
|
1294
|
+
completionRequirement?: CompletionRequirementWithLiterals;
|
|
1295
|
+
}
|
|
1296
|
+
declare enum Timing {
|
|
1297
|
+
/** Send form after booking. */
|
|
1298
|
+
AFTER_BOOKING = "AFTER_BOOKING",
|
|
1299
|
+
/** Show form during booking flow. */
|
|
1300
|
+
BEFORE_BOOKING = "BEFORE_BOOKING"
|
|
1301
|
+
}
|
|
1302
|
+
/** @enumType */
|
|
1303
|
+
type TimingWithLiterals = Timing | 'AFTER_BOOKING' | 'BEFORE_BOOKING';
|
|
1304
|
+
/** Requirement for completing the intake form. */
|
|
1305
|
+
declare enum CompletionRequirement {
|
|
1306
|
+
/** Form completion is optional and can be skipped entirely. */
|
|
1307
|
+
OPTIONAL = "OPTIONAL",
|
|
1308
|
+
/**
|
|
1309
|
+
* Form must be completed before the booking can be finalized.
|
|
1310
|
+
* can used only if timing is BEFORE_BOOKING.
|
|
1311
|
+
*/
|
|
1312
|
+
REQUIRED_BEFORE_BOOKING = "REQUIRED_BEFORE_BOOKING"
|
|
1313
|
+
}
|
|
1314
|
+
/** @enumType */
|
|
1315
|
+
type CompletionRequirementWithLiterals = CompletionRequirement | 'OPTIONAL' | 'REQUIRED_BEFORE_BOOKING';
|
|
1316
|
+
interface Schedule {
|
|
1317
|
+
/**
|
|
1318
|
+
* ID of the [schedule](https://dev.wix.com/docs/api-reference/business-management/calendar/schedules-v3/introduction)
|
|
1319
|
+
* to which the service's events belong.
|
|
1320
|
+
* @format GUID
|
|
1321
|
+
* @readonly
|
|
1322
|
+
*/
|
|
1323
|
+
_id?: string | null;
|
|
1324
|
+
/**
|
|
1325
|
+
* Start time of the first session in the schedule. For courses only.
|
|
1326
|
+
* @readonly
|
|
1327
|
+
*/
|
|
1328
|
+
firstSessionStart?: Date | null;
|
|
1329
|
+
/**
|
|
1330
|
+
* End time of the last session in the schedule. For courses only.
|
|
1331
|
+
* @readonly
|
|
1332
|
+
*/
|
|
1333
|
+
lastSessionEnd?: Date | null;
|
|
1334
|
+
/** Limitations affecting the service availability. */
|
|
1335
|
+
availabilityConstraints?: AvailabilityConstraints;
|
|
1336
|
+
}
|
|
1337
|
+
interface AvailabilityConstraints {
|
|
1338
|
+
/**
|
|
1339
|
+
* Calculated list of all supported session durations for the service. For
|
|
1340
|
+
* appointment-based services without varied pricing based on session length, it
|
|
1341
|
+
* matches the single value in the `sessionDurations` array. For appointment-based
|
|
1342
|
+
* services with varied pricing based on session length, it includes session
|
|
1343
|
+
* durations for all [variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction),
|
|
1344
|
+
* while ignoring `sessionDurations`.
|
|
1345
|
+
* For courses and classes, it includes durations for all future
|
|
1346
|
+
* recurring sessions but excludes durations for one-off or past recurring sessions.
|
|
1347
|
+
* @readonly
|
|
1348
|
+
* @maxSize 50
|
|
1349
|
+
*/
|
|
1350
|
+
durations?: Duration[];
|
|
1351
|
+
/**
|
|
1352
|
+
* List of supported session durations in minutes.
|
|
1353
|
+
*
|
|
1354
|
+
* - For appointment-based services, specify `sessionDurations` when creating a service.
|
|
1355
|
+
* - For appointment-based services with varied pricing by session length, you must still specify `sessionDurations`, but the values are ignored. Actual durations are taken from the [service variants](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/service-options-and-variants/introduction).
|
|
1356
|
+
* - For classes or courses, don't specify `sessionDurations` when creating a service.
|
|
1357
|
+
*
|
|
1358
|
+
* Min: `1` minute
|
|
1359
|
+
* Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
|
|
1360
|
+
* @min 1
|
|
1361
|
+
* @max 44639
|
|
1362
|
+
* @maxSize 50
|
|
1363
|
+
*/
|
|
1364
|
+
sessionDurations?: number[];
|
|
1365
|
+
/**
|
|
1366
|
+
* The number of minutes between the end of a session and the start of the next.
|
|
1367
|
+
*
|
|
1368
|
+
*
|
|
1369
|
+
* Min: `0` minutes
|
|
1370
|
+
* Max: `720` minutes
|
|
1371
|
+
* @max 720
|
|
1372
|
+
*/
|
|
1373
|
+
timeBetweenSessions?: number;
|
|
1374
|
+
}
|
|
1375
|
+
interface Duration {
|
|
1376
|
+
/**
|
|
1377
|
+
* The duration of the service in minutes.
|
|
1378
|
+
*
|
|
1379
|
+
* Min: `1` minute
|
|
1380
|
+
* Max: `44639` minutes (30 days, 23 hours, and 59 minutes)
|
|
1381
|
+
* @min 1
|
|
1382
|
+
* @max 44639
|
|
1383
|
+
*/
|
|
1384
|
+
minutes?: number;
|
|
1385
|
+
}
|
|
1386
|
+
/** Duration range configuration for a service. */
|
|
1387
|
+
interface DurationRange extends DurationRangeConfigOneOf {
|
|
1388
|
+
/** Configuration for hourly duration. Set when `unit_type` is `HOUR`. */
|
|
1389
|
+
hourOptions?: HourlyConfig;
|
|
1390
|
+
/** Configuration for daily duration. Set when `unit_type` is `DAY`. */
|
|
1391
|
+
dayOptions?: DailyConfig;
|
|
1392
|
+
/** The unit type for this duration range. */
|
|
1393
|
+
unitType?: UnitTypeWithLiterals;
|
|
1394
|
+
}
|
|
1395
|
+
/** @oneof */
|
|
1396
|
+
interface DurationRangeConfigOneOf {
|
|
1397
|
+
/** Configuration for hourly duration. Set when `unit_type` is `HOUR`. */
|
|
1398
|
+
hourOptions?: HourlyConfig;
|
|
1399
|
+
/** Configuration for daily duration. Set when `unit_type` is `DAY`. */
|
|
1400
|
+
dayOptions?: DailyConfig;
|
|
1401
|
+
}
|
|
1402
|
+
/** The booking unit for the duration range. */
|
|
1403
|
+
declare enum UnitType {
|
|
1404
|
+
}
|
|
1405
|
+
/** @enumType */
|
|
1406
|
+
type UnitTypeWithLiterals = UnitType;
|
|
1407
|
+
/** Hourly duration configuration. Values are in minutes. */
|
|
1408
|
+
interface HourlyConfig {
|
|
1409
|
+
/**
|
|
1410
|
+
* Minimum bookable duration in minutes.
|
|
1411
|
+
*
|
|
1412
|
+
* Min: `30` minutes
|
|
1413
|
+
* Max: `1440` minutes (24 hours)
|
|
1414
|
+
* @min 30
|
|
1415
|
+
* @max 1440
|
|
1416
|
+
*/
|
|
1417
|
+
minDurationInMinutes?: number;
|
|
1418
|
+
/**
|
|
1419
|
+
* Maximum bookable duration in minutes.
|
|
1420
|
+
*
|
|
1421
|
+
* Min: `30` minutes
|
|
1422
|
+
* Max: `1440` minutes (24 hours)
|
|
1423
|
+
* @min 30
|
|
1424
|
+
* @max 1440
|
|
1425
|
+
*/
|
|
1426
|
+
maxDurationInMinutes?: number;
|
|
1427
|
+
}
|
|
1428
|
+
/** Daily duration configuration. Values are in days. */
|
|
1429
|
+
interface DailyConfig {
|
|
1430
|
+
/**
|
|
1431
|
+
* Minimum bookable duration in days.
|
|
1432
|
+
*
|
|
1433
|
+
* Min: `1` day
|
|
1434
|
+
* Max: `8` days
|
|
1435
|
+
* @min 1
|
|
1436
|
+
* @max 8
|
|
1437
|
+
*/
|
|
1438
|
+
minDurationInDays?: number;
|
|
1439
|
+
/**
|
|
1440
|
+
* Maximum bookable duration in days.
|
|
1441
|
+
*
|
|
1442
|
+
* Min: `1` day
|
|
1443
|
+
* Max: `8` days
|
|
1444
|
+
* @min 1
|
|
1445
|
+
* @max 8
|
|
1446
|
+
*/
|
|
1447
|
+
maxDurationInDays?: number;
|
|
1448
|
+
}
|
|
1449
|
+
interface StaffMember {
|
|
1450
|
+
/**
|
|
1451
|
+
* ID of the [resource](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resources-v2/introduction) associated with the staff member providing the service.
|
|
1452
|
+
* Despite the field name, this is the resource ID, not the staff member ID.
|
|
1453
|
+
* This value matches the staff member's `resourceId` from the [Staff Members API](https://dev.wix.com/docs/api-reference/business-solutions/bookings/staff-members/staff-members/introduction)
|
|
1454
|
+
* and corresponds to the IDs in the service's `staffMemberIds` field.
|
|
1455
|
+
* @format GUID
|
|
1456
|
+
* @readonly
|
|
1457
|
+
*/
|
|
1458
|
+
staffMemberId?: string;
|
|
1459
|
+
/**
|
|
1460
|
+
* Name of the staff member
|
|
1461
|
+
* @maxLength 40
|
|
1462
|
+
* @readonly
|
|
1463
|
+
*/
|
|
1464
|
+
name?: string | null;
|
|
1465
|
+
/**
|
|
1466
|
+
* Main media associated with the service.
|
|
1467
|
+
* @readonly
|
|
1468
|
+
*/
|
|
1469
|
+
mainMedia?: StaffMediaItem;
|
|
1470
|
+
}
|
|
1471
|
+
interface StaffMediaItem extends StaffMediaItemItemOneOf {
|
|
1472
|
+
/** Details of the image associated with the staff, such as URL and size. */
|
|
1473
|
+
image?: string;
|
|
1474
|
+
}
|
|
1475
|
+
/** @oneof */
|
|
1476
|
+
interface StaffMediaItemItemOneOf {
|
|
1477
|
+
/** Details of the image associated with the staff, such as URL and size. */
|
|
1478
|
+
image?: string;
|
|
1479
|
+
}
|
|
1480
|
+
/**
|
|
1481
|
+
* Working hours location coverage derived from Calendar v3 WORKING_HOURS events
|
|
1482
|
+
* (`NONE` and `MASTER` recurrence types). The server paginates through Calendar results
|
|
1483
|
+
* (100 events per page) until all matching events are collected.
|
|
1484
|
+
*
|
|
1485
|
+
* Coverage states when enrichment is requested:
|
|
1486
|
+
* + `available_at_all_locations = true`: Staff applies to every business location. Set when the staff
|
|
1487
|
+
* uses default business working hours, or has any WORKING_HOURS event without a location ID
|
|
1488
|
+
* (including when mixed with location-specific events).
|
|
1489
|
+
* + `available_at_all_locations = false` with non-empty `location_ids`: Staff has location-specific
|
|
1490
|
+
* WORKING_HOURS only. Show the staff member only when the selected location is in `location_ids`.
|
|
1491
|
+
* + `available_at_all_locations = false` with empty `location_ids`: Staff has working-hours schedules
|
|
1492
|
+
* but no applicable location coverage was found.
|
|
1493
|
+
*
|
|
1494
|
+
* Recommended client filter:
|
|
1495
|
+
* `availableAtAllLocations || locationIds.includes(selectedLocationId)`
|
|
1496
|
+
*
|
|
1497
|
+
* Omitted when `STAFF_WORKING_HOURS_LOCATIONS` is not requested.
|
|
1498
|
+
*/
|
|
1499
|
+
interface WorkingHoursLocationCoverage {
|
|
1500
|
+
}
|
|
1501
|
+
interface StaffMemberDetails {
|
|
1502
|
+
/**
|
|
1503
|
+
* Staff members providing the service. For appointments only.
|
|
1504
|
+
* @maxSize 220
|
|
1505
|
+
*/
|
|
1506
|
+
staffMembers?: StaffMember[];
|
|
1507
|
+
}
|
|
1508
|
+
interface ResourceGroup {
|
|
1509
|
+
/**
|
|
1510
|
+
* An optional resource group ID. If specified, it references a resource group in the resource groups API.
|
|
1511
|
+
* TODO - referenced_entity annotation
|
|
1512
|
+
* @format GUID
|
|
1513
|
+
*/
|
|
1514
|
+
resourceGroupId?: string | null;
|
|
1515
|
+
/**
|
|
1516
|
+
* Resource IDs. Each ID references a resource in the resources API and may be a subset of resources within a resource group.
|
|
1517
|
+
* TODO - referenced_entity annotation
|
|
1518
|
+
*/
|
|
1519
|
+
resourceIds?: ResourceIds;
|
|
1520
|
+
/**
|
|
1521
|
+
* Specifies how many resources in the group / resource IDs are required to book the service.
|
|
1522
|
+
* Defaults to 1.
|
|
1523
|
+
* @min 1
|
|
1524
|
+
*/
|
|
1525
|
+
requiredResourcesNumber?: number | null;
|
|
1526
|
+
/**
|
|
1527
|
+
* If set to `true`, the customer can select the specific resources while booking the service.
|
|
1528
|
+
* If set to `false`, the resources required to book the service will be auto-selected at the time of the booking.
|
|
1529
|
+
* Defaults to false.
|
|
1530
|
+
* @readonly
|
|
1531
|
+
*/
|
|
1532
|
+
selectableResource?: boolean | null;
|
|
1533
|
+
}
|
|
1534
|
+
interface ResourceIds {
|
|
1535
|
+
/**
|
|
1536
|
+
* Values of the resource IDs.
|
|
1537
|
+
* @maxSize 100
|
|
1538
|
+
* @format GUID
|
|
1539
|
+
*/
|
|
1540
|
+
values?: string[];
|
|
1541
|
+
}
|
|
1542
|
+
interface ServiceResource extends ServiceResourceSelectionOneOf {
|
|
1543
|
+
/** Details about the required [resource type](https://dev.wix.com/docs/api-reference/business-solutions/bookings/resources/resource-types-v2/introduction). */
|
|
1544
|
+
resourceType?: ResourceType;
|
|
1545
|
+
}
|
|
1546
|
+
/** @oneof */
|
|
1547
|
+
interface ServiceResourceSelectionOneOf {
|
|
1548
|
+
}
|
|
1549
|
+
interface ResourceType {
|
|
1550
|
+
/**
|
|
1551
|
+
* The type of the resource.
|
|
1552
|
+
* @format GUID
|
|
1553
|
+
*/
|
|
1554
|
+
_id?: string | null;
|
|
1555
|
+
/**
|
|
1556
|
+
* The name of the resource type.
|
|
1557
|
+
* @readonly
|
|
1558
|
+
* @maxLength 40
|
|
1559
|
+
* @minLength 1
|
|
1560
|
+
*/
|
|
1561
|
+
name?: string | null;
|
|
1562
|
+
}
|
|
1563
|
+
/** Details about the individual resources assigned to a service resource. */
|
|
1564
|
+
interface ResourceDetails {
|
|
1565
|
+
/**
|
|
1566
|
+
* List of resources assigned to this service resource.
|
|
1567
|
+
* @maxSize 100
|
|
1568
|
+
*/
|
|
1569
|
+
resources?: ResourceInfo[];
|
|
1570
|
+
}
|
|
1571
|
+
/** A resource assigned to a service resource. */
|
|
1572
|
+
interface ResourceInfo {
|
|
1573
|
+
/**
|
|
1574
|
+
* ID of the resource.
|
|
1575
|
+
* @format GUID
|
|
1576
|
+
* @readonly
|
|
1577
|
+
*/
|
|
1578
|
+
_id?: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Display name of the resource (for example, `"John Smith"` or `"Room A"`).
|
|
1581
|
+
* @readonly
|
|
1582
|
+
* @maxLength 100
|
|
1583
|
+
*/
|
|
1584
|
+
name?: string | null;
|
|
1585
|
+
}
|
|
1586
|
+
interface Slug {
|
|
1587
|
+
/**
|
|
1588
|
+
* The unique part of service's URL that identifies the service's information page. For example, `service-1` in `https:/example.com/services/service-1`.
|
|
1589
|
+
* @maxLength 500
|
|
1590
|
+
*/
|
|
1591
|
+
name?: string;
|
|
1592
|
+
/**
|
|
1593
|
+
* Whether the slug was generated or customized. If `true`, the slug was customized manually by the business owner. Otherwise, the slug was automatically generated from the service name.
|
|
1594
|
+
* @readonly
|
|
1595
|
+
*/
|
|
1596
|
+
custom?: boolean | null;
|
|
1597
|
+
/**
|
|
1598
|
+
* Date and time the slug was created. This is a system field.
|
|
1599
|
+
* @readonly
|
|
1600
|
+
*/
|
|
1601
|
+
_createdDate?: Date | null;
|
|
1602
|
+
}
|
|
1603
|
+
interface URLs {
|
|
1604
|
+
/**
|
|
1605
|
+
* The URL for the service page.
|
|
1606
|
+
* @readonly
|
|
1607
|
+
*/
|
|
1608
|
+
servicePage?: string;
|
|
1609
|
+
/**
|
|
1610
|
+
* The URL for the booking entry point. It can be either to the calendar or to the service page.
|
|
1611
|
+
* @readonly
|
|
1612
|
+
*/
|
|
1613
|
+
bookingPage?: string;
|
|
1614
|
+
/**
|
|
1615
|
+
* The URL for the calendar. Can be empty if no calendar exists.
|
|
1616
|
+
* @readonly
|
|
1617
|
+
*/
|
|
1618
|
+
calendarPage?: string;
|
|
1619
|
+
}
|
|
1620
|
+
interface ExtendedFields {
|
|
1621
|
+
/**
|
|
1622
|
+
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
1623
|
+
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
1624
|
+
*
|
|
1625
|
+
* You can only access fields for which you have the appropriate permissions.
|
|
1626
|
+
*
|
|
1627
|
+
* Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).
|
|
1628
|
+
*/
|
|
1629
|
+
namespaces?: Record<string, Record<string, any>>;
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* The SEO schema object contains data about different types of meta tags. It makes sure that the information about your page is presented properly to search engines.
|
|
1633
|
+
* The search engines use this information for ranking purposes, or to display snippets in the search results.
|
|
1634
|
+
* This data will override other sources of tags (for example patterns) and will be included in the <head> section of the HTML document, while not being displayed on the page itself.
|
|
1635
|
+
*/
|
|
1636
|
+
interface SeoSchema {
|
|
1637
|
+
/** SEO tag information. */
|
|
1638
|
+
tags?: Tag[];
|
|
1639
|
+
/** SEO general settings. */
|
|
1640
|
+
settings?: Settings;
|
|
1641
|
+
}
|
|
1642
|
+
interface Keyword {
|
|
1643
|
+
/** Keyword value. */
|
|
1644
|
+
term?: string;
|
|
1645
|
+
/** Whether the keyword is the main focus keyword. */
|
|
1646
|
+
isMain?: boolean;
|
|
1647
|
+
/**
|
|
1648
|
+
* The source that added the keyword terms to the SEO settings.
|
|
1649
|
+
* @maxLength 1000
|
|
1650
|
+
*/
|
|
1651
|
+
origin?: string | null;
|
|
1652
|
+
}
|
|
1653
|
+
interface Tag {
|
|
1654
|
+
/**
|
|
1655
|
+
* SEO tag type.
|
|
1656
|
+
*
|
|
1657
|
+
*
|
|
1658
|
+
* Supported values: `title`, `meta`, `script`, `link`.
|
|
1659
|
+
*/
|
|
1660
|
+
type?: string;
|
|
1661
|
+
/**
|
|
1662
|
+
* A `{"key": "value"}` pair object where each SEO tag property (`"name"`, `"content"`, `"rel"`, `"href"`) contains a value.
|
|
1663
|
+
* For example: `{"name": "description", "content": "the description itself"}`.
|
|
1664
|
+
*/
|
|
1665
|
+
props?: Record<string, any> | null;
|
|
1666
|
+
/** SEO tag metadata. For example, `{"height": 300, "width": 240}`. */
|
|
1667
|
+
meta?: Record<string, any> | null;
|
|
1668
|
+
/** SEO tag inner content. For example, `<title> inner content </title>`. */
|
|
1669
|
+
children?: string;
|
|
1670
|
+
/** Whether the tag is a [custom tag](https://support.wix.com/en/article/adding-additional-meta-tags-to-your-sites-pages). */
|
|
1671
|
+
custom?: boolean;
|
|
1672
|
+
/** Whether the tag is disabled. If the tag is disabled, people can't find your page when searching for this phrase in search engines. */
|
|
1673
|
+
disabled?: boolean;
|
|
1674
|
+
}
|
|
1675
|
+
interface Settings {
|
|
1676
|
+
/**
|
|
1677
|
+
* Whether the [automatical redirect visits](https://support.wix.com/en/article/customizing-your-pages-seo-settings-in-the-seo-panel) from the old URL to the new one is enabled.
|
|
1678
|
+
*
|
|
1679
|
+
*
|
|
1680
|
+
* Default: `false` (automatical redirect is enabled).
|
|
1681
|
+
*/
|
|
1682
|
+
preventAutoRedirect?: boolean;
|
|
1683
|
+
/**
|
|
1684
|
+
* User-selected keyword terms for a specific page.
|
|
1685
|
+
* @maxSize 5
|
|
1686
|
+
*/
|
|
1687
|
+
keywords?: Keyword[];
|
|
1688
|
+
}
|
|
1689
|
+
interface AddOnGroup {
|
|
1690
|
+
/**
|
|
1691
|
+
* ID of the add-on group.
|
|
1692
|
+
* Wix Bookings automatically populates this field when creating or updating an add-on group.
|
|
1693
|
+
* @readonly
|
|
1694
|
+
* @format GUID
|
|
1695
|
+
*/
|
|
1696
|
+
_id?: string | null;
|
|
1697
|
+
/**
|
|
1698
|
+
* Name of the add-on group.
|
|
1699
|
+
* @maxLength 100
|
|
1700
|
+
*/
|
|
1701
|
+
name?: string | null;
|
|
1702
|
+
/**
|
|
1703
|
+
* Maximum number of different [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) from the group customers can add when booking the service.
|
|
1704
|
+
* When empty, there's no upper limit.
|
|
1705
|
+
*/
|
|
1706
|
+
maxNumberOfAddOns?: number | null;
|
|
1707
|
+
/**
|
|
1708
|
+
* List of IDs of all [add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction) included in the group.
|
|
1709
|
+
* @format GUID
|
|
1710
|
+
* @maxSize 7
|
|
1711
|
+
*/
|
|
1712
|
+
addOnIds?: string[] | null;
|
|
1713
|
+
/**
|
|
1714
|
+
* Description or instructional prompt of the add-on group that's displayed to customers when booking the service.
|
|
1715
|
+
* @maxLength 200
|
|
1716
|
+
*/
|
|
1717
|
+
prompt?: string | null;
|
|
1718
|
+
}
|
|
1719
|
+
interface AddOnDetails {
|
|
1720
|
+
/**
|
|
1721
|
+
* ID of the add-on.
|
|
1722
|
+
* @format GUID
|
|
1723
|
+
*/
|
|
1724
|
+
addOnId?: string | null;
|
|
1725
|
+
/**
|
|
1726
|
+
* Duration in minutes for add-ons that extend service time.
|
|
1727
|
+
* Empty for [quantity-based add-ons](https://dev.wix.com/docs/api-reference/business-solutions/bookings/services/add-ons/introduction#terminology).
|
|
1728
|
+
*/
|
|
1729
|
+
durationInMinutes?: number | null;
|
|
1730
|
+
}
|
|
1731
|
+
/** `TaxableAddress` defines the taxable address used for the service. */
|
|
1732
|
+
interface TaxableAddress {
|
|
1733
|
+
/** Taxable address type. */
|
|
1734
|
+
taxableAddressType?: TaxableAddressTypeWithLiterals;
|
|
1735
|
+
}
|
|
1736
|
+
declare enum TaxableAddressType {
|
|
1737
|
+
BUSINESS = "BUSINESS",
|
|
1738
|
+
BILLING = "BILLING"
|
|
1739
|
+
}
|
|
1740
|
+
/** @enumType */
|
|
1741
|
+
type TaxableAddressTypeWithLiterals = TaxableAddressType | 'BUSINESS' | 'BILLING';
|
|
1742
|
+
interface PhoneCall {
|
|
1743
|
+
/** Whether the service is delivered via phone call. */
|
|
1744
|
+
enabled?: boolean | null;
|
|
1745
|
+
}
|
|
1746
|
+
interface CursorPagingMetadata {
|
|
1747
|
+
/** Number of items returned in the response. */
|
|
1748
|
+
count?: number | null;
|
|
1749
|
+
/** Cursor strings that point to the next page, previous page, or both. */
|
|
1750
|
+
cursors?: Cursors;
|
|
1751
|
+
/**
|
|
1752
|
+
* Whether there are more pages to retrieve following the current page.
|
|
1753
|
+
*
|
|
1754
|
+
* + `true`: Another page of results can be retrieved.
|
|
1755
|
+
* + `false`: This is the last page.
|
|
1756
|
+
*/
|
|
1757
|
+
hasNext?: boolean | null;
|
|
1758
|
+
}
|
|
1759
|
+
interface Cursors {
|
|
1760
|
+
/**
|
|
1761
|
+
* Cursor string pointing to the next page in the list of results.
|
|
1762
|
+
* @maxLength 16000
|
|
1763
|
+
*/
|
|
1764
|
+
next?: string | null;
|
|
1765
|
+
/**
|
|
1766
|
+
* Cursor pointing to the previous page in the list of results.
|
|
1767
|
+
* @maxLength 16000
|
|
1768
|
+
*/
|
|
1769
|
+
prev?: string | null;
|
|
1770
|
+
}
|
|
1771
|
+
interface QueryServicesByAvailabilityOptions {
|
|
1772
|
+
/**
|
|
1773
|
+
* Query against the service catalog — WQL filter, sort, and cursor paging.
|
|
1774
|
+
* Supports the same fields as QueryServices.
|
|
1775
|
+
*/
|
|
1776
|
+
query?: QueryV2;
|
|
1777
|
+
/**
|
|
1778
|
+
* Availability and resource constraints applied on top of the service query.
|
|
1779
|
+
* When absent, no availability check is performed and all pre-filtered services are returned.
|
|
1780
|
+
*/
|
|
1781
|
+
availabilityFilter?: AvailabilityFilter;
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
export { type AddOnDetails, type AddOnGroup, AddOnPaymentOptions, type AddOnPaymentOptionsWithLiterals, type Address, type AddressLocation, type AddressStreetOneOf, type Attribute, type AttributeValueOneOf, type AvailabilityConstraints, type AvailabilityFilter, type BookAfterStartPolicy, type BookingPolicy, type BusinessLocationOptions, type CancellationFeePolicy, type CancellationPolicy, type CancellationWindow, type CancellationWindowFeeOneOf, type CatalogSearchResult, type Category, CompletionRequirement, type CompletionRequirementWithLiterals, type Conferencing, type CursorPaging, type CursorPagingMetadata, type Cursors, type CustomLocationOptions, type CustomOptions, type CustomPayment, type DailyConfig, type DiscountInfo, type Duration, type DurationRange, type DurationRangeConfigOneOf, type ExtendedFields, FirstChargeDateType, type FirstChargeDateTypeWithLiterals, type FixedPayment, type Form, type FormSettings, FrequencyType, type FrequencyTypeWithLiterals, type FullUpfrontPayment, type HourlyConfig, type IntakeFormPolicy, type Keyword, type LimitEarlyBookingPolicy, type LimitLateBookingPolicy, type Location, type LocationOptionsOneOf, LocationType, type LocationTypeWithLiterals, type Media, type MediaItem, type MediaItemItemOneOf, type Money, type OnlineBooking, type Paging, type ParticipantsPolicy, type Payment, type PaymentOptions, type PaymentRateOneOf, type PhoneCall, type PolicyDescription, type QueryServicesByAvailabilityOptions, type QueryServicesByAvailabilityRequest, type QueryServicesByAvailabilityResponse, type QueryV2, type QueryV2PagingMethodOneOf, type RankingOptions, RankingOrder, type RankingOrderWithLiterals, RateType, type RateTypeWithLiterals, type ReschedulePolicy, type ResourceDetails, type ResourceGroup, type ResourceIds, type ResourceInfo, type ResourceType, type ResourcesPolicy, type SaveCreditCardPolicy, type Schedule, type SeoSchema, type Service, type ServiceResource, type ServiceResourceSelectionOneOf, ServiceType, type ServiceTypeWithLiterals, type ServiceWithAvailability, type Settings, type Slug, SortOrder, type SortOrderWithLiterals, type Sorting, SortingMethodType, type SortingMethodTypeWithLiterals, type StaffMediaItem, type StaffMediaItemItemOneOf, type StaffMember, type StaffMemberDetails, type StaffSortingPolicy, type StaffSortingPolicyOptionsOneOf, type StreetAddress, type SubscriptionPayment, type Tag, type TaxableAddress, TaxableAddressType, type TaxableAddressTypeWithLiterals, Timing, type TimingWithLiterals, type URLs, UnitType, type UnitTypeWithLiterals, type VariedPayment, type WaitlistPolicy, type WorkingHoursLocationCoverage };
|