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