@wix/auto_sdk_bookings_resources 1.0.20 → 1.0.22
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/{internal/cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{cjs/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/index.d.mts +168 -0
- package/build/index.d.ts +168 -0
- package/build/index.js +883 -0
- package/build/index.js.map +1 -0
- package/build/index.mjs +837 -0
- package/build/index.mjs.map +1 -0
- package/build/internal/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.mts} +328 -409
- package/build/{es/src/bookings-resources-v2-resource-resources.universal.d.ts → internal/bookings-resources-v2-resource-resources.universal-BvcAlBYB.d.ts} +328 -409
- package/build/internal/index.d.mts +168 -0
- package/build/internal/index.d.ts +168 -0
- package/build/internal/index.js +883 -0
- package/build/internal/index.js.map +1 -0
- package/build/internal/index.mjs +837 -0
- package/build/internal/index.mjs.map +1 -0
- package/build/{es/src/bookings-resources-v2-resource-resources.types.d.ts → internal/meta.d.mts} +145 -347
- package/build/internal/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/internal/meta.js +559 -0
- package/build/internal/meta.js.map +1 -0
- package/build/internal/meta.mjs +524 -0
- package/build/internal/meta.mjs.map +1 -0
- package/build/{cjs/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.mts} +145 -347
- package/build/{internal/es/src/bookings-resources-v2-resource-resources.types.d.ts → meta.d.ts} +145 -347
- package/build/meta.js +559 -0
- package/build/meta.js.map +1 -0
- package/build/meta.mjs +524 -0
- package/build/meta.mjs.map +1 -0
- package/package.json +13 -12
- package/build/cjs/index.d.ts +0 -1
- package/build/cjs/index.js +0 -18
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/index.typings.d.ts +0 -27
- package/build/cjs/index.typings.js +0 -18
- package/build/cjs/index.typings.js.map +0 -1
- package/build/cjs/meta.d.ts +0 -1
- package/build/cjs/meta.js +0 -18
- package/build/cjs/meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/es/index.d.ts +0 -1
- package/build/es/index.js +0 -2
- package/build/es/index.js.map +0 -1
- package/build/es/index.typings.d.ts +0 -27
- package/build/es/index.typings.js +0 -2
- package/build/es/index.typings.js.map +0 -1
- package/build/es/meta.d.ts +0 -1
- package/build/es/meta.js +0 -2
- package/build/es/meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/cjs/index.d.ts +0 -1
- package/build/internal/cjs/index.js +0 -18
- package/build/internal/cjs/index.js.map +0 -1
- package/build/internal/cjs/index.typings.d.ts +0 -27
- package/build/internal/cjs/index.typings.js +0 -18
- package/build/internal/cjs/index.typings.js.map +0 -1
- package/build/internal/cjs/meta.d.ts +0 -1
- package/build/internal/cjs/meta.js +0 -18
- package/build/internal/cjs/meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js +0 -43
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js +0 -446
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js +0 -199
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js +0 -106
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js +0 -104
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js +0 -589
- package/build/internal/cjs/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
- package/build/internal/es/index.d.ts +0 -1
- package/build/internal/es/index.js +0 -2
- package/build/internal/es/index.js.map +0 -1
- package/build/internal/es/index.typings.d.ts +0 -27
- package/build/internal/es/index.typings.js +0 -2
- package/build/internal/es/index.typings.js.map +0 -1
- package/build/internal/es/meta.d.ts +0 -1
- package/build/internal/es/meta.js +0 -2
- package/build/internal/es/meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.d.ts +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js +0 -29
- package/build/internal/es/src/bookings-resources-v2-resource-resources.context.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.d.ts +0 -96
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js +0 -434
- package/build/internal/es/src/bookings-resources-v2-resource-resources.http.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.d.ts +0 -27
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js +0 -164
- package/build/internal/es/src/bookings-resources-v2-resource-resources.meta.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.d.ts +0 -143
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js +0 -83
- package/build/internal/es/src/bookings-resources-v2-resource-resources.public.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js +0 -101
- package/build/internal/es/src/bookings-resources-v2-resource-resources.types.js.map +0 -1
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js +0 -554
- package/build/internal/es/src/bookings-resources-v2-resource-resources.universal.js.map +0 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SearchSpec, Search } from '@wix/sdk-types';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
4
|
* A resource represents an entity, such as a room or a staff member, that can be
|
|
4
5
|
* scheduled for use in a *booking*
|
|
@@ -6,7 +7,7 @@ import { NonNullablePaths } from '@wix/sdk-types';
|
|
|
6
7
|
* The availability of a resource is tracked to ensure that it
|
|
7
8
|
* can be allocated at a requested time slot and to prevent double bookings.
|
|
8
9
|
*/
|
|
9
|
-
|
|
10
|
+
interface Resource extends ResourceCompositionDetailsOneOf {
|
|
10
11
|
/**
|
|
11
12
|
* Resource ID.
|
|
12
13
|
* @format GUID
|
|
@@ -70,9 +71,9 @@ export interface Resource extends ResourceCompositionDetailsOneOf {
|
|
|
70
71
|
extendedFields?: ExtendedFields;
|
|
71
72
|
}
|
|
72
73
|
/** @oneof */
|
|
73
|
-
|
|
74
|
+
interface ResourceCompositionDetailsOneOf {
|
|
74
75
|
}
|
|
75
|
-
|
|
76
|
+
interface WorkingHoursSchedule {
|
|
76
77
|
/**
|
|
77
78
|
* ID of the working hour *schedule*
|
|
78
79
|
* ([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)).
|
|
@@ -87,7 +88,7 @@ export interface WorkingHoursSchedule {
|
|
|
87
88
|
*/
|
|
88
89
|
shared?: boolean | null;
|
|
89
90
|
}
|
|
90
|
-
|
|
91
|
+
interface SingleResource {
|
|
91
92
|
/**
|
|
92
93
|
* Schedule details that specify the working hours and locations of this resource.
|
|
93
94
|
*
|
|
@@ -112,7 +113,7 @@ export interface SingleResource {
|
|
|
112
113
|
*/
|
|
113
114
|
eventsSchedule?: Schedule;
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
interface V2WorkingHoursSchedules {
|
|
116
117
|
/**
|
|
117
118
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
118
119
|
* @maxSize 1
|
|
@@ -120,7 +121,7 @@ export interface V2WorkingHoursSchedules {
|
|
|
120
121
|
values?: Schedule[];
|
|
121
122
|
}
|
|
122
123
|
/** Deprecated and subject to removal */
|
|
123
|
-
|
|
124
|
+
interface Schedule {
|
|
124
125
|
/**
|
|
125
126
|
* Schedule ID. See [Schedules API](https://dev.wix.com/docs/rest/business-management/calendar/schedules-v3/schedule-object) for more information.
|
|
126
127
|
* @format GUID
|
|
@@ -134,7 +135,7 @@ export interface Schedule {
|
|
|
134
135
|
*/
|
|
135
136
|
shared?: boolean | null;
|
|
136
137
|
}
|
|
137
|
-
|
|
138
|
+
interface LocationOptions {
|
|
138
139
|
/**
|
|
139
140
|
* Whether the resource is available in all *business locations*
|
|
140
141
|
* ([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)).
|
|
@@ -148,7 +149,7 @@ export interface LocationOptions {
|
|
|
148
149
|
/** Details of resource availability in specific locations. */
|
|
149
150
|
specificLocationOptions?: SpecificLocation;
|
|
150
151
|
}
|
|
151
|
-
|
|
152
|
+
interface SpecificLocation {
|
|
152
153
|
/**
|
|
153
154
|
* Whether the resource is available in *business locations*
|
|
154
155
|
* ([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)).
|
|
@@ -168,7 +169,7 @@ export interface SpecificLocation {
|
|
|
168
169
|
*/
|
|
169
170
|
businessLocations?: BusinessLocation[];
|
|
170
171
|
}
|
|
171
|
-
|
|
172
|
+
interface BusinessLocation {
|
|
172
173
|
/**
|
|
173
174
|
* ID of the business *location*
|
|
174
175
|
* ([SDK](https://dev.wix.com/docs/sdk/backend-modules/business-tools/locations/introduction) | [REST](https://dev.wix.com/docs/rest/business-management/locations/introduction)).
|
|
@@ -176,14 +177,14 @@ export interface BusinessLocation {
|
|
|
176
177
|
*/
|
|
177
178
|
locationId?: string | null;
|
|
178
179
|
}
|
|
179
|
-
|
|
180
|
+
interface WorkingHoursSchedules {
|
|
180
181
|
/**
|
|
181
182
|
* Schedules specifying the working hours of the resource. Currently, only a single schedule is supported.
|
|
182
183
|
* @maxSize 1
|
|
183
184
|
*/
|
|
184
185
|
values?: WorkingHoursSchedule[];
|
|
185
186
|
}
|
|
186
|
-
|
|
187
|
+
interface EventsSchedule {
|
|
187
188
|
/**
|
|
188
189
|
* ID of the event *schedule*
|
|
189
190
|
* ([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)).
|
|
@@ -191,11 +192,11 @@ export interface EventsSchedule {
|
|
|
191
192
|
*/
|
|
192
193
|
scheduleId?: string | null;
|
|
193
194
|
}
|
|
194
|
-
|
|
195
|
+
declare enum ManagementType {
|
|
195
196
|
/** The resource is managed by a Wix user. */
|
|
196
197
|
WIX_USER = "WIX_USER"
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
+
interface ExtendedFields {
|
|
199
200
|
/**
|
|
200
201
|
* Extended field data. Each key corresponds to the namespace of the app that created the extended fields.
|
|
201
202
|
* The value of each key is structured according to the schema defined when the extended fields were configured.
|
|
@@ -206,15 +207,15 @@ export interface ExtendedFields {
|
|
|
206
207
|
*/
|
|
207
208
|
namespaces?: Record<string, Record<string, any>>;
|
|
208
209
|
}
|
|
209
|
-
|
|
210
|
+
interface CreateResourceRequest {
|
|
210
211
|
/** Resource to create. */
|
|
211
212
|
resource: Resource;
|
|
212
213
|
}
|
|
213
|
-
|
|
214
|
+
interface CreateResourceResponse {
|
|
214
215
|
/** Created resource. */
|
|
215
216
|
resource?: Resource;
|
|
216
217
|
}
|
|
217
|
-
|
|
218
|
+
interface BulkCreateResourcesRequest {
|
|
218
219
|
/**
|
|
219
220
|
* Resources to create.
|
|
220
221
|
* @maxSize 50
|
|
@@ -227,19 +228,19 @@ export interface BulkCreateResourcesRequest {
|
|
|
227
228
|
*/
|
|
228
229
|
returnEntity?: boolean;
|
|
229
230
|
}
|
|
230
|
-
|
|
231
|
+
interface BulkCreateResourcesResponse {
|
|
231
232
|
/** The result of each resource creation. */
|
|
232
233
|
results?: BulkResourceResult[];
|
|
233
234
|
/** Create statistics. */
|
|
234
235
|
bulkActionMetadata?: BulkActionMetadata;
|
|
235
236
|
}
|
|
236
|
-
|
|
237
|
+
interface BulkResourceResult {
|
|
237
238
|
/** Item metadata. */
|
|
238
239
|
itemMetadata?: ItemMetadata;
|
|
239
240
|
/** The resulting resource after the bulk operation. */
|
|
240
241
|
item?: Resource;
|
|
241
242
|
}
|
|
242
|
-
|
|
243
|
+
interface ItemMetadata {
|
|
243
244
|
/**
|
|
244
245
|
* Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).
|
|
245
246
|
* @format GUID
|
|
@@ -252,7 +253,7 @@ export interface ItemMetadata {
|
|
|
252
253
|
/** Details about the error in case of failure. */
|
|
253
254
|
error?: ApplicationError;
|
|
254
255
|
}
|
|
255
|
-
|
|
256
|
+
interface ApplicationError {
|
|
256
257
|
/** Error code. */
|
|
257
258
|
code?: string;
|
|
258
259
|
/** Description of the error. */
|
|
@@ -260,7 +261,7 @@ export interface ApplicationError {
|
|
|
260
261
|
/** Data related to the error. */
|
|
261
262
|
data?: Record<string, any> | null;
|
|
262
263
|
}
|
|
263
|
-
|
|
264
|
+
interface BulkActionMetadata {
|
|
264
265
|
/** Number of items that were successfully processed. */
|
|
265
266
|
totalSuccesses?: number;
|
|
266
267
|
/** Number of items that couldn't be processed. */
|
|
@@ -268,29 +269,29 @@ export interface BulkActionMetadata {
|
|
|
268
269
|
/** Number of failures without details because detailed failure threshold was exceeded. */
|
|
269
270
|
undetailedFailures?: number;
|
|
270
271
|
}
|
|
271
|
-
|
|
272
|
+
interface GetResourceRequest {
|
|
272
273
|
/**
|
|
273
274
|
* ID of the resource to retrieve.
|
|
274
275
|
* @format GUID
|
|
275
276
|
*/
|
|
276
277
|
resourceId: string;
|
|
277
278
|
}
|
|
278
|
-
|
|
279
|
+
interface GetResourceResponse {
|
|
279
280
|
/** Retrieved resource. */
|
|
280
281
|
resource?: Resource;
|
|
281
282
|
}
|
|
282
|
-
|
|
283
|
+
interface GetDeletedResourceRequest {
|
|
283
284
|
/**
|
|
284
285
|
* ID of the deleted resource to retrieve from the trash bin.
|
|
285
286
|
* @format GUID
|
|
286
287
|
*/
|
|
287
288
|
resourceId?: string;
|
|
288
289
|
}
|
|
289
|
-
|
|
290
|
+
interface GetDeletedResourceResponse {
|
|
290
291
|
/** Retrieved resource. */
|
|
291
292
|
resource?: Resource;
|
|
292
293
|
}
|
|
293
|
-
|
|
294
|
+
interface ListDeletedResourcesRequest {
|
|
294
295
|
/**
|
|
295
296
|
* IDs of the resources to retrieve.
|
|
296
297
|
* @format GUID
|
|
@@ -300,7 +301,7 @@ export interface ListDeletedResourcesRequest {
|
|
|
300
301
|
/** Paging details, allowing you specify a limit and a cursor. */
|
|
301
302
|
paging?: CursorPaging;
|
|
302
303
|
}
|
|
303
|
-
|
|
304
|
+
interface CursorPaging {
|
|
304
305
|
/**
|
|
305
306
|
* Maximum number of items to return in the results.
|
|
306
307
|
* @max 100
|
|
@@ -315,13 +316,13 @@ export interface CursorPaging {
|
|
|
315
316
|
*/
|
|
316
317
|
cursor?: string | null;
|
|
317
318
|
}
|
|
318
|
-
|
|
319
|
+
interface ListDeletedResourcesResponse {
|
|
319
320
|
/** Retrieved resources. */
|
|
320
321
|
resources?: Resource[];
|
|
321
322
|
/** Paging metadata. */
|
|
322
323
|
pagingMetadata?: CursorPagingMetadata;
|
|
323
324
|
}
|
|
324
|
-
|
|
325
|
+
interface CursorPagingMetadata {
|
|
325
326
|
/** Number of items returned in the response. */
|
|
326
327
|
count?: number | null;
|
|
327
328
|
/** Cursor strings that point to the next page, previous page, or both. */
|
|
@@ -334,7 +335,7 @@ export interface CursorPagingMetadata {
|
|
|
334
335
|
*/
|
|
335
336
|
hasNext?: boolean | null;
|
|
336
337
|
}
|
|
337
|
-
|
|
338
|
+
interface Cursors {
|
|
338
339
|
/**
|
|
339
340
|
* Cursor string pointing to the next page in the list of results.
|
|
340
341
|
* @maxLength 16000
|
|
@@ -346,44 +347,44 @@ export interface Cursors {
|
|
|
346
347
|
*/
|
|
347
348
|
prev?: string | null;
|
|
348
349
|
}
|
|
349
|
-
|
|
350
|
+
interface RemoveResourceFromTrashBinRequest {
|
|
350
351
|
/**
|
|
351
352
|
* ID of the resource to permanently delete from the trash bin.
|
|
352
353
|
* @format GUID
|
|
353
354
|
*/
|
|
354
355
|
resourceId?: string;
|
|
355
356
|
}
|
|
356
|
-
|
|
357
|
+
interface RemoveResourceFromTrashBinResponse {
|
|
357
358
|
}
|
|
358
|
-
|
|
359
|
+
interface RestoreResourceFromTrashBinRequest {
|
|
359
360
|
/**
|
|
360
361
|
* ID of the resource to restore from the trash bin.
|
|
361
362
|
* @format GUID
|
|
362
363
|
*/
|
|
363
364
|
resourceId?: string;
|
|
364
365
|
}
|
|
365
|
-
|
|
366
|
+
interface RestoreResourceFromTrashBinResponse {
|
|
366
367
|
/** Restored resource. */
|
|
367
368
|
resource?: Resource;
|
|
368
369
|
}
|
|
369
|
-
|
|
370
|
+
interface UpdateResourceRequest {
|
|
370
371
|
/** Resource to update. */
|
|
371
372
|
resource: Resource;
|
|
372
373
|
}
|
|
373
|
-
|
|
374
|
+
interface UpdateResourceResponse {
|
|
374
375
|
/** Updated resource. */
|
|
375
376
|
resource?: Resource;
|
|
376
377
|
}
|
|
377
|
-
|
|
378
|
+
interface DeleteResourceRequest {
|
|
378
379
|
/**
|
|
379
380
|
* ID of the resource to delete.
|
|
380
381
|
* @format GUID
|
|
381
382
|
*/
|
|
382
383
|
resourceId: string;
|
|
383
384
|
}
|
|
384
|
-
|
|
385
|
+
interface DeleteResourceResponse {
|
|
385
386
|
}
|
|
386
|
-
|
|
387
|
+
interface BulkDeleteResourcesRequest {
|
|
387
388
|
/**
|
|
388
389
|
* IDs of the resources to delete.
|
|
389
390
|
* @format GUID
|
|
@@ -391,13 +392,13 @@ export interface BulkDeleteResourcesRequest {
|
|
|
391
392
|
*/
|
|
392
393
|
ids: string[];
|
|
393
394
|
}
|
|
394
|
-
|
|
395
|
+
interface BulkDeleteResourcesResponse {
|
|
395
396
|
/** The result of each resource removal. */
|
|
396
397
|
results?: BulkResourceResult[];
|
|
397
398
|
/** Delete statistics. */
|
|
398
399
|
bulkActionMetadata?: BulkActionMetadata;
|
|
399
400
|
}
|
|
400
|
-
|
|
401
|
+
interface SearchResourcesRequest {
|
|
401
402
|
/**
|
|
402
403
|
* Search condition. Refer to the *supported filters article*
|
|
403
404
|
* ([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))
|
|
@@ -405,7 +406,7 @@ export interface SearchResourcesRequest {
|
|
|
405
406
|
*/
|
|
406
407
|
search?: CursorSearch;
|
|
407
408
|
}
|
|
408
|
-
|
|
409
|
+
interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
409
410
|
/**
|
|
410
411
|
* Cursor pointing to page of results.
|
|
411
412
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
@@ -438,27 +439,29 @@ export interface CursorSearch extends CursorSearchPagingMethodOneOf {
|
|
|
438
439
|
timeZone?: string | null;
|
|
439
440
|
}
|
|
440
441
|
/** @oneof */
|
|
441
|
-
|
|
442
|
+
interface CursorSearchPagingMethodOneOf {
|
|
442
443
|
/**
|
|
443
444
|
* Cursor pointing to page of results.
|
|
444
445
|
* When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
445
446
|
*/
|
|
446
447
|
cursorPaging?: CursorPaging;
|
|
447
448
|
}
|
|
448
|
-
|
|
449
|
+
interface Sorting {
|
|
449
450
|
/**
|
|
450
451
|
* Name of the field to sort by.
|
|
451
452
|
* @maxLength 512
|
|
452
453
|
*/
|
|
453
454
|
fieldName?: string;
|
|
454
455
|
/** Sort order. */
|
|
455
|
-
order?:
|
|
456
|
+
order?: SortOrderWithLiterals;
|
|
456
457
|
}
|
|
457
|
-
|
|
458
|
+
declare enum SortOrder {
|
|
458
459
|
ASC = "ASC",
|
|
459
460
|
DESC = "DESC"
|
|
460
461
|
}
|
|
461
|
-
|
|
462
|
+
/** @enumType */
|
|
463
|
+
type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';
|
|
464
|
+
interface Aggregation extends AggregationKindOneOf {
|
|
462
465
|
/** Value aggregation */
|
|
463
466
|
value?: ValueAggregation;
|
|
464
467
|
/** Range aggregation */
|
|
@@ -475,7 +478,7 @@ export interface Aggregation extends AggregationKindOneOf {
|
|
|
475
478
|
*/
|
|
476
479
|
name?: string | null;
|
|
477
480
|
/** Type of aggregation, client must provide matching aggregation field below */
|
|
478
|
-
type?:
|
|
481
|
+
type?: AggregationTypeWithLiterals;
|
|
479
482
|
/**
|
|
480
483
|
* Field to aggregate by, use dot notation to specify json path
|
|
481
484
|
* @maxLength 200
|
|
@@ -490,7 +493,7 @@ export interface Aggregation extends AggregationKindOneOf {
|
|
|
490
493
|
groupBy?: GroupByAggregation;
|
|
491
494
|
}
|
|
492
495
|
/** @oneof */
|
|
493
|
-
|
|
496
|
+
interface AggregationKindOneOf {
|
|
494
497
|
/** Value aggregation */
|
|
495
498
|
value?: ValueAggregation;
|
|
496
499
|
/** Range aggregation */
|
|
@@ -502,38 +505,44 @@ export interface AggregationKindOneOf {
|
|
|
502
505
|
/** Nested aggregation */
|
|
503
506
|
nested?: NestedAggregation;
|
|
504
507
|
}
|
|
505
|
-
|
|
508
|
+
interface RangeBucket {
|
|
506
509
|
/** Inclusive lower bound of the range. Required if to is not given */
|
|
507
510
|
from?: number | null;
|
|
508
511
|
/** Exclusive upper bound of the range. Required if from is not given */
|
|
509
512
|
to?: number | null;
|
|
510
513
|
}
|
|
511
|
-
|
|
514
|
+
declare enum SortType {
|
|
512
515
|
/** Should sort by number of matches */
|
|
513
516
|
COUNT = "COUNT",
|
|
514
517
|
/** Should sort by value of the field alphabetically */
|
|
515
518
|
VALUE = "VALUE"
|
|
516
519
|
}
|
|
517
|
-
|
|
520
|
+
/** @enumType */
|
|
521
|
+
type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';
|
|
522
|
+
declare enum SortDirection {
|
|
518
523
|
/** Should sort in descending order */
|
|
519
524
|
DESC = "DESC",
|
|
520
525
|
/** Should sort in ascending order */
|
|
521
526
|
ASC = "ASC"
|
|
522
527
|
}
|
|
523
|
-
|
|
528
|
+
/** @enumType */
|
|
529
|
+
type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';
|
|
530
|
+
declare enum MissingValues {
|
|
524
531
|
/** Should missing values be excluded from the aggregation results */
|
|
525
532
|
EXCLUDE = "EXCLUDE",
|
|
526
533
|
/** Should missing values be included in the aggregation results */
|
|
527
534
|
INCLUDE = "INCLUDE"
|
|
528
535
|
}
|
|
529
|
-
|
|
536
|
+
/** @enumType */
|
|
537
|
+
type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';
|
|
538
|
+
interface IncludeMissingValuesOptions {
|
|
530
539
|
/**
|
|
531
540
|
* Can specify custom bucket name. Defaults are [string -> "N/A"], [int -> "0"], [bool -> "false"] ...
|
|
532
541
|
* @maxLength 20
|
|
533
542
|
*/
|
|
534
543
|
addToBucket?: string;
|
|
535
544
|
}
|
|
536
|
-
|
|
545
|
+
declare enum ScalarType {
|
|
537
546
|
UNKNOWN_SCALAR_TYPE = "UNKNOWN_SCALAR_TYPE",
|
|
538
547
|
/** Count of distinct values */
|
|
539
548
|
COUNT_DISTINCT = "COUNT_DISTINCT",
|
|
@@ -542,24 +551,26 @@ export declare enum ScalarType {
|
|
|
542
551
|
/** Maximum value */
|
|
543
552
|
MAX = "MAX"
|
|
544
553
|
}
|
|
545
|
-
|
|
554
|
+
/** @enumType */
|
|
555
|
+
type ScalarTypeWithLiterals = ScalarType | 'UNKNOWN_SCALAR_TYPE' | 'COUNT_DISTINCT' | 'MIN' | 'MAX';
|
|
556
|
+
interface ValueAggregation extends ValueAggregationOptionsOneOf {
|
|
546
557
|
/** Options for including missing values */
|
|
547
558
|
includeOptions?: IncludeMissingValuesOptions;
|
|
548
559
|
/** Should sort by number of matches or value of the field */
|
|
549
|
-
sortType?:
|
|
560
|
+
sortType?: SortTypeWithLiterals;
|
|
550
561
|
/** Should sort in ascending or descending order */
|
|
551
|
-
sortDirection?:
|
|
562
|
+
sortDirection?: SortDirectionWithLiterals;
|
|
552
563
|
/** How many aggregations would you like to return? Can be between 1 and 250. 10 is the default. */
|
|
553
564
|
limit?: number | null;
|
|
554
565
|
/** Should missing values be included or excluded from the aggregation results. Default is EXCLUDE */
|
|
555
|
-
missingValues?:
|
|
566
|
+
missingValues?: MissingValuesWithLiterals;
|
|
556
567
|
}
|
|
557
568
|
/** @oneof */
|
|
558
|
-
|
|
569
|
+
interface ValueAggregationOptionsOneOf {
|
|
559
570
|
/** Options for including missing values */
|
|
560
571
|
includeOptions?: IncludeMissingValuesOptions;
|
|
561
572
|
}
|
|
562
|
-
|
|
573
|
+
declare enum NestedAggregationType {
|
|
563
574
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
564
575
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
565
576
|
VALUE = "VALUE",
|
|
@@ -570,22 +581,24 @@ export declare enum NestedAggregationType {
|
|
|
570
581
|
/** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */
|
|
571
582
|
DATE_HISTOGRAM = "DATE_HISTOGRAM"
|
|
572
583
|
}
|
|
573
|
-
|
|
584
|
+
/** @enumType */
|
|
585
|
+
type NestedAggregationTypeWithLiterals = NestedAggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM';
|
|
586
|
+
interface RangeAggregation {
|
|
574
587
|
/**
|
|
575
588
|
* List of range buckets, where during aggregation each entity will be placed in the first bucket where its value falls into based on provided range bounds
|
|
576
589
|
* @maxSize 50
|
|
577
590
|
*/
|
|
578
591
|
buckets?: RangeBucket[];
|
|
579
592
|
}
|
|
580
|
-
|
|
593
|
+
interface ScalarAggregation {
|
|
581
594
|
/** Define the operator for the scalar aggregation */
|
|
582
|
-
type?:
|
|
595
|
+
type?: ScalarTypeWithLiterals;
|
|
583
596
|
}
|
|
584
|
-
|
|
597
|
+
interface DateHistogramAggregation {
|
|
585
598
|
/** Interval for date histogram aggregation */
|
|
586
|
-
interval?:
|
|
599
|
+
interval?: IntervalWithLiterals;
|
|
587
600
|
}
|
|
588
|
-
|
|
601
|
+
declare enum Interval {
|
|
589
602
|
UNKNOWN_INTERVAL = "UNKNOWN_INTERVAL",
|
|
590
603
|
/** Yearly interval */
|
|
591
604
|
YEAR = "YEAR",
|
|
@@ -602,7 +615,9 @@ export declare enum Interval {
|
|
|
602
615
|
/** Second interval */
|
|
603
616
|
SECOND = "SECOND"
|
|
604
617
|
}
|
|
605
|
-
|
|
618
|
+
/** @enumType */
|
|
619
|
+
type IntervalWithLiterals = Interval | 'UNKNOWN_INTERVAL' | 'YEAR' | 'MONTH' | 'WEEK' | 'DAY' | 'HOUR' | 'MINUTE' | 'SECOND';
|
|
620
|
+
interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
606
621
|
/** Value aggregation */
|
|
607
622
|
value?: ValueAggregation;
|
|
608
623
|
/** Range aggregation */
|
|
@@ -617,7 +632,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
617
632
|
*/
|
|
618
633
|
name?: string | null;
|
|
619
634
|
/** Type of aggregation, client must provide matching aggregation field below */
|
|
620
|
-
type?:
|
|
635
|
+
type?: NestedAggregationTypeWithLiterals;
|
|
621
636
|
/**
|
|
622
637
|
* Field to aggregate by, use dont notation to specify json path
|
|
623
638
|
* @maxLength 200
|
|
@@ -625,7 +640,7 @@ export interface NestedAggregationItem extends NestedAggregationItemKindOneOf {
|
|
|
625
640
|
fieldPath?: string;
|
|
626
641
|
}
|
|
627
642
|
/** @oneof */
|
|
628
|
-
|
|
643
|
+
interface NestedAggregationItemKindOneOf {
|
|
629
644
|
/** Value aggregation */
|
|
630
645
|
value?: ValueAggregation;
|
|
631
646
|
/** Range aggregation */
|
|
@@ -635,7 +650,7 @@ export interface NestedAggregationItemKindOneOf {
|
|
|
635
650
|
/** Date histogram aggregation */
|
|
636
651
|
dateHistogram?: DateHistogramAggregation;
|
|
637
652
|
}
|
|
638
|
-
|
|
653
|
+
declare enum AggregationType {
|
|
639
654
|
UNKNOWN_AGGREGATION_TYPE = "UNKNOWN_AGGREGATION_TYPE",
|
|
640
655
|
/** An aggregation where result buckets are dynamically built - one per unique value */
|
|
641
656
|
VALUE = "VALUE",
|
|
@@ -648,8 +663,10 @@ export declare enum AggregationType {
|
|
|
648
663
|
/** Multi-level aggregation, where each next aggregation is nested within previous one */
|
|
649
664
|
NESTED = "NESTED"
|
|
650
665
|
}
|
|
666
|
+
/** @enumType */
|
|
667
|
+
type AggregationTypeWithLiterals = AggregationType | 'UNKNOWN_AGGREGATION_TYPE' | 'VALUE' | 'RANGE' | 'SCALAR' | 'DATE_HISTOGRAM' | 'NESTED';
|
|
651
668
|
/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one */
|
|
652
|
-
|
|
669
|
+
interface NestedAggregation {
|
|
653
670
|
/**
|
|
654
671
|
* Flattened list of aggregations, where each next aggregation is nested within previous one
|
|
655
672
|
* @minSize 2
|
|
@@ -657,7 +674,7 @@ export interface NestedAggregation {
|
|
|
657
674
|
*/
|
|
658
675
|
nestedAggregations?: NestedAggregationItem[];
|
|
659
676
|
}
|
|
660
|
-
|
|
677
|
+
interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
661
678
|
/** Value aggregation configuration */
|
|
662
679
|
value?: ValueAggregation;
|
|
663
680
|
/**
|
|
@@ -672,13 +689,13 @@ export interface GroupByAggregation extends GroupByAggregationKindOneOf {
|
|
|
672
689
|
fieldPath?: string;
|
|
673
690
|
}
|
|
674
691
|
/** @oneof */
|
|
675
|
-
|
|
692
|
+
interface GroupByAggregationKindOneOf {
|
|
676
693
|
/** Value aggregation configuration */
|
|
677
694
|
value?: ValueAggregation;
|
|
678
695
|
}
|
|
679
|
-
|
|
696
|
+
interface SearchDetails {
|
|
680
697
|
/** Defines how separate search terms in `expression` are combined */
|
|
681
|
-
mode?:
|
|
698
|
+
mode?: ModeWithLiterals;
|
|
682
699
|
/**
|
|
683
700
|
* Search term or expression
|
|
684
701
|
* @maxLength 100
|
|
@@ -693,13 +710,15 @@ export interface SearchDetails {
|
|
|
693
710
|
/** Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm) */
|
|
694
711
|
fuzzy?: boolean;
|
|
695
712
|
}
|
|
696
|
-
|
|
713
|
+
declare enum Mode {
|
|
697
714
|
/** Any of the search terms must be present */
|
|
698
715
|
OR = "OR",
|
|
699
716
|
/** All search terms must be present */
|
|
700
717
|
AND = "AND"
|
|
701
718
|
}
|
|
702
|
-
|
|
719
|
+
/** @enumType */
|
|
720
|
+
type ModeWithLiterals = Mode | 'OR' | 'AND';
|
|
721
|
+
interface SearchResourcesResponse {
|
|
703
722
|
/** Retrieved resources. */
|
|
704
723
|
resources?: Resource[];
|
|
705
724
|
/** Paging metadata. */
|
|
@@ -707,14 +726,14 @@ export interface SearchResourcesResponse {
|
|
|
707
726
|
/** Aggregation results. */
|
|
708
727
|
aggregationData?: AggregationData;
|
|
709
728
|
}
|
|
710
|
-
|
|
729
|
+
interface AggregationData {
|
|
711
730
|
/**
|
|
712
731
|
* key = aggregation name (as derived from search request)
|
|
713
732
|
* @maxSize 10000
|
|
714
733
|
*/
|
|
715
734
|
results?: AggregationResults[];
|
|
716
735
|
}
|
|
717
|
-
|
|
736
|
+
interface ValueAggregationResult {
|
|
718
737
|
/**
|
|
719
738
|
* Value of the field
|
|
720
739
|
* @maxLength 100
|
|
@@ -723,7 +742,7 @@ export interface ValueAggregationResult {
|
|
|
723
742
|
/** Count of entities with this value */
|
|
724
743
|
count?: number;
|
|
725
744
|
}
|
|
726
|
-
|
|
745
|
+
interface RangeAggregationResult {
|
|
727
746
|
/** Inclusive lower bound of the range */
|
|
728
747
|
from?: number | null;
|
|
729
748
|
/** Exclusive upper bound of the range */
|
|
@@ -731,7 +750,7 @@ export interface RangeAggregationResult {
|
|
|
731
750
|
/** Count of entities in this range */
|
|
732
751
|
count?: number;
|
|
733
752
|
}
|
|
734
|
-
|
|
753
|
+
interface NestedAggregationResults extends NestedAggregationResultsResultOneOf {
|
|
735
754
|
/** Value aggregation results */
|
|
736
755
|
values?: ValueResults;
|
|
737
756
|
/** Range aggregation results */
|
|
@@ -744,7 +763,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
|
|
|
744
763
|
*/
|
|
745
764
|
name?: string;
|
|
746
765
|
/** Type of aggregation that matches result */
|
|
747
|
-
type?:
|
|
766
|
+
type?: AggregationTypeWithLiterals;
|
|
748
767
|
/**
|
|
749
768
|
* Field to aggregate by, matches the one provided in request
|
|
750
769
|
* @maxLength 200
|
|
@@ -752,7 +771,7 @@ export interface NestedAggregationResults extends NestedAggregationResultsResult
|
|
|
752
771
|
fieldPath?: string;
|
|
753
772
|
}
|
|
754
773
|
/** @oneof */
|
|
755
|
-
|
|
774
|
+
interface NestedAggregationResultsResultOneOf {
|
|
756
775
|
/** Value aggregation results */
|
|
757
776
|
values?: ValueResults;
|
|
758
777
|
/** Range aggregation results */
|
|
@@ -760,27 +779,27 @@ export interface NestedAggregationResultsResultOneOf {
|
|
|
760
779
|
/** Scalar aggregation results */
|
|
761
780
|
scalar?: AggregationResultsScalarResult;
|
|
762
781
|
}
|
|
763
|
-
|
|
782
|
+
interface ValueResults {
|
|
764
783
|
/**
|
|
765
784
|
* List of value aggregations
|
|
766
785
|
* @maxSize 250
|
|
767
786
|
*/
|
|
768
787
|
results?: ValueAggregationResult[];
|
|
769
788
|
}
|
|
770
|
-
|
|
789
|
+
interface RangeResults {
|
|
771
790
|
/**
|
|
772
791
|
* List of ranges returned in same order as requested
|
|
773
792
|
* @maxSize 50
|
|
774
793
|
*/
|
|
775
794
|
results?: RangeAggregationResult[];
|
|
776
795
|
}
|
|
777
|
-
|
|
796
|
+
interface AggregationResultsScalarResult {
|
|
778
797
|
/** Type of scalar aggregation */
|
|
779
|
-
type?:
|
|
798
|
+
type?: ScalarTypeWithLiterals;
|
|
780
799
|
/** Value of the scalar aggregation */
|
|
781
800
|
value?: number;
|
|
782
801
|
}
|
|
783
|
-
|
|
802
|
+
interface NestedValueAggregationResult {
|
|
784
803
|
/**
|
|
785
804
|
* Value of the field
|
|
786
805
|
* @maxLength 1000
|
|
@@ -789,7 +808,7 @@ export interface NestedValueAggregationResult {
|
|
|
789
808
|
/** Nested aggregations */
|
|
790
809
|
nestedResults?: NestedAggregationResults;
|
|
791
810
|
}
|
|
792
|
-
|
|
811
|
+
interface ValueResult {
|
|
793
812
|
/**
|
|
794
813
|
* Value of the field
|
|
795
814
|
* @maxLength 1000
|
|
@@ -798,7 +817,7 @@ export interface ValueResult {
|
|
|
798
817
|
/** Count of entities with this value */
|
|
799
818
|
count?: number | null;
|
|
800
819
|
}
|
|
801
|
-
|
|
820
|
+
interface RangeResult {
|
|
802
821
|
/** Inclusive lower bound of the range */
|
|
803
822
|
from?: number | null;
|
|
804
823
|
/** Exclusive upper bound of the range */
|
|
@@ -806,11 +825,11 @@ export interface RangeResult {
|
|
|
806
825
|
/** Count of entities in this range */
|
|
807
826
|
count?: number | null;
|
|
808
827
|
}
|
|
809
|
-
|
|
828
|
+
interface ScalarResult {
|
|
810
829
|
/** Value of the scalar aggregation */
|
|
811
830
|
value?: number;
|
|
812
831
|
}
|
|
813
|
-
|
|
832
|
+
interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
814
833
|
/** Value aggregation result */
|
|
815
834
|
value?: ValueResult;
|
|
816
835
|
/** Range aggregation result */
|
|
@@ -821,7 +840,7 @@ export interface NestedResultValue extends NestedResultValueResultOneOf {
|
|
|
821
840
|
dateHistogram?: ValueResult;
|
|
822
841
|
}
|
|
823
842
|
/** @oneof */
|
|
824
|
-
|
|
843
|
+
interface NestedResultValueResultOneOf {
|
|
825
844
|
/** Value aggregation result */
|
|
826
845
|
value?: ValueResult;
|
|
827
846
|
/** Range aggregation result */
|
|
@@ -831,11 +850,11 @@ export interface NestedResultValueResultOneOf {
|
|
|
831
850
|
/** Date histogram aggregation result */
|
|
832
851
|
dateHistogram?: ValueResult;
|
|
833
852
|
}
|
|
834
|
-
|
|
853
|
+
interface Results {
|
|
835
854
|
/** List of nested aggregations */
|
|
836
855
|
results?: Record<string, NestedResultValue>;
|
|
837
856
|
}
|
|
838
|
-
|
|
857
|
+
interface DateHistogramResult {
|
|
839
858
|
/**
|
|
840
859
|
* Date in ISO 8601 format
|
|
841
860
|
* @maxLength 100
|
|
@@ -844,14 +863,14 @@ export interface DateHistogramResult {
|
|
|
844
863
|
/** Count of documents in the bucket */
|
|
845
864
|
count?: number;
|
|
846
865
|
}
|
|
847
|
-
|
|
866
|
+
interface GroupByValueResults {
|
|
848
867
|
/**
|
|
849
868
|
* List of value aggregations
|
|
850
869
|
* @maxSize 1000
|
|
851
870
|
*/
|
|
852
871
|
results?: NestedValueAggregationResult[];
|
|
853
872
|
}
|
|
854
|
-
|
|
873
|
+
interface DateHistogramResults {
|
|
855
874
|
/**
|
|
856
875
|
* List of date histogram aggregations
|
|
857
876
|
* @maxSize 200
|
|
@@ -862,14 +881,14 @@ export interface DateHistogramResults {
|
|
|
862
881
|
* Results of `NESTED` aggregation type in a flattened form
|
|
863
882
|
* aggregations in resulting array are keyed by requested aggregation `name`.
|
|
864
883
|
*/
|
|
865
|
-
|
|
884
|
+
interface NestedResults {
|
|
866
885
|
/**
|
|
867
886
|
* List of nested aggregations
|
|
868
887
|
* @maxSize 1000
|
|
869
888
|
*/
|
|
870
889
|
results?: Results[];
|
|
871
890
|
}
|
|
872
|
-
|
|
891
|
+
interface AggregationResults extends AggregationResultsResultOneOf {
|
|
873
892
|
/** Value aggregation results */
|
|
874
893
|
values?: ValueResults;
|
|
875
894
|
/** Range aggregation results */
|
|
@@ -888,7 +907,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
888
907
|
*/
|
|
889
908
|
name?: string;
|
|
890
909
|
/** Type of aggregation that must match provided kind as derived from search request */
|
|
891
|
-
type?:
|
|
910
|
+
type?: AggregationTypeWithLiterals;
|
|
892
911
|
/**
|
|
893
912
|
* Field to aggregate by as derived from search request
|
|
894
913
|
* @maxLength 200
|
|
@@ -896,7 +915,7 @@ export interface AggregationResults extends AggregationResultsResultOneOf {
|
|
|
896
915
|
fieldPath?: string;
|
|
897
916
|
}
|
|
898
917
|
/** @oneof */
|
|
899
|
-
|
|
918
|
+
interface AggregationResultsResultOneOf {
|
|
900
919
|
/** Value aggregation results */
|
|
901
920
|
values?: ValueResults;
|
|
902
921
|
/** Range aggregation results */
|
|
@@ -910,7 +929,7 @@ export interface AggregationResultsResultOneOf {
|
|
|
910
929
|
/** Nested aggregation results */
|
|
911
930
|
nested?: NestedResults;
|
|
912
931
|
}
|
|
913
|
-
|
|
932
|
+
interface QueryResourcesRequest {
|
|
914
933
|
/**
|
|
915
934
|
* Query for retrieving resources. Refer to the *supported filters article*
|
|
916
935
|
* ([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))
|
|
@@ -918,7 +937,7 @@ export interface QueryResourcesRequest {
|
|
|
918
937
|
*/
|
|
919
938
|
query?: CursorQuery;
|
|
920
939
|
}
|
|
921
|
-
|
|
940
|
+
interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
922
941
|
/** 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`. */
|
|
923
942
|
cursorPaging?: CursorPaging;
|
|
924
943
|
/**
|
|
@@ -938,17 +957,17 @@ export interface CursorQuery extends CursorQueryPagingMethodOneOf {
|
|
|
938
957
|
sort?: Sorting[];
|
|
939
958
|
}
|
|
940
959
|
/** @oneof */
|
|
941
|
-
|
|
960
|
+
interface CursorQueryPagingMethodOneOf {
|
|
942
961
|
/** 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`. */
|
|
943
962
|
cursorPaging?: CursorPaging;
|
|
944
963
|
}
|
|
945
|
-
|
|
964
|
+
interface QueryResourcesResponse {
|
|
946
965
|
/** Retrieved resources. */
|
|
947
966
|
resources?: Resource[];
|
|
948
967
|
/** Paging metadata. */
|
|
949
968
|
pagingMetadata?: CursorPagingMetadata;
|
|
950
969
|
}
|
|
951
|
-
|
|
970
|
+
interface CountResourcesRequest {
|
|
952
971
|
/**
|
|
953
972
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
954
973
|
* ([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))
|
|
@@ -962,11 +981,11 @@ export interface CountResourcesRequest {
|
|
|
962
981
|
*/
|
|
963
982
|
search?: SearchDetails;
|
|
964
983
|
}
|
|
965
|
-
|
|
984
|
+
interface CountResourcesResponse {
|
|
966
985
|
/** Total number of resources matching the filter. */
|
|
967
986
|
count?: number;
|
|
968
987
|
}
|
|
969
|
-
|
|
988
|
+
interface FixResourceSchedulesRequest {
|
|
970
989
|
/**
|
|
971
990
|
* ID of the resource to fix schedules for.
|
|
972
991
|
* @format GUID
|
|
@@ -975,15 +994,15 @@ export interface FixResourceSchedulesRequest {
|
|
|
975
994
|
/** Working hour schedule that must be set for this resource. */
|
|
976
995
|
workingHoursSchedule?: Schedule;
|
|
977
996
|
}
|
|
978
|
-
|
|
997
|
+
interface FixResourceSchedulesResponse {
|
|
979
998
|
/** Updated resource. */
|
|
980
999
|
resource?: Resource;
|
|
981
1000
|
}
|
|
982
|
-
|
|
1001
|
+
interface ReindexTenantRequest {
|
|
983
1002
|
}
|
|
984
|
-
|
|
1003
|
+
interface ReindexTenantResponse {
|
|
985
1004
|
}
|
|
986
|
-
|
|
1005
|
+
interface DomainEvent extends DomainEventBodyOneOf {
|
|
987
1006
|
createdEvent?: EntityCreatedEvent;
|
|
988
1007
|
updatedEvent?: EntityUpdatedEvent;
|
|
989
1008
|
deletedEvent?: EntityDeletedEvent;
|
|
@@ -1018,19 +1037,19 @@ export interface DomainEvent extends DomainEventBodyOneOf {
|
|
|
1018
1037
|
entityEventSequence?: string | null;
|
|
1019
1038
|
}
|
|
1020
1039
|
/** @oneof */
|
|
1021
|
-
|
|
1040
|
+
interface DomainEventBodyOneOf {
|
|
1022
1041
|
createdEvent?: EntityCreatedEvent;
|
|
1023
1042
|
updatedEvent?: EntityUpdatedEvent;
|
|
1024
1043
|
deletedEvent?: EntityDeletedEvent;
|
|
1025
1044
|
actionEvent?: ActionEvent;
|
|
1026
1045
|
}
|
|
1027
|
-
|
|
1046
|
+
interface EntityCreatedEvent {
|
|
1028
1047
|
entity?: string;
|
|
1029
1048
|
}
|
|
1030
|
-
|
|
1049
|
+
interface RestoreInfo {
|
|
1031
1050
|
deletedDate?: Date | null;
|
|
1032
1051
|
}
|
|
1033
|
-
|
|
1052
|
+
interface EntityUpdatedEvent {
|
|
1034
1053
|
/**
|
|
1035
1054
|
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
1036
1055
|
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
@@ -1038,16 +1057,16 @@ export interface EntityUpdatedEvent {
|
|
|
1038
1057
|
*/
|
|
1039
1058
|
currentEntity?: string;
|
|
1040
1059
|
}
|
|
1041
|
-
|
|
1060
|
+
interface EntityDeletedEvent {
|
|
1042
1061
|
/** Entity that was deleted. */
|
|
1043
1062
|
deletedEntity?: string | null;
|
|
1044
1063
|
}
|
|
1045
|
-
|
|
1064
|
+
interface ActionEvent {
|
|
1046
1065
|
body?: string;
|
|
1047
1066
|
}
|
|
1048
|
-
|
|
1067
|
+
interface Empty {
|
|
1049
1068
|
}
|
|
1050
|
-
|
|
1069
|
+
interface MessageEnvelope {
|
|
1051
1070
|
/**
|
|
1052
1071
|
* App instance ID.
|
|
1053
1072
|
* @format GUID
|
|
@@ -1063,7 +1082,7 @@ export interface MessageEnvelope {
|
|
|
1063
1082
|
/** Stringify payload. */
|
|
1064
1083
|
data?: string;
|
|
1065
1084
|
}
|
|
1066
|
-
|
|
1085
|
+
interface IdentificationData extends IdentificationDataIdOneOf {
|
|
1067
1086
|
/**
|
|
1068
1087
|
* ID of a site visitor that has not logged in to the site.
|
|
1069
1088
|
* @format GUID
|
|
@@ -1085,10 +1104,10 @@ export interface IdentificationData extends IdentificationDataIdOneOf {
|
|
|
1085
1104
|
*/
|
|
1086
1105
|
appId?: string;
|
|
1087
1106
|
/** @readonly */
|
|
1088
|
-
identityType?:
|
|
1107
|
+
identityType?: WebhookIdentityTypeWithLiterals;
|
|
1089
1108
|
}
|
|
1090
1109
|
/** @oneof */
|
|
1091
|
-
|
|
1110
|
+
interface IdentificationDataIdOneOf {
|
|
1092
1111
|
/**
|
|
1093
1112
|
* ID of a site visitor that has not logged in to the site.
|
|
1094
1113
|
* @format GUID
|
|
@@ -1110,14 +1129,16 @@ export interface IdentificationDataIdOneOf {
|
|
|
1110
1129
|
*/
|
|
1111
1130
|
appId?: string;
|
|
1112
1131
|
}
|
|
1113
|
-
|
|
1132
|
+
declare enum WebhookIdentityType {
|
|
1114
1133
|
UNKNOWN = "UNKNOWN",
|
|
1115
1134
|
ANONYMOUS_VISITOR = "ANONYMOUS_VISITOR",
|
|
1116
1135
|
MEMBER = "MEMBER",
|
|
1117
1136
|
WIX_USER = "WIX_USER",
|
|
1118
1137
|
APP = "APP"
|
|
1119
1138
|
}
|
|
1120
|
-
|
|
1139
|
+
/** @enumType */
|
|
1140
|
+
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
1141
|
+
interface BaseEventMetadata {
|
|
1121
1142
|
/**
|
|
1122
1143
|
* App instance ID.
|
|
1123
1144
|
* @format GUID
|
|
@@ -1131,7 +1152,7 @@ export interface BaseEventMetadata {
|
|
|
1131
1152
|
/** The identification type and identity data. */
|
|
1132
1153
|
identity?: IdentificationData;
|
|
1133
1154
|
}
|
|
1134
|
-
|
|
1155
|
+
interface EventMetadata extends BaseEventMetadata {
|
|
1135
1156
|
/** Event ID. With this ID you can easily spot duplicated events and ignore them. */
|
|
1136
1157
|
_id?: string;
|
|
1137
1158
|
/**
|
|
@@ -1161,102 +1182,18 @@ export interface EventMetadata extends BaseEventMetadata {
|
|
|
1161
1182
|
*/
|
|
1162
1183
|
entityEventSequence?: string | null;
|
|
1163
1184
|
}
|
|
1164
|
-
|
|
1185
|
+
interface ResourceCreatedEnvelope {
|
|
1165
1186
|
entity: Resource;
|
|
1166
1187
|
metadata: EventMetadata;
|
|
1167
1188
|
}
|
|
1168
|
-
|
|
1169
|
-
* Triggered when a resource is created.
|
|
1170
|
-
* @webhook
|
|
1171
|
-
* @eventType wix.bookings.resources.v2.resource_created
|
|
1172
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1173
|
-
* @slug created
|
|
1174
|
-
* @documentationMaturity preview
|
|
1175
|
-
*/
|
|
1176
|
-
export declare function onResourceCreated(handler: (event: ResourceCreatedEnvelope) => void | Promise<void>): void;
|
|
1177
|
-
export interface ResourceDeletedEnvelope {
|
|
1189
|
+
interface ResourceDeletedEnvelope {
|
|
1178
1190
|
metadata: EventMetadata;
|
|
1179
1191
|
}
|
|
1180
|
-
|
|
1181
|
-
* Triggered when a resource is deleted.
|
|
1182
|
-
* @webhook
|
|
1183
|
-
* @eventType wix.bookings.resources.v2.resource_deleted
|
|
1184
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1185
|
-
* @slug deleted
|
|
1186
|
-
* @documentationMaturity preview
|
|
1187
|
-
*/
|
|
1188
|
-
export declare function onResourceDeleted(handler: (event: ResourceDeletedEnvelope) => void | Promise<void>): void;
|
|
1189
|
-
export interface ResourceUpdatedEnvelope {
|
|
1192
|
+
interface ResourceUpdatedEnvelope {
|
|
1190
1193
|
entity: Resource;
|
|
1191
1194
|
metadata: EventMetadata;
|
|
1192
1195
|
}
|
|
1193
|
-
|
|
1194
|
-
* Triggered when a resource is updated.
|
|
1195
|
-
* @webhook
|
|
1196
|
-
* @eventType wix.bookings.resources.v2.resource_updated
|
|
1197
|
-
* @serviceIdentifier wix.bookings.resources.v2.ResourcesService
|
|
1198
|
-
* @slug updated
|
|
1199
|
-
* @documentationMaturity preview
|
|
1200
|
-
*/
|
|
1201
|
-
export declare function onResourceUpdated(handler: (event: ResourceUpdatedEnvelope) => void | Promise<void>): void;
|
|
1202
|
-
type ResourceNonNullablePaths = `workingHoursSchedules.values` | `locationOptions.specificLocationOptions.businessLocations`;
|
|
1203
|
-
/**
|
|
1204
|
-
* Creates a new resource.
|
|
1205
|
-
*
|
|
1206
|
-
*
|
|
1207
|
-
* ## Connected schedules
|
|
1208
|
-
*
|
|
1209
|
-
* A new event *schedule*
|
|
1210
|
-
* ([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))
|
|
1211
|
-
* is automatically created for the resource.
|
|
1212
|
-
*
|
|
1213
|
-
* ## Locations
|
|
1214
|
-
*
|
|
1215
|
-
* If you don't specify `locationOptions`, Wix Bookings automatically sets
|
|
1216
|
-
* `locationOptions.availableInAllLocations` to `true`.
|
|
1217
|
-
*
|
|
1218
|
-
* If you specify 1 business location ID in `locationOptions.specificLocationOptions.businessLocations`,
|
|
1219
|
-
* you must specify `locationOptions.specificLocationOptions.availableInBusinessLocations`
|
|
1220
|
-
* as `true`. Currently, you can specify only a single business location.
|
|
1221
|
-
* @param resource - Resource to create.
|
|
1222
|
-
* @public
|
|
1223
|
-
* @documentationMaturity preview
|
|
1224
|
-
* @requiredField resource
|
|
1225
|
-
* @requiredField resource.name
|
|
1226
|
-
* @permissionId BOOKINGS.RESOURCE_CREATE
|
|
1227
|
-
* @permissionScope Manage Bookings
|
|
1228
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1229
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1230
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1231
|
-
* @applicableIdentity APP
|
|
1232
|
-
* @returns Created resource.
|
|
1233
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.CreateResource
|
|
1234
|
-
*/
|
|
1235
|
-
export declare function createResource(resource: NonNullablePaths<Resource, `name`>): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1236
|
-
/**
|
|
1237
|
-
* Creates up to 50 resources.
|
|
1238
|
-
*
|
|
1239
|
-
*
|
|
1240
|
-
* Refer to *Create Resource*
|
|
1241
|
-
* ([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))
|
|
1242
|
-
* for more details.
|
|
1243
|
-
* @param resources - Resources to create.
|
|
1244
|
-
* @public
|
|
1245
|
-
* @documentationMaturity preview
|
|
1246
|
-
* @requiredField resources
|
|
1247
|
-
* @requiredField resources.name
|
|
1248
|
-
* @permissionId BOOKINGS.RESOURCE_CREATE
|
|
1249
|
-
* @permissionScope Manage Bookings
|
|
1250
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1251
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1252
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1253
|
-
* @applicableIdentity APP
|
|
1254
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.BulkCreateResources
|
|
1255
|
-
*/
|
|
1256
|
-
export declare function bulkCreateResources(resources: NonNullablePaths<Resource, `name`>[], options?: BulkCreateResourcesOptions): Promise<NonNullablePaths<BulkCreateResourcesResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | {
|
|
1257
|
-
[P in ResourceNonNullablePaths]: `results.${number}.item.${P}`;
|
|
1258
|
-
}[ResourceNonNullablePaths] | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`>>;
|
|
1259
|
-
export interface BulkCreateResourcesOptions {
|
|
1196
|
+
interface BulkCreateResourcesOptions {
|
|
1260
1197
|
/**
|
|
1261
1198
|
* Whether to include the created resources in the response.
|
|
1262
1199
|
*
|
|
@@ -1264,52 +1201,7 @@ export interface BulkCreateResourcesOptions {
|
|
|
1264
1201
|
*/
|
|
1265
1202
|
returnEntity?: boolean;
|
|
1266
1203
|
}
|
|
1267
|
-
|
|
1268
|
-
* Retrieves a resource.
|
|
1269
|
-
* @param resourceId - ID of the resource to retrieve.
|
|
1270
|
-
* @public
|
|
1271
|
-
* @documentationMaturity preview
|
|
1272
|
-
* @requiredField resourceId
|
|
1273
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1274
|
-
* @permissionScope Read Bookings - Public Data
|
|
1275
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1276
|
-
* @permissionScope Manage Bookings
|
|
1277
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1278
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1279
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1280
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1281
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1282
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1283
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1284
|
-
* @applicableIdentity APP
|
|
1285
|
-
* @applicableIdentity VISITOR
|
|
1286
|
-
* @returns Retrieved resource.
|
|
1287
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.GetResource
|
|
1288
|
-
*/
|
|
1289
|
-
export declare function getResource(resourceId: string): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1290
|
-
/**
|
|
1291
|
-
* Updates a resource.
|
|
1292
|
-
*
|
|
1293
|
-
*
|
|
1294
|
-
* Each time the resource is updated, `revision` increments by 1. You must include the current revision of the resource when updating it.
|
|
1295
|
-
* This ensures you're working with the latest service information and prevents unintended overwrites.
|
|
1296
|
-
* @param _id - Resource ID.
|
|
1297
|
-
* @public
|
|
1298
|
-
* @documentationMaturity preview
|
|
1299
|
-
* @requiredField _id
|
|
1300
|
-
* @requiredField resource
|
|
1301
|
-
* @requiredField resource.revision
|
|
1302
|
-
* @permissionId BOOKINGS.RESOURCE_UPDATE
|
|
1303
|
-
* @permissionScope Manage Bookings
|
|
1304
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1305
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1306
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1307
|
-
* @applicableIdentity APP
|
|
1308
|
-
* @returns Updated resource.
|
|
1309
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.UpdateResource
|
|
1310
|
-
*/
|
|
1311
|
-
export declare function updateResource(_id: string, resource: NonNullablePaths<UpdateResource, `revision`>): Promise<NonNullablePaths<Resource, ResourceNonNullablePaths>>;
|
|
1312
|
-
export interface UpdateResource {
|
|
1204
|
+
interface UpdateResource {
|
|
1313
1205
|
/**
|
|
1314
1206
|
* Resource ID.
|
|
1315
1207
|
* @format GUID
|
|
@@ -1372,119 +1264,171 @@ export interface UpdateResource {
|
|
|
1372
1264
|
/** Extensions enabling users to save custom data related to the resource. */
|
|
1373
1265
|
extendedFields?: ExtendedFields;
|
|
1374
1266
|
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
*
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1267
|
+
interface ResourceSearchSpec extends SearchSpec {
|
|
1268
|
+
aggregatable: [
|
|
1269
|
+
'_createdDate',
|
|
1270
|
+
'_id',
|
|
1271
|
+
'_updatedDate',
|
|
1272
|
+
'appId',
|
|
1273
|
+
'managementType',
|
|
1274
|
+
'singleResource.locationOptions.availableInAllLocations',
|
|
1275
|
+
'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',
|
|
1276
|
+
'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',
|
|
1277
|
+
'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',
|
|
1278
|
+
'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId',
|
|
1279
|
+
'type'
|
|
1280
|
+
];
|
|
1281
|
+
paging: 'cursor';
|
|
1282
|
+
wql: [
|
|
1283
|
+
{
|
|
1284
|
+
operators: ['$hasAll', '$hasSome'];
|
|
1285
|
+
fields: [
|
|
1286
|
+
'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId'
|
|
1287
|
+
];
|
|
1288
|
+
sort: 'BOTH';
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
operators: '*';
|
|
1292
|
+
fields: [
|
|
1293
|
+
'_createdDate',
|
|
1294
|
+
'_id',
|
|
1295
|
+
'_updatedDate',
|
|
1296
|
+
'appId',
|
|
1297
|
+
'managementType',
|
|
1298
|
+
'name',
|
|
1299
|
+
'singleResource.locationOptions.availableInAllLocations',
|
|
1300
|
+
'singleResource.locationOptions.specificLocationOptions.availableInBusinessLocations',
|
|
1301
|
+
'singleResource.locationOptions.specificLocationOptions.availableInCustomLocations',
|
|
1302
|
+
'singleResource.locationOptions.specificLocationOptions.availableInCustomerLocations',
|
|
1303
|
+
'type'
|
|
1304
|
+
];
|
|
1305
|
+
sort: 'BOTH';
|
|
1306
|
+
}
|
|
1307
|
+
];
|
|
1308
|
+
}
|
|
1309
|
+
type CommonSearchWithEntityContext = Search<Resource, ResourceSearchSpec>;
|
|
1310
|
+
type ResourceSearch = {
|
|
1311
|
+
/**
|
|
1312
|
+
Cursor pointing to page of results.
|
|
1313
|
+
When requesting 'cursor_paging.cursor', no `filter`, `sort` or `search` can be provided.
|
|
1314
|
+
*/
|
|
1315
|
+
cursorPaging?: {
|
|
1316
|
+
/**
|
|
1317
|
+
Maximum number of items to return in the results.
|
|
1318
|
+
@max: 100
|
|
1319
|
+
*/
|
|
1320
|
+
limit?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['limit'] | null;
|
|
1321
|
+
/**
|
|
1322
|
+
Pointer to the next or previous page in the list of results.
|
|
1323
|
+
|
|
1324
|
+
Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.
|
|
1325
|
+
Not relevant for the first request.
|
|
1326
|
+
@maxLength: 16000
|
|
1327
|
+
*/
|
|
1328
|
+
cursor?: NonNullable<CommonSearchWithEntityContext['cursorPaging']>['cursor'] | null;
|
|
1329
|
+
};
|
|
1330
|
+
/**
|
|
1331
|
+
A filter object. See documentation [here](https://bo.wix.com/wix-docs/rnd/platformization-guidelines/api-query-language#platformization-guidelines_api-query-language_defining-in-protobuf)
|
|
1332
|
+
*/
|
|
1333
|
+
filter?: CommonSearchWithEntityContext['filter'] | null;
|
|
1334
|
+
/**
|
|
1335
|
+
Sort object in the form [{"fieldName":"sortField1"},{"fieldName":"sortField2","direction":"DESC"}]
|
|
1336
|
+
@maxSize: 10
|
|
1337
|
+
*/
|
|
1338
|
+
sort?: {
|
|
1339
|
+
/**
|
|
1340
|
+
Name of the field to sort by.
|
|
1341
|
+
@maxLength: 512
|
|
1342
|
+
*/
|
|
1343
|
+
fieldName?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['fieldName'];
|
|
1344
|
+
/**
|
|
1345
|
+
Sort order.
|
|
1346
|
+
*/
|
|
1347
|
+
order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];
|
|
1348
|
+
}[];
|
|
1349
|
+
/**
|
|
1350
|
+
Aggregations | Faceted search: refers to a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.
|
|
1351
|
+
@maxSize: 10
|
|
1352
|
+
*/
|
|
1353
|
+
aggregations?: {
|
|
1354
|
+
/**
|
|
1355
|
+
Value aggregation
|
|
1356
|
+
*/
|
|
1357
|
+
value?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['value'];
|
|
1358
|
+
/**
|
|
1359
|
+
Range aggregation
|
|
1360
|
+
*/
|
|
1361
|
+
range?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['range'];
|
|
1362
|
+
/**
|
|
1363
|
+
Scalar aggregation
|
|
1364
|
+
*/
|
|
1365
|
+
scalar?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['scalar'];
|
|
1366
|
+
/**
|
|
1367
|
+
Date histogram aggregation
|
|
1368
|
+
*/
|
|
1369
|
+
dateHistogram?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['dateHistogram'];
|
|
1370
|
+
/**
|
|
1371
|
+
Nested aggregation
|
|
1372
|
+
*/
|
|
1373
|
+
nested?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['nested'];
|
|
1374
|
+
/**
|
|
1375
|
+
User-defined name of aggregation, should be unique, will appear in aggregation results
|
|
1376
|
+
@maxLength: 100
|
|
1377
|
+
*/
|
|
1378
|
+
name?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['name'] | null;
|
|
1379
|
+
/**
|
|
1380
|
+
Type of aggregation, client must provide matching aggregation field below
|
|
1381
|
+
*/
|
|
1382
|
+
type?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['type'];
|
|
1383
|
+
/**
|
|
1384
|
+
Field to aggregate by, use dot notation to specify json path
|
|
1385
|
+
@maxLength: 200
|
|
1386
|
+
*/
|
|
1387
|
+
fieldPath?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['fieldPath'];
|
|
1388
|
+
/**
|
|
1389
|
+
deprecated, use `nested` instead
|
|
1390
|
+
@deprecated: deprecated, use `nested` instead,
|
|
1391
|
+
@replacedBy: kind.nested,
|
|
1392
|
+
@targetRemovalDate: 2024-03-30
|
|
1393
|
+
*/
|
|
1394
|
+
groupBy?: NonNullable<CommonSearchWithEntityContext['aggregations']>[number]['groupBy'];
|
|
1395
|
+
}[];
|
|
1396
|
+
/**
|
|
1397
|
+
Free text to match in searchable fields
|
|
1398
|
+
*/
|
|
1399
|
+
search?: {
|
|
1400
|
+
/**
|
|
1401
|
+
Defines how separate search terms in `expression` are combined
|
|
1402
|
+
*/
|
|
1403
|
+
mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];
|
|
1404
|
+
/**
|
|
1405
|
+
Search term or expression
|
|
1406
|
+
@maxLength: 100
|
|
1407
|
+
*/
|
|
1408
|
+
expression?: NonNullable<CommonSearchWithEntityContext['search']>['expression'] | null;
|
|
1409
|
+
/**
|
|
1410
|
+
Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path
|
|
1411
|
+
@maxLength: 200,
|
|
1412
|
+
@maxSize: 20
|
|
1413
|
+
*/
|
|
1414
|
+
fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];
|
|
1415
|
+
/**
|
|
1416
|
+
Flag if should use auto fuzzy search (allowing typos by a managed proximity algorithm)
|
|
1417
|
+
*/
|
|
1418
|
+
fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];
|
|
1419
|
+
};
|
|
1420
|
+
/**
|
|
1421
|
+
UTC offset or IANA time zone. Valid values are
|
|
1422
|
+
ISO 8601 UTC offsets, such as +02:00 or -06:00,
|
|
1423
|
+
and IANA time zone IDs, such as Europe/Rome
|
|
1424
|
+
|
|
1425
|
+
Affects all filters and aggregations returned values.
|
|
1426
|
+
You may override this behavior in a specific filter by providing
|
|
1427
|
+
timestamps including time zone. e.g. `"2023-12-20T10:52:34.795Z"`
|
|
1428
|
+
@maxLength: 50
|
|
1429
|
+
*/
|
|
1430
|
+
timeZone?: CommonSearchWithEntityContext['timeZone'] | null;
|
|
1431
|
+
};
|
|
1488
1432
|
interface QueryCursorResult {
|
|
1489
1433
|
cursors: Cursors;
|
|
1490
1434
|
hasNext: () => boolean;
|
|
@@ -1492,13 +1436,13 @@ interface QueryCursorResult {
|
|
|
1492
1436
|
length: number;
|
|
1493
1437
|
pageSize: number;
|
|
1494
1438
|
}
|
|
1495
|
-
|
|
1439
|
+
interface ResourcesQueryResult extends QueryCursorResult {
|
|
1496
1440
|
items: Resource[];
|
|
1497
1441
|
query: ResourcesQueryBuilder;
|
|
1498
1442
|
next: () => Promise<ResourcesQueryResult>;
|
|
1499
1443
|
prev: () => Promise<ResourcesQueryResult>;
|
|
1500
1444
|
}
|
|
1501
|
-
|
|
1445
|
+
interface ResourcesQueryBuilder {
|
|
1502
1446
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1503
1447
|
* @param value - Value to compare against.
|
|
1504
1448
|
* @documentationMaturity preview
|
|
@@ -1513,22 +1457,22 @@ export interface ResourcesQueryBuilder {
|
|
|
1513
1457
|
* @param value - Value to compare against.
|
|
1514
1458
|
* @documentationMaturity preview
|
|
1515
1459
|
*/
|
|
1516
|
-
ge: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
|
|
1460
|
+
ge: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
|
|
1517
1461
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1518
1462
|
* @param value - Value to compare against.
|
|
1519
1463
|
* @documentationMaturity preview
|
|
1520
1464
|
*/
|
|
1521
|
-
gt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
|
|
1465
|
+
gt: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
|
|
1522
1466
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1523
1467
|
* @param value - Value to compare against.
|
|
1524
1468
|
* @documentationMaturity preview
|
|
1525
1469
|
*/
|
|
1526
|
-
le: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
|
|
1470
|
+
le: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
|
|
1527
1471
|
/** @param propertyName - Property whose value is compared with `value`.
|
|
1528
1472
|
* @param value - Value to compare against.
|
|
1529
1473
|
* @documentationMaturity preview
|
|
1530
1474
|
*/
|
|
1531
|
-
lt: (propertyName: '_createdDate' | '_updatedDate', value: any) => ResourcesQueryBuilder;
|
|
1475
|
+
lt: (propertyName: 'singleResource.locationOptions.specificLocationOptions.businessLocations.locationId' | '_id' | '_createdDate' | '_updatedDate' | 'name' | 'typeId' | 'eventsSchedule.scheduleId', value: any) => ResourcesQueryBuilder;
|
|
1532
1476
|
/** @param propertyName - Property whose value is compared with `string`.
|
|
1533
1477
|
* @param string - String to compare against. Case-insensitive.
|
|
1534
1478
|
* @documentationMaturity preview
|
|
@@ -1562,33 +1506,7 @@ export interface ResourcesQueryBuilder {
|
|
|
1562
1506
|
/** @documentationMaturity preview */
|
|
1563
1507
|
find: () => Promise<ResourcesQueryResult>;
|
|
1564
1508
|
}
|
|
1565
|
-
|
|
1566
|
-
* Counts resources according to given criteria.
|
|
1567
|
-
*
|
|
1568
|
-
*
|
|
1569
|
-
* Refer to the *supported filters article*
|
|
1570
|
-
* ([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))
|
|
1571
|
-
* for a complete list of supported filters and sorting options.
|
|
1572
|
-
* @public
|
|
1573
|
-
* @documentationMaturity preview
|
|
1574
|
-
* @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.
|
|
1575
|
-
* @permissionId BOOKINGS.RESOURCE_READ
|
|
1576
|
-
* @permissionScope Read Bookings - Public Data
|
|
1577
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-PUBLIC
|
|
1578
|
-
* @permissionScope Manage Bookings
|
|
1579
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.MANAGE-BOOKINGS
|
|
1580
|
-
* @permissionScope Read Bookings - Including Participants
|
|
1581
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS.READ-BOOKINGS-SENSITIVE
|
|
1582
|
-
* @permissionScope Read Bookings - all read permissions
|
|
1583
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.READ-BOOKINGS
|
|
1584
|
-
* @permissionScope Manage Bookings - all permissions
|
|
1585
|
-
* @permissionScopeId SCOPE.DC-BOOKINGS-MEGA.MANAGE-BOOKINGS
|
|
1586
|
-
* @applicableIdentity APP
|
|
1587
|
-
* @applicableIdentity VISITOR
|
|
1588
|
-
* @fqn wix.bookings.resources.v2.ResourcesService.CountResources
|
|
1589
|
-
*/
|
|
1590
|
-
export declare function countResources(options?: CountResourcesOptions): Promise<NonNullablePaths<CountResourcesResponse, `count`>>;
|
|
1591
|
-
export interface CountResourcesOptions {
|
|
1509
|
+
interface CountResourcesOptions {
|
|
1592
1510
|
/**
|
|
1593
1511
|
* Filter to base the count on. Refer to the *supported filters article*
|
|
1594
1512
|
* ([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))
|
|
@@ -1602,4 +1520,5 @@ export interface CountResourcesOptions {
|
|
|
1602
1520
|
*/
|
|
1603
1521
|
search?: SearchDetails;
|
|
1604
1522
|
}
|
|
1605
|
-
|
|
1523
|
+
|
|
1524
|
+
export { type RestoreResourceFromTrashBinRequest as $, AggregationType as A, type BulkCreateResourcesOptions as B, type CountResourcesOptions as C, type ItemMetadata as D, type EventsSchedule as E, type ApplicationError as F, type BulkActionMetadata as G, type GetResourceRequest as H, Interval as I, type GetResourceResponse as J, type GetDeletedResourceRequest as K, type LocationOptions as L, ManagementType as M, NestedAggregationType as N, type GetDeletedResourceResponse as O, type ListDeletedResourcesRequest as P, type CursorPaging as Q, type Resource as R, type SearchResourcesResponse as S, type ListDeletedResourcesResponse as T, type UpdateResource as U, type V2WorkingHoursSchedules as V, WebhookIdentityType as W, type CursorPagingMetadata as X, type Cursors as Y, type RemoveResourceFromTrashBinRequest as Z, type RemoveResourceFromTrashBinResponse as _, type BulkCreateResourcesResponse as a, type MessageEnvelope as a$, type RestoreResourceFromTrashBinResponse as a0, type UpdateResourceRequest as a1, type UpdateResourceResponse as a2, type DeleteResourceRequest as a3, type DeleteResourceResponse as a4, type BulkDeleteResourcesRequest as a5, type SearchResourcesRequest as a6, type CursorSearch as a7, type CursorSearchPagingMethodOneOf as a8, type Sorting as a9, type ScalarResult as aA, type NestedResultValue as aB, type NestedResultValueResultOneOf as aC, type Results as aD, type DateHistogramResult as aE, type GroupByValueResults as aF, type DateHistogramResults as aG, type NestedResults as aH, type AggregationResults as aI, type AggregationResultsResultOneOf as aJ, type QueryResourcesRequest as aK, type CursorQuery as aL, type CursorQueryPagingMethodOneOf as aM, type QueryResourcesResponse as aN, type CountResourcesRequest as aO, type FixResourceSchedulesRequest as aP, type FixResourceSchedulesResponse as aQ, type ReindexTenantRequest as aR, type ReindexTenantResponse as aS, type DomainEvent as aT, type DomainEventBodyOneOf as aU, type EntityCreatedEvent as aV, type RestoreInfo as aW, type EntityUpdatedEvent as aX, type EntityDeletedEvent as aY, type ActionEvent as aZ, type Empty as a_, type Aggregation as aa, type AggregationKindOneOf as ab, type RangeBucket as ac, type IncludeMissingValuesOptions as ad, type ValueAggregation as ae, type ValueAggregationOptionsOneOf as af, type RangeAggregation as ag, type ScalarAggregation as ah, type DateHistogramAggregation as ai, type NestedAggregationItem as aj, type NestedAggregationItemKindOneOf as ak, type NestedAggregation as al, type GroupByAggregation as am, type GroupByAggregationKindOneOf as an, type SearchDetails as ao, type AggregationData as ap, type ValueAggregationResult as aq, type RangeAggregationResult as ar, type NestedAggregationResults as as, type NestedAggregationResultsResultOneOf as at, type ValueResults as au, type RangeResults as av, type AggregationResultsScalarResult as aw, type NestedValueAggregationResult as ax, type ValueResult as ay, type RangeResult as az, type BulkDeleteResourcesResponse as b, type IdentificationData as b0, type IdentificationDataIdOneOf as b1, type BaseEventMetadata as b2, type EventMetadata as b3, type ResourceSearchSpec as b4, type ResourcesQueryResult as b5, type ResourceSearch as c, type ResourcesQueryBuilder as d, type CountResourcesResponse as e, type ResourceCreatedEnvelope as f, type ResourceDeletedEnvelope as g, type ResourceUpdatedEnvelope as h, SortOrder as i, SortType as j, SortDirection as k, MissingValues as l, ScalarType as m, Mode as n, type ResourceCompositionDetailsOneOf as o, type WorkingHoursSchedule as p, type SingleResource as q, type Schedule as r, type SpecificLocation as s, type BusinessLocation as t, type WorkingHoursSchedules as u, type ExtendedFields as v, type CreateResourceRequest as w, type CreateResourceResponse as x, type BulkCreateResourcesRequest as y, type BulkResourceResult as z };
|