@wix/bookings 1.0.0 → 1.0.2
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 +5 -0
- package/build/cjs/index.js +6 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
- package/build/cjs/src/bookings-availability-v1-slot-availability.http.js +6 -6
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js +7 -6
- package/build/cjs/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
- package/build/cjs/src/bookings-calendar-v1-session.http.d.ts +75 -0
- package/build/cjs/src/bookings-calendar-v1-session.http.js +355 -0
- package/build/cjs/src/bookings-calendar-v1-session.http.js.map +1 -0
- package/build/cjs/src/bookings-calendar-v1-session.public.d.ts +8 -0
- package/build/cjs/src/bookings-calendar-v1-session.public.js +41 -0
- package/build/cjs/src/bookings-calendar-v1-session.public.js.map +1 -0
- package/build/cjs/src/bookings-calendar-v1-session.types.d.ts +1011 -0
- package/build/cjs/src/bookings-calendar-v1-session.types.js +110 -0
- package/build/cjs/src/bookings-calendar-v1-session.types.js.map +1 -0
- package/build/cjs/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
- package/build/cjs/src/bookings-calendar-v1-session.universal.js +437 -0
- package/build/cjs/src/bookings-calendar-v1-session.universal.js.map +1 -0
- package/build/cjs/src/bookings-catalog-v1-resource.http.d.ts +195 -0
- package/build/cjs/src/bookings-catalog-v1-resource.http.js +564 -0
- package/build/cjs/src/bookings-catalog-v1-resource.http.js.map +1 -0
- package/build/cjs/src/bookings-catalog-v1-resource.public.d.ts +10 -0
- package/build/cjs/src/bookings-catalog-v1-resource.public.js +55 -0
- package/build/cjs/src/bookings-catalog-v1-resource.public.js.map +1 -0
- package/build/cjs/src/bookings-catalog-v1-resource.types.d.ts +931 -0
- package/build/cjs/src/bookings-catalog-v1-resource.types.js +125 -0
- package/build/cjs/src/bookings-catalog-v1-resource.types.js.map +1 -0
- package/build/cjs/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js +740 -0
- package/build/cjs/src/bookings-catalog-v1-resource.universal.js.map +1 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.js +117 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.public.js +22 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.js +90 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js +226 -0
- package/build/cjs/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking.http.d.ts +123 -0
- package/build/cjs/src/bookings-v2-booking.http.js +305 -0
- package/build/cjs/src/bookings-v2-booking.http.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking.public.d.ts +9 -0
- package/build/cjs/src/bookings-v2-booking.public.js +47 -0
- package/build/cjs/src/bookings-v2-booking.public.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking.types.d.ts +1594 -0
- package/build/cjs/src/bookings-v2-booking.types.js +99 -0
- package/build/cjs/src/bookings-v2-booking.types.js.map +1 -0
- package/build/cjs/src/bookings-v2-booking.universal.d.ts +1840 -0
- package/build/cjs/src/bookings-v2-booking.universal.js +561 -0
- package/build/cjs/src/bookings-v2-booking.universal.js.map +1 -0
- package/build/cjs/src/bookings-v2-price-info.http.d.ts +56 -0
- package/build/cjs/src/bookings-v2-price-info.http.js +164 -0
- package/build/cjs/src/bookings-v2-price-info.http.js.map +1 -0
- package/build/cjs/src/bookings-v2-price-info.public.d.ts +6 -0
- package/build/cjs/src/bookings-v2-price-info.public.js +26 -0
- package/build/cjs/src/bookings-v2-price-info.public.js.map +1 -0
- package/build/cjs/src/bookings-v2-price-info.types.d.ts +594 -0
- package/build/cjs/src/bookings-v2-price-info.types.js +79 -0
- package/build/cjs/src/bookings-v2-price-info.types.js.map +1 -0
- package/build/cjs/src/bookings-v2-price-info.universal.d.ts +664 -0
- package/build/cjs/src/bookings-v2-price-info.universal.js +274 -0
- package/build/cjs/src/bookings-v2-price-info.universal.js.map +1 -0
- package/build/es/index.d.ts +5 -0
- package/build/es/index.js +5 -0
- package/build/es/index.js.map +1 -1
- package/build/es/src/bookings-availability-v1-slot-availability.http.d.ts +6 -6
- package/build/es/src/bookings-availability-v1-slot-availability.http.js +6 -6
- package/build/es/src/bookings-availability-v1-slot-availability.universal.d.ts +14 -29
- package/build/es/src/bookings-availability-v1-slot-availability.universal.js +7 -6
- package/build/es/src/bookings-availability-v1-slot-availability.universal.js.map +1 -1
- package/build/es/src/bookings-calendar-v1-session.http.d.ts +75 -0
- package/build/es/src/bookings-calendar-v1-session.http.js +348 -0
- package/build/es/src/bookings-calendar-v1-session.http.js.map +1 -0
- package/build/es/src/bookings-calendar-v1-session.public.d.ts +8 -0
- package/build/es/src/bookings-calendar-v1-session.public.js +23 -0
- package/build/es/src/bookings-calendar-v1-session.public.js.map +1 -0
- package/build/es/src/bookings-calendar-v1-session.types.d.ts +1011 -0
- package/build/es/src/bookings-calendar-v1-session.types.js +107 -0
- package/build/es/src/bookings-calendar-v1-session.types.js.map +1 -0
- package/build/es/src/bookings-calendar-v1-session.universal.d.ts +1178 -0
- package/build/es/src/bookings-calendar-v1-session.universal.js +411 -0
- package/build/es/src/bookings-calendar-v1-session.universal.js.map +1 -0
- package/build/es/src/bookings-catalog-v1-resource.http.d.ts +195 -0
- package/build/es/src/bookings-catalog-v1-resource.http.js +555 -0
- package/build/es/src/bookings-catalog-v1-resource.http.js.map +1 -0
- package/build/es/src/bookings-catalog-v1-resource.public.d.ts +10 -0
- package/build/es/src/bookings-catalog-v1-resource.public.js +33 -0
- package/build/es/src/bookings-catalog-v1-resource.public.js.map +1 -0
- package/build/es/src/bookings-catalog-v1-resource.types.d.ts +931 -0
- package/build/es/src/bookings-catalog-v1-resource.types.js +122 -0
- package/build/es/src/bookings-catalog-v1-resource.types.js.map +1 -0
- package/build/es/src/bookings-catalog-v1-resource.universal.d.ts +1201 -0
- package/build/es/src/bookings-catalog-v1-resource.universal.js +712 -0
- package/build/es/src/bookings-catalog-v1-resource.universal.js.map +1 -0
- package/build/es/src/bookings-reader-v2-extended-booking.http.d.ts +38 -0
- package/build/es/src/bookings-reader-v2-extended-booking.http.js +113 -0
- package/build/es/src/bookings-reader-v2-extended-booking.http.js.map +1 -0
- package/build/es/src/bookings-reader-v2-extended-booking.public.d.ts +5 -0
- package/build/es/src/bookings-reader-v2-extended-booking.public.js +8 -0
- package/build/es/src/bookings-reader-v2-extended-booking.public.js.map +1 -0
- package/build/es/src/bookings-reader-v2-extended-booking.types.d.ts +730 -0
- package/build/es/src/bookings-reader-v2-extended-booking.types.js +87 -0
- package/build/es/src/bookings-reader-v2-extended-booking.types.js.map +1 -0
- package/build/es/src/bookings-reader-v2-extended-booking.universal.d.ts +786 -0
- package/build/es/src/bookings-reader-v2-extended-booking.universal.js +203 -0
- package/build/es/src/bookings-reader-v2-extended-booking.universal.js.map +1 -0
- package/build/es/src/bookings-v2-booking.http.d.ts +123 -0
- package/build/es/src/bookings-v2-booking.http.js +297 -0
- package/build/es/src/bookings-v2-booking.http.js.map +1 -0
- package/build/es/src/bookings-v2-booking.public.d.ts +9 -0
- package/build/es/src/bookings-v2-booking.public.js +28 -0
- package/build/es/src/bookings-v2-booking.public.js.map +1 -0
- package/build/es/src/bookings-v2-booking.types.d.ts +1594 -0
- package/build/es/src/bookings-v2-booking.types.js +96 -0
- package/build/es/src/bookings-v2-booking.types.js.map +1 -0
- package/build/es/src/bookings-v2-booking.universal.d.ts +1840 -0
- package/build/es/src/bookings-v2-booking.universal.js +534 -0
- package/build/es/src/bookings-v2-booking.universal.js.map +1 -0
- package/build/es/src/bookings-v2-price-info.http.d.ts +56 -0
- package/build/es/src/bookings-v2-price-info.http.js +159 -0
- package/build/es/src/bookings-v2-price-info.http.js.map +1 -0
- package/build/es/src/bookings-v2-price-info.public.d.ts +6 -0
- package/build/es/src/bookings-v2-price-info.public.js +13 -0
- package/build/es/src/bookings-v2-price-info.public.js.map +1 -0
- package/build/es/src/bookings-v2-price-info.types.d.ts +594 -0
- package/build/es/src/bookings-v2-price-info.types.js +76 -0
- package/build/es/src/bookings-v2-price-info.types.js.map +1 -0
- package/build/es/src/bookings-v2-price-info.universal.d.ts +664 -0
- package/build/es/src/bookings-v2-price-info.universal.js +250 -0
- package/build/es/src/bookings-v2-price-info.universal.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,931 @@
|
|
|
1
|
+
export interface Resource {
|
|
2
|
+
/**
|
|
3
|
+
* Resource ID.
|
|
4
|
+
* @readonly
|
|
5
|
+
*/
|
|
6
|
+
id?: string | null;
|
|
7
|
+
/** Resource name. */
|
|
8
|
+
name?: string | null;
|
|
9
|
+
/** Resource email address. */
|
|
10
|
+
email?: string | null;
|
|
11
|
+
/** Resource phone number. */
|
|
12
|
+
phone?: string | null;
|
|
13
|
+
/** Resource description. */
|
|
14
|
+
description?: string | null;
|
|
15
|
+
/** Deprecated. Please use tags. */
|
|
16
|
+
tag?: string | null;
|
|
17
|
+
/** Resource tags. Tags are used to identify, group, and filter the different types of resources. For example, 'staff' or 'room'. */
|
|
18
|
+
tags?: string[] | null;
|
|
19
|
+
/** Resource images. */
|
|
20
|
+
images?: Image[];
|
|
21
|
+
/** Deprecated. Please use scheduleIds. List of the schedules owned by this resource. Min size 1. */
|
|
22
|
+
schedules?: Schedule[];
|
|
23
|
+
/**
|
|
24
|
+
* List of IDs of schedules owned by this resource.
|
|
25
|
+
* @readonly
|
|
26
|
+
*/
|
|
27
|
+
scheduleIds?: string[] | null;
|
|
28
|
+
/**
|
|
29
|
+
* Resource status.
|
|
30
|
+
* <!--ONLY:VELO
|
|
31
|
+
* One of:
|
|
32
|
+
* - `"CREATED"` Default status.
|
|
33
|
+
* - `"DELETED"` The resource was deleted.
|
|
34
|
+
* - `"UPDATED"` The resource was updated.
|
|
35
|
+
* <!--END:ONLY:VELO-->
|
|
36
|
+
* @readonly
|
|
37
|
+
*/
|
|
38
|
+
status?: ResourceStatus;
|
|
39
|
+
/**
|
|
40
|
+
* Wix user ID, if the resource is associated with the Wix user.
|
|
41
|
+
* A staff member resource can be associated with a Wix user via assignment of a permissions role in the business manager.
|
|
42
|
+
* <!--ONLY:VELO
|
|
43
|
+
* Click the **Set Permissions** button for the staff member on the Staff page on your site's dashboard.
|
|
44
|
+
* <!--END:ONLY:VELO-->
|
|
45
|
+
* @readonly
|
|
46
|
+
*/
|
|
47
|
+
wixUserId?: string | null;
|
|
48
|
+
}
|
|
49
|
+
export interface Image {
|
|
50
|
+
/** WixMedia image ID. */
|
|
51
|
+
id?: string;
|
|
52
|
+
/** Image URL. */
|
|
53
|
+
url?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Original image height.
|
|
56
|
+
* @readonly
|
|
57
|
+
*/
|
|
58
|
+
height?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Original image width.
|
|
61
|
+
* @readonly
|
|
62
|
+
*/
|
|
63
|
+
width?: number;
|
|
64
|
+
/** Image alt text. */
|
|
65
|
+
altText?: string | null;
|
|
66
|
+
/**
|
|
67
|
+
* Image filename.
|
|
68
|
+
* @readonly
|
|
69
|
+
*/
|
|
70
|
+
filename?: string | null;
|
|
71
|
+
}
|
|
72
|
+
export interface Schedule {
|
|
73
|
+
/** Schedule ID. */
|
|
74
|
+
id?: string;
|
|
75
|
+
/** ID of the schedule's owner entity. This may be a resource ID or a service ID. */
|
|
76
|
+
scheduleOwnerId?: string | null;
|
|
77
|
+
timeZone?: string | null;
|
|
78
|
+
/**
|
|
79
|
+
* Specifies the intervals for the sessions calculation. Optional. e.g. when creating class service you can add
|
|
80
|
+
* pattern for recurring intervals, these intervals can be returned as schedule's sessions or available slots if
|
|
81
|
+
* there are no other availability calculation constraints and the capacity is bigger then the current total number of sessions' participants.
|
|
82
|
+
*/
|
|
83
|
+
intervals?: RecurringInterval[];
|
|
84
|
+
/** Default title for the schedule's sessions. Maximum length: 6000 characters. */
|
|
85
|
+
title?: string | null;
|
|
86
|
+
/**
|
|
87
|
+
* Tags for grouping schedules. These tags are the default tags for the schedule's sessions.
|
|
88
|
+
* The Wix Bookings app uses the following predefined tags to set schedule type: `"INDIVIDUAL"`, `"GROUP"`, and `"COURSE"`. Once the schedule type is set using these tags, you cannot update it. In addition to the app's tags, you can create and update your own tags.
|
|
89
|
+
*/
|
|
90
|
+
tags?: string[] | null;
|
|
91
|
+
/** Default location for the schedule's sessions. */
|
|
92
|
+
location?: Location;
|
|
93
|
+
/**
|
|
94
|
+
* Maximum number of participants that can be added to the schedule's sessions.
|
|
95
|
+
* Must be at most `1` for schedule whose availability is affected by another schedule. E.g, appointment schedules of the Wix Bookings app.
|
|
96
|
+
*/
|
|
97
|
+
capacity?: number | null;
|
|
98
|
+
/** Price options offered when booking this schedule's slots. Default is no rate. */
|
|
99
|
+
rate?: Rate;
|
|
100
|
+
/**
|
|
101
|
+
* An object describing how to calculate the schedule's availability.
|
|
102
|
+
* An empty object indicates that the schedule is not available for booking.
|
|
103
|
+
*/
|
|
104
|
+
availability?: Availability;
|
|
105
|
+
/**
|
|
106
|
+
* Number of participants registered to sessions in this schedule, calculated as the sum of the party sizes.
|
|
107
|
+
* @readonly
|
|
108
|
+
*/
|
|
109
|
+
totalNumberOfParticipants?: number;
|
|
110
|
+
/**
|
|
111
|
+
* Participants currently registered to sessions in this schedule.
|
|
112
|
+
* Participants who are registered in the schedule are automatically registered to any session that is created for the schedule.
|
|
113
|
+
* @readonly
|
|
114
|
+
*/
|
|
115
|
+
participants?: Participant[];
|
|
116
|
+
/**
|
|
117
|
+
* Title and description values to override session defaults when syncing to an external calendar.
|
|
118
|
+
* Learn more about [syncing calendars](https://support.wix.com/en/article/wix-bookings-important-information-about-syncing-google-calendars-with-wix-bookings).
|
|
119
|
+
*/
|
|
120
|
+
externalCalendarOverrides?: ExternalCalendarOverrides;
|
|
121
|
+
/**
|
|
122
|
+
* Schedule status.
|
|
123
|
+
* @readonly
|
|
124
|
+
*/
|
|
125
|
+
status?: ScheduleStatus;
|
|
126
|
+
/**
|
|
127
|
+
* Schedule creation date.
|
|
128
|
+
* @readonly
|
|
129
|
+
*/
|
|
130
|
+
created?: Date;
|
|
131
|
+
/**
|
|
132
|
+
* Schedule last update date.
|
|
133
|
+
* @readonly
|
|
134
|
+
*/
|
|
135
|
+
updated?: Date;
|
|
136
|
+
/**
|
|
137
|
+
* Schedule version number, updated each time the schedule is updated.
|
|
138
|
+
* @readonly
|
|
139
|
+
*/
|
|
140
|
+
version?: number;
|
|
141
|
+
/**
|
|
142
|
+
* Fields which were inherited from the Business Info page under Settings in the Dashboard.
|
|
143
|
+
* @readonly
|
|
144
|
+
*/
|
|
145
|
+
inheritedFields?: string[];
|
|
146
|
+
/** Conferencing Provider. A schedule with a conferencing provider will use to provider information to create a conference on the provider's system when a session is created on the schedule or on one of its linked schedule's. */
|
|
147
|
+
conferenceProvider?: ConferenceProvider;
|
|
148
|
+
/** A conference created for the schedule. This is used when a participant is added to a schedule. */
|
|
149
|
+
calendarConference?: CalendarConference;
|
|
150
|
+
}
|
|
151
|
+
export interface RecurringInterval {
|
|
152
|
+
/**
|
|
153
|
+
* The recurring interval identifier.
|
|
154
|
+
* @readonly
|
|
155
|
+
*/
|
|
156
|
+
id?: string;
|
|
157
|
+
/** The start time of the recurring interval. Required. */
|
|
158
|
+
start?: Date;
|
|
159
|
+
/** The end time of the recurring interval. Optional. Empty value indicates that there is no end time. */
|
|
160
|
+
end?: Date;
|
|
161
|
+
/** The interval rules. The day, hour and minutes the interval is recurring. */
|
|
162
|
+
interval?: Interval;
|
|
163
|
+
/** The frequency of the interval. Optional. The default is frequency with the default repetition. */
|
|
164
|
+
frequency?: Frequency;
|
|
165
|
+
/** Specifies the list of linked schedules and the way this link affects the corresponding schedules' availability. Can be calculated from the schedule or overridden on the recurring interval. */
|
|
166
|
+
affectedSchedules?: LinkedSchedule[];
|
|
167
|
+
/**
|
|
168
|
+
* The type of recurring interval.
|
|
169
|
+
* <!--ONLY:VELO
|
|
170
|
+
* One of:
|
|
171
|
+
* - `"UNDEFINED"` The default value. Sessions for this interval will be of type EVENT.
|
|
172
|
+
* - `"EVENT"` A recurring interval of events.
|
|
173
|
+
* - `"WORKING_HOURS"` A recurring interval for availability.
|
|
174
|
+
* <!--END:ONLY:VELO-->
|
|
175
|
+
*/
|
|
176
|
+
intervalType?: RecurringIntervalType;
|
|
177
|
+
}
|
|
178
|
+
export interface Interval {
|
|
179
|
+
/** The day the interval accrue. Optional. The default is the day of the recurring interval's start time. */
|
|
180
|
+
daysOfWeek?: Day;
|
|
181
|
+
/** The hour of the day the interval accrue. must be consistent with the Interval start time. Options. The default is 0. minimum: 0, maximum: 23. */
|
|
182
|
+
hourOfDay?: number | null;
|
|
183
|
+
/** The minutes of hour the interval accrue. must be consistent with the Interval end time. Options. The default is 0. minimum: 0, maximum: 59. */
|
|
184
|
+
minuteOfHour?: number | null;
|
|
185
|
+
/** The duration of the interval in minutes. Required. Part of the session end time calculation. minimum: 1, maximum: 86400. */
|
|
186
|
+
duration?: number;
|
|
187
|
+
}
|
|
188
|
+
export declare enum Day {
|
|
189
|
+
/** Undefined. */
|
|
190
|
+
UNDEFINED = "UNDEFINED",
|
|
191
|
+
/** Monday. */
|
|
192
|
+
MON = "MON",
|
|
193
|
+
/** Tuesday. */
|
|
194
|
+
TUE = "TUE",
|
|
195
|
+
/** Wednesday. */
|
|
196
|
+
WED = "WED",
|
|
197
|
+
/** Thursday. */
|
|
198
|
+
THU = "THU",
|
|
199
|
+
/** Friday. */
|
|
200
|
+
FRI = "FRI",
|
|
201
|
+
/** Saturday. */
|
|
202
|
+
SAT = "SAT",
|
|
203
|
+
/** Sunday. */
|
|
204
|
+
SUN = "SUN"
|
|
205
|
+
}
|
|
206
|
+
export interface Frequency {
|
|
207
|
+
/** The frequency of the recurrence in weeks. i.e. when this value is 4, the interval occurs every 4 weeks. Optional. The default is 1. minimum: 1, maximum: 52. */
|
|
208
|
+
repetition?: number | null;
|
|
209
|
+
}
|
|
210
|
+
export interface LinkedSchedule {
|
|
211
|
+
/** Schedule ID. */
|
|
212
|
+
scheduleId?: string;
|
|
213
|
+
/**
|
|
214
|
+
* Sets this schedule's availability for the duration of the linked schedule's sessions. Default is `"BUSY"`.
|
|
215
|
+
* <!--ONLY:REST-->
|
|
216
|
+
* If set to `"BUSY"`, this schedule cannot have any available slots during the linked schedule's sessions.
|
|
217
|
+
* If set to `"FREE"`, this schedule can have available slots during the linked schedule's sessions.
|
|
218
|
+
* <!--END:ONLY:REST-->
|
|
219
|
+
*
|
|
220
|
+
* <!--ONLY:VELO
|
|
221
|
+
* One of:
|
|
222
|
+
* - `"FREE"` This schedule can have available slots during the linked schedule's sessions.
|
|
223
|
+
* - `"BUSY"` This schedule cannot have any available slots during the linked schedule's sessions.
|
|
224
|
+
* <!--END:ONLY:VELO-->
|
|
225
|
+
*/
|
|
226
|
+
transparency?: Transparency;
|
|
227
|
+
/**
|
|
228
|
+
* Owner ID, of the linked schedule.
|
|
229
|
+
* @readonly
|
|
230
|
+
*/
|
|
231
|
+
scheduleOwnerId?: string;
|
|
232
|
+
}
|
|
233
|
+
export declare enum Transparency {
|
|
234
|
+
UNDEFINED = "UNDEFINED",
|
|
235
|
+
/** The schedule can have available slots during the session. */
|
|
236
|
+
FREE = "FREE",
|
|
237
|
+
/** The schedule cannot have available slots during the session. Default value. */
|
|
238
|
+
BUSY = "BUSY"
|
|
239
|
+
}
|
|
240
|
+
export declare enum RecurringIntervalType {
|
|
241
|
+
/** The default value. Sessions for this interval will be of type EVENT. */
|
|
242
|
+
UNDEFINED = "UNDEFINED",
|
|
243
|
+
/** A recurring interval of events */
|
|
244
|
+
EVENT = "EVENT",
|
|
245
|
+
/** Deprecated */
|
|
246
|
+
TIME_AVAILABILITY = "TIME_AVAILABILITY",
|
|
247
|
+
/** A recurring interval for availability */
|
|
248
|
+
AVAILABILITY = "AVAILABILITY"
|
|
249
|
+
}
|
|
250
|
+
export interface Location {
|
|
251
|
+
/**
|
|
252
|
+
* Location type.
|
|
253
|
+
* One of:
|
|
254
|
+
* - `"OWNER_BUSINESS"` The business address as set in the site’s general settings.
|
|
255
|
+
* - `"OWNER_CUSTOM"` The address as set when creating the service.
|
|
256
|
+
* - `"CUSTOM"` The address set for the individual session.
|
|
257
|
+
*/
|
|
258
|
+
locationType?: LocationType;
|
|
259
|
+
/** Free text address used when locationType is `OWNER_CUSTOM`. */
|
|
260
|
+
address?: string | null;
|
|
261
|
+
/** Custom address, used when locationType is `"OWNER_CUSTOM"`. Might be used when locationType is `"CUSTOM"` in case the owner sets a custom address for the session which is different from the default. */
|
|
262
|
+
customAddress?: Address;
|
|
263
|
+
/**
|
|
264
|
+
* Valid when `locationType` is `OWNER_BUSINESS`. Defaults to the business's location.
|
|
265
|
+
*
|
|
266
|
+
* `businessSchedule` is not supported by Wix Bookings
|
|
267
|
+
*/
|
|
268
|
+
businessLocation?: LocationsLocation;
|
|
269
|
+
}
|
|
270
|
+
export declare enum LocationType {
|
|
271
|
+
UNDEFINED = "UNDEFINED",
|
|
272
|
+
OWNER_BUSINESS = "OWNER_BUSINESS",
|
|
273
|
+
OWNER_CUSTOM = "OWNER_CUSTOM",
|
|
274
|
+
CUSTOM = "CUSTOM"
|
|
275
|
+
}
|
|
276
|
+
/** Physical address */
|
|
277
|
+
export interface Address extends AddressStreetOneOf {
|
|
278
|
+
/** Country code. */
|
|
279
|
+
country?: string | null;
|
|
280
|
+
/** Subdivision. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
281
|
+
subdivision?: string | null;
|
|
282
|
+
/** City name. */
|
|
283
|
+
city?: string | null;
|
|
284
|
+
/** Zip/postal code. */
|
|
285
|
+
postalCode?: string | null;
|
|
286
|
+
/** Free text providing more detailed address info. Usually contains Apt, Suite, and Floor. */
|
|
287
|
+
addressLine2?: string | null;
|
|
288
|
+
/** A string containing the full address of this location. */
|
|
289
|
+
formattedAddress?: string | null;
|
|
290
|
+
/** Free text to help find the address. */
|
|
291
|
+
hint?: string | null;
|
|
292
|
+
/** Coordinates of the physical address. */
|
|
293
|
+
geocode?: AddressLocation;
|
|
294
|
+
/** Country full name. */
|
|
295
|
+
countryFullname?: string | null;
|
|
296
|
+
/** Multi-level subdivisions from top to bottom. */
|
|
297
|
+
subdivisions?: Subdivision[];
|
|
298
|
+
/** Street name, number and apartment number. */
|
|
299
|
+
streetAddress?: StreetAddress;
|
|
300
|
+
/** Main address line, usually street and number, as free text. */
|
|
301
|
+
addressLine?: string | null;
|
|
302
|
+
}
|
|
303
|
+
/** @oneof */
|
|
304
|
+
export interface AddressStreetOneOf {
|
|
305
|
+
/** Street name, number and apartment number. */
|
|
306
|
+
streetAddress?: StreetAddress;
|
|
307
|
+
/** Main address line, usually street and number, as free text. */
|
|
308
|
+
addressLine?: string | null;
|
|
309
|
+
}
|
|
310
|
+
export interface StreetAddress {
|
|
311
|
+
/** Street number. */
|
|
312
|
+
number?: string;
|
|
313
|
+
/** Street name. */
|
|
314
|
+
name?: string;
|
|
315
|
+
/** Apartment number. */
|
|
316
|
+
apt?: string;
|
|
317
|
+
}
|
|
318
|
+
export interface AddressLocation {
|
|
319
|
+
/** Address latitude. */
|
|
320
|
+
latitude?: number | null;
|
|
321
|
+
/** Address longitude. */
|
|
322
|
+
longitude?: number | null;
|
|
323
|
+
}
|
|
324
|
+
export interface Subdivision {
|
|
325
|
+
/** Subdivision code. Usually state, region, prefecture or province code, according to [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2). */
|
|
326
|
+
code?: string;
|
|
327
|
+
/** Subdivision full name. */
|
|
328
|
+
name?: string;
|
|
329
|
+
}
|
|
330
|
+
export interface LocationsLocation {
|
|
331
|
+
/**
|
|
332
|
+
* Location ID.
|
|
333
|
+
* @readonly
|
|
334
|
+
*/
|
|
335
|
+
id?: string | null;
|
|
336
|
+
/** Location name. */
|
|
337
|
+
name?: string;
|
|
338
|
+
/** Location description. */
|
|
339
|
+
description?: string | null;
|
|
340
|
+
/**
|
|
341
|
+
* Whether this is the default location. There can only be one default location per site. The default location can't be archived.
|
|
342
|
+
* @readonly
|
|
343
|
+
*/
|
|
344
|
+
default?: boolean;
|
|
345
|
+
/**
|
|
346
|
+
* Location status. Defaults to `ACTIVE`.
|
|
347
|
+
* __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)
|
|
348
|
+
* doesn't affect the location's status. `INACTIVE` is currently not supported.
|
|
349
|
+
*/
|
|
350
|
+
status?: LocationStatus;
|
|
351
|
+
/** Location type. **Note:** Currently not supported. */
|
|
352
|
+
locationType?: LocationsLocationType;
|
|
353
|
+
/** Fax number. */
|
|
354
|
+
fax?: string | null;
|
|
355
|
+
/** Timezone in `America/New_York` format. */
|
|
356
|
+
timeZone?: string | null;
|
|
357
|
+
/** Email address. */
|
|
358
|
+
email?: string | null;
|
|
359
|
+
/** Phone number. */
|
|
360
|
+
phone?: string | null;
|
|
361
|
+
/** Address. */
|
|
362
|
+
address?: LocationsAddress;
|
|
363
|
+
/**
|
|
364
|
+
* Business schedule. Array of weekly recurring time periods when the location is open for business. Limited to 100 time periods.
|
|
365
|
+
*
|
|
366
|
+
* __Note:__ Not supported by Wix Bookings.
|
|
367
|
+
*/
|
|
368
|
+
businessSchedule?: BusinessSchedule;
|
|
369
|
+
/**
|
|
370
|
+
* Revision number, which increments by 1 each time the location is updated.
|
|
371
|
+
* To prevent conflicting changes, the existing revision must be used when updating a location.
|
|
372
|
+
*/
|
|
373
|
+
revision?: string | null;
|
|
374
|
+
/**
|
|
375
|
+
* Whether the location is archived. Archived locations can't be updated.
|
|
376
|
+
* __Note:__ [Archiving a location](https://dev.wix.com/api/rest/business-info/locations/archive-location)
|
|
377
|
+
* doesn't affect its `status`.
|
|
378
|
+
* @readonly
|
|
379
|
+
*/
|
|
380
|
+
archived?: boolean;
|
|
381
|
+
}
|
|
382
|
+
/** For future use */
|
|
383
|
+
export declare enum LocationStatus {
|
|
384
|
+
ACTIVE = "ACTIVE",
|
|
385
|
+
INACTIVE = "INACTIVE"
|
|
386
|
+
}
|
|
387
|
+
/** For future use */
|
|
388
|
+
export declare enum LocationsLocationType {
|
|
389
|
+
UNKNOWN = "UNKNOWN",
|
|
390
|
+
BRANCH = "BRANCH",
|
|
391
|
+
OFFICES = "OFFICES",
|
|
392
|
+
RECEPTION = "RECEPTION",
|
|
393
|
+
HEADQUARTERS = "HEADQUARTERS"
|
|
394
|
+
}
|
|
395
|
+
export interface LocationsAddress {
|
|
396
|
+
/** 2-letter country code in an [ISO-3166 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format. */
|
|
397
|
+
country?: string | null;
|
|
398
|
+
/** Code for a subdivision (such as state, prefecture, or province) in [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) format. */
|
|
399
|
+
subdivision?: string | null;
|
|
400
|
+
/** City name. */
|
|
401
|
+
city?: string | null;
|
|
402
|
+
/** Postal or zip code. */
|
|
403
|
+
postalCode?: string | null;
|
|
404
|
+
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
405
|
+
streetAddress?: LocationsStreetAddress;
|
|
406
|
+
/** Full address of the location. */
|
|
407
|
+
formattedAddress?: string | null;
|
|
408
|
+
/** Extra information that helps finding the location. */
|
|
409
|
+
hint?: string | null;
|
|
410
|
+
/** Geographic coordinates of location. */
|
|
411
|
+
geocode?: LocationsAddressLocation;
|
|
412
|
+
}
|
|
413
|
+
/** Street address. Includes street name, number, and apartment number in separate fields. */
|
|
414
|
+
export interface LocationsStreetAddress {
|
|
415
|
+
/** Street number. */
|
|
416
|
+
number?: string;
|
|
417
|
+
/** Street name. */
|
|
418
|
+
name?: string;
|
|
419
|
+
/** Apartment number. */
|
|
420
|
+
apt?: string;
|
|
421
|
+
}
|
|
422
|
+
/** Address Geolocation */
|
|
423
|
+
export interface LocationsAddressLocation {
|
|
424
|
+
/** Latitude of the location. Must be between -90 and 90. */
|
|
425
|
+
latitude?: number | null;
|
|
426
|
+
/** Longitude of the location. Must be between -180 and 180. */
|
|
427
|
+
longitude?: number | null;
|
|
428
|
+
}
|
|
429
|
+
/** Business schedule. Regular and exceptional time periods when the business is open or the service is available. */
|
|
430
|
+
export interface BusinessSchedule {
|
|
431
|
+
/** Weekly recurring time periods when the business is regularly open or the service is available. Limited to 100 time periods. */
|
|
432
|
+
periods?: TimePeriod[];
|
|
433
|
+
/** Exceptions to the business's regular hours. The business can be open or closed during the exception. */
|
|
434
|
+
specialHourPeriod?: SpecialHourPeriod[];
|
|
435
|
+
}
|
|
436
|
+
/** Weekly recurring time periods when the business is regularly open or the service is available. */
|
|
437
|
+
export interface TimePeriod {
|
|
438
|
+
/** Day of the week the period starts on. */
|
|
439
|
+
openDay?: DayOfWeek;
|
|
440
|
+
/**
|
|
441
|
+
* Time the period starts in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
|
|
442
|
+
* midnight at the end of the specified day.
|
|
443
|
+
*/
|
|
444
|
+
openTime?: string;
|
|
445
|
+
/** Day of the week the period ends on. */
|
|
446
|
+
closeDay?: DayOfWeek;
|
|
447
|
+
/**
|
|
448
|
+
* Time the period ends in 24-hour [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) extended format. Valid values are `00:00` to `24:00`, where `24:00` represents
|
|
449
|
+
* midnight at the end of the specified day.
|
|
450
|
+
*
|
|
451
|
+
* __Note:__ If `openDay` and `closeDay` specify the same day of the week `closeTime` must be later than `openTime`.
|
|
452
|
+
*/
|
|
453
|
+
closeTime?: string;
|
|
454
|
+
}
|
|
455
|
+
/** Enumerates the days of the week. */
|
|
456
|
+
export declare enum DayOfWeek {
|
|
457
|
+
MONDAY = "MONDAY",
|
|
458
|
+
TUESDAY = "TUESDAY",
|
|
459
|
+
WEDNESDAY = "WEDNESDAY",
|
|
460
|
+
THURSDAY = "THURSDAY",
|
|
461
|
+
FRIDAY = "FRIDAY",
|
|
462
|
+
SATURDAY = "SATURDAY",
|
|
463
|
+
SUNDAY = "SUNDAY"
|
|
464
|
+
}
|
|
465
|
+
/** Exception to the business's regular hours. The business can be open or closed during the exception. */
|
|
466
|
+
export interface SpecialHourPeriod {
|
|
467
|
+
/** Start date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
|
|
468
|
+
startDate?: string;
|
|
469
|
+
/** End date and time of the exception in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format and [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). */
|
|
470
|
+
endDate?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Whether the business is closed (or the service is not available) during the exception.
|
|
473
|
+
*
|
|
474
|
+
* Default: `true`.
|
|
475
|
+
*/
|
|
476
|
+
isClosed?: boolean;
|
|
477
|
+
/** Additional info about the exception. For example, "We close earlier on New Year's Eve." */
|
|
478
|
+
comment?: string;
|
|
479
|
+
}
|
|
480
|
+
export interface Rate {
|
|
481
|
+
/**
|
|
482
|
+
* Mapping between a named price option, for example, adult or child prices, and the price, currency, and down payment amount.
|
|
483
|
+
* When present in an update request, the `default_varied_price` is ignored to support backward compatibility.
|
|
484
|
+
*/
|
|
485
|
+
labeledPriceOptions?: Record<string, Price>;
|
|
486
|
+
/**
|
|
487
|
+
* Textual price information used when **Price Per Session** is set to **Custom Price** in the app's service details page.
|
|
488
|
+
* When present in an update request, the `default_varied_price` is ignored to support backward compatibility.
|
|
489
|
+
*/
|
|
490
|
+
priceText?: string | null;
|
|
491
|
+
}
|
|
492
|
+
export interface Price {
|
|
493
|
+
/** Required payment amount. */
|
|
494
|
+
amount?: string;
|
|
495
|
+
/** Currency in which the amount is quoted. */
|
|
496
|
+
currency?: string;
|
|
497
|
+
/** Amount of a down payment or deposit as part of the transaction. */
|
|
498
|
+
downPayAmount?: string;
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
* <!-- Needs updating when recurrence has been tested
|
|
502
|
+
* Schedule's availability calculation is executed by the schedule's available intervals and this additional information.
|
|
503
|
+
* Schedule's available intervals are recurring intervals (defined in the schedule) minus sessions that has no more spots for bookings (including time between_slots), or schedule's sessions with open spots for bookings.-->
|
|
504
|
+
*/
|
|
505
|
+
export interface Availability {
|
|
506
|
+
/** Date and time the schedule starts to be available for booking. */
|
|
507
|
+
start?: Date;
|
|
508
|
+
/** Date and time the schedule stops being available for booking. No value indicates no end time. */
|
|
509
|
+
end?: Date;
|
|
510
|
+
/** Other schedules that impact the availability calculation. Relevant only when there are availability constraints. */
|
|
511
|
+
linkedSchedules?: LinkedSchedule[];
|
|
512
|
+
/** Constraints for calculating the schedule's availability. */
|
|
513
|
+
constraints?: AvailabilityConstraints;
|
|
514
|
+
}
|
|
515
|
+
/** Describes how to calculate the specific slots that are available for booking. */
|
|
516
|
+
export interface AvailabilityConstraints {
|
|
517
|
+
/**
|
|
518
|
+
* A list of duration options for slots, in minutes. Minimum value for a duration is 1.
|
|
519
|
+
* The availability calculation generates slots with these durations, where there is no conflict with existing sessions or other availability constraints.
|
|
520
|
+
*/
|
|
521
|
+
slotDurations?: number[];
|
|
522
|
+
/**
|
|
523
|
+
* The number of minutes between the `end` of one slot, and the `start` of the next.
|
|
524
|
+
* Minimum value is 0, maximum value is 120.
|
|
525
|
+
*/
|
|
526
|
+
timeBetweenSlots?: number;
|
|
527
|
+
/**
|
|
528
|
+
* Specify how to split the slots in intervals of minutes.
|
|
529
|
+
* This value indicates the time between available slots' start time. e.g., from 5 minute slots (3:00, 3:05, 3:15) and 1 hour slots (3:00, 4:00, 5:00).
|
|
530
|
+
* Optional. The default is the first duration in slot_durations field.
|
|
531
|
+
* Deprecated. Use the `split_slots_interval.value_in_minutes`.
|
|
532
|
+
*/
|
|
533
|
+
splitInterval?: number | null;
|
|
534
|
+
/**
|
|
535
|
+
* An object defining the time between available slots' start times. For example, a slot with slots_split_interval=5 can start every 5 minutes. The default is the slot duration.
|
|
536
|
+
* @readonly
|
|
537
|
+
*/
|
|
538
|
+
slotsSplitInterval?: SplitInterval;
|
|
539
|
+
}
|
|
540
|
+
/** The time between available slots' start times. For example, For 5 minute slots, 3:00, 3:05, 3:15 etc. For 1 hour slots, 3:00, 4:00, 5:00 etc. */
|
|
541
|
+
export interface SplitInterval {
|
|
542
|
+
/**
|
|
543
|
+
* Whether the slot duration is used as the split interval value.
|
|
544
|
+
* If `same_as_duration` is `true`, the `value_in_minutes` is the sum of the first duration in
|
|
545
|
+
* `schedule.availabilityConstraints.SlotDurations` field, and `schedule.availabilityConstraints.TimeBetweenSlots` field.
|
|
546
|
+
*/
|
|
547
|
+
sameAsDuration?: boolean | null;
|
|
548
|
+
/** Number of minutes between available slots' start times when `same_as_duration` is `false`. */
|
|
549
|
+
valueInMinutes?: number | null;
|
|
550
|
+
}
|
|
551
|
+
export interface Participant {
|
|
552
|
+
/** Participant ID. Currently represents the booking.id. */
|
|
553
|
+
id?: string;
|
|
554
|
+
/** Contact ID. */
|
|
555
|
+
contactId?: string | null;
|
|
556
|
+
/** Participant's name. */
|
|
557
|
+
name?: string | null;
|
|
558
|
+
/** Participant's phone number. */
|
|
559
|
+
phone?: string | null;
|
|
560
|
+
/** Participant's email address. */
|
|
561
|
+
email?: string | null;
|
|
562
|
+
/** Group or party size. The number of people attending. Defaults to 0. Maximum is 250. */
|
|
563
|
+
partySize?: number;
|
|
564
|
+
/**
|
|
565
|
+
* Approval status for the participant.
|
|
566
|
+
* <!-- Commented out untill updateParticipant is exposed Generally the same status as the booking, unless updated using the `updateParticipant()` API. Defaults to `"UNDEFINED"`.-->
|
|
567
|
+
* <!--ONLY:VELO
|
|
568
|
+
* One of:
|
|
569
|
+
* - `"PENDING"` Pending business approval.
|
|
570
|
+
* - `"APPROVED"` Approved by the business.
|
|
571
|
+
* - `"DECLINED"` Declined by the business.
|
|
572
|
+
* <!--END:ONLY:VELO-->
|
|
573
|
+
*/
|
|
574
|
+
approvalStatus?: ApprovalStatus;
|
|
575
|
+
/**
|
|
576
|
+
* Whether the participant was inherited from the schedule, as opposed to being booked directly to the session.
|
|
577
|
+
* @readonly
|
|
578
|
+
*/
|
|
579
|
+
inherited?: boolean;
|
|
580
|
+
}
|
|
581
|
+
export declare enum ApprovalStatus {
|
|
582
|
+
/** Default. */
|
|
583
|
+
UNDEFINED = "UNDEFINED",
|
|
584
|
+
/** Pending business approval. */
|
|
585
|
+
PENDING = "PENDING",
|
|
586
|
+
/** Approved by the business. */
|
|
587
|
+
APPROVED = "APPROVED",
|
|
588
|
+
/** Declined by the business. */
|
|
589
|
+
DECLINED = "DECLINED"
|
|
590
|
+
}
|
|
591
|
+
export interface ExternalCalendarOverrides {
|
|
592
|
+
/** Synced title of the external calendar event. */
|
|
593
|
+
title?: string | null;
|
|
594
|
+
/** Synced description of the external calendar event. */
|
|
595
|
+
description?: string | null;
|
|
596
|
+
}
|
|
597
|
+
export declare enum ScheduleStatus {
|
|
598
|
+
UNDEFINED = "UNDEFINED",
|
|
599
|
+
/** The default value when the schedule is created. */
|
|
600
|
+
CREATED = "CREATED",
|
|
601
|
+
/** The schedule has been canceled. */
|
|
602
|
+
CANCELLED = "CANCELLED"
|
|
603
|
+
}
|
|
604
|
+
export interface Version {
|
|
605
|
+
/** Schedule version number, updated each time the schedule is updated. */
|
|
606
|
+
scheduleVersion?: number | null;
|
|
607
|
+
/** Participants version number, updated each time the schedule participants are updated. */
|
|
608
|
+
participantsVersion?: number | null;
|
|
609
|
+
}
|
|
610
|
+
export interface ConferenceProvider {
|
|
611
|
+
/** Conferencing provider ID */
|
|
612
|
+
providerId?: string;
|
|
613
|
+
}
|
|
614
|
+
export interface CalendarConference {
|
|
615
|
+
/** Wix Calendar conference ID. */
|
|
616
|
+
id?: string;
|
|
617
|
+
/** Conference meeting ID in the provider's conferencing system. */
|
|
618
|
+
externalId?: string;
|
|
619
|
+
/** Conference provider ID. */
|
|
620
|
+
providerId?: string;
|
|
621
|
+
/** URL used by the host to start the conference. */
|
|
622
|
+
hostUrl?: string;
|
|
623
|
+
/** URL used by a guest to join the conference. */
|
|
624
|
+
guestUrl?: string;
|
|
625
|
+
/** Password to join the conference. */
|
|
626
|
+
password?: string | null;
|
|
627
|
+
/** Conference description. */
|
|
628
|
+
description?: string | null;
|
|
629
|
+
/**
|
|
630
|
+
* Conference type.
|
|
631
|
+
* <!--ONLY:VELO
|
|
632
|
+
* One of:
|
|
633
|
+
* - `"ONLINE_MEETING_PROVIDER"` API-generated online meeting.
|
|
634
|
+
* - `"CUSTOM"` User-defined meeting.
|
|
635
|
+
* <!--END:ONLY:VELO-->
|
|
636
|
+
*/
|
|
637
|
+
conferenceType?: ConferenceType;
|
|
638
|
+
/** Account owner id in vc service */
|
|
639
|
+
accountOwnerId?: string | null;
|
|
640
|
+
}
|
|
641
|
+
export declare enum ConferenceType {
|
|
642
|
+
UNDEFINED = "UNDEFINED",
|
|
643
|
+
/** API-generated online meeting. */
|
|
644
|
+
ONLINE_MEETING_PROVIDER = "ONLINE_MEETING_PROVIDER",
|
|
645
|
+
/** User-defined meeting. */
|
|
646
|
+
CUSTOM = "CUSTOM"
|
|
647
|
+
}
|
|
648
|
+
export declare enum ResourceStatus {
|
|
649
|
+
UNDEFINED = "UNDEFINED",
|
|
650
|
+
/** Default status. */
|
|
651
|
+
CREATED = "CREATED",
|
|
652
|
+
/** The resource was deleted. */
|
|
653
|
+
DELETED = "DELETED",
|
|
654
|
+
/** The resource was updated. */
|
|
655
|
+
UPDATED = "UPDATED"
|
|
656
|
+
}
|
|
657
|
+
export interface ListResourcesRequest {
|
|
658
|
+
query?: Query;
|
|
659
|
+
}
|
|
660
|
+
export interface Query {
|
|
661
|
+
/**
|
|
662
|
+
* Filter object in the following format:
|
|
663
|
+
* `"filter" : {
|
|
664
|
+
* "fieldName1": "value1",
|
|
665
|
+
* "fieldName2":{"$operator":"value2"}
|
|
666
|
+
* }`
|
|
667
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
668
|
+
*/
|
|
669
|
+
filter?: any;
|
|
670
|
+
/**
|
|
671
|
+
* Sort object in the following format:
|
|
672
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
673
|
+
*/
|
|
674
|
+
sort?: Sorting[];
|
|
675
|
+
/** Paging options to limit and skip the number of items. */
|
|
676
|
+
paging?: Paging;
|
|
677
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
678
|
+
fields?: string[];
|
|
679
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
680
|
+
fieldsets?: string[];
|
|
681
|
+
}
|
|
682
|
+
export interface Sorting {
|
|
683
|
+
/** Name of the field to sort by. */
|
|
684
|
+
fieldName?: string;
|
|
685
|
+
/** Sort order. */
|
|
686
|
+
order?: SortOrder;
|
|
687
|
+
}
|
|
688
|
+
export declare enum SortOrder {
|
|
689
|
+
ASC = "ASC",
|
|
690
|
+
DESC = "DESC"
|
|
691
|
+
}
|
|
692
|
+
export interface Paging {
|
|
693
|
+
/** Number of items to load. */
|
|
694
|
+
limit?: number | null;
|
|
695
|
+
/** Number of items to skip in the current sort order. */
|
|
696
|
+
offset?: number | null;
|
|
697
|
+
}
|
|
698
|
+
export interface ListResourcesResponse {
|
|
699
|
+
/** List of resources matching the query object. */
|
|
700
|
+
resources?: Resource[];
|
|
701
|
+
metadata?: QueryMetaData;
|
|
702
|
+
pagingMetadata?: PagingMetadataV2;
|
|
703
|
+
}
|
|
704
|
+
export interface QueryMetaData {
|
|
705
|
+
items?: number;
|
|
706
|
+
offset?: number;
|
|
707
|
+
totalCount?: number;
|
|
708
|
+
}
|
|
709
|
+
export interface PagingMetadataV2 {
|
|
710
|
+
/** Number of items returned in the response. */
|
|
711
|
+
count?: number | null;
|
|
712
|
+
/** Offset that was requested. */
|
|
713
|
+
offset?: number | null;
|
|
714
|
+
/** Total number of items that match the query. Returned if offset paging is used and the `tooManyToCount` flag is not set. */
|
|
715
|
+
total?: number | null;
|
|
716
|
+
/** Flag that indicates the server failed to calculate the `total` field. */
|
|
717
|
+
tooManyToCount?: boolean | null;
|
|
718
|
+
/** Cursors to navigate through the result pages using `next` and `prev`. Returned if cursor paging is used. */
|
|
719
|
+
cursors?: Cursors;
|
|
720
|
+
}
|
|
721
|
+
export interface Cursors {
|
|
722
|
+
/** Cursor pointing to next page in the list of results. */
|
|
723
|
+
next?: string | null;
|
|
724
|
+
/** Cursor pointing to previous page in the list of results. */
|
|
725
|
+
prev?: string | null;
|
|
726
|
+
}
|
|
727
|
+
export interface QueryResourcesRequest {
|
|
728
|
+
query?: QueryV2;
|
|
729
|
+
}
|
|
730
|
+
export interface QueryV2 extends QueryV2PagingMethodOneOf {
|
|
731
|
+
/**
|
|
732
|
+
* Filter object in the following format:
|
|
733
|
+
* `"filter" : {
|
|
734
|
+
* "fieldName1": "value1",
|
|
735
|
+
* "fieldName2":{"$operator":"value2"}
|
|
736
|
+
* }`
|
|
737
|
+
* Example of operators: `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`, `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`
|
|
738
|
+
*/
|
|
739
|
+
filter?: Record<string, any> | null;
|
|
740
|
+
/**
|
|
741
|
+
* Sort object in the following format:
|
|
742
|
+
* `[{"fieldName":"sortField1","order":"ASC"},{"fieldName":"sortField2","order":"DESC"}]`
|
|
743
|
+
*/
|
|
744
|
+
sort?: Sorting[];
|
|
745
|
+
/** Array of projected fields. A list of specific field names to return. If `fieldsets` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
746
|
+
fields?: string[];
|
|
747
|
+
/** Array of named, predefined sets of projected fields. A array of predefined named sets of fields to be returned. Specifying multiple `fieldsets` will return the union of fields from all sets. If `fields` are also specified, the union of `fieldsets` and `fields` is returned. */
|
|
748
|
+
fieldsets?: string[];
|
|
749
|
+
/** Paging options to limit and skip the number of items. */
|
|
750
|
+
paging?: Paging;
|
|
751
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
752
|
+
cursorPaging?: CursorPaging;
|
|
753
|
+
}
|
|
754
|
+
/** @oneof */
|
|
755
|
+
export interface QueryV2PagingMethodOneOf {
|
|
756
|
+
/** Paging options to limit and skip the number of items. */
|
|
757
|
+
paging?: Paging;
|
|
758
|
+
/** Cursor token pointing to a page of results. Not used in the first request. Following requests use the cursor token and not `filter` or `sort`. */
|
|
759
|
+
cursorPaging?: CursorPaging;
|
|
760
|
+
}
|
|
761
|
+
export interface CursorPaging {
|
|
762
|
+
/** Number of items to load. */
|
|
763
|
+
limit?: number | null;
|
|
764
|
+
/**
|
|
765
|
+
* Pointer to the next or previous page in the list of results.
|
|
766
|
+
*
|
|
767
|
+
* You can get the relevant cursor token
|
|
768
|
+
* from the `pagingMetadata` object in the previous call's response.
|
|
769
|
+
* Not relevant for the first request.
|
|
770
|
+
*/
|
|
771
|
+
cursor?: string | null;
|
|
772
|
+
}
|
|
773
|
+
export interface QueryResourcesResponse {
|
|
774
|
+
/** List of resources matching the query object. */
|
|
775
|
+
resources?: Resource[];
|
|
776
|
+
pagingMetadata?: PagingMetadataV2;
|
|
777
|
+
}
|
|
778
|
+
export interface CreateResourceRequest {
|
|
779
|
+
/** Resource details. */
|
|
780
|
+
resource: Resource;
|
|
781
|
+
/**
|
|
782
|
+
* List of schedules to be assigned for the created resource. Currently only a single schedule is allowed.
|
|
783
|
+
* If provided, any schedules in the resource entity will be ignored.
|
|
784
|
+
*/
|
|
785
|
+
schedules?: Schedule[];
|
|
786
|
+
}
|
|
787
|
+
export interface CreateResourceResponse {
|
|
788
|
+
/** Resource details. */
|
|
789
|
+
resource?: Resource;
|
|
790
|
+
}
|
|
791
|
+
export interface ResourceNotification {
|
|
792
|
+
/**
|
|
793
|
+
* Updated resource entity.
|
|
794
|
+
* 'resource.schedules' is deprecated and will not be returned. Please use 'resource.scheduleIds' instead.
|
|
795
|
+
*/
|
|
796
|
+
resource?: Resource;
|
|
797
|
+
/** Event type. */
|
|
798
|
+
event?: Event;
|
|
799
|
+
}
|
|
800
|
+
export declare enum Event {
|
|
801
|
+
UNDEFINED = "UNDEFINED",
|
|
802
|
+
Updated = "Updated",
|
|
803
|
+
Deleted = "Deleted",
|
|
804
|
+
Created = "Created",
|
|
805
|
+
Schedule_Updated = "Schedule_Updated"
|
|
806
|
+
}
|
|
807
|
+
export interface BatchCreateResourceRequest {
|
|
808
|
+
/** List of resource entities to create. */
|
|
809
|
+
resources?: Resource[];
|
|
810
|
+
/** Optional. If provided, the resources field is ignored. */
|
|
811
|
+
batchedResources?: CreateResourceRequest[];
|
|
812
|
+
}
|
|
813
|
+
export interface BatchCreateResourceResponse {
|
|
814
|
+
/** List of the created resources. */
|
|
815
|
+
resources?: Resource[];
|
|
816
|
+
}
|
|
817
|
+
export interface UpdateResourceRequest {
|
|
818
|
+
/** Resource details. */
|
|
819
|
+
resource?: Resource;
|
|
820
|
+
/** Field mask of fields to update. */
|
|
821
|
+
fieldMask?: string[];
|
|
822
|
+
}
|
|
823
|
+
export interface BatchRequest {
|
|
824
|
+
/** Create multiple schedules. */
|
|
825
|
+
createRequests?: CreateScheduleRequest[];
|
|
826
|
+
/** Update multiple schedules. Not Supported yet. */
|
|
827
|
+
updateRequests?: UpdateScheduleRequest[];
|
|
828
|
+
/**
|
|
829
|
+
* Cancel multiple schedules.
|
|
830
|
+
* The given schedules move to a CANCELLED status which means that all sessions up until
|
|
831
|
+
* the cancellation point in time are kept, while removing all following sessions.
|
|
832
|
+
*/
|
|
833
|
+
cancelRequests?: CancelScheduleRequest[];
|
|
834
|
+
}
|
|
835
|
+
/** schedule */
|
|
836
|
+
export interface CreateScheduleRequest {
|
|
837
|
+
/** Schedule. */
|
|
838
|
+
schedule?: Schedule;
|
|
839
|
+
}
|
|
840
|
+
export interface UpdateScheduleRequest {
|
|
841
|
+
/** Schedule. */
|
|
842
|
+
schedule?: Schedule;
|
|
843
|
+
/** Field mask of fields to update. */
|
|
844
|
+
fieldMask?: string[];
|
|
845
|
+
/** Optional. Defaults to false. In case of updated intervals' start time, this field indicates whether to align those interval's time exceptions. */
|
|
846
|
+
alignTimeExceptions?: boolean;
|
|
847
|
+
/** Deprecated, use participant_notification. */
|
|
848
|
+
notifyParticipants?: boolean;
|
|
849
|
+
/** Whether to notify participants about the change, and an optional custom message. */
|
|
850
|
+
participantNotification?: ParticipantNotification;
|
|
851
|
+
}
|
|
852
|
+
export interface ParticipantNotification {
|
|
853
|
+
/**
|
|
854
|
+
* Whether to send the message about the changes to the customer.
|
|
855
|
+
*
|
|
856
|
+
* Default: `false`
|
|
857
|
+
*/
|
|
858
|
+
notifyParticipants?: boolean;
|
|
859
|
+
/** Custom message to send to the participants about the changes to the booking. */
|
|
860
|
+
message?: string | null;
|
|
861
|
+
}
|
|
862
|
+
export interface CancelScheduleRequest {
|
|
863
|
+
/** Schedule ID. */
|
|
864
|
+
scheduleId?: string;
|
|
865
|
+
/** Time to cancel the sessions from. Optional. If this field is empty, all of this schedule's sessions will be canceled. */
|
|
866
|
+
from?: Date;
|
|
867
|
+
/** Whether to preserve future sessions with reservations. Defaults to false. */
|
|
868
|
+
preserveFutureSessionsWithParticipants?: boolean;
|
|
869
|
+
/** Deprecated, use participant_notification */
|
|
870
|
+
notifyParticipants?: boolean;
|
|
871
|
+
/** Whether to notify participants about the change, and an optional custom message. */
|
|
872
|
+
participantNotification?: ParticipantNotification;
|
|
873
|
+
}
|
|
874
|
+
export interface UpdateResourceResponse {
|
|
875
|
+
/** Resource details. */
|
|
876
|
+
resource?: Resource;
|
|
877
|
+
/** Updated Schedules */
|
|
878
|
+
schedules?: BatchResponse;
|
|
879
|
+
}
|
|
880
|
+
export interface BatchResponse {
|
|
881
|
+
/** Created schedules. */
|
|
882
|
+
created?: Schedule[];
|
|
883
|
+
/** Updated schedules. */
|
|
884
|
+
updated?: Schedule[];
|
|
885
|
+
/** Cancelled schedules. */
|
|
886
|
+
cancelled?: Schedule[];
|
|
887
|
+
}
|
|
888
|
+
export interface ResourceUpdateScheduleRequest {
|
|
889
|
+
/** Resource id to update. */
|
|
890
|
+
resourceId: string | null;
|
|
891
|
+
/** Fieldmask for schedule */
|
|
892
|
+
fieldmask?: string[];
|
|
893
|
+
/** The schedule to update */
|
|
894
|
+
schedule?: Schedule;
|
|
895
|
+
}
|
|
896
|
+
export interface UpdateScheduleResponse {
|
|
897
|
+
/** The updated schedule. */
|
|
898
|
+
schedule?: Schedule;
|
|
899
|
+
}
|
|
900
|
+
export interface DeleteResourceRequest {
|
|
901
|
+
/** ID of the resource to delete. */
|
|
902
|
+
id: string;
|
|
903
|
+
}
|
|
904
|
+
export interface DeleteResourceResponse {
|
|
905
|
+
/** Deleted resource id */
|
|
906
|
+
id?: string;
|
|
907
|
+
}
|
|
908
|
+
export interface BatchDeleteResourceRequest {
|
|
909
|
+
/** List of resource IDs to delete. */
|
|
910
|
+
ids?: string[];
|
|
911
|
+
}
|
|
912
|
+
export interface BatchDeleteResourceResponse {
|
|
913
|
+
}
|
|
914
|
+
export interface LinkResourceToUserRequest {
|
|
915
|
+
/** The id of the resource to link. */
|
|
916
|
+
resourceId?: string | null;
|
|
917
|
+
/** The id of Wix user to link. */
|
|
918
|
+
userId?: string | null;
|
|
919
|
+
}
|
|
920
|
+
export interface LinkResourceToUserResponse {
|
|
921
|
+
/** The updated resource. */
|
|
922
|
+
resource?: Resource;
|
|
923
|
+
}
|
|
924
|
+
export interface UnLinkResourceFromOwnerRequest {
|
|
925
|
+
/** The id of the resource to unlink. */
|
|
926
|
+
resourceId?: string | null;
|
|
927
|
+
}
|
|
928
|
+
export interface UnLinkResourceFromOwnerResponse {
|
|
929
|
+
/** The updated resource. */
|
|
930
|
+
resource?: Resource;
|
|
931
|
+
}
|