@wix/auto_sdk_bookings_resources 1.0.0 → 1.0.1
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/src/bookings-resources-v2-resource-resources.context.d.ts +2 -6
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +2 -6
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +47 -17
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +46 -16
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +47 -23
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +110 -64
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +191 -105
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +46 -22
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +2 -6
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +2 -6
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +47 -17
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +46 -16
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +47 -23
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.types.d.ts +110 -64
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/es/src/bookings-resources-v2-resource-resources.universal.d.ts +191 -105
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +46 -22
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +2 -6
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +2 -6
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +47 -17
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +46 -16
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +47 -23
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.d.ts +110 -64
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts +191 -105
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +46 -22
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +2 -6
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +2 -6
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +47 -17
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +46 -16
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +47 -23
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.d.ts +110 -64
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +1 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.d.ts +191 -105
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +46 -22
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A resource represents an entity
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* A resource represents an entity, such as a room or a staff member, that can be
|
|
3
|
+
* scheduled for use in a *booking*
|
|
4
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/bookings/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/bookings/about-the-bookings-apis)).
|
|
5
|
+
* The availability of a resource is tracked to ensure that it
|
|
6
|
+
* can be allocated at a requested time slot and to prevent double bookings.
|
|
5
7
|
*/
|
|
6
8
|
export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
7
9
|
/**
|
|
@@ -17,35 +19,42 @@ export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
17
19
|
*/
|
|
18
20
|
revision?: string | null;
|
|
19
21
|
/**
|
|
20
|
-
*
|
|
22
|
+
* Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created.
|
|
21
23
|
* @readonly
|
|
22
24
|
*/
|
|
23
25
|
_createdDate?: Date | null;
|
|
24
26
|
/**
|
|
25
|
-
*
|
|
27
|
+
* Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated.
|
|
26
28
|
* @readonly
|
|
27
29
|
*/
|
|
28
30
|
_updatedDate?: Date | null;
|
|
29
31
|
/** Name of the resource. */
|
|
30
32
|
name?: string | null;
|
|
31
33
|
/**
|
|
32
|
-
* ID of the
|
|
34
|
+
* ID of the *resource type*
|
|
35
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
|
33
36
|
*
|
|
34
37
|
* Once a type has been set it can't be modified. You can create a resource
|
|
35
|
-
* without specifying a type. However,
|
|
38
|
+
* without specifying a type. However, customers can't book such resources.
|
|
36
39
|
*/
|
|
37
40
|
typeId?: string | null;
|
|
38
41
|
/**
|
|
39
|
-
*
|
|
42
|
+
* Information about the *schedule*
|
|
43
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
|
|
44
|
+
* specifying the working hours and locations of the resource.
|
|
40
45
|
*
|
|
41
|
-
* Resources without
|
|
42
|
-
*
|
|
46
|
+
* Resources without a working hour schedule are available 24/7 at the locations
|
|
47
|
+
* specified in the field `locationOptions`.
|
|
48
|
+
* When both `workingHoursSchedules` and `locationOptions` are set,
|
|
49
|
+
* `workingHoursSchedules` takes precedence.
|
|
43
50
|
*/
|
|
44
51
|
workingHoursSchedules?: WorkingHoursSchedules;
|
|
45
|
-
/**
|
|
52
|
+
/** Information about the location where the resource is available. */
|
|
46
53
|
locationOptions?: LocationOptions;
|
|
47
54
|
/**
|
|
48
|
-
*
|
|
55
|
+
* Schedule containing the *events*
|
|
56
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
57
|
+
* for which the resource has been booked.
|
|
49
58
|
* @readonly
|
|
50
59
|
*/
|
|
51
60
|
eventsSchedule?: EventsSchedule;
|
|
@@ -56,13 +65,15 @@ export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
56
65
|
export interface ResourceCompositionDetailsOneOf {
|
|
57
66
|
}
|
|
58
67
|
export interface WorkingHoursSchedule {
|
|
59
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* ID of the working hour *schedule*
|
|
70
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
71
|
+
*/
|
|
60
72
|
scheduleId?: string | null;
|
|
61
73
|
/**
|
|
62
|
-
* Whether
|
|
74
|
+
* Whether the schedule is shared by multiple resources or unique for this resource.
|
|
63
75
|
*
|
|
64
|
-
*
|
|
65
|
-
* Default: `false`.
|
|
76
|
+
* Default: `false`
|
|
66
77
|
* @readonly
|
|
67
78
|
*/
|
|
68
79
|
shared?: boolean | null;
|
|
@@ -71,25 +82,29 @@ export interface SingleResource {
|
|
|
71
82
|
/**
|
|
72
83
|
* Schedule details that specify the working hours and locations of this resource.
|
|
73
84
|
*
|
|
74
|
-
* When this field is
|
|
75
|
-
*
|
|
76
|
-
* `
|
|
85
|
+
* When this field is missing or empty, the resource is assumed to be available
|
|
86
|
+
* around the clock (24/7) at the locations specified in `locationOptions`. When
|
|
87
|
+
* both `workingHoursSchedules` and `locationOptions` are set,
|
|
88
|
+
* `workingHoursSchedules` takes precedence.
|
|
77
89
|
*/
|
|
78
90
|
workingHoursSchedules?: V2WorkingHoursSchedules;
|
|
79
91
|
/**
|
|
80
|
-
*
|
|
92
|
+
* Information about the location where the resource is available.
|
|
81
93
|
*
|
|
82
|
-
* If
|
|
94
|
+
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
95
|
+
* `{"availableInAllLocations": true}`.
|
|
83
96
|
*/
|
|
84
97
|
locationOptions?: LocationOptions;
|
|
85
98
|
/**
|
|
86
|
-
*
|
|
99
|
+
* Schedule containing the *events*
|
|
100
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
101
|
+
* for which the resource has been booked.
|
|
87
102
|
* @readonly
|
|
88
103
|
*/
|
|
89
104
|
eventsSchedule?: Schedule;
|
|
90
105
|
}
|
|
91
106
|
export interface V2WorkingHoursSchedules {
|
|
92
|
-
/**
|
|
107
|
+
/** Schedules specifying the working hours of the resource. Currently, only a single schedule is supported. */
|
|
93
108
|
values?: Schedule[];
|
|
94
109
|
}
|
|
95
110
|
/** Deprecated and subject to removal */
|
|
@@ -106,39 +121,53 @@ export interface Schedule {
|
|
|
106
121
|
}
|
|
107
122
|
export interface LocationOptions {
|
|
108
123
|
/**
|
|
109
|
-
*
|
|
124
|
+
* Whether the resource is available in all *business locations*
|
|
125
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).
|
|
126
|
+
*
|
|
127
|
+
* - `true`: The resource is available in all business locations.
|
|
128
|
+
* - `false`: The resource is available only in specific locations.
|
|
129
|
+
*
|
|
110
130
|
* Default: `false`
|
|
111
131
|
*/
|
|
112
132
|
availableInAllLocations?: boolean | null;
|
|
113
|
-
/**
|
|
114
|
-
* Details of specific locations. It must be left empty if `availableInAllLocations` is `true`.
|
|
115
|
-
* If supplied then the field `specificLocationOptions.availableInBusinessLocations` must be set to `true`.
|
|
116
|
-
*/
|
|
133
|
+
/** Details of resource availability in specific locations. */
|
|
117
134
|
specificLocationOptions?: SpecificLocation;
|
|
118
135
|
}
|
|
119
136
|
export interface SpecificLocation {
|
|
120
137
|
/**
|
|
121
|
-
*
|
|
138
|
+
* Whether the resource is available in *business locations*
|
|
139
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/services/about-service-locations#backend-modules_bookings_services_location-types) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/services/services-v2/about-service-locations#location-types)).
|
|
140
|
+
*
|
|
141
|
+
* - `true`: The resource is available in business locations.
|
|
142
|
+
* - `false`: The resource isn't available in business locations.
|
|
122
143
|
*
|
|
123
144
|
* Default: `false`
|
|
124
145
|
*/
|
|
125
146
|
availableInBusinessLocations?: boolean | null;
|
|
126
147
|
/**
|
|
127
|
-
* Information about business locations
|
|
128
|
-
*
|
|
148
|
+
* Information about the business locations where the resource is available.
|
|
149
|
+
* Not returned, if the resource is available in either all business locations
|
|
150
|
+
* or in no business location.
|
|
151
|
+
* You can specify up to 5 business locations.
|
|
129
152
|
*/
|
|
130
153
|
businessLocations?: BusinessLocation[];
|
|
131
154
|
}
|
|
132
155
|
export interface BusinessLocation {
|
|
133
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* ID of the business *location*
|
|
158
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
|
|
159
|
+
*/
|
|
134
160
|
locationId?: string | null;
|
|
135
161
|
}
|
|
136
162
|
export interface WorkingHoursSchedules {
|
|
137
|
-
/** Schedules specifying
|
|
163
|
+
/** Schedules specifying the working hours of the resource. Currently, only a single schedule is supported. */
|
|
138
164
|
values?: WorkingHoursSchedule[];
|
|
139
165
|
}
|
|
140
166
|
export interface EventsSchedule {
|
|
141
|
-
/**
|
|
167
|
+
/**
|
|
168
|
+
* ID of the event *schedule*
|
|
169
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction)).
|
|
170
|
+
*/
|
|
142
171
|
scheduleId?: string | null;
|
|
143
172
|
}
|
|
144
173
|
export declare enum ManagementType {
|
|
@@ -161,13 +190,17 @@ export interface CreateResourceRequest {
|
|
|
161
190
|
resource: Resource;
|
|
162
191
|
}
|
|
163
192
|
export interface CreateResourceResponse {
|
|
164
|
-
/**
|
|
193
|
+
/** Created resource. */
|
|
165
194
|
resource?: Resource;
|
|
166
195
|
}
|
|
167
196
|
export interface BulkCreateResourcesRequest {
|
|
168
197
|
/** Resources to create. */
|
|
169
198
|
resources: Resource[];
|
|
170
|
-
/**
|
|
199
|
+
/**
|
|
200
|
+
* Whether to include the created resources in the response.
|
|
201
|
+
*
|
|
202
|
+
* Default: `false`
|
|
203
|
+
*/
|
|
171
204
|
returnEntity?: boolean;
|
|
172
205
|
}
|
|
173
206
|
export interface BulkCreateResourcesResponse {
|
|
@@ -177,7 +210,7 @@ export interface BulkCreateResourcesResponse {
|
|
|
177
210
|
bulkActionMetadata?: BulkActionMetadata;
|
|
178
211
|
}
|
|
179
212
|
export interface BulkResourceResult {
|
|
180
|
-
/** Item metadata */
|
|
213
|
+
/** Item metadata. */
|
|
181
214
|
itemMetadata?: ItemMetadata;
|
|
182
215
|
/** The resulting resource after the bulk operation. */
|
|
183
216
|
item?: Resource;
|
|
@@ -213,21 +246,21 @@ export interface GetResourceRequest {
|
|
|
213
246
|
resourceId: string;
|
|
214
247
|
}
|
|
215
248
|
export interface GetResourceResponse {
|
|
216
|
-
/**
|
|
249
|
+
/** Retrieved resource. */
|
|
217
250
|
resource?: Resource;
|
|
218
251
|
}
|
|
219
252
|
export interface GetDeletedResourceRequest {
|
|
220
|
-
/** ID of the resource to retrieve. */
|
|
253
|
+
/** ID of the deleted resource to retrieve from the trash bin. */
|
|
221
254
|
resourceId?: string;
|
|
222
255
|
}
|
|
223
256
|
export interface GetDeletedResourceResponse {
|
|
224
|
-
/**
|
|
257
|
+
/** Retrieved resource. */
|
|
225
258
|
resource?: Resource;
|
|
226
259
|
}
|
|
227
260
|
export interface ListDeletedResourcesRequest {
|
|
228
|
-
/**
|
|
261
|
+
/** IDs of the resources to retrieve. */
|
|
229
262
|
resourceIds?: string[];
|
|
230
|
-
/** Paging
|
|
263
|
+
/** Paging details, allowing you specify a limit and a cursor. */
|
|
231
264
|
paging?: CursorPaging;
|
|
232
265
|
}
|
|
233
266
|
export interface CursorPaging {
|
|
@@ -242,9 +275,9 @@ export interface CursorPaging {
|
|
|
242
275
|
cursor?: string | null;
|
|
243
276
|
}
|
|
244
277
|
export interface ListDeletedResourcesResponse {
|
|
245
|
-
/**
|
|
278
|
+
/** Retrieved resources. */
|
|
246
279
|
resources?: Resource[];
|
|
247
|
-
/** Paging metadata */
|
|
280
|
+
/** Paging metadata. */
|
|
248
281
|
pagingMetadata?: CursorPagingMetadata;
|
|
249
282
|
}
|
|
250
283
|
export interface CursorPagingMetadata {
|
|
@@ -267,7 +300,7 @@ export interface Cursors {
|
|
|
267
300
|
prev?: string | null;
|
|
268
301
|
}
|
|
269
302
|
export interface RemoveResourceFromTrashBinRequest {
|
|
270
|
-
/** ID of the resource to
|
|
303
|
+
/** ID of the resource to permanently delete from the trash bin. */
|
|
271
304
|
resourceId?: string;
|
|
272
305
|
}
|
|
273
306
|
export interface RemoveResourceFromTrashBinResponse {
|
|
@@ -277,15 +310,15 @@ export interface RestoreResourceFromTrashBinRequest {
|
|
|
277
310
|
resourceId?: string;
|
|
278
311
|
}
|
|
279
312
|
export interface RestoreResourceFromTrashBinResponse {
|
|
280
|
-
/**
|
|
313
|
+
/** Restored resource. */
|
|
281
314
|
resource?: Resource;
|
|
282
315
|
}
|
|
283
316
|
export interface UpdateResourceRequest {
|
|
284
|
-
/** Resource to
|
|
317
|
+
/** Resource to update. */
|
|
285
318
|
resource: Resource;
|
|
286
319
|
}
|
|
287
320
|
export interface UpdateResourceResponse {
|
|
288
|
-
/**
|
|
321
|
+
/** Updated resource. */
|
|
289
322
|
resource?: Resource;
|
|
290
323
|
}
|
|
291
324
|
export interface DeleteResourceRequest {
|
|
@@ -295,7 +328,7 @@ export interface DeleteResourceRequest {
|
|
|
295
328
|
export interface DeleteResourceResponse {
|
|
296
329
|
}
|
|
297
330
|
export interface BulkDeleteResourcesRequest {
|
|
298
|
-
/**
|
|
331
|
+
/** IDs of the resources to delete. */
|
|
299
332
|
ids: string[];
|
|
300
333
|
}
|
|
301
334
|
export interface BulkDeleteResourcesResponse {
|
|
@@ -305,7 +338,11 @@ export interface BulkDeleteResourcesResponse {
|
|
|
305
338
|
bulkActionMetadata?: BulkActionMetadata;
|
|
306
339
|
}
|
|
307
340
|
export interface SearchResourcesRequest {
|
|
308
|
-
/**
|
|
341
|
+
/**
|
|
342
|
+
* Search condition. Refer to the *supported filters article*
|
|
343
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
344
|
+
* for a complete list of supported filters and sorting options.
|
|
345
|
+
*/
|
|
309
346
|
search?: CursorSearch;
|
|
310
347
|
}
|
|
311
348
|
export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
@@ -558,11 +595,11 @@ export declare enum Mode {
|
|
|
558
595
|
AND = "AND"
|
|
559
596
|
}
|
|
560
597
|
export interface SearchResourcesResponse {
|
|
561
|
-
/**
|
|
598
|
+
/** Retrieved resources. */
|
|
562
599
|
resources?: Resource[];
|
|
563
|
-
/** Paging metadata */
|
|
600
|
+
/** Paging metadata. */
|
|
564
601
|
pagingMetadata?: CursorPagingMetadata;
|
|
565
|
-
/** Aggregation results */
|
|
602
|
+
/** Aggregation results. */
|
|
566
603
|
aggregationData?: AggregationData;
|
|
567
604
|
}
|
|
568
605
|
export interface AggregationData {
|
|
@@ -727,7 +764,11 @@ export interface AggregationResultsResultOneOf {
|
|
|
727
764
|
nested?: NestedResults;
|
|
728
765
|
}
|
|
729
766
|
export interface QueryResourcesRequest {
|
|
730
|
-
/**
|
|
767
|
+
/**
|
|
768
|
+
* Query for retrieving resources. Refer to the *supported filters article*
|
|
769
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
770
|
+
* for a complete list of supported filters.
|
|
771
|
+
*/
|
|
731
772
|
query?: CursorQuery;
|
|
732
773
|
}
|
|
733
774
|
export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
@@ -754,40 +795,45 @@ export interface CursorQueryPagingMethodOneOf {
|
|
|
754
795
|
cursorPaging?: CursorPaging;
|
|
755
796
|
}
|
|
756
797
|
export interface QueryResourcesResponse {
|
|
757
|
-
/**
|
|
798
|
+
/** Retrieved resources. */
|
|
758
799
|
resources?: Resource[];
|
|
759
|
-
/** Paging metadata */
|
|
800
|
+
/** Paging metadata. */
|
|
760
801
|
pagingMetadata?: CursorPagingMetadata;
|
|
761
802
|
}
|
|
762
803
|
export interface CountResourcesRequest {
|
|
763
|
-
/**
|
|
804
|
+
/**
|
|
805
|
+
* Filter to base the count on. Refer to the *supported filters article*
|
|
806
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
807
|
+
* for a complete list of supported filters.
|
|
808
|
+
*/
|
|
764
809
|
filter?: Record<string, any> | null;
|
|
765
810
|
/**
|
|
766
|
-
*
|
|
811
|
+
* Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
812
|
+
* @deprecated Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
767
813
|
* @targetRemovalDate 2024-05-01
|
|
768
814
|
*/
|
|
769
815
|
search?: SearchDetails;
|
|
770
816
|
}
|
|
771
817
|
export interface CountResourcesResponse {
|
|
772
|
-
/**
|
|
818
|
+
/** Total number of resources matching the filter. */
|
|
773
819
|
count?: number;
|
|
774
820
|
}
|
|
775
821
|
export interface ImportResourceRequest {
|
|
776
|
-
/** Resource to
|
|
822
|
+
/** Resource to import. */
|
|
777
823
|
resource?: Resource;
|
|
778
824
|
}
|
|
779
825
|
export interface ImportResourceResponse {
|
|
780
|
-
/**
|
|
826
|
+
/** Imported resource. */
|
|
781
827
|
resource?: Resource;
|
|
782
828
|
}
|
|
783
829
|
export interface FixResourceSchedulesRequest {
|
|
784
|
-
/**
|
|
830
|
+
/** ID of the resource to fix schedules for. */
|
|
785
831
|
resourceId?: string;
|
|
786
|
-
/**
|
|
832
|
+
/** Working hour schedule that must be set for this resource. */
|
|
787
833
|
workingHoursSchedule?: Schedule;
|
|
788
834
|
}
|
|
789
835
|
export interface FixResourceSchedulesResponse {
|
|
790
|
-
/**
|
|
836
|
+
/** Updated resource. */
|
|
791
837
|
resource?: Resource;
|
|
792
838
|
}
|
|
793
839
|
export interface ReindexTenantRequest {
|
|
@@ -1057,9 +1103,7 @@ export interface ResourceCreatedEnvelope {
|
|
|
1057
1103
|
metadata: EventMetadata;
|
|
1058
1104
|
}
|
|
1059
1105
|
/**
|
|
1060
|
-
* Triggered
|
|
1061
|
-
*
|
|
1062
|
-
* This event has the same structure as [Resource Created](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/create-resource#resource-created).
|
|
1106
|
+
* Triggered when a resource is created.
|
|
1063
1107
|
* @webhook
|
|
1064
1108
|
* @eventType wix.bookings.resources.v2.resource_created
|
|
1065
1109
|
* @documentationMaturity preview
|
|
@@ -1069,9 +1113,7 @@ export interface ResourceDeletedEnvelope {
|
|
|
1069
1113
|
metadata: EventMetadata;
|
|
1070
1114
|
}
|
|
1071
1115
|
/**
|
|
1072
|
-
* Triggered
|
|
1073
|
-
*
|
|
1074
|
-
* This event has the same structure as [Resource Deleted](https://dev.wix.com/docs/rest/business-solutions/bookings/staff-members-and-resources/resource-v2/bulk-delete-resources#resource-deleted).
|
|
1116
|
+
* Triggered when a resource is deleted.
|
|
1075
1117
|
* @webhook
|
|
1076
1118
|
* @eventType wix.bookings.resources.v2.resource_deleted
|
|
1077
1119
|
* @documentationMaturity preview
|
|
@@ -1091,15 +1133,21 @@ export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelo
|
|
|
1091
1133
|
/**
|
|
1092
1134
|
* Creates a new resource.
|
|
1093
1135
|
*
|
|
1094
|
-
* A new events schedule is automatically created specific to this resource. This schedule will contain information
|
|
1095
|
-
* on when the resource is booked in order to prevent double bookings.
|
|
1096
|
-
* See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
|
|
1097
1136
|
*
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
*
|
|
1102
|
-
*
|
|
1137
|
+
* ## Connected schedules
|
|
1138
|
+
*
|
|
1139
|
+
* A new event *schedule*
|
|
1140
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration))
|
|
1141
|
+
* is automatically created for the resource.
|
|
1142
|
+
*
|
|
1143
|
+
* ## Locations
|
|
1144
|
+
*
|
|
1145
|
+
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
1146
|
+
* `locationOptions.availableInAllLocations` to `true`.
|
|
1147
|
+
*
|
|
1148
|
+
* If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
|
|
1149
|
+
* you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
|
|
1150
|
+
* as `true`. Currently, you can specify only a single business location.
|
|
1103
1151
|
* @param resource - Resource to create.
|
|
1104
1152
|
* @public
|
|
1105
1153
|
* @documentationMaturity preview
|
|
@@ -1111,12 +1159,17 @@ export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelo
|
|
|
1111
1159
|
* @permissionScope Manage Bookings - all permissions
|
|
1112
1160
|
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1113
1161
|
* @applicableIdentity APP
|
|
1114
|
-
* @returns
|
|
1162
|
+
* @returns Created resource.
|
|
1115
1163
|
* @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
|
|
1116
1164
|
*/
|
|
1117
1165
|
export declare function createResource(resource: Resource): Promise<Resource & ResourceNonNullableFields>;
|
|
1118
1166
|
/**
|
|
1119
|
-
* Creates
|
|
1167
|
+
* Creates up to 50 resources.
|
|
1168
|
+
*
|
|
1169
|
+
*
|
|
1170
|
+
* Refer to *Create Resource*
|
|
1171
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/create-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/create-resource))
|
|
1172
|
+
* for more details.
|
|
1120
1173
|
* @param resources - Resources to create.
|
|
1121
1174
|
* @public
|
|
1122
1175
|
* @documentationMaturity preview
|
|
@@ -1132,11 +1185,15 @@ export declare function createResource(resource: Resource): Promise<Resource & R
|
|
|
1132
1185
|
*/
|
|
1133
1186
|
export declare function bulkCreateResources(resources: Resource[], options?: BulkCreateResourcesOptions): Promise<BulkCreateResourcesResponse & BulkCreateResourcesResponseNonNullableFields>;
|
|
1134
1187
|
export interface BulkCreateResourcesOptions {
|
|
1135
|
-
/**
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether to include the created resources in the response.
|
|
1190
|
+
*
|
|
1191
|
+
* Default: `false`
|
|
1192
|
+
*/
|
|
1136
1193
|
returnEntity?: boolean;
|
|
1137
1194
|
}
|
|
1138
1195
|
/**
|
|
1139
|
-
* Retrieves a resource
|
|
1196
|
+
* Retrieves a resource.
|
|
1140
1197
|
* @param resourceId - ID of the resource to retrieve.
|
|
1141
1198
|
* @public
|
|
1142
1199
|
* @documentationMaturity preview
|
|
@@ -1154,13 +1211,14 @@ export interface BulkCreateResourcesOptions {
|
|
|
1154
1211
|
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1155
1212
|
* @applicableIdentity APP
|
|
1156
1213
|
* @applicableIdentity VISITOR
|
|
1157
|
-
* @returns
|
|
1214
|
+
* @returns Retrieved resource.
|
|
1158
1215
|
* @fqn wix.bookings.resources.v2.ResourcesService.GetResource
|
|
1159
1216
|
*/
|
|
1160
1217
|
export declare function getResource(resourceId: string): Promise<Resource & ResourceNonNullableFields>;
|
|
1161
1218
|
/**
|
|
1162
1219
|
* Updates a resource.
|
|
1163
1220
|
*
|
|
1221
|
+
*
|
|
1164
1222
|
* Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
|
|
1165
1223
|
* This ensures you're working with the latest service information and prevents unintended overwrites.
|
|
1166
1224
|
* @param _id - Resource ID.
|
|
@@ -1175,7 +1233,7 @@ export declare function getResource(resourceId: string): Promise<Resource & Reso
|
|
|
1175
1233
|
* @permissionScope Manage Bookings - all permissions
|
|
1176
1234
|
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1177
1235
|
* @applicableIdentity APP
|
|
1178
|
-
* @returns
|
|
1236
|
+
* @returns Updated resource.
|
|
1179
1237
|
* @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
|
|
1180
1238
|
*/
|
|
1181
1239
|
export declare function updateResource(_id: string | null, resource: UpdateResource): Promise<Resource & ResourceNonNullableFields>;
|
|
@@ -1193,35 +1251,42 @@ export interface UpdateResource {
|
|
|
1193
1251
|
*/
|
|
1194
1252
|
revision?: string | null;
|
|
1195
1253
|
/**
|
|
1196
|
-
*
|
|
1254
|
+
* Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was created.
|
|
1197
1255
|
* @readonly
|
|
1198
1256
|
*/
|
|
1199
1257
|
_createdDate?: Date | null;
|
|
1200
1258
|
/**
|
|
1201
|
-
*
|
|
1259
|
+
* Time in `YYYY-MM-DDThh:mm:ss.sssZ` format the resource was last updated.
|
|
1202
1260
|
* @readonly
|
|
1203
1261
|
*/
|
|
1204
1262
|
_updatedDate?: Date | null;
|
|
1205
1263
|
/** Name of the resource. */
|
|
1206
1264
|
name?: string | null;
|
|
1207
1265
|
/**
|
|
1208
|
-
* ID of the
|
|
1266
|
+
* ID of the *resource type*
|
|
1267
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resource-types/introduction) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resource-types-v2/introduction)).
|
|
1209
1268
|
*
|
|
1210
1269
|
* Once a type has been set it can't be modified. You can create a resource
|
|
1211
|
-
* without specifying a type. However,
|
|
1270
|
+
* without specifying a type. However, customers can't book such resources.
|
|
1212
1271
|
*/
|
|
1213
1272
|
typeId?: string | null;
|
|
1214
1273
|
/**
|
|
1215
|
-
*
|
|
1274
|
+
* Information about the *schedule*
|
|
1275
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/schedules/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/introduction))
|
|
1276
|
+
* specifying the working hours and locations of the resource.
|
|
1216
1277
|
*
|
|
1217
|
-
* Resources without
|
|
1218
|
-
*
|
|
1278
|
+
* Resources without a working hour schedule are available 24/7 at the locations
|
|
1279
|
+
* specified in the field `locationOptions`.
|
|
1280
|
+
* When both `workingHoursSchedules` and `locationOptions` are set,
|
|
1281
|
+
* `workingHoursSchedules` takes precedence.
|
|
1219
1282
|
*/
|
|
1220
1283
|
workingHoursSchedules?: WorkingHoursSchedules;
|
|
1221
|
-
/**
|
|
1284
|
+
/** Information about the location where the resource is available. */
|
|
1222
1285
|
locationOptions?: LocationOptions;
|
|
1223
1286
|
/**
|
|
1224
|
-
*
|
|
1287
|
+
* Schedule containing the *events*
|
|
1288
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/events/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/events-v3/introduction))
|
|
1289
|
+
* for which the resource has been booked.
|
|
1225
1290
|
* @readonly
|
|
1226
1291
|
*/
|
|
1227
1292
|
eventsSchedule?: EventsSchedule;
|
|
@@ -1231,7 +1296,11 @@ export interface UpdateResource {
|
|
|
1231
1296
|
/**
|
|
1232
1297
|
* Deletes a resource.
|
|
1233
1298
|
*
|
|
1234
|
-
*
|
|
1299
|
+
*
|
|
1300
|
+
* Deleting a resource cancels its event schedule and all its working hour
|
|
1301
|
+
* schedules that aren't shared with another resource. Learn more about
|
|
1302
|
+
* how Bookings uses the Calendar APIs*
|
|
1303
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/calendar/wix-bookings-integration) | [REST](https://dev.wix.com/docs/rest/business-management/calendar/wix-bookings-integration)).
|
|
1235
1304
|
* @param resourceId - ID of the resource to delete.
|
|
1236
1305
|
* @public
|
|
1237
1306
|
* @documentationMaturity preview
|
|
@@ -1247,7 +1316,12 @@ export interface UpdateResource {
|
|
|
1247
1316
|
export declare function deleteResource(resourceId: string): Promise<void>;
|
|
1248
1317
|
/**
|
|
1249
1318
|
* Deletes multiple resources.
|
|
1250
|
-
*
|
|
1319
|
+
*
|
|
1320
|
+
*
|
|
1321
|
+
* Refer to *Delete Resource*
|
|
1322
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/delete-resource) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/delete-resource))
|
|
1323
|
+
* for more details.
|
|
1324
|
+
* @param ids - IDs of the resources to delete.
|
|
1251
1325
|
* @public
|
|
1252
1326
|
* @documentationMaturity preview
|
|
1253
1327
|
* @requiredField ids
|
|
@@ -1263,8 +1337,10 @@ export declare function bulkDeleteResources(ids: string[]): Promise<BulkDeleteRe
|
|
|
1263
1337
|
/**
|
|
1264
1338
|
* Retrieves a list of resources matching the provided search criteria.
|
|
1265
1339
|
*
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1340
|
+
*
|
|
1341
|
+
* Refer to the *supported filters article*
|
|
1342
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1343
|
+
* for a complete list of supported filters and sorting options.
|
|
1268
1344
|
* @public
|
|
1269
1345
|
* @documentationMaturity preview
|
|
1270
1346
|
* @permissionId BOOKINGS.RESOURCE_READ
|
|
@@ -1284,7 +1360,11 @@ export declare function bulkDeleteResources(ids: string[]): Promise<BulkDeleteRe
|
|
|
1284
1360
|
*/
|
|
1285
1361
|
export declare function searchResources(options?: SearchResourcesOptions): Promise<SearchResourcesResponse & SearchResourcesResponseNonNullableFields>;
|
|
1286
1362
|
export interface SearchResourcesOptions {
|
|
1287
|
-
/**
|
|
1363
|
+
/**
|
|
1364
|
+
* Search condition. Refer to the *supported filters article*
|
|
1365
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1366
|
+
* for a complete list of supported filters and sorting options.
|
|
1367
|
+
*/
|
|
1288
1368
|
search?: CursorSearch;
|
|
1289
1369
|
}
|
|
1290
1370
|
/**
|
|
@@ -1301,7 +1381,7 @@ export interface SearchResourcesOptions {
|
|
|
1301
1381
|
* + `limit` is `50`.
|
|
1302
1382
|
* + Sorted by `id` in ascending order.
|
|
1303
1383
|
*
|
|
1304
|
-
* The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending("typeId")` and then `ascending("
|
|
1384
|
+
* The functions that are chained to `queryResources()` are applied in the order they are called. For example, if you apply `ascending("typeId")` and then `ascending("name")`, the results are sorted first by the `"typeId"`, and then, if there are multiple results with the same `"typeId"`, the items are sorted by `"name"`.
|
|
1305
1385
|
*
|
|
1306
1386
|
* The following `ResourcesQueryBuilder` functions are supported for the `queryResources()` function. For a full description of the resource object, see the object returned for the [items](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/resources-query-result/items) property in `ResourcesQueryResult`.
|
|
1307
1387
|
* @public
|
|
@@ -1402,12 +1482,13 @@ export interface ResourcesQueryBuilder {
|
|
|
1402
1482
|
/**
|
|
1403
1483
|
* Counts resources according to given criteria.
|
|
1404
1484
|
*
|
|
1405
|
-
*
|
|
1485
|
+
*
|
|
1486
|
+
* Refer to the *supported filters article*
|
|
1487
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1488
|
+
* for a complete list of supported filters and sorting options.
|
|
1406
1489
|
* @public
|
|
1407
1490
|
* @documentationMaturity preview
|
|
1408
|
-
* @param options - Filter to base the count on. See
|
|
1409
|
-
* [queryResources()](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/query-resources)
|
|
1410
|
-
* for supported filters.
|
|
1491
|
+
* @param options - Filter to base the count on. See *the supported filters article* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting)) for a complete list of filtering options.
|
|
1411
1492
|
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1412
1493
|
* @permissionScope Read Bookings - Public Data
|
|
1413
1494
|
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
@@ -1425,10 +1506,15 @@ export interface ResourcesQueryBuilder {
|
|
|
1425
1506
|
*/
|
|
1426
1507
|
export declare function countResources(options?: CountResourcesOptions): Promise<CountResourcesResponse & CountResourcesResponseNonNullableFields>;
|
|
1427
1508
|
export interface CountResourcesOptions {
|
|
1428
|
-
/**
|
|
1509
|
+
/**
|
|
1510
|
+
* Filter to base the count on. Refer to the *supported filters article*
|
|
1511
|
+
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/bookings/resources/supported-filters) | [REST](https://dev.wix.com/docs/rest/business-solutions/bookings/resources/resources-v2/filtering-and-sorting))
|
|
1512
|
+
* for a complete list of supported filters.
|
|
1513
|
+
*/
|
|
1429
1514
|
filter?: Record<string, any> | null;
|
|
1430
1515
|
/**
|
|
1431
|
-
*
|
|
1516
|
+
* Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
1517
|
+
* @deprecated Free text to match in searchable fields. Field is deprecated due to decision to use query instead of search for performing the count.
|
|
1432
1518
|
* @targetRemovalDate 2024-05-01
|
|
1433
1519
|
*/
|
|
1434
1520
|
search?: SearchDetails;
|